?
Solved

XP.CMDSHELL and SQL Server Problem

Posted on 2008-06-25
1
Medium Priority
?
1,086 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
[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
1 Comment
 
LVL 21

Accepted Solution

by:
mastoo earned 1500 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 Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

719 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