Home arrow SQL Server arrow An Introduction To The Bulk Copy Utility
SQL SERVER

An Introduction To The Bulk Copy Utility


There are a number of ways to import and export data with SQL Server 2000. Bulk copy is one of them. In this article Mitchell introduces us to basic import/export functionality with the bulk copy command utility.

Author Info:
By: Mitchell Harper
Rating: 4 stars4 stars4 stars4 stars4 stars / 98
June 12, 2002
TABLE OF CONTENTS:
  1. · An Introduction To The Bulk Copy Utility
  2. · What is bulk copy?
  3. · Using the bcp.exe utility
  4. · Bcp.exe Example #1
  5. · Conclusion

print this article
SEARCH DEVARTICLES

An Introduction To The Bulk Copy Utility
(Page 1 of 5 )

Picture this. You have to export 100,000 rows of customer information from your SQL Server 2000 database into an SQL-native file format for importing into a database half way across the world.

These rows of data will be used to populate a customer database for your new office opening in Paris. Each row needs to have its data values preserved and because you’re exporting 100,000 rows of data, the export needs to be quick. Very quick.

What do you use?

SQL Server comes with a number of different ways to quickly import and export data from various sources and in various formats. Basically, there are three methods that we could use to do it:
  • Use the bulk copy API's to write a custom C++ application to extract and then import the rows from the database.
  • Use data transformation services (DTS) to create a package to handle the export and re-import of the rows.
  • Use the bcp.exe command line utility to both import and export the rows to a file.
In this article we're going to take a look at using the bulk copy utility that ships with SQL Server to import and export rows quickly and easily from the command line.

To implement the bulk copy sample that we're going to look at in this article, you should be sitting in front of a PC where SQL Server 7/2000 is installed. You should have unrestricted administrative privileges at both the operating system and database level.
blog comments powered by Disqus
SQL SERVER ARTICLES

- Executing SQL Server Stored Procedure from P...
- How to Search for Date and Time Values Using...
- Replication: SQL Server 2000 - Part 2
- Replication: SQL Server 2000 - Part 1
- SQL Sever: Storing Code in Binary or Text Fi...
- Execute SQL on Multiple Tables/Columns - New...
- How to Connect to a SQL Server from Visual F...
- SQL Server Hardware Tuning and Performance M...
- Primary Key on Multiple Tables – New RDBMS C...
- Migrating from Sybase to SQL Server
- What's Best for DBAs? GUI or T-SQL Comma...
- How to Perform a SQL Server Performance Audit
- An Introduction To The Bulk Copy Utility
- SQL Server Stored Procedures 101
- Building Your First SQL Server 2000 Database

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials