What are the guidelines to use bulk copy utility of SQL Server?
While importing data, the destination table must already exist.
While exporting to a file, bcp will create the file.
Need permissions to bulk copy data for source and destination files and tables.
Need INSERT and SELECT permissions to bulk copy data from a data file into a table.
What are the guidelines to use bulk copy utility of SQL Server?
Bulk copy is an API that allows interacting with SQL Server to export/import data in one of the two data formats. Bulk copy needs sufficient system credentials.
- Need INSERT permissions on destination table while importing.
- Need SELECT permissions on source table while exporting.
- Need SELECT permissions on sysindexes, sysobjects and syscolumns tables.
bcp.exe northwind..cust out "c:\cust.txt" –c -T
Export all rows in Northwind.Cust table to an ASCII-character formatted text file.