Solved

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

Posted on 2014-11-21
3
619 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 49

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 49

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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

730 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