Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Batch file from isql/osql

Author  Topic 

schinni
Yak Posting Veteran

66 Posts

Posted - 2003-10-01 : 16:30:47
Hello,

can i run a batch file with the osql/isql command
like this
isql -S server1 -E -iC:\test.bat

Thanks,

X002548
Not Just a Number

15586 Posts

Posted - 2003-10-01 : 16:34:34
I'm assuming you mean from inside a sproc...

No.

Use master..xp_cmdshell c:\test.bat



Brett

8-)

SELECT @@POST FROM Brain ORDER BY NewId()

That's correct! It's an AlphaNumeric!
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-10-01 : 17:49:17
No, you run sql scripts with isql/osql.

Batch files would be run directly from the cmd window and not within the utility:

C> test.bat --this runs a batch file from the cmd window
C> osql -Ssomeserver -E -iC:\test.sql --this runs a sql script from osql

Tara
Go to Top of Page

schinni
Yak Posting Veteran

66 Posts

Posted - 2003-10-01 : 20:21:25
Thanks Guys!
Go to Top of Page
   

- Advertisement -