May 28, 2004 at 9:21 am
I need to create an osql script to restore a database. ie use commandprompt
How can this be done. examples etc....
May 31, 2004 at 2:40 am
the osql scripts are nothing but TSQL statments called from command prompt. Build your restore command and call it with osql.
e.g.
osql -E -S . -Q "select @@version"
osql -E -S . -Q "RESTORE DATABASE DB FROM DISK=N'c:\abc.bak' "
May 31, 2004 at 9:21 am
Test your restore in QA, then take the script adn put it in the -Q parameter as shown by Amit above.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy