Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to duplicate whole database from one machine to another machine in Windows 2000?

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

From: Laxman Uchlani <laxmanuchlani_at_yahoo.com>
Date: 29 Dec 2002 16:35:35 -0800
Message-ID: <99249aa6.0212291635.3ec69c48@posting.google.com>


Dear Rauf,

   Thanks for suggesting the precise way to duplicate a database. I should have mentioned it explicitly, but my technique was meant if we want to hand over the task to a person not exposed to databases at all, and we do not want to give him/her the SYS password also. A few extra minutes spent copying for that person is sometimes better than teaching him the intricacies. The bottomline was that it works, and doesn't take much longer.

Anyway, thanks again for educating on the precise way to duplicate a database.

Laxman

rs_arwar_at_hotmail.com (Rauf Sarwar) wrote in message news:<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.
>
> a) Create same directory structure on the 2nd machine.
> b) 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;
> c) 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.
> d) Using ORACLE_HOME\bin\oradim.exe on the 2nd machine, create the
> service. Make sure SID is same as on the 1st machine.
> e) Connect as sysdba and startup the database and look for any errors.
>
>
> 2) You DO NOT want to keep the same directory structure on the 2nd
> machine.
>
> a) Create new directory structure on the 2nd machine.
> b) Same as above but only run SQL> select name from v_$datafile;
> c) 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.
> d) Shutdown the database and copy all datafiles to the 2nd machine.
> Also copy init.ora file and Create controlfile script from the trace
> folder.
> e) 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.
> f) Using ORACLE_HOME\bin\oradim.exe on the 2nd machine, create the
> service.
> g) Connect as sysdba and run create controlfile script and look for
> any errors.
>
> Regards
> /Rauf Sarwar
Received on Sun Dec 29 2002 - 18:35:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US