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 |
|
Pezamystik
Starting Member
8 Posts |
Posted - 2000-11-29 : 13:21:44
|
| I am getting 'Message 2812, Level 16, State 4' when I try to run the query below. I am currently running SQL Server version 6.50.409 on Windows NT Version 4.0, Service Pack 4. The procedure xp_cmdshell is owned by the dbo and I am connected as the sa. I believe I made an error in the usage of the apostrophe's.USE masterSET NOCOUNT ONDECLARE @pc int, @cmd char(32)SELECT @pc = 1WHILE @pc < 25BEGIN SELECT @cmd = RTRIM ('xp_cmdshell ' + '''ping servername' + RTRIM (CONVERT (char(2), @pc)) + 'a' + '''') EXEC @cmd SELECT @pc = @pc + 1ENDThe purpose of this query is to ping the servers on one side of a duplexed network. Any help that can be offered is greatly appreciated. Have a Groovy Day!!! |
|
|
|
|
|