Id like to make a copy of our production database to use for testing purposes. What is generally the best and easiest way to do this? It is currently running 9.5 64bit on win2k08r2 (dedicated server, not virtualized)
I can image the system, prep it and give it a new hostname/IP etc on new hardware but Id have no idea how to make the changes to the database, rename it etc.
Thanks for any help.
I am not sure what others have done but our solution was to grab the nightly backup job from CPS and to move a copy of that file to anew server and restore it to an instance of SQl server on the other side.
Basically you shouldn't have to worry about renaming the database if you are restoring it on a new server / instance of SQL server. we have emr2011\CentricityPs and emr93\CentricityPS databases and they do not conflict with each other at all.
Thanks for the reply.
This is 9.5 Oracle EMR, not SQL (and not PS) I have a vague (very vague) memory of something to do with having to change TNSNAME etc.
Sacramento_Heart said:
Thanks for the reply.
This is 9.5 Oracle EMR, not SQL (and not PS) I have a vague (very vague) memory of something to do with having to change TNSNAME etc.
That's it, I'm out! I have no experience with Oracle at all but I imagine it can't be too much different. Good luck getting it set up!
Yes, copy the section in TNSNAMES.ORA for the production database (probably EMR), paste it, give it a new name like CentricityTest, and change the server name to the test server.
Have the same exact server setup.
For a one-off project, it's easy with a cold backup (or copy/paste); all you need to copy over are DATA (with REDO) and the ADMIN folder's four control Files (assuming the same SID name has been pre-built on the test box).
With a hot backup, you may need to recover first. I've been trying to stick with the Oracle Enterprise Manager version of RMAN to re-direct to the second server since I don't really want to be an RMAN code expert. Haven't rebuilt that all the way yet, but we just had EMC Networker's Oracle guru in to visit last week for some tips. EMC uses Robert Freeman's Oracle backup book as the bible.
Folks from Michigan State gave a good presentation at CHUG a few years back which included their nightly RMAN scripts if you're interested in that code.
Jim Eppright
Crozer-Keystone Health System
From GE:
(for Oracle DB's)
Topic: Migration of an Oracle database between Servers with compatible Operating Systems. Or, more specifically, moving the database from a Win2k Server to another Win2k Server, or Windows 2003 to Windows 2003.
Product: All
Environment: Win2k, Win2k3, Oracle 9i & Oracle 10g
Severity: Low
Information: When a customer is migrating a database from one Server platform to another and the two are NOT compatible ie Novell or Unix to Win2k or Win2k3 or vice versa (or the customer feels the database requires defragmenting) see k-base http://kbase/LE/data/2340.html . If the Operating Systems are compatible, the procedure is much simpler:
NOTE: Do not put both Servers on the same network until you have completed steps 1-6.
1) 1) Before putting the destination Server on the network, be sure that the Server has the same IP Address and Name as the source Server.
2) 2) On the destination Server, install a fresh copy of the Logician DB version being migrated. Ensure the same Database Name and SID are used.
3) 3) Ensure that the destination database is functional and that a Logician client can access it.
4) 4) Ensure that the directory structure contained under the <drive>:Orant or <drive>:Oracle folder are the same on both Servers.
5) 5) On both Servers ensure that the Logician database is shut down.
6) 6) Change the Name, and IP address of the Source server (using the same subnet).
7) 7) Establish network connectivity between the two Servers. Preferably isolated from the production network, but either way should work.
8) 8) On the Destination Server browse to the “<drive>:orant folder and rename the “data” folder to “data_old”.
9) 9) Now browse to the source server, “<drive>:orant folder, highlight and copy the “data” folder.
10) 10) Paste the “data” folder into the destination Server’s “<drive>:orant” folder. Be patient, this could take some time depending on the size of the database.
11) 11) Next, also on the destination Server in the “<drive>:orant folder, rename the “admin” folder to “admin_old”.
12) 12) Now browse to the source server, “<drive>:orant folder, highlight and copy the “Admin” folder.
13) 13) Paste the “admin” folder into the destination Server’s “<drive>:orant” folder.
14) 14) If you aren’t already connected, you can connect the destination Server to the production network at this time.
15) 15) Startup the database on the destination Server and verify that Logician clients can connect and that all data is now available.
16) 16) You can now delete the “<drive>:orantdata_old” and “<drive>:orantadmin_old” folders.
17) 17) Normally, at this juncture I would say shutdown Oracle and make a good cold backup, but in this case one already exists on the source Server. It’s up to you whether that’s sufficient or not.
Hope that helps.
Does anyone have a procedure such as this that can drop certain tables? WE would like to create a test database with all the controls etc from production but no patient data so we can start fresh with non-live data.
you can drop table yourself.
but you are compromising the integrity of the database.
you might want to clear the tables not drop them.
Still a database with no data is no useful for testing. Only a database which was copy from original server and is used in a closed test environment will give you the kind of problem that a real live database would give you. Still as it isnt in use by the physician at the moment of test. the result will be very different from what you will find in the real world scenario
If you don't want live data, I would install EMR fresh and then export all the clinical kits out of Production and import them back into your test server. You really couldn't drop tables because that would break content and probably the EMR, especially if you are using CCC. You could truncate (empty) tables but that would be a LOT of tables. I think it would be easier to do the fresh install and them export/import all the clinical kits.
We have a report server and do a nightly RMAN duplicate process. Copy the nightly RMAN backup to the report server and do the RMAN duplicate there. Be sure to do your backup with multiple channels and into multiple pieces, then you get to use multiple channels to to the duplicate. It all goes so much faster as I found out waaaay after we started the process. There is also a process where you do the duplicate by connecting to production and not using backup files but the first time I tried it, it took even longer than using a file copy and local duplicate. I have to do some more testing.