PDA

View Full Version : any better option than BCP


sachin shukla
12-25-01, 04:32
I have to write a program for data migration between two sybase databases. BCP is very slow. Can U suggest something better.

MattR
12-25-01, 12:31
If they are on the same database server you can do this:
INSERT INTO somedatabase..sometable ( SELECT FROM currenttable )
or
INSERT INTO sometable ( SELECT FROM someotherdb..oldtable )

If they are on different boxes you could set up replication (if you have rep server) I suppose and transfer that way.

Or you could use CIS and set up a proxy table (never tried it so this could be wrong ;)) on one box and simply insert into it.

Check out the manuals and other links in this thread:
http://dbforums.com/t65148.html

ffeingol
12-25-01, 22:30
Just drop the indexes on the table that you are loading. BCP will then go into "fast bcp" mode and it should build much quicker.

Then just rebuild the indexes. If you have a clustered index, use the "with sorted data" option.

Frank