Backup a Single Table in SQL Server 2008 using SSMS
1. Right-click the database and choose Tasks > Generate Scripts:
2. In the Choose Objects pane, select the table you want to script
3. In the Set Scripting Options pane, click Advanced.
4. In the Types of Data to Script option, choose Schema and Data
Click ‘Next’ through the remaining screens:
…and you will get a script for recreating the table with data.
To export:
ReplyDeletebcp "[MyDatabase].dbo.Customer" out "Customer.bcp" -N -S ServerName -T -E -U"xxxxxx" -P"xxxxxxx"
To import:
bcp "[MyDatabase].dbo.Customer" in "Customer.bcp" -N -S ServerName -T -E -b 10000 -U"xxxxxx" -P"xxxxxxx"