Changing database repositories in Oracle VM 3
By Wcoekaer-Oracle on Feb 04, 2012
The manager instance stores its data as objects inside the database. To do that, there is something called a datasource defined in weblogic during installation. It's basically a jdbc connection from weblogic to the database. This DS requires the following information : database hostname, database instance name, database listener port number, schema username and schema password. In my default install this was localhost, XE, 1521, ovs, mypassword.
Now that I re-organized my machines a bit, I have a larger server that runs a normal database 126.96.36.199, which I also happen to use for EM12c. So I figured I would take some load off the little atom server, keep it running Oracle VM Manager but shut down XE and move the schema over to my dedicated database host. This is a straightforward process so I just wanted to list the steps.
1) shut down Oracle VM Manager so that it does not continue updating the repository. as root : /etc/init.d/ovmm stop 2) export the schema user using the exp command for Oracle XE as oracle : cd /u01/app/oracle/product/11.2.0/xe export ORACLE_HOME=`pwd` export ORACLE_SID=XE export PATH=$ORACLE_HOME/bin:$PATH exp (enter user ovs and its password) export user (option 2) export everything including data this will create (by default) a file called expdat.dmp copy this file over to the other server with the other database The schema name is also in /u01/app/oracle/ovm-manager-3/.config (OVSSCHEMA) 3) shutdown oracle-xe as it's no longer needed as root : /etc/init.d/oracle-xe stop 4) import the ovs user into the new database. I like to do it as the user. I just simply pre-create the schema before starting import as oracle : sqlplus '/ as sysdba' create user ovs identified by MyPassword; grant connect,resource to ovs; at this point, run the imp utility on the box to import the expdat.dmp import asks for username/password, enter ovs and its password import yes on all data and tables and content. At this point you have a good complete repository. Now let's make the Oracle VM Manager weblogic instance point to the new database. 5) on the original system, restart weblogic as root :/etc/init.d/ovmm start wait a few minutes for the instance to come online 6) use the ovm_admin tool as oracle : cd /u01/app/oracle/ovm-manager-3/bin ./ovm_admin --modifyds orcl wopr8 1521 ovs mypassword My new host name for the 188.8.131.52 database is called wopr, the database instance is orcl and listener is still 1521 with schema ovs The admin tool asks for a password, this is the weblogic user password. In a simple install, this would be the same as your admin or ovs account password. 7) restart to have everything take effect. as root : /etc/init.d/ovmm stop ; sleep 5 ;/etc/init.d/ovmm start ; 8) edit the config file and update the new data vi /u01/app/oracle/ovm-manager-3/.config modify : DBHOST=
SID= LSNR= OVSSCHEMA= and leave the rest as is. that should do it !