| Comment | SQLServer Stored Procedure
PURPOSE
Dump scriptfile to create TMP_SURVIVE database.
The output filename is survive_script.sql and is dumped to the given dump_path.
The dump_path must exist and will be checked.
With the generated script, it is possible to create a temporarily database TMP_SURVIVE,
which holds all necessary procedures to restore user databases from backup files.
PARAMETERS
- 1 @dump_path VARCHAR(255) Path to dump file to.
USED OBJECTS
- dbo.prc_restore_database (SP in local database) + referenced procedures and functions
- dbo.prc_save_text_to_file (SP in local database)
- dbo.fun_FolderExist (UDF in local database)
- sys.all_objects
- sys.sql_modules
- sys.sql_expression_dependencies
SQLSERVER CONFIGURATION
- OLE Automation has to be enabled.
EXAMPLES
EXEC dbo.prc_dump_survive_script @dump_path='C:\Data\MSSQL\survive'
HISTORY
2026-04-09 - Created procedure
2026-04-10 - Renamed procedure
- Changed output filename
2026-05-12 - Bug fix: Included wrong procedure name in survive_script
TAGS
<program>
<description>Dump scriptfile to create SURVIVE database</description>
<generic>0</generic>
<minversion>12</minversion>
<author>Gerrit Mantel</author>
<created>2026-04-09</created>
<lastmodified>2026-05-12</lastmodified>
</program> |