Home » Server Options » Data Guard » Standby database db_name doubt (10.2.0, WindowsNT)
Standby database db_name doubt [message #302278] Mon, 25 February 2008 02:51 Go to next message
navaneethdba
Messages: 71
Registered: July 2007
Location: chennai
Member
Hi,

I am practicing Standby database configuration in same host.I have some confusion in db_name parameter for the standby parameter file whether i should give stdby(standby database name) or leave it as primary database name (orcl).

1.If i give db_name=stdby,DB_UNIQUE_NAME=stdby it shows error when restoring from the backup like ...
sql statement: alter database mount standby database
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 02/25/2008 14:02:58
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on clone_default channel at 02/25/2008 14:02:58
RMAN-11003: failure during parse/execution of SQL statement: alter database mount standby database
ORA-01103: database name 'ORCL' in control file is not 'STDBY'


2.when i leave as primary database name, its ok when restoring.But when i am configuring Dataguard it gives error like ..
DGMGRL> add database orcl as
> connect identifier is stdby
> maintained as physical;
Error: ORA-16642: db_unique_name mismatch

Failed.
DGMGRL>


please advice..
TIA,
Re: Standby database db_name doubt [message #302502 is a reply to message #302278] Mon, 25 February 2008 23:48 Go to previous messageGo to next message
NandKumar
Messages: 92
Registered: June 2007
Location: v$hyderabad
Member
The parameter db_name should be same while db_unique_name should be different.
Re: Standby database db_name doubt [message #302509 is a reply to message #302502] Tue, 26 February 2008 00:09 Go to previous messageGo to next message
navaneethdba
Messages: 71
Registered: July 2007
Location: chennai
Member
Hi Nandkumar,

Thanks for your reply.

Yes incase when the primary database and standby database are in different machines you are correct.

I dont know whether to create the standby in same name or in different name.i read in a document that when creating standby in same machine it is recomended to give different names.

1.But in my case i have created the standby in same machine.
2.When configuring Dataguard it gives error

DGMGRL> add database orcl as
> connect identifier is stdby
> maintained as physical;
Error: ORA-16642: db_unique_name mismatch
Failed.
DGMGRL>



standby DB parameters
db_name=orcl
db_unique_name=stdby


Primary DB parameters
db_name=orcl
db_unique_name=orcl


If it is correct then please guide me to configure Dataguard!

please advice..
TIA,
Re: Standby database db_name doubt [message #302561 is a reply to message #302509] Tue, 26 February 2008 02:54 Go to previous messageGo to next message
NandKumar
Messages: 92
Registered: June 2007
Location: v$hyderabad
Member
What is the value you have set for log_archive_dest_n parameters.

What is the process that you are following ?

You can check the steps here: (For Oracle 10.2)

http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ps.htm#i63561

and

http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/rcmbackp.htm#i636377


Re: Standby database db_name doubt [message #302568 is a reply to message #302561] Tue, 26 February 2008 03:05 Go to previous messageGo to next message
navaneethdba
Messages: 71
Registered: July 2007
Location: chennai
Member
Hi Nandkumar,

These are the steps am following:

1.CHECK PRIMARY DATABASE IN ARCHIVELOG MODE.
2.ALTER DATABASE FORCE LOGGING.
3.BACKUP TARGET DATABASE. 
4.1 BACKUP TARGET DATABASE CONTROLFILE FOR STANDBY DATABASE.
4.2 Alter system archive log current.
5.1 alter database open;
5.2 CREATED PASSWORD FILE FOR STANDBY DATABASE
6.PRIMARY DATABASE INITIALIZATION PARAMETERS : 

DB_UNIQUE_NAME=orcl
LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl,stdby)'
log_archive_dest_1='location=e:\oracle\product\10.2.0\Logarchive'
LOG_ARCHIVE_DEST_2 ='SERVICE=stdby
DB_UNIQUE_NAME=stdby'
LOG_FILE_NAME_CONVERT='C:\stdby_db\file\REDO02.LOG','E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG','C:\stdby_db\file\REDO01.LOG','E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
FAL_SERVER=stdby
FAL_CLIENT=orcl
STANDBY_FILE_MANAGEMENT=AUTO

7.CREATE SPFILE FROM PFILE='PRIMARY DATABASE PFILE LOCATION'
8.CREATE PFILE=' STANDBY DATABASE PFILE LOCATION' FROM SPFILE;
some changed standby database parameters 

DB_NAME=orcl - same as primary database name
DB_UNIQUE_NAME=stdby - change
LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl,stdby)' - same
LOG_FILE_NAME_CONVERT='E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG','C:\stdby_db\file\REDO02.LOG','E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG','C:\stdby_db\file\REDO01.LOG'
LOG_ARCHIVE_DEST_1='LOCATION=C:\STDBY_DB\LOGARCHIVE'
LOG_ARCHIVE_DEST_2='SERVICE=ORCL DB_UNIQUE_NAME=orcl'
STANDBY_FILE_MANAGEMENT=AUTO
FAL_SERVER=orcl
FAL_CLIENT=stdby
*************************************************************

9.1CREATE INSTANCE OR SERVICE FOR STANDBY DATABASE
9.2 Listener and tns configuration
10.CONNECT PRIMARY DATABASE USING RMAN AND CONNECT STANDBY DATABASE USING "CONNECT AUXILIARY USERNAME/PASSWD@STDBYNAME".
11.run
{
 set newname ..
   .
   .
   .
  duplicate target database for standby dorecover;
 }
startup in mount

12.1 ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
			(or)
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE

12.2 ALTER DATABASE RECOVER MANAGED STANDBY DATABASE NODELAY;

13.RECOVER MANAGED STANDBY DATABASE CANCEL;
14.ALTER DATABASE OPEN READ ONLY;


I have used the doc's which u have given in links..
Its 100% correct i think, its working fine But when i configure Dataguard by add standby its giving error...

please Advice!
TIA,
Re: Standby database db_name doubt [message #302676 is a reply to message #302278] Tue, 26 February 2008 09:45 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Its 100% correct i think, its working fine But when i configure Dataguard by add standby its giving error...
Nice post up until the very end.
Exactly what SQL did you issue & what exactly was the "error" message?
Re: Standby database db_name doubt [message #302748 is a reply to message #302676] Tue, 26 February 2008 21:53 Go to previous messageGo to next message
navaneethdba
Messages: 71
Registered: July 2007
Location: chennai
Member
Hi Anacedent,

Thanks for your reply.

What my problem is, i tried to add standby database in the Dataguard configuration which i have created using these steps

SQL> alter system set DG_BROKER_START = true;  

System altered.

DGMGRL> connect username/Passwd@orcl
Connected.

DGMGRL> create configuration DGORCL as
> primary database is orcl
> connect identifier is orcl;
Configuration "dgorcl" created with primary database "orcl"

DGMGRL> show database orcl
Database
  Name:            orcl
  Role:            PRIMARY
  Enabled:         YES
  Intended State:  ONLINE
  Instance(s):
    orcl
Current status for "orcl":
SUCCESS

DGMGRL> add database orcl as
> connect identifier is stdby
> maintained as physical;
Error: ORA-16642: db_unique_name mismatch

Failed.


This is my exact problem.I have created the standby database with name "db_name=orcl" as same as primary database.And i have given a different name for "db_unique_name=stdby".

In this situation how to add my standby database ?

please Advice..
TIA,
Re: Standby database db_name doubt [message #304622 is a reply to message #302748] Wed, 05 March 2008 21:20 Go to previous messageGo to next message
navaneethdba
Messages: 71
Registered: July 2007
Location: chennai
Member
Hi,

Anybody faced this type of situation.....

TIA,
Re: Standby database db_name doubt [message #304626 is a reply to message #302278] Wed, 05 March 2008 22:28 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
I setup a physical standby without using Data Broker so I have no idea what needs to change.
Re: Standby database db_name doubt [message #304839 is a reply to message #304626] Thu, 06 March 2008 21:19 Go to previous messageGo to next message
navaneethdba
Messages: 71
Registered: July 2007
Location: chennai
Member

Hi,

Thanks for the response....
Re: Standby database db_name doubt [message #316340 is a reply to message #302278] Thu, 24 April 2008 12:21 Go to previous message
sonumalhi
Messages: 62
Registered: April 2008
Member
Hi You need to give db_unique_name while adding standby database

add database stdby as
> connect identifier is stdby
> maintained as physical;

Hope it will work..
Previous Topic: Dataguard
Next Topic: Scripts for Monitoring Data Guard using Broker - Oracle9i
Goto Forum:
  


Current Time: Thu Mar 28 08:55:55 CDT 2024