Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import BCP file created by replication

Status
Not open for further replies.

jcaulder

Programmer
Apr 22, 2002
241
0
0
US
I have SQL 2000 publisher with MSDE subscribers using Dynamic/Partitioned Merge Replication.

When a snapshot is generated by replication, it creates numerous files including the rows of data to be sent to a subscriber in a .bcp file.

Does anyone know the bcp command to use to import this file manually into a table?

Something like "bcp [tablename] in c:\test.bcp -Usa". . .

I'm not sure what switches to use to support the format replication has saved the bcp file in. It goes through a process of asking me about each field format, prefix, etc and then starts but imports no rows and no errors. I can only assume that I'm specifying something incorrectly in the format. Just wondering if there is a switch I can use that would correctly identify the format replication has exported the bcp as originally.

TIA!

J
 
Just as a followup, I can get the bcp file to import the rows at this point but it does not do it correctly. Many of my guids end up as all '0' and I cannot query the table at all because of an 'invalid datetime' format error.

When I look in the bcp file as text, some of it is readable while other parts appear encoded in some way.

So I guess there is still some magic switch that tells bcp the correct format of the incoming data.

J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top