Simples T-SQL Script zum Sichern alle DBs

Gespeichert von drupaladmin am Fr., 02.07.2021 - 14:45

DECLARE @name VARCHAR(50) 
DECLARE @path VARCHAR(400) 
DECLARE @fileName VARCHAR(256) 
DECLARE @fileDate VARCHAR(20)

SET @path = 'Pfad worin die Backup gespeichert werden soll'
 

SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112)
DECLARE db_cursor CURSOR READ_ONLY FOR SELECT name FROM master.sys.databases WHERE name NOT IN ('master','model','msdb','tempdb') AND state = 0  AND is_in_standby = 0

Tags