Tuesday, March 27, 2012

bulk insertion

hi

hi i have common problem.

which is the best way to insert 1000 rows at a time in sql server 2000.

From where you want to insert?

You can use the following approaches

apporach 1:

Use bcp to backup the data on text file (delimited file) - from soruce server

http://msdn2.microsoft.com/en-us/library/ms162802.aspx

Use BULK INSERT to reload the data on the target server

http://msdn2.microsoft.com/en-us/library/ms188365.aspx

approach 2:

Use DTS to load the data from one server to another server

http://msdn2.microsoft.com/en-us/library/aa902640(SQL.80).aspx

approach 3:

Use linked server to get the source data on the target server

http://msdn2.microsoft.com/en-us/library/aa213778(SQL.80).aspx

|||

If the data is in a delimited text file, use bcp; it's quick and flexible.

Read up on [bcp] in Books Online.

No comments:

Post a Comment