Home » Server Options » Data Guard » Service Name in Data Guard (Oracle 11)
Service Name in Data Guard [message #654254] Thu, 28 July 2016 14:14 Go to next message
lol1975
Messages: 7
Registered: June 2016
Junior Member
Hi
I need configure and my listener and tnsnames service in a Data Guard cluster, so that the base was available under the same name, regardless of the server on which the current is running.

I know like I should do "service name", but I can't deal with it.

My databases name on cluster nodes: db and db_stby

My server name: primarysrv and secondarysrv

Application use global name: "database".


If someone help me? Sad
Re: Service Name in Data Guard [message #654256 is a reply to message #654254] Thu, 28 July 2016 14:30 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Quote:
I can't deal with it

What exactly do you mean by that?
I fail to understand your environment.
Do you have RAC (primary) and want a Dataguard on RAC standby (secondary)?
In other words, RAC to RAC standby?

[Updated on: Thu, 28 July 2016 14:31]

Report message to a moderator

Re: Service Name in Data Guard [message #654257 is a reply to message #654256] Thu, 28 July 2016 14:38 Go to previous messageGo to next message
lol1975
Messages: 7
Registered: June 2016
Junior Member
I haven't RAC. I have Data Guard only.

After the crash I want to switch my base in Data Guard, and I want to make it available for application under the same name.

No "db" or "db_stby" but ALWAYS as a "database".
Re: Service Name in Data Guard [message #654258 is a reply to message #654257] Thu, 28 July 2016 14:59 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
It sounds as though you have single instance primary and standby running in one cluster. So all you need to do is register a service to start on whichever database has he primary role. To see the syntax:
srvctl add service -h
Re: Service Name in Data Guard [message #654259 is a reply to message #654257] Thu, 28 July 2016 15:05 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Then why are you throwing "cluster" everywhere?

>> No "db" or "db_stby" but ALWAYS as a "database".
That is how it supposed to work.
You create db_name and use it after switch over. Only db_unique_name will differ.
Re: Service Name in Data Guard [message #654260 is a reply to message #654258] Thu, 28 July 2016 15:10 Go to previous messageGo to next message
lol1975
Messages: 7
Registered: June 2016
Junior Member
John Watson wrote on Thu, 28 July 2016 14:59
It sounds as though you have single instance primary and standby running in one cluster. So all you need to do is register a service to start on whichever database has he primary role. To see the syntax:
srvctl add service -h



And do if I only have Data Guard database of primary and standby I have to register a service ? Not enough entries in the tnsnames.ora and listener.ora?
Re: Service Name in Data Guard [message #654261 is a reply to message #654260] Thu, 28 July 2016 15:52 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
I don't really understand your question. So all I can do is repeat: register a service that will be started on whichever database is the primary.
Your tnsnames.ora entry will contact the scan listeners and request a session for that service.
Re: Service Name in Data Guard [message #654262 is a reply to message #654257] Thu, 28 July 2016 16:04 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
lol1975 wrote on Thu, 28 July 2016 12:38
I haven't RAC. I have Data Guard only.

After the crash I want to switch my base in Data Guard, and I want to make it available for application under the same name.

No "db" or "db_stby" but ALWAYS as a "database".


consider to actually Read The Fine Manual that contains answers to your questions

https://docs.oracle.com/database/121/SBYDB/toc.htm
Re: Service Name in Data Guard [message #654331 is a reply to message #654261] Sat, 30 July 2016 16:39 Go to previous messageGo to next message
lol1975
Messages: 7
Registered: June 2016
Junior Member
John Watson wrote on Thu, 28 July 2016 15:52
I don't really understand your question. So all I can do is repeat: register a service that will be started on whichever database is the primary.
Your tnsnames.ora entry will contact the scan listeners and request a session for that service.


in other words:

How can the clients automatically connect to the new Primary database (previously Standby database) in case of failover/switchover using Tnsnames.ora without changing tnsnames.ora file on each client machine?
Re: Service Name in Data Guard [message #654332 is a reply to message #654331] Sat, 30 July 2016 17:09 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
http://www.oracle.com/technetwork/database/features/availability/maa-wp-11gr2-client-failover-173305.pdf

If application is 3-tier, the end user/client continues to connect to same collection of Application Server node 100% oblivious to the underlying database sever system
Re: Service Name in Data Guard [message #654335 is a reply to message #654331] Sun, 31 July 2016 00:31 Go to previous message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
You said that your Data Guard environment is in a cluster. That means you need a tnsnames.ora entry that points to the cluster's SCAN listeners. The whole point of the SCAN is that it is tha Single Client Access Name: one name that conceals the cluster topology. The single name through which clients can get to any database. You really need to talk to your DBA about this.
Previous Topic: Standby database creation (Primary db RACOnenode) standby db in single instance db having asm disk
Next Topic: archive log gap
Goto Forum:
  


Current Time: Thu Mar 28 14:50:20 CDT 2024