Solved

XP.CMDSHELL and SQL Server Problem

Posted on 2008-06-25
1
1,079 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
Comment Utility
Don't you want another slash like this: C:\DCT\SCOUT  
And that refers to a directory on the database server?
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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 …
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 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

11 Experts available now in Live!

Get 1:1 Help Now