Download presentation
Presentation is loading. Please wait.
Published byPolly Burke Modified over 9 years ago
1
BCP - bulk copy program for Microsoft SQL Server 1 BCP - Bulk Copy Program Bulk copying to and from Microsoft SQL Server
2
BCP - bulk copy program for Microsoft SQL Server 2 BCP introduction BCP is use for import and export of data from / to Microsoft SQL Server. BCP is a simple(?) command line tool. BCP has a lot(!) of options
3
BCP - bulk copy program for Microsoft SQL Server 3 BCP import Import data from a file to SQL Server. Database + tables must exist –no creation at run time
4
BCP - bulk copy program for Microsoft SQL Server 4 BCP import example bcp importexport.dbo.employee in newEmployees.txt -c -t, -UNV14 -Uanders -Psecret -E bcpbulk copy program importexport.dbo.employee importexortname of an existing database dbodatabase owner (could we write anything else??) employeename of an existing table (in the importexport database) inusing bcp to copy data INto the table newEmployees.txta text file with the new data -cthe imported file is a text (character) file - t,field terminator is "," -SUNV14server name is "UNV14" -Uandersuser name is "anders" -Psecretpassword is "secret" -Edon't ignore the identity columns in the input file if not new identities are generated
5
BCP - bulk copy program for Microsoft SQL Server 5 BCP export example bcp northwind.dbo.shippers out shipout.txt -c -t, -SUNV14 -Uanders -Psecret bcpbulk copy program northwind.dbo.shipper northwindname of database dbodatabase owner shippersname of table outcopying OUT from the database shipout.txtname of the receiving file -coutput is a text (character) file - t,field terminator in output file is "," -SUNV14server name is "UNV14" -Uandersusername is "anders" -Psecretpassword is "secret"
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.