Showing posts with label osql. Show all posts
Showing posts with label osql. Show all posts

Monday, March 26, 2012

how to apply a sql script file on Sql server 2000 without OSql.exe

Hi guys

I need to apply a sql script file on Sql server 2000 by .net 2.0 program. but on the current running machine, there is not Osql.exe file. Do you guys know how to execute the sql file without the command? Is there any way provided in .net library ?

Thanks for you response!

This Should help.|||

Hi Ken

thanks for your response.

if my script file is long with comments,translation. if I combine all text lines in the file into one string to execute on sql, an error will be thrown out. how do you think that situation?

|||

Hi andi,

When you have installed a SQL Server instance, the osql.exe tool will always be installed. If you don't have SQL Server instance, the scripts cannot be applied to any SQL Server instance.

sql

Friday, March 9, 2012

How to add DTS

How can I Add a DTS by Script?
I run a batch script with osql or Query Analyser...
:D
ThanksYou can use SQL-DMO either with VB/VBScript or through sp_OAxxx