Solved

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

Posted on 2014-11-21
3
473 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 45

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 45

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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 …
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

760 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

21 Experts available now in Live!

Get 1:1 Help Now