|
I am on windows 2003 and SQL server 2000. I have a stored procedure "XYZ" which accepts input parameters "P", "Q". Can anyone tell me, How can I call this stored procedure from the command prompt (Dos prompt) from another workstation. Is it possible to invoke this procedure from any workstation or do I need to run this on the same server where my database is installed ? I am new to SQL server 2000/2005. Any help will be greatly appreciated. With Regards Novice
(comments are locked)
|
|
Edited to use two-part naming convention for stored procedure (schema.spname). SQL Server 2000 syntax: Use osql. Here is an example, but check the link for more options.
SQL Server 2005 syntax: Use sqlcmd. Again, this is just a simple example. +1, but remember to owner qualify that proc name... :)
Nov 13 '09 at 05:55 AM
Matt Whitfield ♦♦
touche! ... done.
Nov 13 '09 at 01:07 PM
Tom Staab
(comments are locked)
|
|
This is a copy of my "do_sqlcmd" (very much the same as osql) batch file. All calls and procedures are text files that this batch file uses.
(comments are locked)
|
|
Yes , lookup the sqlcmd utility in BOL. sqlcmd is only available in SQL Server 2005 and beyond.
Nov 13 '09 at 05:16 AM
Tom Staab
(comments are locked)
|

