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.
| Author |
Topic |
|
padhma.p
Yak Posting Veteran
91 Posts |
Posted - 2009-09-01 : 15:52:13
|
| Hello,I have 3 SP.SP1: spAutoCreateTableInput parameters: month, startdate,enddate,yearUse: creates a table in the DB.SP2: spAutoIncrementDateInput parameters:startdate and enddate in mm/dd/yyyy format only.SP3: spAutoDataCollectionPVZNo input parameters, but just execute this one.My Question:I want to create a batch file which will promt user for input for the SP1 and SP2.I want to connect to SQL SP, make use of the user entered input's via DOS promt as the input for the SP1 and SP2.Execute SP1 first, followed by a success/failure message.Execute SP2 second, followed by a success/failure message.Execute SP3 second, followed by a success/failure message.Is this possible?I have the skeleton os the batch file.Not sure how to connect to SQL SP. I have tried using SQLCMD util as well.Not sure. Any relavent article or guidance would be helpful.Thank you. |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2009-09-02 : 04:58:08
|
| Look up the osql command in Books Online. |
 |
|
|
|
|
|