Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1064
  • Last Modified:

Stored procedure error [SQLSTATE 4200] (Error 2812). This step failed

Hi,

I'm receiving the following error "Could not find stored procedure 'master..xp_cmshell'. [SQLSTATE 42000] (Error 2812).  The step failed." when I execute my stored procedure.

Here is the stored procedure syntax.

DECLARE @sql VARCHAR (8000);
SELECT @sql = 'bcp "SELECT * FROM dbo.vw_DirDailyActual ORDER by Date, DirCode" queryout  
 "P:\Shared Information\Extracts\DB_Admin\dirdailyactual.csv" -T -c';
exec master..xp_cmshell @sql;

I have admin privileges.  Please advised
0
kdbworld
Asked:
kdbworld
  • 2
1 Solution
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
It's a typo. Should be xp_cmdshell
0
 
kdbworldAuthor Commented:
Thanks, I feel embarass that I didn't catch this error.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
No worries. There are times that a 2nd pair of eyes is necessary. It happens to everyone.
Cheers.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now