How to back up SQL 2008 tables and stored procedures?

Last night I received a complete shock from Dilbert.com (so be careful). This is quite invasive when I am about to perform a full system restore. The only thing I need to save on my PC is the database (consisting of only tables and stored procedures) in SQL 2008. How can I export them so that after recovery I can easily import them. I thought about doing Access, but it is never completely clean (data types change, etc.).

+3
source share
3 answers

In addition to the backup operation that restores everything, you can also use the Generate Scripts option in SQL Server Management Studio to create a text dump of all tables, keys, stored procedures, users, etc. This option is available by selecting your database (left-click once), right-click to get the options menu, then select "Tasks" (which opens a new submenu) and then "Generate Scripts ...". Please note that the script wizard is NOT an option to "Script Database As". The "Script Database As" option is very limited and will not give you many of the database objects needed to fully restore the schema.

0
source

SQL Server Management Studio. .

+3

Alternatively, since you are still dropping the machine, just separate the database. Then you can copy the file to an external hard drive or to another computer.

0
source

Source: https://habr.com/ru/post/1735044/


All Articles