My Blog List

Wednesday, January 9, 2013

BCP Utility in SQL Server

The bcp utility bulk copies data between an instance of Microsoft SQL Server and a data file in a user-specified format. The bcp utility can be used to import large numbers of new rows into SQL Server tables or to export data out of tables into data files. Except when used with the queryout option, the utility requires no knowledge of Transact-SQL. To import data into a table, you must either use a format file created for that table or understand the structure of the table and the types of data that are valid for its columns.

to know more please refer to this link - http://msdn.microsoft.com/en-us/library/ms162802.aspx

2 comments:

Priya said...

Is there a similar utility available in oracle to do the same. In our project, we need to support both SQL and Oracle. for SQL we have the procedures ready and we plan to use BCP technique to export result into excel sheet. we are still looking for an equivalent option in oracle. please suggest

Deep said...

There are several tools, the most similar probably being SQL*Loader. Exp/imp and Oracle Data Pump for moving of data, UTL_FILE package and with this package, you can read/write files from pl/sql.