Solved

bcp command failed

Posted on 2006-06-29
7
430 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
[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
  • 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how the fundamental information of how to create a table.

733 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