April 30, 2009 at 8:45 am
Hi
I have a stored procedure that restores a database based on the database name that gets passed
as a parameter. I can execute this stored procedure in osql or dos by providing this command in dos
osql -E -Q "execute master.dbo.RestoreDBFromBackup 'test1'", however when i save this command to a .bat
file then thereafter double click the bat file it won't work. How do I get to execute this
restore command from a .bat file?
Your response regarding my question will be highly appreciated
April 30, 2009 at 9:22 am
We use perl... to run from .bat file.
perl is free.
Pl. let me know if want more info.
HTH.
Thanx.
Vinay
Thanx.
Vinay
http://rdbmsexperts.com/Blogs/
http://vinay-thakur.spaces.live.com/
http://twitter.com/ThakurVinay
April 30, 2009 at 9:37 am
Hi Vinay thanks for the response
Do you have an alternative suggestion. I deally I wouldn't wan't to use pearl
April 30, 2009 at 9:52 am
I tested and its working.....
make the .bat file as
isql /S /U sa /P /d /i
create another query.txt file where you call the sp... as
exec usp_Vinay
HTH.
Vinay
Thanx.
Vinay
http://rdbmsexperts.com/Blogs/
http://vinay-thakur.spaces.live.com/
http://twitter.com/ThakurVinay
May 4, 2009 at 9:09 am
Thanks very much Viney...its working perfectly!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply