Home » RDBMS Server » Backup & Recovery » clone the database on the same machine (window xp 2000)
clone the database on the same machine [message #549796] Tue, 03 April 2012 23:31 Go to next message
priteshranjan.preet
Messages: 131
Registered: April 2012
Location: delhi
Senior Member
hi friends
can any one help me to configure the clone the database on the same system. i m using window xp 2000 and oracle 10.2.1.
please also mentain the step.

thanks and regards
pritesh ranjan.
Re: clone the database on the same machine [message #549803 is a reply to message #549796] Wed, 04 April 2012 00:12 Go to previous messageGo to next message
BlackSwan
Messages: 22926
Registered: January 2009
Senior Member
both OS & ORACLE are obsoleted.
Re: clone the database on the same machine [message #549813 is a reply to message #549796] Wed, 04 April 2012 01:02 Go to previous messageGo to next message
Michel Cadot
Messages: 59497
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Database Backup and Recovery Advanced User's Guide
Chapter 3 RMAN Recovery Concepts
Section Database Duplication with RMAN
Read and follow the links.

Regards
Michel

Re: clone the database on the same machine [message #549816 is a reply to message #549813] Wed, 04 April 2012 01:16 Go to previous messageGo to next message
priteshranjan.preet
Messages: 131
Registered: April 2012
Location: delhi
Senior Member
thanks to replay. but i cant understand the what i directory structure used on the same machine.
Re: clone the database on the same machine [message #549818 is a reply to message #549816] Wed, 04 April 2012 01:31 Go to previous messageGo to next message
Michel Cadot
Messages: 59497
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Sorry some words are missing in your sentence and I don't understand it.
Please repost.

Regards
Michel
how tune the database [message #549863 is a reply to message #549796] Wed, 04 April 2012 05:45 Go to previous messageGo to next message
priteshranjan.preet
Messages: 131
Registered: April 2012
Location: delhi
Senior Member
i dont know how to create the duplicate database on the same machine.

[Updated on: Wed, 04 April 2012 05:49]

Report message to a moderator

Re: how tune the database [message #549872 is a reply to message #549863] Wed, 04 April 2012 06:00 Go to previous messageGo to next message
Michel Cadot
Messages: 59497
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
There is no difference between same or different machine (except you must have a different sid).

Regards
Michel
Re: how tune the database [message #552103 is a reply to message #549872] Mon, 23 April 2012 09:26 Go to previous messageGo to next message
priteshranjan.preet
Messages: 131
Registered: April 2012
Location: delhi
Senior Member
i make a clone of the database(oracle 10g 10.2.0.1.0)on os xp service pack2. i use the following code.plz help to let me know where i m wrong. please suggest me the appropriate solution.


D:\>set ORACLE_SID=orcl

D:\>sqlplus sys/oracle as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Apr 23 18:32:24 2012

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> select log_mode from v$database;

LOG_MODE
------------
ARCHIVELOG

SQL> select name from v$database;

NAME
---------
ORCL

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 8
Next log sequence to archive 10
Current log sequence 10
SQL>exit

d:\> mkdir d:\oracle\product\10.2.0\oradata\orcl1


D:\>edit D:\oracle\product\10.2.0\db_1\database\initorcl1.ora

D:\>type D:\oracle\product\10.2.0\db_1\database\initorcl1.ora
db_name=orcl1
compatible=10.2.0.1.0


D:\>oradim -new -sid orcl1
DIM-00019: create service error
O/S-Error: (OS 1073) The specified service already exists.

D:\>net start OracleServiceorcl1
The requested service has already been started.

More help is available by typing NET HELPMSG 2182.



D:\>set ORACLE_SID=orcl

D:\>sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Apr 23 18:44:03 2012

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> select log_mode from v$database;

LOG_MODE
------------
ARCHIVELOG

SQL> select name from v$database;

NAME
---------
ORCL

SQL> select * from v$backup;

FILE# STATUS CHANGE# TIME
---------- ------------------ ---------- ---------
1 NOT ACTIVE 687021 23-APR-12
2 NOT ACTIVE 687021 23-APR-12
3 NOT ACTIVE 687021 23-APR-12
4 NOT ACTIVE 687021 23-APR-12
5 NOT ACTIVE 687021 23-APR-12

SQL> select tablespace_name from dba_tablespace;
select tablespace_name from dba_tablespace
*
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> select tablespace_name from dba_tablespaces;

TABLESPACE_NAME
------------------------------
SYSTEM
UNDOTBS1
SYSAUX
TEMP
USERS
EXAMPLE

6 rows selected.

SQL> alter database begin backup;

Database altered.

SQL>

now copy the all datafile into the location

d:\oracle\product\10.2.0\oradata\orcl1


SQL> alter database end backup;

Database altered.


SQL> alter system archive log current;

System altered.

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 9
Next log sequence to archive 11
Current log sequence 11
SQL>



SQL> alter database backup controlfile to trace as 'd:\oracle\product\10.2.0\tra
ce.sql' reuse;

Database altered.
SQL>exit

D:\>edit D:\oracle\product\10.2.0\TRACE.SQL

(controlfile contains)

STARTUP NOMOUNT
CREATE CONTROLFILE SET DATABASE "ORCL1" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\REDO01.LOG' SIZE 50M,
GROUP 2 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\REDO02.LOG' SIZE 50M,
GROUP 3 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\REDO03.LOG' SIZE 50M
DATAFILE
'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\SYSTEM01.DBF',
'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\UNDOTBS01.DBF',
'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\SYSAUX01.DBF',
'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\USERS01.DBF',
'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\EXAMPLE01.DBF'
CHARACTER SET WE8MSWIN1252
;


in the controlfile change ( REUSE-> SET AND NORESETLOGS -> RESETLOGS)


D:\>set ORACLE_SID=orcl1

D:\>sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Apr 23 19:09:08 2012

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> startup nomount
ORACLE instance started.

Total System Global Area 117440512 bytes
Fixed Size 1247588 bytes
Variable Size 58721948 bytes
Database Buffers 50331648 bytes
Redo Buffers 7139328 bytes

SQL> @D:\oracle\product\10.2.0\TRACE.SQL


ORA-01081: cannot start already-running ORACLE - shut it down first
SP2-0042: unknown command "DATAFILE" - rest of line ignored.
SP2-0734: unknown command beginning "'D:\ORACLE..." - rest of line ignored.
SP2-0734: unknown command beginning "'D:\ORACLE..." - rest of line ignored.
SP2-0734: unknown command beginning "'D:\ORACLE..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning "'D:\ORACLE..." - rest of line ignored.
SP2-0734: unknown command beginning "'D:\ORACLE..." - rest of line ignored.
SP2-0734: unknown command beginning "CHARACTER ..." - rest of line ignored.
1 CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS ARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 100
5 MAXINSTANCES 8
6 MAXLOGHISTORY 292
7 LOGFILE
8 GROUP 1 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG' SIZE 50M,
9 GROUP 2 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG' SIZE 50M,
10 GROUP 3 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG' SIZE 50M
11* -- STANDBY LOGFILE
ORA-01507: database not mounted


ALTER SYSTEM ARCHIVE LOG ALL
*
ERROR at line 1:
ORA-01507: database not mounted


ALTER DATABASE OPEN
*
ERROR at line 1:
ORA-01507: database not mounted


ALTER TABLESPACE TEMP ADD TEMPFILE 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\TEMP01
.DBF'
*
ERROR at line 1:
ORA-01109: database not open


ORA-01081: cannot start already-running ORACLE - shut it down first
SP2-0042: unknown command "DATAFILE" - rest of line ignored.
SP2-0734: unknown command beginning "'D:\ORACLE..." - rest of line ignored.
SP2-0734: unknown command beginning "'D:\ORACLE..." - rest of line ignored.
SP2-0734: unknown command beginning "'D:\ORACLE..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning "'D:\ORACLE..." - rest of line ignored.
SP2-0734: unknown command beginning "'D:\ORACLE..." - rest of line ignored.
SP2-0734: unknown command beginning "CHARACTER ..." - rest of line ignored.
1 CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS ARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 100
5 MAXINSTANCES 8
6 MAXLOGHISTORY 292
7 LOGFILE
8 GROUP 1 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG' SIZE 50M,
9 GROUP 2 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG' SIZE 50M,
10 GROUP 3 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG' SIZE 50M
11* -- STANDBY LOGFILE
ORA-01507: database not mounted


ALTER DATABASE OPEN RESETLOGS
*
ERROR at line 1:
ORA-01507: database not mounted


ALTER TABLESPACE TEMP ADD TEMPFILE 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\TEMP01
.DBF'
*
ERROR at line 1:
ORA-01109: database not open


SQL>
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01507: database not mounted


SQL> alter database mount
2 ;

Database altered.

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01195: online backup of file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\SYSTEM01.DBF'

regards
pritesh ranjan

Re: how tune the database [message #552105 is a reply to message #552103] Mon, 23 April 2012 09:28 Go to previous messageGo to next message
priteshranjan.preet
Messages: 131
Registered: April 2012
Location: delhi
Senior Member
same database single machine no auxilary database.
thanks
Re: how tune the database [message #552107 is a reply to message #552105] Mon, 23 April 2012 09:36 Go to previous messageGo to next message
BlackSwan
Messages: 22926
Registered: January 2009
Senior Member
when all else fails Read The Fine Manual

http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta2011.htm#RCMRF111

http://docs.oracle.com/cd/E11882_01/server.112/e25513/initparams056.htm#sthref155
Re: how tune the database [message #552125 is a reply to message #552107] Mon, 23 April 2012 12:42 Go to previous messageGo to next message
priteshranjan.preet
Messages: 131
Registered: April 2012
Location: delhi
Senior Member
please suggest me where i m wrong and how can i resolve it. where i m using db_file_name_convert according to your oracle link. now the error is.

SQL> alter database mount
2 ;

Database altered.

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL1\SYSTEM01.DBF'

thanks
pritesh ranjan
Re: how tune the database [message #552127 is a reply to message #552125] Mon, 23 April 2012 12:51 Go to previous messageGo to next message
BlackSwan
Messages: 22926
Registered: January 2009
Senior Member
>please suggest me where i m wrong and how can i resolve it.

01113, 00000, "file %s needs media recovery"
// *Cause:  An attempt was made to online or open a database with a file that
//	   is in need of media recovery.
// *Action: First apply media recovery to the file.


I do not know what you have done that has led to this situation.
It could be error of omission.
It could be error of commission.
SYSTEM01.DBF file is not in consistent state; so Oracle refuses to open it.

all REDO files between start of cloning process through to completion need to be applied; inclusive
Re: how tune the database [message #552128 is a reply to message #552127] Mon, 23 April 2012 12:58 Go to previous messageGo to next message
priteshranjan.preet
Messages: 131
Registered: April 2012
Location: delhi
Senior Member
i mentain above every and each step that i do.
Re: how tune the database [message #552129 is a reply to message #552128] Mon, 23 April 2012 13:01 Go to previous messageGo to next message
BlackSwan
Messages: 22926
Registered: January 2009
Senior Member
>i mentain above every and each step that i do.
You do not have to convince me; but convince Oracle.
I don't care if the clone DB opens or not.
Re: how tune the database [message #552268 is a reply to message #552129] Tue, 24 April 2012 14:49 Go to previous messageGo to next message
priteshranjan.preet
Messages: 131
Registered: April 2012
Location: delhi
Senior Member
hi any one let me know what this error say.

RMAN> duplicate target database to "orcl1" nofilenamecheck until time "to_date('
24-04-2012 12:00:45','dd-mm-yyyy hh24:mi:ss')" backup location 'D:\oracle\produc
t\10.2.0\oradata\orcl1';

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "backup": expecting one of: "device, db_file_nam
e_convert, high, logfile, nofilenamecheck, open, pfile, ;, skip, until"
RMAN-01007: at line 1 column 122 file: standard input

regards
pritesh ranjan
Re: how tune the database [message #552270 is a reply to message #552268] Tue, 24 April 2012 15:03 Go to previous messageGo to next message
Littlefoot
Messages: 19711
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't use RMAN, but the error is rather obvious: syntax error, which means that you issued an invalid command. Perhaps you should read documentation, I believe it contains directions you should follow.
Re: how tune the database [message #552273 is a reply to message #552270] Tue, 24 April 2012 15:12 Go to previous messageGo to next message
priteshranjan.preet
Messages: 131
Registered: April 2012
Location: delhi
Senior Member
now it give the following error.

RMAN> duplicate target database to "orcl1";

Starting Duplicate Db at 24-APR-12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 04/24/2012 13:09:01
RMAN-12010: automatic channel allocation initialization failed
RMAN-06171: not connected to target database

RMAN> duplicate target database to "orcl1" nofilenamecheck until time "to_date('
24-04-2012 12:00:45','dd-mm-yyyy hh24:mi:ss')" ;

Starting Duplicate Db at 24-APR-12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 04/24/2012 13:09:56
RMAN-12010: automatic channel allocation initialization failed
RMAN-06171: not connected to target database

RMAN> exit


Recovery Manager complete.

D:\>
Re: how tune the database [message #552274 is a reply to message #552270] Tue, 24 April 2012 15:14 Go to previous messageGo to next message
BlackSwan
Messages: 22926
Registered: January 2009
Senior Member
double quote marks should be avoided.
If double quote marks are never used the first time, then they are NEVER required the second time.
Re: how tune the database [message #552333 is a reply to message #552273] Wed, 25 April 2012 03:15 Go to previous messageGo to next message
John Watson
Messages: 4709
Registered: January 2010
Location: Global Village
Senior Member
Pritesh, this message makes it obvious that you are not following the instructions in the docs:
RMAN-06171: not connected to target database
When duplicating a database in releases < 11.0, you must always connect to both the target and auxiliary.
Re: how tune the database [message #552400 is a reply to message #552333] Wed, 25 April 2012 08:44 Go to previous message
priteshranjan.preet
Messages: 131
Registered: April 2012
Location: delhi
Senior Member
i m using oracle 10g(10.2.0.1.0) on os window xp service pack 2. not 11g.
thanks
Previous Topic: database accidently droped by dbca
Next Topic: rman backup size
Goto Forum:
  


Current Time: Thu Oct 30 10:53:39 CDT 2014

Total time taken to generate the page: 0.12406 seconds