Is it possible to somehow do an unattended restore with prorest? I'm trying to restore a db over an an existing one and I get a question if I want to overwrite. Since I'm do this for multiple db's in a script, I'm missing the -by parameter here.
Cheers
This is an example of a script I use.
echo off SET DLC=C:\OE102B SET PATH=%DLC%;%DLC%\bin;%PATH% echo Deleting Databases..... cd /d C:\Databases\next\yearend\10.2B\ call proshut openstrt -by call proshut paydb -by call proshut userdef -by call prodel openstrt < C:\temp\yes.txt call prodel paydb < C:\temp\yes.txt call prodel userdef < C:\temp\yes.txt call prorest openstrt openstrt.bak call prorest paydb paydb.bak call prorest userdef userdef.bak call proserve openstrt call proserve paydb call proserve userdef echo Complete. pause.
Hi,
You can pipe in a response.
For example create a file called Yes.txt and just put a Y in it followed by a blank line.
The in your script you would do the following.
prorest dbname dbname.bak < C:\temp\yes.txt
Hope that helps.
Paul
Hi,
You can pipe in a response.
For example create a file called Yes.txt and just put a Y in it followed by a blank line.
The in your script you would do the following.
prorest dbname dbname.bak < C:\temp\yes.txt
Hope that helps.
Paul
This is an example of a script I use.
echo off SET DLC=C:\OE102B SET PATH=%DLC%;%DLC%\bin;%PATH% echo Deleting Databases..... cd /d C:\Databases\next\yearend\10.2B\ call proshut openstrt -by call proshut paydb -by call proshut userdef -by call prodel openstrt < C:\temp\yes.txt call prodel paydb < C:\temp\yes.txt call prodel userdef < C:\temp\yes.txt call prorest openstrt openstrt.bak call prorest paydb paydb.bak call prorest userdef userdef.bak call proserve openstrt call proserve paydb call proserve userdef echo Complete. pause.
Hi,
You can also echo a Y into the command:
echo y | prorest sports sports.bak
I use this method in my scripts (both unix and windows) and it works without the need of a file on disk although I still pipe in from a file when there are more complicated prompts that I need to answer.
I would have hoped by now that there was a command line option to confirm without prompting (like a -y) to automate scripted tasks without having to find other ways to answer prompts.
HTH.
I don't fabricate too many DBA scripts (as you might have guessed), but I was indeed surprised there's no -y, -by or whatever.
Didn't know you could do a echo :)