简体   繁体   English

SQL Server Management Studio:备份和还原没有数据的数据库

[英]SQL Server Management Studio: Backup and restore database without data

Is there a way to backup and restore a database without the data. 有没有一种方法可以在没有数据的情况下备份和还原数据库。 I just want the tables, scheme, stored procedures, etc. without the data. 我只希望表,方案,存储过程等没有数据。

  1. How to backup the database? 如何备份数据库?
  2. How to restore it in SSMS? 如何在SSMS中还原它?

If I'm not mistaken you can do this: 如果我没记错的话,您可以这样做:

  1. Right click the database 右键单击数据库
  2. Select Script Database As 选择Script Database As
  3. Select Create to 选择Create to
  4. Select file 选择file

This gives you a script that you can run on a different server to set up the db. 这为您提供了一个脚本,您可以在其他服务器上运行该脚本来设置数据库。

Update: 更新:

You probably need to follow the steps here 您可能需要按照这里的步骤

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM