October 1, 2010 at 12:36 pm
Is the script a bunch of insert commands? This would have to be done using the sqlcmd utility.
Any chance of breaking it down into segments, say by table?
does it handle referential integrity?
I would have gone for BCP files myself.
---------------------------------------------------------------------
October 1, 2010 at 12:40 pm
GilaMonster (10/1/2010)
Generate script with data is NOT one of the ways I'd recommend for moving the data. SSIS, mcp or import/export wizard are far more effective.
yes, having it done by a Microsoft Certified Professional is another way. 🙂
---------------------------------------------------------------------
October 1, 2010 at 12:46 pm
I would agree with Gail that if this file is insert statements this is not the best way to do this. Presuming your client sent these files to you in this format I would go back and ask for the data in a more manageable format, which means bcp files preferably or at least the data divided up, if you cannot connect the servers and therefore use SSIS
---------------------------------------------------------------------
October 1, 2010 at 12:50 pm
Thanks everyone.
Yes.. Our client sent a sql file with bunch of insert statements and I had to split the files to run in the query.. I thought BCP utility works only within a network between 2 sql servers connections.. Is it possible to get a bcp export and use that to import in our database?
How can I get the data divided otherwise??
Please help. Thank you
October 1, 2010 at 1:02 pm
newbieuser (10/1/2010)
Yes.. Our client sent a sql file with bunch of insert statements and I had to split the files to run in the query.. I thought BCP utility works only within a network between 2 sql servers connections.. Is it possible to get a bcp export and use that to import in our database?
yes, bcp out to a series of flat files on a per table basis, send those to you by email, sftp, however, you then load them in using either bcp or bulk insert. Unload in native format and should be problem free.
How can I get the data divided otherwise??
they should send it to you divided by table level at least. For both bcp and inserts you can split the files into segments as much as you like.
be aware of log file growth especially if inserts are used.
---------------------------------------------------------------------
October 1, 2010 at 2:29 pm
Can you please provide me an example of bcp export and import.. I google'd some examples but they all reference exporting single table but not the full database..
Thank you so much
October 1, 2010 at 3:38 pm
BOL is as good a resource as any. You will have one BCP statement per table.
---------------------------------------------------------------------
Viewing 7 posts - 16 through 21 (of 21 total)
You must be logged in to reply to this topic. Login to reply