03-16-2017 02:31 PM
I am using BPLIST to generate the NBIMAGE which I now want to use with my powershell script to automate the SQL SERVER database restore.
Has anyone written a PS script which they are willing to share ?
Appreciate your help.
Thanks
03-17-2017 11:58 AM
I guess have creased something similar PS for RMAN.
For SQL database restore, the bpimagelist doesn't show Database name as "keyword" to drill down further to find the backup image id's that will match with bplist output.
Please review your bpimagelist -L output for the Sql database backup and see if you have something under keyword.
Once you confirme bpimagelist and bplist output is for the same database the restore can be easily automated, i think so.
03-21-2017 06:08 AM
Havn't done a Poweshell script, but managed to do a bat script based on bplist and dbbackex at a former place of employment.
The database name is as far as I remember a part of the NBIMAGE string from bplist.
I used the technote about generating a script by bplist as a starting point, sorry don't have the number right now.
One thing I had to do to get my script to work, was expand the command prompt the script ran in to more than default 80 columns.