Solved

Connect to remote database (not started) via SQLNET - part of Cloning Process

Posted on 2011-03-20
2
1,997 Views
Last Modified: 2012-05-11
Hi, The cloning process ended prematurely when it is trying to connect to a down cloned database (dg1) after it shuts down the cloned db with the following error:

RMAN-04006: error from auxiliary database: ORA-12514: TNS:listener does not currently know

-----Here is the cloning log -----

[oracle@linux1 dbs]$ rman target sys/oracle@LINUX1 auxiliary sys/oracle@dg1

Recovery Manager: Release 11.2.0.1.0 - Production on Sun Mar 20 18:01:09 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=1264426863)
connected to auxiliary database: DG1 (not mounted)

RMAN> run{
allocate channel prmy1 type disk;
allocate auxiliary channel stby1 type disk;
duplicate target database for standby from active database
spfile
parameter_value_convert 'ORCL','DG1'
set cluster_database = 'false'
set db_domain = ''
set service_names = 'dg1'
set local_listener = 'dg1'
set remote_listener = ''
set db_file_name_convert='/ORCL/','/DG1/'
set log_file_name_convert='/ORCL/','/DG1/'
set 'db_unique_name'='dg1'
set control_files='/u01/app/oracle/oradata/control01.ctl','/u01/app/oracle/flash_recovery_area/control02.ctl'
set db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
set DB_RECOVERY_FILE_DEST_SIZE='4977M'
nofilenamecheck;
}2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19>

using target database control file instead of recovery catalog
allocated channel: prmy1
channel prmy1: SID=33 instance=orcl1 device type=DISK

allocated channel: stby1
channel stby1: SID=19 device type=DISK

Starting Duplicate Db at 20-MAR-11

contents of Memory Script:
{
   backup as copy reuse
   targetfile  '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapworcl1' auxiliary format
 '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwdg1'   targetfile
 '+DATA1/orcl/spfileorcl.ora' auxiliary format
 '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfiledg1.ora'   ;
   sql clone "alter system set spfile= ''/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfiledg1.ora''";
}
executing Memory Script

Starting backup at 20-MAR-11
Finished backup at 20-MAR-11

sql statement: alter system set spfile= ''/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfiledg1.ora''

contents of Memory Script:
{
   sql clone "alter system set  cluster_database =
 false comment=
 '''' scope=spfile";
   sql clone "alter system set  db_domain =
 '''' comment=
 '''' scope=spfile";
   sql clone "alter system set  service_names =
 ''dg1'' comment=
 '''' scope=spfile";
   sql clone "alter system set  local_listener =
 ''dg1'' comment=
 '''' scope=spfile";
   sql clone "alter system set  remote_listener =
 '''' comment=
 '''' scope=spfile";
   sql clone "alter system set  db_file_name_convert =
 ''/ORCL/'', ''/DG1/'' comment=
 '''' scope=spfile";
   sql clone "alter system set  log_file_name_convert =
 ''/ORCL/'', ''/DG1/'' comment=
 '''' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''dg1'' comment=
 '''' scope=spfile";
   sql clone "alter system set  control_files =
 ''/u01/app/oracle/oradata/control01.ctl'', ''/u01/app/oracle/flash_recovery_area/control02.ctl'' comment=
 '''' scope=spfile";
   sql clone "alter system set  db_recovery_file_dest =
 ''/u01/app/oracle/flash_recovery_area'' comment=
 '''' scope=spfile";
   sql clone "alter system set  DB_RECOVERY_FILE_DEST_SIZE =
 4977M comment=
 '''' scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

sql statement: alter system set  cluster_database =  false comment= '''' scope=spfile

sql statement: alter system set  db_domain =  '''' comment= '''' scope=spfile

sql statement: alter system set  service_names =  ''dg1'' comment= '''' scope=spfile

sql statement: alter system set  local_listener =  ''dg1'' comment= '''' scope=spfile

sql statement: alter system set  remote_listener =  '''' comment= '''' scope=spfile

sql statement: alter system set  db_file_name_convert =  ''/ORCL/'', ''/DG1/'' comment= '''' scope=spfile

sql statement: alter system set  log_file_name_convert =  ''/ORCL/'', ''/DG1/'' comment= '''' scope=spfile

sql statement: alter system set  db_unique_name =  ''dg1'' comment= '''' scope=spfile

sql statement: alter system set  control_files =  ''/u01/app/oracle/oradata/control01.ctl'', ''/u01/app/oracle/flash_recovery_area/control02.ctl'' comment= '''' scope=spfile

sql statement: alter system set  db_recovery_file_dest =  ''/u01/app/oracle/flash_recovery_area'' comment= '''' scope=spfile

sql statement: alter system set  DB_RECOVERY_FILE_DEST_SIZE =  4977M comment= '''' scope=spfile

Oracle instance shut down

released channel: prmy1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/20/2011 18:01:29
RMAN-03015: error occurred in stored script Memory Script
RMAN-04006: error from auxiliary database: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

RMAN> exit
---------------
ON the target side, LUNUX1 server:

TNSNAMEs.ora:

dg1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.122)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = dg1)
      (UR = A)
    )
  )

----- ON the dg1 side - the auxiliary db ------
LINUX1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.110)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl.domain)
    )
  )

LISTENER_LINUX1 =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.110)(PORT = 1521))


DG1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.122)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = dg1)
      (UR = A)
    )
  )

LISTENER_DG1 =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.122)(PORT = 1521))

-----

---dg1 - auxiliary listener.ora ---

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST =  192.168.1.122)(PORT = 1521))
      )
    )
  )
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
      (PROGRAM = extproc)
    )
     (SID_DESC =
      (GLOBAL_DBNAME = dg1)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME = dg1)
    )
  )
--------------

Thanks,



0
Comment
Question by:mystudent
  • 2
2 Comments
 

Accepted Solution

by:
mystudent earned 0 total points
ID: 35177654
Solved. I forgot to restart the listener on the cloned side after change to use SID_name. Thanks.
0
 

Author Closing Comment

by:mystudent
ID: 35177655
Solved
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question