开发者

Import SQL server database using batch

开发者 https://www.devze.com 2022-12-27 21:57 出处:网络
I need to import a database into a SQL Server instance using a batch script and the database is provided by an sql 开发者_开发技巧file.

I need to import a database into a SQL Server instance using a batch script and the database is provided by an sql 开发者_开发技巧file.

How can I do This?

The SQL file was generated by the SQL Server management studio.


SQL Server has a command line utility called SQLCMD. It will let you do things like run scripts or restore a database backup. The -i parameter allows you to specify an input file.

There is also an article here that has a quick intro to SQLCMD.

0

精彩评论

暂无评论...
验证码 换一张
取 消