Solved

BCP works fine but dosen't work

Posted on 2010-09-03
3
411 Views
Last Modified: 2012-06-21
This command runs without error
Exec master..xp_cmdShell 'bcp "select * from MyDB.dbo.ftpinf" queryout C:\test.txt -c -T'

the bcp runs fine. No errors but also no file is created?!!?

heres the result
NULL
Starting copy...
NULL
4 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total     : 1      Average : (4000.00 rows per sec.)
NULL

Any ideas??
0
Comment
Question by:janmishkin
[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
3 Comments
 
LVL 12

Expert Comment

by:GMGenius
ID: 33599176
I think your problem is the file path
Try a drive and folder not on C:\ root
0
 
LVL 5

Expert Comment

by:robertg34
ID: 33604494
Are you running the commands directly on the server or on a client ?  This command will place the output file on the c drive of the sql server, not on the c drive of your client where you are running ssms.  
0
 

Accepted Solution

by:
janmishkin earned 0 total points
ID: 33695305
I needed an -S[ServernaME] TAG
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

717 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