reset password after vdb creation

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
After creating vdb, how can i reset db password of user  automatically ?
Photo of Ramji Rangarajan

Ramji Rangarajan

  • 110 Points 100 badge 2x thumb

Posted 3 years ago

  • 0
  • 1
Photo of Sathees Kodi

Sathees Kodi, Employee

  • 260 Points 250 badge 2x thumb
You can run a post hook script after provisioning VDB where you can change the password.
Photo of Ramji Rangarajan

Ramji Rangarajan

  • 110 Points 100 badge 2x thumb
any sample please. I did write post hook up script. it did not work. there is no log to check where it went wrong.

Thanks
Ramji
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,862 Points 4k badge 2x thumb
Hi,

The hooks should be run at "config clone, post refresh" events.

Sample :

#!/bin/sh
$ORACLE_HOME/bin/sqlplus / as sysdba <<eof
Alter user test identified by test;
eof

Regards,

Mouhssine
Photo of Ramji Rangarajan

Ramji Rangarajan

  • 110 Points 100 badge 2x thumb
This did not work. Delphix suggested to have a shell script at target os.  I did same and script was not called.


thanks
Ramji
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,862 Points 4k badge 2x thumb
Hi,

Can you upload a screen of your hooks.

Regards,

Mouhssine
Photo of Ramji Rangarajan

Ramji Rangarajan

  • 110 Points 100 badge 2x thumb
Photo of Sathees Kodi

Sathees Kodi, Employee

  • 260 Points 250 badge 2x thumb
Please set Oracle_HOME and ORACLE_SID in your script. In order to access sqlplus you need to set the environment correct. 
Photo of Ramji Rangarajan

Ramji Rangarajan

  • 110 Points 100 badge 2x thumb
That is also set.  for some reason script is not trigged after post refresh.

thanks
Ramji
Photo of Sathees Kodi

Sathees Kodi, Employee

  • 260 Points 250 badge 2x thumb
Is it first time you are provisioning this VDB ? If so you need to keep the scripts path under Configure Clone tab. Please have a look at the hook operations options https://docs.delphix.com/display/DOCS50/_hook+operations
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,862 Points 4k badge 2x thumb
Hi,

Can you try please this plan.

Modify the content of you hooks to be :

echo "Invoked refresh hooks by vdb" >> /tmp/hooks

Trigger a refresh on your vdb

Check out if the file was created at /tmp directory of the target server.

Regards,

Mouhssine