Solved

XP.CMDSHELL and SQL Server Problem

Posted on 2008-06-25
1
1,082 Views
Last Modified: 2008-07-07
Trying to run the following command in SQL Server 2005:

declare @cmd char(300)
SET @cmd = 'bcp scout.dbo.woheader in c:DCT\SCOUT\woheader.mobile.492 -t^| -Sdevserver\cdi2 -Usa -Pcv1 -c'
EXEC master..xp_cmdshell @cmd

Get the error message:  
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP host data-file
NULL

Any suggestions ?
0
Comment
Question by:rhhunt
1 Comment
 
LVL 21

Accepted Solution

by:
mastoo earned 500 total points
ID: 21871174
Don't you want another slash like this: C:\DCT\SCOUT  
And that refers to a directory on the database server?
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

821 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