Export SQL Server database to script using a command
I need to export 开发者_如何学Gomy database into a script file using a SQL command.
I'm using MS SQL Server 2010 Express.
Is it possible and if yes whats the command?
This link may be of your use: Generate Script with Data from Database. With it you can use publish command like:
sqlpubwiz script -d AdventureWorks “C:\AdventureWorks.sql”
However its quite easy to use SQL Server Management Studio to export the database.
精彩评论