failover steps when primary DB server problem occurs [message #308566] |
Mon, 24 March 2008 22:08 |
NIckman
Messages: 64 Registered: May 2007
|
Member |
|
|
Hi
i have data guard and oracle 9i.I have 2 servers.
primary and secondary.i want to know what steps perform when primary server fails. both severs are unix os.
pl let me know if i miss any step.
DGMGRL> connect sys/oracle@to_secondary
primary server is not avaiable. so, i logged on seconday stand by server.
it is in max protection mode.
i think i need connected to secondary sever.(because priamry server failed)
DGMGRL>show configuration
i think it says secondary server is stand by mode.
primary unknown.(it failed)
DGMGRL>FAILOVER TO STANDBY GRACEFUL;
if thE above command is is not success, i will use forced
may be i will get some data loss.
DGMGRL>FAILOVER TO STANDBY FORCED;
DGMGRL>show configuration
it shows now stand by DB is primary DB after failover command.
do i need to perform any other steps or command.
i think i do not need use any restart or shutdown commands.
i think, when i use failover command, i think it automatically
restart the database.
then i will change tns names to standby server.
afte that NOW stand by server act as PRIMARY server.am i right?
pl tell me any thing i missing.
thx,N.
|
|
|
Re: failover steps when primary DB server problem occurs [message #309786 is a reply to message #308566] |
Fri, 28 March 2008 15:38 |
NIckman
Messages: 64 Registered: May 2007
|
Member |
|
|
hi
i found this info.
when failover occurs on primary DB,
you will connected to seconday standby server
issue these 4 commands down bellow will complete whole failover procedure.
both DB are in max protection mode
Quote: | DGMGRL> failover to 'secondary DB name' graceful
show configuration
show site
show resource
|
and change tns names to secondary server.
i am seeing on various manules,
you need to change first to max perforamce mode and need to verify logs also and copy logs to stand by and need to restart DB and mount the data bases. do we need to do all these things or data gurad will take everyting.
thx,n.
|
|
|
Re: failover steps when primary DB server problem occurs [message #311490 is a reply to message #309786] |
Fri, 04 April 2008 11:20 |
DreamzZ
Messages: 1666 Registered: May 2007 Location: Dreamzland
|
Senior Member |
|
|
But before issuing this command you have to setup you data broker!!!
DATA GUARD BROKER
The Data Guard broker is a distributed management framework that automates and centralizes the creation, maintenance, and monitoring of Data Guard configurations. You can use either the Oracle Enterprise Manager graphical user interface (GUI) or command-line interface (CLI) to automate and simplify:
• Creating and enabling Data Guard configurations, including setting up log transport services and log apply services.
• Managing an entire Data Guard configuration from any system in the configuration.
• Managing and monitoring Data Guard configurations that contain Real Application Clusters primary or standby databases.
BROKER CONFIGURATION:
On both Primary and Standby sites, change the initialization parameter in the spfile to enable the Data guard broker.
• SQL> Alter system set dg_broker_start=True scope=both;
System Altered.
On the PRIMARY site, open the ‘cmd’ and start Command Line Interface (CLI) of the Dataguard Broker (DGMGRL).
C:\> dgmgrl
DGMGRL for 32-bit Windows: Version 10.2.0.1.0 - Production
Copyright (c) 2000, 2005, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL>_
Now connect to the database through the service you made previously.
DGMGRL> connect sys/oracle@to_primary
Connected.
Create broker configuration.
DGMGRL> create configuration ‘broker1’ as
> primary database is ‘primary’
> connect identifier is primary;[/code]
(‘primary’ in Connect identifier is the service name through which the broker is connected to the PRIMARY database)
Add Standby Database to the above configuration.
DGMGRL> Add database ‘standby’ as
> connect identifier is to_standby
> maintained as physical;
(‘to_standby’ in Connect identifier is the service name through which the broker is connected to the STANDBY database)
Now the configuration has been set up but it is still disabled. You can view the configuration by executing:
DGMGRL> show configuration
Configuration
Name: broker1
Enabled: NO
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLE
Databases:
primary - Physical standby database
standby - Primary database
Current status for "broker1":
DISABLE
The next step is to ENABLE the configuration ‘broker1’.
DGMGRL> enable configuration;
Enabled
Again view the configuration.
DGMGRL> show configuration
Configuration
Name: broker1
Enabled: YES
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLE
Databases:
primary - Physical standby database
standby - Primary database
Current status for "broker1":
SUCCESS
Switchover:
Now we are ready to switch over the PRIMARY database Role to STANDBY database Role.
DGMGRL> switchover to ‘Standby’;
…..
…..
Primary Database Successfully converted to Physical Standby.
You can again switch over the Standby Database to Primary by executing following command.
DGMGRL> switchover to ‘Primary’;
…..
…..
Standby Database is successfully converted to Primary Database.
Failover:
Failover can be done through the same configuration without any alteration. You simply need to execute following command:
DGMGRL> failover to ‘Standby’;
….
Failover to standby succeeded.
And also…
DGMGRL> failover to ‘Primary’;
….
Failover to primary succeeded.
[Updated on: Fri, 04 April 2008 11:25] Report message to a moderator
|
|
|
|
|
|
Re: failover steps when primary DB server problem occurs [message #324224 is a reply to message #313463] |
Sat, 31 May 2008 14:11 |
NIckman
Messages: 64 Registered: May 2007
|
Member |
|
|
Hi
server1 is primary
server2 is stand by.
server1 fails
I need to do failover to server2
after logging on server2 dataguard.
Quote: |
DGMGRL> failover to ‘server2’;
do I need to copy tnsnames to successfully complete failover procedure.pl let me know.
$cp tnsnames.ora.server2 tnsnames.ora
|
thx,N.
|
|
|
Re: failover steps when primary DB server problem occurs [message #328471 is a reply to message #324224] |
Fri, 20 June 2008 05:21 |
ranvijaidba
Messages: 71 Registered: May 2008 Location: Bangalore
|
Member |
|
|
Database version:10.2.0.1.0
I sucessfully created the broker and also added the standby database but when i am passing this command it is showing error
DGMGRL> show configuration
Configuration
Name: broker1
Enabled: YES
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLED
Databases:
primary - Primary database
phstandby - Physical standby database
Current status for "broker1":
Warning: ORA-16607: one or more databases have failed
DGMGRL> show database phstandby
Database
Name: phstandby
Role: PHYSICAL STANDBY
Enabled: YES
Intended State: ONLINE
Instance(s):
phstandby
Current status for "phstandby":
Error: ORA-12541: TNS:no listener
But listener is running and i am able to connect.Please suggest me what i have to do.
|
|
|
|