Archive

Archive for March, 2015

Try Oracle 12c VM with Delphix download

March 25th, 2015


9104210308_a63b5ae5c4_z
 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 

Download both of these and start them up in Virtualbox and you can start virtualizing your PDBs.
The Oracle pre-installed VM has a few eccentricities that have to be addressed before using it. There is no IP address and there is no history of the install and it’s missing a glibc library. After we address these in the instructions below you can link to the PDB and then provision that PDB back as a virtual PDB (vPDB) or provision that PDB to another 12c instance on another machine as a vPDB.

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:

After importing and starting, change network to “Bridge Adaptor” and restarted services
get the ip address with “ifconfig -a” and vi  /etc/hosts to add hostname “oraclevm” with the  ip address. Also increase /dev/shm or otherwise will get “MEMORY_TARGET not supported on this system”
su –
service network restart
# note the IP of the machine
ifconfig -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 anway
umount tmpfs
mount -t tmpfs shmfs -o size=1500m /dev/shm

mkdir /mnt/provision
chmod 755 /mnt
chmod 755 /mnt/provision

yum install glibc.i686

yum might get error

Existing lock /var/run/yum.pid: another copy is running as PID ….

Waited a few minutes and was able to run. Oracle VM must run some yum stuff just after starting up. After one try, the running yum process never seemed to exit, so rebooted VM and upon reboot was able to run yum

 

 

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

Set up  Delphix c##delphix container user and delphix PDB user

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

Use the machine name in listener.ora and tnsnames.ora instead of IP from 0.0.0.0
LISTENER =  (DESCRIPTION_LIST =
(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

Then in Delphix UI, go to

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

 

2401421989_e05053cbf7_z

photo by Yannis (CC 2.0)

Uncategorized

Remote graphical installs

March 5th, 2015

Most of my servers tend to be Linux VMs on VMware ESX without any graphics desktops setup, so it can be disconcerting trying to install Oralce with it’s graphical “runInstaller” being the gate way we have to cross to achieve installation.  Of course there is the silent install, but to do that requires knowing all the secret handshake responses to make the silent installer work. Often the easiest way to get a response file is to capture the responses form a graphical run of the runInstaller.

There is another way, and that is using vncserver to run the graphic desktop on another machine. For example I can display the the graphical desktop on my Mac.

Here is the setup:

On the Linux box:

 cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-ol6.repo
yum install oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
yum install oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
yum install elfutils-libelf-devel
yum install glibc.i686
yum install tigervnc-server
yum install xterm
yum install twm
yum install xsetroot

# without the following get errors
# [dix] Could not init font path element /usr/share/X11/fonts/misc, removing from list!
# [dix] Could not init font path element /usr/share/X11/fonts/100dpi, removing from list!
# [dix] Could not init font path element /usr/share/X11/fonts/Type1, removing from list!
# [dix] Could not init font path element /usr/share/fonts/default/Type1, removing from list!
# [dix] Could not init font path element built-ins, removing from list!
(EE)
# Fatal server error:
(EE) could not open default font ‘fixed'(EE)

yum install libXfont

then run

vncserver

on my Mac, I install and run

VNC Viewer.app

 

And all this makes me wonder why there can’t be a web based installer …

 

Uncategorized