Solved

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

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
clob to char in oracle 3 95
Oracle Query - Return results based on minimum value 8 44
ER Diagram 3 42
Oracle Query to Find number of process consumed by a session 15 54
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Via a live example, show how to take different types of Oracle backups using RMAN.

749 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