Migration of RDB

Find and share HowTos to various installations / configurations!
10 posts • Page 1 of 1
aorange
Posts:147
Joined: Thu Nov 04, 2010 10:07 am

Migration of RDB

Post by aorange »

Hi Guys,

I am in the process of migrating our Oracle DB to a new server due to growth and I am reading into the best way of achieving this with the lowest possible downtime. Am I correct in thinking that there is no Oracle redundancy provided by WinCC-OA and that if I want to setup a redundant cluster, I should use something like Oracle Dataguard?

I suppose the easiest way to move the database would be to shut it down and use RMAN or Oracle Export/Import to move all the tables etc. but this is going to create downtime that I would like to avoid. On the other hand, if I take snapshot of the live database and leave my source system running whilst I prepare the target system, then I will have “gaps” in the archives on the new system

Any thoughts or suggestions are much appreciated.

vogler
Posts:122
Joined: Thu Oct 28, 2010 8:32 am

Re: Migration of RDB

Post by vogler »

Hi!

Maybe an idea:
* setup the new database server software
* try to export/import (or with rman) the database, so you can do it a second time as fast as possible and without troubles

* hint: you can also use datapump export/import (expdp/impdp), it is much faster than exp/imp, and i think you can transfer data directly from one database to another via database link... or use rman, will also be faster than exp/imp

* another hint: are you using "oracle standard edition" or "enterprise edition with transportable tablespaces (for OA archive exporting)"? if you use standard-edition, then rman will be a good(!) idea => because then you will have a "copy" of the database (recovered database) and you will be able to re-import exported OA archives (tablespaces) - if you create a new database then i think it will not be possible to import old/exported archives (tablespaces).......(if you don't use transportable tablespaces).

afterwards:
* check that buffering to disk is enabled (rdb-manager) and with a high limit of files or with no limit (i don't have all possibilities in my mind)
* check that rdb-manager tries to reconnect endlessly to database

* lock rdb-manager user account (alter user xxx account lock)
* kill rdb-manager-user sessions in oracle
* now rdb-manager cannot reconnect (account is locked), and will start buffering (to disk)

* transfer database

* change tnsnames.ora on rdb-manager host, so it points to the new database.
* now rdb-manager should be able to connect (to the new database) and can flush the buffer files to the new database...

"maybe" it will be a good idea to test this procedure on a test-system first.

no guaranty, it is just an idea ;-)

take care,
Andy

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: Migration of RDB

Post by Gertjan van Schijndel »

Instead of locking the rdb-manager user you could also stop writing to the database by setting '_RDBArchive.stopWriteToDB' to TRUE.

aorange
Posts:147
Joined: Thu Nov 04, 2010 10:07 am

Re: Migration of RDB

Post by aorange »

Thanks for the help guys, I seem to have managed to move the database now and connect to it from PVSS... the only problem I have left is that I keep seeing an error message in the log showing:

"Error when inserting the EVENT history with bulk!, ORA-25153: Temporary Tablespace is Empty"

and i can also see a "write error" in my RDB archive manager.

Something else is puzzling me though... there is nowhere to enter a host IP address in PVSS for the Oracle database, I can only specify the instance name in the config file. Does this mean that I have to have an active listener on the server (lets call it server 1) running the RDB manager in order to connect to the server where the Oracle database lives (server 2)? :unsure:

aorange
Posts:147
Joined: Thu Nov 04, 2010 10:07 am

Re: Migration of RDB

Post by aorange »

hmmm... I resolved the "Error when inserting the EVENT history with bulk!, ORA-25153: Temporary Tablespace is Empty" by issuing the following command

Code: Select all

ALTER TABLESPACE temp ADD tempfile '/fullpath.dbf' SIZE 50M;
and essentially recreating the temporary table space, I couldn't see anything wrong with the previous one but at least that error is gone.

I still don't understand how the RDB manager connects to the remote database though...

vogler
Posts:122
Joined: Thu Oct 28, 2010 8:32 am

Re: Migration of RDB

Post by vogler »

great!!

i wonder about the temp-tablespace..... how did you move the database? rman? exp/imp?

you will find the host-ip/name in the file tnsnames.ora - normally you will find the file here: $ORACLE_HOME/network/admin... winccoa "connects" to oracle tns-name, this is resolved by tnsnames to an ip/service/sid pointing to the oracle-server...

aorange
Posts:147
Joined: Thu Nov 04, 2010 10:07 am

Re: Migration of RDB

Post by aorange »

hmm this is not going too well.. I moved the database by cloning it and re-creating the control files on the new server. It seems the process has worked but I am having some problems with the installation and also PVSS does not seem to be able to switch archive files.

This is causing a lot of "Source time outside valid limits (resource: validTimeDiff)" error messages

aorange
Posts:147
Joined: Thu Nov 04, 2010 10:07 am

Re: Migration of RDB

Post by aorange »

I think I am onto something.. I receive the following error when I attempt to modify the archive groups from PVSS.

PVSS00ui (2), 2012.03.26 11:01:28.914, CTRL, INFO, 0, , Error when executing the query! , ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission (java.io.FilePermission C:\\PVSSRDB\\PVSSRDB read) has not been granted to PVSSRDB. The PL/SQL to grant this is dbms_java.grant_permission( 'PVSSRDB', 'SYS:java.io.FilePermission', 'C:\\PVSSRDB\\PVSSRDB', 'read' )

I believe this is related to the permissions set in dbms_java

I know that the procedure to change the permissions on this file is:
  • call dbms_java.grant_permission('username', 'java.net.SocketPermission', 'hostname', 'resolve');
  • commit;
But what should the username be when WinCC-OA is running as System on another machine?

vogler
Posts:122
Joined: Thu Oct 28, 2010 8:32 am

Re: Migration of RDB

Post by vogler »

I think something is wrong with your database clone, i don't know exactly how you created the clone, but maybe you will trap into more problems... my opinion is that you should re-create your clone, maybe in another way...

The username is the user inside the oracle database (not os user), you find the name in then config file in the rdb-section.

vogler
Posts:122
Joined: Thu Oct 28, 2010 8:32 am

Re: Migration of RDB

Post by vogler »

by the way, if it is not a problem to shut down the database (no other applications than OA which must be available), then i think you can just copy the database (all db-files, logfiles, controlfiles, spfile, ...), if the destination system has the same architecture (os, 32/64bit, ...) and if you can setup the same directory structure... no need for rman, exp/imp and so on....

10 posts • Page 1 of 1