Best way to start a VDB automatically in noarchivelog ?

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered
What is the best way ?Should I use clone hook. ?
What do you suggest in the script ? restart the VDB in mount mode and execute alter database noarchivelog ?

Photo of Marie Labidoire

Marie Labidoire

  • 550 Points 500 badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of David Gillespie

David Gillespie, Employee

  • 1,010 Points 1k badge 2x thumb
Official Response
Hi Marie,

Correct the Configure Clone Hook will run for both a provision and refresh of a VDB when wanting to switch to noarchivelog.

There are two types of operations for a hook, shell script or expect script. We would use shell script, which is the default.

More information  can be found here in our documentation:

Utilizing the Configure Clone hook when provisioning, we would press the Green Plus sign at the top right of the UI window. Verify that it's operation is Run shell script, the default and then just paste something like the following where indicated:

echo “Running Config clone script to switch to noarchivelog” > /tmp/logme.out

sqlplus / as sysdba <<EOF
startup force mount ;
alter database noarchivelog ;
alter database open ;
exit ;

exit 0

You can also flip the VDB card over for an existing VDB and select the hooks tab on the top right and add a configure clone hook. Therefore the next time this VDB is refreshed that hook will run.

I hope this helps.

Dave G.