SQL Server command line backup statement

前端 未结 6 546
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-04 10:41

Does any one know if there is a way to script out SQL Server backup in to a batch file, so that it could be executed from a command line?

6条回答
  •  旧巷少年郎
    2020-12-04 11:17

    You can use sqlcmd to run a backup, or any other T-SQL script. You can find the detailed instructions and examples on various useful sqlcmd switches in this article: Working with the SQL Server command line (sqlcmd)

提交回复
热议问题