Solved

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

Posted on 2014-11-21
3
525 Views
Last Modified: 2014-11-21
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
Comment
Question by:kdbworld
  • 2
3 Comments
 
LVL 46

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40457201
It's a typo. Should be xp_cmdshell
0
 

Author Closing Comment

by:kdbworld
ID: 40457365
Thanks, I feel embarass that I didn't catch this error.
0
 
LVL 46

Expert Comment

by:Vitor Montalvão
ID: 40457371
No worries. There are times that a 2nd pair of eyes is necessary. It happens to everyone.
Cheers.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now