MS SQL server data dump
Ways to dump database content:
You may use bcp command to dump database content to text file.
- DTS or SSIS
- bcp
You may use bcp command to dump database content to text file.
SET @cmd = 'bcp "select * from mytable where {your condition} ORDER
BY {sorting}"'
+ ' queryout Z:\outputfilename' +
'.TXT -c -Sservername -Uusername -Ppassword'
EXEC @rc = master..xp_cmdshell @cmd
Comments