?
Solved

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

Posted on 2014-11-21
3
Medium Priority
?
778 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 51

Accepted Solution

by:
Vitor Montalvão earned 2000 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 51

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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 set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

764 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