Buradasın
BCP Utility Usage Guide
sqlserverscience.com/tools/example-bcp-export-import-commands/Yapay zekadan makale özeti
- Main Commands
- BCP.exe copies data between SQL Server instances and databases
- Three main commands: export, format, and import
- Commands use -S, -T, -d, -n, -q parameters for connection and file operations
- Export Process
- First command extracts data to specified output file
- Second command creates BCP format file for DDL definition
- Third command imports data into target database
- Import Options
- TABLOCK parameter enables table-level lock for improved performance
- ORDER clause specifies data sorting order
- CHECK_CONSTRAINTS ensures constraint enforcement during import
- -b parameter controls batch size of rows per transaction
- Import Details
- Default batch size is 1000 rows per transaction
- Failed batches roll back only current batch
- Multiple batches can be imported if batch size is smaller
- Simple recovery databases can truncate transaction logs between batches