Solved

bcp command failed

Posted on 2006-06-29
7
429 Views
Last Modified: 2012-08-14
Hi,
I has run bcp command as below in cmd prompt.

bcp "externalFF.tempsn" out "tempsnxx.txt" -c -q -U"sa" -P"BruderX4$",

however it return with error msg as below, I had run this at CMD windows in the server that run the database engine.

SQLState = S0002, NativeError = 208
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'externalFF
.tempsn'.
0
Comment
Question by:motioneye
  • 5
  • 2
7 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17015190
bcp dbName.owner.TableName  out  completepath\Filename  -c -q  -Usa -PBruderX4$

here is an example

BCP Northwind.dbo.Categories out c:\categories.txt -n -Smyservername -Usa -PBruderX4$
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17015194
I missed to specify the servername in your query

bcp dbName.owner.TableName  out  completepath\Filename  -c -q  -Usa -PBruderX4$ -Smyservername
0
 

Author Comment

by:motioneye
ID: 17015437
Hi,
How could I use this file agaib to get it insert into other tables?? how do I use bcp insert here?
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17015581
You can do this in the following way, you need to replace the 'out' with 'in', in your above query

BCP Northwind.dbo.Categories in c:\categories.txt -c -Smyservername  -Uusername - Ppassword
0
 

Author Comment

by:motioneye
ID: 17015913
Ok,
I got it, so mean to get it transfer to another table that have same column and data type, I should not define the indexes or any constraints earlier, this has to be done right after the data was bcp in...

am I rite???
0
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 17015999
motioneye,
>  I should not define the indexes or any constraints earlier

Not always true. But the Better option is to continue as you mentioned..

:)
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17016342
Thanks for Grade 'B'

Please re-read the EE Guidelines regarding grading Standards at:

What's the right grade to give?
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/help.jsp#hi73

And in particular this section:

<quote>
C: Because Experts' reliability are often judged by their grading records, many Experts would like the opportunity to clarify if you have questions about their solutions. If you have given the Expert(s) ample time to respond to your clarification posts and you have responded to each of their posts providing requested information; or if the answers, after clarification, lack finality or do not completely address the issue presented, then a "C" grade is an option. You also have the option here of just asking Community Support to delete the question.
Remember, the Expert helping you today is probably going to be helping you next time you post a question. Give them a fair chance to earn an 'Excellent!' grade and they'll provide you with some amazing support. It's also true that a "C" is the lowest grade you can give, and the Experts know that -- so use it judiciously.

Only the Moderators and Page Editors have the choice to give a D grade. Beyond that, in a practical sense, the grading guidelines have "softened" a bit over the last year or two; one might expect that the majority of grades would be Bs (a standard "bell" curve), but the fact is that the culture of the site has caused there to be an inordinately high percentage of As. The Moderators have been instructed to ensure that the As they award are actually "Excellent" answers. Similarly, the C grade is the lowest that can be given by a member, a fact which should be kept in mind when grading as well.

The use of a C in a vindictive manner is likely to be changed by a Moderator. You may not like the answer you get, and in some cases, and you may not like the way it is delivered, but if it is deemed to be accurate, no less than a B is an acceptable grade.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

713 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