Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

911 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

23 Experts available now in Live!

Get 1:1 Help Now