Solved

Problems Trying To Run DUPLICATE

Posted on 2014-02-21
3
2,598 Views
Last Modified: 2014-03-05
Can't get to target database when trying through RMAN, but the same is fine through SQLPlus.  What needs to be done to make it work with RMAN/

RMAN> connect target sys/ora@s2pdb
connected to target database: BB60 (DBID=2714891584)
RMAN> connect auxiliary sys/ora@BB60
connected to auxiliary database: BB60 (not mounted)
RMAN> DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE
2> NOFILENAMECHECk
3> DORECOVER ;
Starting Duplicate Db at 21-FEB-14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=9 device type=DISK
contents of Memory Script:
{
backup as copy reuse
targetfile '/apps/app/oracle/product/11.2.0/db_1/dbs/orapwBB60' auxiliary format
'/apps/app/oracle/product/11.2.0/db_1/dbs/orapwBB60' ;
}
executing Memory Script
Starting backup at 21-FEB-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=956 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 02/21/2014 04:18:45
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/21/2014 04:18:45
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
ORA-17629: Cannot connect to the remote database server

names file

p2sdb =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 134.154.228.220.csueastbay.edu)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = standby.csueastbay.edu)
      (UR = A)
  )
)
s2pdb =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = bbdevdb1.csueastbay.edu)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = primary.csueastbay.edu)
      (UR = A)
  )
)

Tnsping returns fine.
[oracle@larzena dbs]$ tnsping s2pdb

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 21-FEB-2014 07:18:14

Copyright (c) 1997, 2013, Oracle.  All rights reserved.

Used parameter files:
/apps/app/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = bbdevdb1.csueastbay.edu)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = primary.csueastbay.edu) (UR = A)))
OK (10 msec)
[oracle@larzena dbs]$

Can connect using SQLPlus


[oracle@larzena dbs]$ $ORACLE_HOME/bin/sqlplus sys/ora@s2pdb as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Feb 21 07:19:36 2014

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select count(*) from all_tables;

  COUNT(*)
----------
      3885

SQL>


Services from target machine:

-bash-3.2$ lsnrctl services

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 21-FEB-2014 14:19:24

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=REGISTER)))
Services Summary...
Service "BB60" has 1 instance(s).
  Instance "BB60", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:618162 refused:100
         LOCAL SERVER
Service "BB60.csueastbay.edu" has 1 instance(s).
  Instance "p2sdb", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:238 refused:0 state:ready
         LOCAL SERVER
Service "BB60XDB.csueastbay.edu" has 1 instance(s).
  Instance "p2sdb", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:1022 state:ready
         DISPATCHER <machine: bbdevdb1.csueastbay.edu, pid: 20014>
         (ADDRESS=(PROTOCOL=tcp)(HOST=bbdevdb1.csueastbay.edu)(PORT=54999))
Service "primary.csueastbay.edu" has 2 instance(s).
  Instance "p2sdb", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:238 refused:0 state:ready
         LOCAL SERVER
  Instance "primary.csueastbay.edu", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:415978 refused:0
         LOCAL SERVER
The command completed successfully
-bash-3.2$
0
Comment
Question by:xoxomos
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
praveencpk earned 300 total points
Comment Utility
The tnsnames.ora the SERVICE_NAME should be a valid service name in your database.

SQL>select value from v$parameter where name='service_names';

Also check the steps by steps process using RMAN duplicate for active database.

https://blogs.oracle.com/AlejandroVargas/resource/dataguard/how%20to%20create%20a%20physical%20standby%20database%20using%20Rman%20Duplicate%20command.pdf
0
 

Author Comment

by:xoxomos
Comment Utility
BB60 =
  (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = 134.154.228.220)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = BB60.csueastbay.edu)
    )
  )
p2sdb =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 134.154.228.220)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = BB60.csueastbay.edu))
      (UR = A)
    )
  )
s2pdb =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = bbdevdb1.csueastbay.edu)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = primary.csueastbay.edu)
      (UR = A)
    )
  )

SQL> show parameter service_names

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
service_names                        string      standby.csueastbay.edu, BB60.c
                                                 sueastbay.edu, standby, BB60
SQL>
SQL> select value from v$parameter where name='service_names';

VALUE
--------------------------------------------------------------------------------
standby.csueastbay.edu, BB60.csueastbay.edu, standby, BB60
0
 

Author Closing Comment

by:xoxomos
Comment Utility
What you said is true, but in this particular case:
"The basic requirement is that there must be static listener entry in listener.ora for auxiliary."
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

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…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

772 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

10 Experts available now in Live!

Get 1:1 Help Now