SQL Server
  Home arrow SQL Server arrow An Introduction To The Bulk Copy Utility
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
SQL SERVER

An Introduction To The Bulk Copy Utility
By: Mitchell Harper
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 77
    2002-06-12

    Table of Contents:
  • An Introduction To The Bulk Copy Utility
  • What is bulk copy?
  • Using the bcp.exe utility
  • Bcp.exe Example #1
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    An Introduction To The Bulk Copy Utility


    (Page 1 of 5 )

    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.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.

    More SQL Server Articles
    More By Mitchell Harper


       · Thanks a lot... U helped me a lot
     

    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







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek