photo by Jose Maria Cuellar (CC 2.0)
Thanks to Leighton Nelson who pointed out that :
Oracle has a pre-installed Linux VM with 12c
Delphix as well has a pre-installed trial version
Here is a video of linking a PDB to Delphix and provisioning a vPDB
before doing the above with the Oracle pre-installed VM, follow these steps:
su –service network restart# note the IP of the machineifconfig -a# add hostname “oraclevm” and current IP to hosts
vi /etc/hosts
hostname oraclevm
echo oraclevm > /proc/sys/kernel/hostname#umount tmpfs might give errors, but seems to do the trick anwayumount tmpfs
mount -t tmpfs shmfs -o size=1500m /dev/shm
mkdir /mnt/provision
chmod 755 /mnt
chmod 755 /mnt/provision
yum install glibc.i686
Existing lock /var/run/yum.pid: another copy is running as PID ….
Back as Oracle unset TWO_TASK as it blocks “/ as sysdba” connections and get rid of the .bash output as it messes up scp and Delphix trying to put the toolkit onto the box
unset TWO_TASK
cp .bashrc .bashrc.orig
cat .bashrc.orig | grep -v cat > .bashrc
sqlplus / as sysdba << EOF
create user c##delphix identified by delphix;
grant create session to c##delphix;
alter user c##delphix set container_data=all container=current;
grant select any dictionary to c##delphix;
create or replace view v_x\$kccfe as select * from x\$kccfe;
grant select on v_x\$kccfe to c##delphix;
create synonym c##delphix.x\$kccfe for v_x\$kccfe;
alter session set container=orcl;
create user delphix identified by delphix;
grant create session to delphix;
grant select any dictionary to delphix;
create or replace view v_x\$kccfe as select * from x\$kccfe;
grant select on v_x\$kccfe to delphix;
create synonym delphix.x\$kccfe for v_x\$kccfe;
EOF
make a toolkit directory
mkdir ~/toolkit
Add the inventory directory and the inventory file with version info that Delphix uses
mkdir $ORACLE_HOME/inventory
mkdir $ORACLE_HOME/inventory/ContentsXML
cat << EOF > $ORACLE_HOME/inventory/ContentsXML/comps.xml
<?xml version=”1.0″ standalone=”yes” ?>
<PRD_LIST>
<TL_LIST>
<COMP NAME=”oracle.server” VER=”12.1.0.2.0″ BUILD_NUMBER=”0″ REP_VER=”0.0.0.0.0″ RELEASE=”Production”INV_LOC=”Components/oracle.server/12.1.0.2.0/1/” LANGS=”en” XML_INV_LOC=”Components21/oracle.server/12.1.0.2.0/”ACT_INST_VER=”12.1.0.2.0″ DEINST_VER=”11.2.0.0.0″ INSTALL_TIME=”2014.
Sep.19 15:31:29 EDT” INST_LOC=”/home/oracle/base/oracle12102/oracle.server”>
</COMP>
</TL_LIST>
</PRD_LIST>
EOF
Put database in archive log mode
sqlplus / as sysdba << EOF
shutdown immediate;
startup mount;
alter database archivelog;
alter database open;
alter system switch logfile;
alter system switch logfile;
EOF
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oraclevm )(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
vi $ORACLE_HOME/network/admin/listener.ora
lsnrctl stop
lsnrctl start
sqlplus / as sysdba << EOF
alter system register;
EOF
Manage -> Environments
click “+” sign
add host
after host is added click on the database tab (far right disk icon)
on database tab for environment, click on “discover”
for login/password give c##delphix / delphix (the CDB login we created)
this will discover the PDBs
now click on Delphix or Manage-> Databases -> My databases
click “+” sign
select the orcl PDB on cdb1
for login/password give delphix / delphix (the PDB login we created)
After creating the vPDB it shows up for the listener
lsnrct stat
…
Service “vorc_fd7” has 1 instance(s).
Instance “cdb1″, status READY, has 1 handler(s) for this service…
I add an entry to $ORACLE_HOME/network/admin/tnsnames.ora
DELPHIX =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oraclevm)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = vorc_fd7)
)
)
and then connect with SQL*Plus
sqlplus delphix/delphix@DELPHIX
photo by Yannis (CC 2.0)