clone the database on the same machine [message #549796] |
Tue, 03 April 2012 23:31 |
|
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: how tune the database [message #552103 is a reply to message #549872] |
Mon, 23 April 2012 09:26 |
|
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 #552268 is a reply to message #552129] |
Tue, 24 April 2012 14:49 |
|
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 #552333 is a reply to message #552273] |
Wed, 25 April 2012 03:15 |
John Watson
Messages: 8964 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.
|
|
|
|