Home » Server Options » Data Guard » Unable to create physical standby database using RMAN (11g release 2, Fedora 12)
Unable to create physical standby database using RMAN [message #481632] Thu, 04 November 2010 14:50 Go to next message
mateenaslam
Messages: 21
Registered: November 2010
Location: Islamabad, Pakistan
Junior Member
Can someone tell why RMAN is unable to create physical standby database ?

-------------------------------------------------------
RMAN> connect auxiliary sys/system@DGREPL

connected to auxiliary database: DGREPL (not mounted)

RMAN> connect target sys/system@REPL

connected to target database: REPL (DBID=2730563515)

RMAN> run{
allocate channel prmy1 type disk;
allocate channel prmy2 type disk;
allocate channel prmy3 type disk;
allocate channel prmy4 type disk;
allocate channel prmy5 type disk;
allocate auxiliary channel stby1 type disk;
duplicate target database for standby from active database
spfile
parameter_value_convert 'REPL','DGREPL'
set db_file_name_convert='/REPL/','/DGREPL/'
set log_file_name_convert='/REPL/','/DGREPL/'
set 'db_unique_name'='DGREPL'
set control_files='/u01/app/oracle/oradata/DGREPL/control01.ctl','/u01/app/oracle/flash_recovery_area/DGREPL/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>

using target database control file instead of recovery catalog
allocated channel: prmy1
channel prmy1: SID=125 device type=DISK

allocated channel: prmy2
channel prmy2: SID=146 device type=DISK

allocated channel: prmy3
channel prmy3: SID=22 device type=DISK

allocated channel: prmy4
channel prmy4: SID=14 device type=DISK

allocated channel: prmy5
channel prmy5: SID=144 device type=DISK

allocated channel: stby1
channel stby1: SID=19 device type=DISK

Starting Duplicate Db at 04-NOV-10

contents of Memory Script:
{
backup as copy reuse
targetfile '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwREPL' auxiliary format
'/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwDGREPL' targetfile
'/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileREPL.ora' auxiliary format
'/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileDGREPL.ora' ;
sql clone "alter system set spfile= ''/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileDGREPL.ora''";
}
executing Memory Script

Starting backup at 04-NOV-10
Finished backup at 04-NOV-10

sql statement: alter system set spfile= ''/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileDGREPL.ora''

contents of Memory Script:
{
sql clone "alter system set audit_file_dest =
''/u01/app/oracle/admin/DGREPL/adump'' comment=
'''' scope=spfile";
sql clone "alter system set dispatchers =
''(PROTOCOL=TCP) (SERVICE=DGREPLXDB)'' comment=
'''' scope=spfile";
sql clone "alter system set db_file_name_convert =
''/REPL/'', ''/DGREPL/'' comment=
'''' scope=spfile";
sql clone "alter system set log_file_name_convert =
''/REPL/'', ''/DGREPL/'' comment=
'''' scope=spfile";
sql clone "alter system set db_unique_name =
''DGREPL'' comment=
'''' scope=spfile";
sql clone "alter system set control_files =
''/u01/app/oracle/oradata/DGREPL/control01.ctl'', ''/u01/app/oracle/flash_recovery_area/DGREPL/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 audit_file_dest = ''/u01/app/oracle/admin/DGREPL/adump'' comment= '''' scope=spfile

sql statement: alter system set dispatchers = ''(PROTOCOL=TCP) (SERVICE=DGREPLXDB)'' comment= '''' scope=spfile

sql statement: alter system set db_file_name_convert = ''/REPL/'', ''/DGREPL/'' comment= '''' scope=spfile

sql statement: alter system set log_file_name_convert = ''/REPL/'', ''/DGREPL/'' comment= '''' scope=spfile

sql statement: alter system set db_unique_name = ''DGREPL'' comment= '''' scope=spfile

sql statement: alter system set control_files = ''/u01/app/oracle/oradata/DGREPL/control01.ctl'', ''/u01/app/oracle/flash_recovery_area/DGREPL/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
released channel: prmy2
released channel: prmy3
released channel: prmy4
released channel: prmy5
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 11/04/2010 15:31:06
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
-------------------------------------------------------
Re: Unable to create physical standby database using RMAN [message #481633 is a reply to message #481632] Thu, 04 November 2010 14:59 Go to previous messageGo to next message
BlackSwan
Messages: 26733
Registered: January 2009
Location: SoCal
Senior Member
>RMAN-04006: error from auxiliary database: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
A connection request was issued & got to a listener.
The listener reports that it does not know anything about the requested SERVICE_NAME.
This can occur because the DB is down.
Re: Unable to create physical standby database using RMAN [message #481634 is a reply to message #481632] Thu, 04 November 2010 15:02 Go to previous messageGo to next message
John Watson
Messages: 8347
Registered: January 2010
Location: Global Village
Senior Member
You need to statically register the auxiliary database in the listener. Automatic instance registration is no good, because when te instance gets shutdown it de-registers and RMAN can't re-connect.
Re: Unable to create physical standby database using RMAN [message #481635 is a reply to message #481633] Thu, 04 November 2010 15:06 Go to previous messageGo to next message
mateenaslam
Messages: 21
Registered: November 2010
Location: Islamabad, Pakistan
Junior Member
Yes, database become down because of following command by Memory script.

*************************
'''' scope=spfile";
shutdown clone immediate;
startup clone nomount;
}
*************************

See everything is fine at the start. RMAN is connecting successfully from both target and auxiliary database successfully via oracle net server.

The problem is, RMAN is unable to continue database duplication with next command i.e 'startup clone nomount;' Any reason for it ??? and how to create duplicate database via RMAN ?

Re: Unable to create physical standby database using RMAN [message #481636 is a reply to message #481634] Thu, 04 November 2010 15:12 Go to previous messageGo to next message
mateenaslam
Messages: 21
Registered: November 2010
Location: Islamabad, Pakistan
Junior Member
Here is my listner.ora on standby host. What else need to statically register the auxiliary database ??

---------------------------------------------------------
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

DGREPL =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.xxx.com)(PORT = 1521))
)
)

SID_LIST_DGREPL =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DGREPL)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = DGREPL)
)
)


ADR_BASE_REPL = /u01/app/oracle
---------------------------------------------------------
Re: Unable to create physical standby database using RMAN [message #481637 is a reply to message #481636] Thu, 04 November 2010 15:22 Go to previous messageGo to next message
John Watson
Messages: 8347
Registered: January 2010
Location: Global Village
Senior Member
Sorry, I can't help. I would check that the SQLNet configuration really is correct, but it looks OK to me.
Re: Unable to create physical standby database using RMAN [message #481639 is a reply to message #481637] Thu, 04 November 2010 15:37 Go to previous messageGo to next message
BlackSwan
Messages: 26733
Registered: January 2009
Location: SoCal
Senior Member
from standby host issue the following commands when DB down but listener is UP

lsnrctl status
lsnrctl service

COPY results then POST all back here

[Updated on: Thu, 04 November 2010 15:38]

Report message to a moderator

Re: Unable to create physical standby database using RMAN [message #481641 is a reply to message #481639] Thu, 04 November 2010 15:56 Go to previous messageGo to next message
mateenaslam
Messages: 21
Registered: November 2010
Location: Islamabad, Pakistan
Junior Member
$./lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 04-NOV-2010 16:55:16

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 04-NOV-2010 16:39:47
Uptime 0 days 0 hr. 15 min. 29 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0/dbhome_1/log/diag/tnslsnr/oracle/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle.xxx.com)(PORT=1521)))
The listener supports no services
The command completed successfully
---------------------------------------
$ ./lsnrctl services

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 04-NOV-2010 16:55:20

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
The listener supports no services
The command completed successfully
Re: Unable to create physical standby database using RMAN [message #481643 is a reply to message #481641] Thu, 04 November 2010 16:48 Go to previous messageGo to next message
mateenaslam
Messages: 21
Registered: November 2010
Location: Islamabad, Pakistan
Junior Member
When DB is down, listner automatically un-register DGREPL service name. so there is no service register while the listner is running.

There is something which is stopping oracle to start again. How to track it ?
Re: Unable to create physical standby database using RMAN [message #481644 is a reply to message #481643] Thu, 04 November 2010 17:56 Go to previous messageGo to next message
BlackSwan
Messages: 26733
Registered: January 2009
Location: SoCal
Senior Member
lsnrctl stop
replace existing listener.ora with one below
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = oracle.xxx.com)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /u01/app/oracle

SID_LIST_LISTENER =
  (SID_LIST =
	(SID_DESC =
         (SID_NAME = XE)			
         (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
        )
  )

lsnrctl start
Re: Unable to create physical standby database using RMAN [message #481661 is a reply to message #481644] Fri, 05 November 2010 01:54 Go to previous messageGo to next message
John Watson
Messages: 8347
Registered: January 2010
Location: Global Village
Senior Member
Perhaps I see the problem: your listener.ora that has the standby instance statically registered is in your database home, but you are running 11.2 where (if you are using the Grid Infrastructure) your listener will be running off the Grid home. Have you edited the correct file?
Re: Unable to create physical standby database using RMAN [message #482595 is a reply to message #481661] Sat, 13 November 2010 09:09 Go to previous messageGo to next message
babuknb
Messages: 1734
Registered: December 2005
Location: NJ
Senior Member

1. Why are you connecting standby database by using connection identifier? Are you connecting from target database?

If yes, Try same procedure from standby database reproduce your error

On Standby server:

export ORACLE_SID=DGREPL

rman target  sys/system@REPL auxiliary /


Else, Coming to your listener configuration on standby database. Something wrong with SID

Thanks
Re: Unable to create physical standby database using RMAN [message #483126 is a reply to message #482595] Thu, 18 November 2010 10:49 Go to previous messageGo to next message
mateenaslam
Messages: 21
Registered: November 2010
Location: Islamabad, Pakistan
Junior Member
@watson - i am not using grid infra-structure. its a simple single instance db.


@gentlebabu - i am using this command on standby database. i have already set the oracle_sid

$ echo $ORACLE_SID
DGREPL

connection identifier is used to connect both databases (target/auxiliary) via net service to make RMAN work. See error while running command not using identifier 'RMAN-06217: not connected to auxiliary database with a net service name'

--------------------------------------------------------
$ ./rman target sys/system@REPL auxiliary /

Recovery Manager: Release 11.2.0.1.0 - Production on Thu Nov 18 21:40:48 2010

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

connected to target database: REPL (DBID=2731504761)
connected to auxiliary database: DGREPL (not mounted)

RMAN> run{
allocate channel prmy1 type disk;
allocate channel prmy2 type disk;
allocate channel prmy3 type disk;
allocate channel prmy4 type disk;
allocate channel prmy5 type disk;
allocate auxiliary channel stby1 type disk;
duplicate target database for standby from active database
spfile
parameter_value_convert 'REPL','DGREPL'
set db_file_name_convert='/REPL/','/DGREPL/'
set log_file_name_convert='/REPL/','/DGREPL/'
set 'db_unique_name'='DGREPL'
set control_files='/u01/app/oracle/oradata/DGREPL/control01.ctl','/u01/app/oracle/flash_recovery_area/DGREPL/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>

using target database control file instead of recovery catalog
allocated channel: prmy1
channel prmy1: SID=39 device type=DISK

allocated channel: prmy2
channel prmy2: SID=49 device type=DISK

allocated channel: prmy3
channel prmy3: SID=45 device type=DISK

allocated channel: prmy4
channel prmy4: SID=41 device type=DISK

allocated channel: prmy5
channel prmy5: SID=47 device type=DISK

allocated channel: stby1
channel stby1: SID=19 device type=DISK

Starting Duplicate Db at 18-NOV-10
released channel: prmy1
released channel: prmy2
released channel: prmy3
released channel: prmy4
released channel: prmy5
released channel: stby1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 11/18/2010 21:43:49
RMAN-06217: not connected to auxiliary database with a net service name
--------------------------------------------------------


Any other thoughts to make me out of problem. I have also tested Centos 5.5 on both primary and standby database but problem is same for fedora 12 and centos 5.5.
Re: Unable to create physical standby database using RMAN [message #483158 is a reply to message #481644] Thu, 18 November 2010 15:06 Go to previous messageGo to next message
mateenaslam
Messages: 21
Registered: November 2010
Location: Islamabad, Pakistan
Junior Member
@blackswan - by replacing your listner file its producing the same error which is given from my very first post.


....
Oracle instance shut down

released channel: prmy1
released channel: prmy2
released channel: prmy3
released channel: prmy4
released channel: prmy5
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 11/18/2010 22:12:57
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
Re: Unable to create physical standby database using RMAN [message #483160 is a reply to message #483158] Thu, 18 November 2010 15:19 Go to previous messageGo to next message
BlackSwan
Messages: 26733
Registered: January 2009
Location: SoCal
Senior Member
post results of following OS command

ls -ltr $ORACLE_HOME/dbs
Re: Unable to create physical standby database using RMAN [message #483186 is a reply to message #483160] Fri, 19 November 2010 00:46 Go to previous messageGo to next message
mateenaslam
Messages: 21
Registered: November 2010
Location: Islamabad, Pakistan
Junior Member
$ ls -ltr $ORACLE_HOME/dbs
total 24
-rw-r--r-- 1 oracle oinstall 2851 May 15 2009 init.ora
-rw-r--r-- 1 oracle oinstall 15 Nov 19 10:58 initDGREPL.ora
drwx------ 2 oracle oinstall 4096 Nov 19 11:31 peshm_DGREPL_0
-rw-r----- 1 oracle oinstall 1536 Nov 19 11:40 orapwDGREPL
-rw-r----- 1 oracle oinstall 3584 Nov 19 11:41 spfileDGREPL.ora
-rw-rw---- 1 oracle oinstall 1544 Nov 19 11:41 hc_DGREPL.dat
Re: Unable to create physical standby database using RMAN [message #483187 is a reply to message #483186] Fri, 19 November 2010 00:48 Go to previous messageGo to next message
mateenaslam
Messages: 21
Registered: November 2010
Location: Islamabad, Pakistan
Junior Member
$ cat initDGREPL.ora
DB_NAME=DGREPL
Re: Unable to create physical standby database using RMAN [message #483191 is a reply to message #483187] Fri, 19 November 2010 01:02 Go to previous messageGo to next message
mateenaslam
Messages: 21
Registered: November 2010
Location: Islamabad, Pakistan
Junior Member
Here is what i have in listner log file while executing above command:-

---------------------------------------------------------------------------
<msg time='2010-11-19T11:55:34.583+05:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='oracle.xxxx.com'
host_addr='192.168.122.87'>
<txt>19-NOV-2010 11:55:34 * service_update * DGREPL * 0
</txt>
</msg>
<msg time='2010-11-19T11:55:35.270+05:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='oracle.xxxx.com'
host_addr='192.168.122.87'>
<txt>19-NOV-2010 11:55:35 * service_died * DGREPL * 12537
</txt>
</msg>
<msg time='2010-11-19T11:55:37.462+05:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='oracle.xxxx.com'
host_addr='192.168.122.87'>
<txt>19-NOV-2010 11:55:37 * (CONNECT_DATA=(SERVICE_NAME=DGREPL)(UR=A)(CID=(PROGRAM=rman)(HOST=oracle.xxxx.com)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.122.87)(PORT=49504)) * establish * DGREPL * 12514
</txt>
</msg>
<msg time='2010-11-19T11:55:37.462+05:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='oracle.xxxx.com'
host_addr='192.168.122.87'>
<txt>TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
</txt>
</msg>
Re: Unable to create physical standby database using RMAN [message #483520 is a reply to message #483191] Mon, 22 November 2010 11:22 Go to previous messageGo to next message
mateenaslam
Messages: 21
Registered: November 2010
Location: Islamabad, Pakistan
Junior Member
I think i am alone who is getting this problem. i have used the cold backup to clone database and data guard is working fine now.
Re: Unable to create physical standby database using RMAN [message #483522 is a reply to message #483520] Mon, 22 November 2010 11:34 Go to previous message
Michel Cadot
Messages: 67369
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Thanks for the feedback.

Regards
Michel
Previous Topic: Changing dbname,sid,data/control file locations
Next Topic: dataguard database is out of sync - help required
Goto Forum:
  


Current Time: Fri Sep 25 18:04:32 CDT 2020