Solved

Problems Trying To Run DUPLICATE

Posted on 2014-02-21
3
2,683 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
ID: 39879098
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
ID: 39892615
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
ID: 39907521
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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Extract the first word (before the , ) 2 37
oracle 11g 23 47
Oracle 10g standard edition server with 4 processors 3 29
Oracle - SQL Parse String 5 17
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
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 set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

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

16 Experts available now in Live!

Get 1:1 Help Now