Is it possible to restore only the schema and stored procedures from a MS SQL database backup?

社会主义新天地 提交于 2019-12-01 22:15:45

问题


I have a full MS SQL Backup file that I would like to extract the stored procedures and schema from. Is there a way to restore only the schema definitions and stored procedures without restoring the data/table rows?


回答1:


I don't think so, but you could restore it to a temporary database and then script it all from there.




回答2:


Yes its possible in SQL Server 2012. Right click your database -> tasks -> generate scritps ...

Here all options are available.




回答3:


What SQL Server version (and tools) are you using? Under SQL 2000, I remember the "Import/Export Data" wizard, that let you specify which objects you wanted to import and where. You could even perform queries to obtain a subset of data.



来源:https://stackoverflow.com/questions/427526/is-it-possible-to-restore-only-the-schema-and-stored-procedures-from-a-ms-sql-da

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!