Solved

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

Posted on 2011-03-20
2
1,926 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now