Solved

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

Posted on 2011-03-20
2
2,196 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

728 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