Standby database db_name doubt [message #302278] |
Mon, 25 February 2008 02:51 |
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 #302509 is a reply to message #302502] |
Tue, 26 February 2008 00:09 |
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 #302568 is a reply to message #302561] |
Tue, 26 February 2008 03:05 |
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 #302748 is a reply to message #302676] |
Tue, 26 February 2008 21:53 |
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,
|
|
|
|
|
|
|