March 16, 2006 at 5:09 am
not a very sql question but i thought you might be able to help. i have to learn how to write ntbatch files that run sprocs and and file editing functions. i have been able to do this to a limited extent, but im wondering if anyone out there uses msbach 3.0, do they have a list of commands compatiable with it? i believe it has extra cmmands not availiable simply in windows.thanks all
March 16, 2006 at 10:57 am
You have to write batch files or scripts? I'm hoping you mean the latter. Executing stored procedures and editing files is easy using scripts. You have access to CreateObject() which allows you to instantiate the ADO objects for accessing a database, and you have access to Scripting.FileSystem object for file manipulation.
K. Brian Kelley
@kbriankelley
March 20, 2006 at 12:37 am
If you need to execute SQL stuff from a command prompt (batch file), run the OSQL utility with the -Q or -i parameters. Look in SQL BooksOnline for osql or run
osql /?
from the command prompt.
There are many sites around that discuss many neat tricks when writing batch files.
If by msbatch 3.0 you mean the BETA batch file interpretor for windows vista, then yes, it has many new commands and looks quite promising, although I haven't had an in-depth look at it
December 28, 2011 at 3:19 pm
hi,
I need some help in msbatch
how do i know the jobname from script code. I need jobname value to be used in my script
Thanks,
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply