Re: How to duplicate whole database from one machine to another machine in Windows 2000?

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 27 Dec 2002 10:49:33 -0800
Message-ID: <92eeeff0.0212271049.63e1e989_at_posting.google.com>


laxmanuchlani_at_yahoo.com (Laxman Uchlani) wrote in message news:<99249aa6.0212261944.33a6793_at_posting.google.com>...
> If you are using a version of Oracle that is less than 8i, you could
> follow the following steps..

This has got nothing to do with which version you are on.

>
> 1. Shut down the database services,
> 2. Copy the "dbs" and "database" folders within oracle installation
> directory,
> 3. Re-start the services.

Copying the entire folders is completely unnecessary. Only files that need to be copied are backed up create controlfile script, init.ora file and all datafiles.

>
> Remember the machine to be copied to should also have its services
> shut down

What services?

>
> Ideally, you have to copy only selected files from "dbs" and
> "database", but I am not an expert at that and can just say that
> copying all the files in the 2 folders - "dbs" and "database" used to
> work for me.
>
>
> If the database is very big ( approx > 200MB) you will have to export
> it though.

BTW...In Oracle a very big (Or VLDB Very Large DataBase) is > 100GB. 200MB database in Oracle is a very small database.

Assuming Oracle version/patchset is same on both machines and since Windoze 2K are same platforms and thus have same Oracle binaries, you can recreate the database on 2nd machine by only copying the init.ora and the datafiles.

  1. You want to keep the same directory structure on the 2nd machine.
  2. Create same directory structure on the 2nd machine.
  3. Get a list of all required database files from the 1st machine. Login as SYS and run following commands, SQL> select name from v_$datafile; SQL> select member from v_$logfile; SQL> select name from v_$controlfile;
  4. Shutdown the database on the 1st machine and copy all these files + init.ora file onto the 2nd machine. Remember... your directory structure should be identical to 1st machine.
  5. Using ORACLE_HOME\bin\oradim.exe on the 2nd machine, create the service. Make sure SID is same as on the 1st machine.
  6. Connect as sysdba and startup the database and look for any errors.
  7. You DO NOT want to keep the same directory structure on the 2nd machine.
  8. Create new directory structure on the 2nd machine.
  9. Same as above but only run SQL> select name from v_$datafile;
  10. Also run SQL> alter database backup controlfile to trace; This will create a file in your user_dump_dest directory. Look for the newest file.
  11. Shutdown the database and copy all datafiles to the 2nd machine. Also copy init.ora file and Create controlfile script from the trace folder.
  12. Edit init.ora file and Create controlfile script to resemble new SID (If any) and change all the required paths to match the paths on the 2nd machine.
  13. Using ORACLE_HOME\bin\oradim.exe on the 2nd machine, create the service.
  14. Connect as sysdba and run create controlfile script and look for any errors.

Regards
/Rauf Sarwar Received on Fri Dec 27 2002 - 19:49:33 CET

Original text of this message