Search This Blog

Thursday, March 8, 2007

Clone_database_NOARCHIVELOG_windows

Oracle Version : 10.1.0.2.0
OS Platform : Windows XP sp2

C:\>set ORACLE_SID=orcl

C:\>SQLPLUS /NOLOG

SQL*Plus: Release 10.1.0.2.0 - Production on Thu Mar 8 11:36:07 2007

Copyright (c) 1982, 2004, Oracle. All rights reserved.

SQL> conn taj as sysdba
Enter password:
Connected.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> HOST XCOPY c:\oracle\product\10.1.0\oradata\ORCL -
> \\192.168.100.255\tajsoft\Clone


C:\oracle\product\10.1.0\oradata\ORCL\CONTROL01.CTL
C:\oracle\product\10.1.0\oradata\ORCL\CONTROL02.CTL
C:\oracle\product\10.1.0\oradata\ORCL\CONTROL03.CTL
C:\oracle\product\10.1.0\oradata\ORCL\EXAMPLE01.DBF
C:\oracle\product\10.1.0\oradata\ORCL\REDO01.LOG
C:\oracle\product\10.1.0\oradata\ORCL\REDO02.LOG
C:\oracle\product\10.1.0\oradata\ORCL\REDO03.LOG
C:\oracle\product\10.1.0\oradata\ORCL\SYSAUX01.DBF
C:\oracle\product\10.1.0\oradata\ORCL\SYSTEM01.DBF
C:\oracle\product\10.1.0\oradata\ORCL\TEMP01.DBF
C:\oracle\product\10.1.0\oradata\ORCL\UNDO02.DBF
C:\oracle\product\10.1.0\oradata\ORCL\UNDOTBS02.DBF
C:\oracle\product\10.1.0\oradata\ORCL\USERS01.DBF
C:\oracle\product\10.1.0\oradata\ORCL\USERS02.DBF
14 File(s) copied


SQL> REM also COPY configuration files
SQL> HOST XCOPY c:\oracle\product\10.1.0\db_1\NETWORK\admin\*.ORA -
> \\192.168.100.255\tajsoft\Clone
C:\oracle\product\10.1.0\db_1\NETWORK\admin\listener.ora
C:\oracle\product\10.1.0\db_1\NETWORK\admin\sqlnet.ora
C:\oracle\product\10.1.0\db_1\NETWORK\admin\tnsnames.ora
3 File(s) copied

SQL> REM also COPY spfile.ora,pfile.ora,pwd.ora
SQL> HOST XCOPY c:\oracle\product\10.1.0\db_1\DATABASE\*.ORA -
> \\192.168.100.255\tajsoft\Clone
C:\oracle\product\10.1.0\db_1\DATABASE\INITorcl.ORA
C:\oracle\product\10.1.0\db_1\DATABASE\PWDorcl.ora
C:\oracle\product\10.1.0\db_1\DATABASE\SNCFORCL.ORA
C:\oracle\product\10.1.0\db_1\DATABASE\SPFILEORCL.ORA
4 File(s) copied

After Copy ALL neccessary file CLONE DESTINATION
On Clone destination
1.Install Oracle Software Without DATABASE.
2.Create all neccessary folders.

C:\>mkdir c:\oracle\product\10.1.0\admin\ORCL\bdump

C:\>mkdir c:\oracle\product\10.1.0\admin\ORCL\udump

C:\>mkdir c:\oracle\product\10.1.0\admin\ORCL\cdump

C:\>mkdir c:\oracle\product\10.1.0\admin\ORCL\pfile

C:\>mkdir c:\oracle\product\10.1.0\oradata\ORCL

Note: Must sure all files are exists in correct location ...

3.EDIT NETWORK CONFIGURATION FILES
1.LISTENER.ORA edit HOST string change IP ADDRESS according current machine)
2.TNSNAMES.ORA edit HOST string change IP ADDRESS according current machine)

4.Create Oracle Service
C:\>REM create oracle services through ORADIM

C:\>ORADIM -NEW -SID ORCL
Instance created.

C:\>ORADIM -EDIT -SID ORCL -STARTMODE AUTO

C:\>set ORACLE_SID=ORCL

C:\>sqlplus /nolog

SQL*Plus: Release 10.1.0.2.0 - Production on Thu Mar 8 13:08:09 2007

Copyright (c) 1982, 2004, Oracle. All rights reserved.

SQL> conn sys as sysdba
Enter password:
Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 209715200 bytes
Fixed Size 788168 bytes
Variable Size 166459704 bytes
Database Buffers 41943040 bytes
Redo Buffers 524288 bytes
Database mounted.
Database opened.
SQL> show parameter db_name

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string orcl


Hope this helps
Taj

No comments: