Created
August 29, 2013 11:32
-
-
Save vladaman/6376946 to your computer and use it in GitHub Desktop.
Export all tables into individual files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* MS SQL Commands */ | |
exec sp_configure 'show advanced options', 1 | |
RECONFIGURE | |
exec sp_configure 'xp_cmdshell', 1 | |
RECONFIGURE | |
exec sp_MSforeachtable 'master..xp_cmdshell ''bcp "SELECT * FROM DBName.?" queryout "Z:\?.txt" -S localhost -T -c -q''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment