可否通过命令行创建SQL Express数据库文件? ScottGu 的提到了一个工具SQL Express Utility
SSEUtil.exe is a tool that lets you easily interact with SQL Server. Among other things, it allows you to:
• Connect to the main instance or user-instance of SQL Server.
• Create, attach, detach, and list databases on the server.
• Upgrade database files to match the version of the server.
• Execute SQL statements via the console (similar to SQLCMD).
• Retrieve the version of SQL Server running.
• Enable and disable trace flags (for example, to trace SQL statements sent to the server by any client application)
• List the instances of SQL Server on the local machine or on remote machines.
• Checkpoint and shrink a database
• Measure the performance of executing specific queries.
• Create and playback lists of SQL commands for the server to execute.
• Log all input and output.