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 |
|
allend2010
Starting Member
28 Posts |
Posted - 2003-07-23 : 14:36:04
|
| Hello:I am using oSQL within a batch file to execute a stored procedure. In the sp, I have 3 large insert statements that take awhile. What I would like to do is after each insert segment is complete, is to write to the stdout that that portion of processing has completed. I tried using the PRINT statement but it didn't display until after the entire process completed:INSERT INTO ...PRINT 'Finished first section'INSERT INTO ...PRINT 'Finished second section...and so on...I was wondering if anybody knows a way to accomplish this so that I can just show on the screen that something is happening. Much thanks in advance,Allen D. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-07-23 : 14:46:04
|
| I do not believe that you are going to be able to do that. osql outputs when the specific task has completed and not during. You could use xp_cmdshell in your stored procedure to write something out to a file, but you'll have to check that file every so often to find out its status.Tara |
 |
|
|
Stoad
Freaky Yak Linguist
1983 Posts |
Posted - 2003-07-23 : 15:05:45
|
| useraiserror('qqqqqqqqq', 2, 1) with nowaitinstead ofprint 'qqqqqqqqq'- Vit |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-07-23 : 15:27:29
|
| Cool! I didn't know that you get could do that. I knew about the RAISERROR but didn't know about using it like this.Tara |
 |
|
|
allend2010
Starting Member
28 Posts |
Posted - 2003-07-23 : 15:50:44
|
| Thanks folks, I'll give it a try... |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-07-23 : 15:58:37
|
| You could also net send a message to yourselfmaster..xp_cmdshell 'NET SEND [yourId] First load finished'Brett8-) |
 |
|
|
|
|
|