HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Is it possible to automate the configuration of dataguard broker?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
thedataguardautomatebrokerpossibleconfiguration

Problem

We deploy a number of oracle databases every year and a good percentage of them require a dataguard configuration.

I've developed a script which is able to perform the database synchronization very well:

  • modify init.ora / generate spfile



  • generate listener.ora



  • generate tnsnames.ora



  • create standby control file



  • create standby redo log



  • gather all files in a tar ball ready to be shipped to the standby server.



On the standby server another script:

  • Dispatch the files different data files, control files, redo logs to where they must be



  • Modifies the init.ora and generate the spfile



  • generate listener.ora



  • generate tnsnames.ora



  • run the recover managed standby database command



Then I hit a wall on data guard manager :( How can I automate its configuration.

It would be really great if I could do something like this:

dgmgrl sys/manager -e "create configuration broker1 as primary database is 'primary' connect identifier is to_primary;"

I haven't seen anything like that.

Anybody has an idea of what could be done to perform this automatically?

Solution

Actually, never mind, I've just found the answer ^^

I just had to google the right thing!
http://docs.oracle.com/cd/B19306_01/server.102/b14230/dgmgrl.htm

8.1.1 DGMGRL Optional Parameters

DGMGRL sys/knl_test7@primary "show database 'North_Sales'"

Context

StackExchange Database Administrators Q#10097, answer score: 3

Revisions (0)

No revisions yet.