Page 1 of 1

LDS Tech VM (Oracle VM) setup

Posted: Wed May 28, 2014 2:49 pm
by bubbayo
Hello,

I have downloaded and installed the LDSTech Oracle XE VM 1.4 appliance on Oracle VM VirtualBox version 4.3.6 which is on a Windows 7 host machine. Setup went just as described in the instructions at https://tech.lds.org/wiki/Oracle_VM . I've configured the Network settings as described in Option #1 for Port Forwarding, and when that didn't seem to work I tried Option #2 where I setup a Host-only adapter.

What is happening when using Network configuration Option #1 is while on the host I attempt to connect to http://localhost:9999/apex through a browser ( tired IE, Firefox, and Chrome ) I get This Page Cannot Be Displayed. When using Network configuration Option #2 and I attempt to connect to http://192.168.56.101/apex I also get the error This Page Cannot Be Displayed. When using Network option #2 I'm able to ping IP 192.168.56.101.

Any suggestions? Thanks

Re: LDS Tech VM (Oracle VM) setup

Posted: Wed May 28, 2014 3:11 pm
by bubbayo
Or, as another option, if I downloaded Oracle XE 11g and installed it on my Windows 7 host machine, does anyone have the scripts needed to setup the configuration to follow along with the Introduction to DB Migrator https://tech.lds.org/wiki/Introduction_to_DB_Migrator ? I'm only looking to understand using DB Migrator for stand-alone projects at this time. Thanks

Re: LDS Tech VM (Oracle VM) setup

Posted: Wed May 28, 2014 4:39 pm
by CampbellBD
Hi bubbayo,
One thing to check is your firewall; it might be blocking traffic.
It looks like the repository that contained the creation script got overlooked in our move from subversion to git but it basically creates a user named oracle with a password of oracle, grants that user DBA privs (but you might just give it less), sets a default tablespace and gives it some tablespace quota in the same.
Let me know how the firewall check and user creation goes and in the mean time I'll look around for the actual script.
Also, look at FlywayDB, we are evaluating it now as a possible future replacement to DB Migrator.
thanks,
Bruce

Re: LDS Tech VM (Oracle VM) setup

Posted: Thu May 29, 2014 9:57 am
by bubbayo
Hey Bruce,

Thanks for the reply. I double checked that the Windows Firewall and additional firewalls were disabled and tried the Option 1 and 2 configurations again, but I'm still getting Page Could Not Be Found. I tried downgrading my Virtual Box to version 4.1.0 which was mentioned to be known functional, but still same problem.
I'll go ahead and download the latest version of Oracle XE 11g and set it up as you've indicated. Please let me know if you find that old creation script.
I'll definitely look into FlywayDB down the road. Thanks!

Re: LDS Tech VM (Oracle VM) setup

Posted: Fri May 30, 2014 2:41 pm
by CampbellBD
Hi Again bubbayo,
Good news, we didn't lose the repo. Do you have access to the LDS network (i.e. are you a church employee/contractor)? If so I will send you the git link. Otherwise, here is the relevant logic...
thanks,
Bruce

sqlplus sys/oracle as sysdba
EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);

CREATE USER oracle IDENTIFIED BY oracle DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;
GRANT CONNECT TO oracle;
GRANT RESOURCE TO oracle;
GRANT CREATE VIEW TO oracle;
GRANT CREATE ANY CONTEXT TO oracle;
GRANT DROP ANY CONTEXT TO oracle;
grant execute on dbms_aqadm to oracle;
grant execute on dbms_aq to oracle;
grant execute on dbms_aqin to oracle;
grant execute on dbms_aqjms to oracle;

CREATE USER oracle_pti IDENTIFIED BY oracle_pti DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;
ALTER USER oracle_pti DEFAULT ROLE ALL;
GRANT CONNECT TO oracle_pti;
GRANT CREATE VIEW TO oracle_pti;
GRANT CREATE SYNONYM TO oracle_pti;
GRANT CREATE SESSION TO oracle_pti;
GRANT ALTER SESSION TO oracle_pti;
GRANT CREATE TRIGGER TO oracle_pti;
grant execute on sys.dbms_aq to oracle_pti;
grant execute on sys.dbms_aqin to oracle_pti;
grant execute on sys.dbms_aqjms to oracle_pti;
CREATE OR REPLACE TRIGGER oracle_pti.u_after_logon_trg
AFTER LOGON ON oracle_pti.SCHEMA
DECLARE
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = ORACLE';
END u_after_logon_trg
;
/
--------------------------------------------------------------------------------
--This trigger switches the name-resolution context of the logged-in schema to
--the one specified by CURRENT_SCHEMA. This enables the applications connecting
--to the databse as a passthru schema to avoid hard-coding the object-owning
--account in their code. It also allows the DBA to avoid having to manage
--private synonyms for every object in the object-owning account.
--

-- Create a ptc account for backwords compatibility
CREATE USER oracle_ptc IDENTIFIED BY oracle_ptc DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;
ALTER USER oracle_ptc DEFAULT ROLE ALL;
GRANT CONNECT TO oracle_ptc;
GRANT CREATE VIEW TO oracle_ptc;
GRANT CREATE SYNONYM TO oracle_ptc;
GRANT CREATE SESSION TO oracle_ptc;
GRANT ALTER SESSION TO oracle_ptc;
GRANT CREATE TRIGGER TO oracle_ptc;
grant execute on sys.dbms_aq to oracle_ptc;
grant execute on sys.dbms_aqin to oracle_ptc;
grant execute on sys.dbms_aqjms to oracle_ptc;
CREATE OR REPLACE TRIGGER oracle_pti.u_after_logon_trg
AFTER LOGON ON oracle_pti.SCHEMA
DECLARE
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = ORACLE';
END u_after_logon_trg
;
/

Re: LDS Tech VM (Oracle VM) setup

Posted: Fri May 30, 2014 4:45 pm
by bubbayo
Bruce, you rock man!

I'm not a church employee or contractor so I'll use the above script. I've got a Windows 2003 R2 server I'll be setting Oracle 11g XE and Maven up on to run through the tutorial. Much appreciated!