Solved

Problems Trying To Run DUPLICATE

Posted on 2014-02-21
3
2,943 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

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

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 …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

740 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