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 |
TAS
Yak Posting Veteran
65 Posts |
Posted - 2004-08-19 : 15:12:25
|
I run this:DECLARE @result intEXEC @result = xp_cmdshell 'dir *.exe'IF (@result = 0) PRINT 'Success'ELSE PRINT 'Failure'I got result like this:Server: Msg 2812, Level 16, State 62, Line 2Could not find stored procedure 'xp_cmdshell'.FailureAnyone knows why? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-08-19 : 15:29:47
|
xp_cmdshell exists in master. So if you are in a different database, then use the 3 part naming convention for it:master.dbo.xp_cmdshellTara |
|
|
|
|
|