Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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:

  1. modify init.ora / generate spfile
  2. generate listener.ora
  3. generate tnsnames.ora
  4. create standby control file
  5. create standby redo log
  6. gather all files in a tar ball ready to be shipped to the standby server.

On the standby server another script:

  1. Dispatch the files different data files, control files, redo logs to where they must be
  2. Modifies the init.ora and generate the spfile
  3. generate listener.ora
  4. generate tnsnames.ora
  5. 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?

share|improve this question
    
You can use something like dgmgrl user/pass@db <<EOF show configuration exit EOF –  user33532 Jan 29 at 14:18

1 Answer 1

up vote 2 down vote accepted

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'"

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.