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

StackOverflow https://stackoverflow.com/questions/427526

  •  06-07-2019
  •  | 
  •  

Question

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?

Was it helpful?

Solution

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

OTHER TIPS

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

Here all options are available.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top