forked from vincent/notebook
35 lines
814 B
MySQL
35 lines
814 B
MySQL
|
-- sauvegardez en mode complet les bases : master, msdb, DB_GRAND_HOTEL
|
|||
|
BACKUP DATABASE master
|
|||
|
TO DISK = 'master.bak'
|
|||
|
WITH COMPRESSION, RETAINDAYS = 3;
|
|||
|
BACKUP DATABASE msdb
|
|||
|
TO DISK = 'msdb.bak'
|
|||
|
WITH COMPRESSION, RETAINDAYS = 3;
|
|||
|
BACKUP DATABASE DB_GRAND_HOTEL
|
|||
|
TO DISK = 'DB_GRAND_HOTEL.bak'
|
|||
|
WITH COMPRESSION, RETAINDAYS = 3;
|
|||
|
-- planifi<66> <20> 22h tous les jours
|
|||
|
|
|||
|
-- sauvegarder le journal de transaction de la base DB_GRAND_HOTEL
|
|||
|
BACKUP LOG DB_GRAND_HOTEL
|
|||
|
TO DISK = 'DB_GRAND_HOTEL.trn'
|
|||
|
WITH RETAINDAYS = 3;
|
|||
|
-- planifi<66> toutes les 20 minutes
|
|||
|
|
|||
|
RAISERROR('Mon erreur', 16, 1) WITH LOG;
|
|||
|
|
|||
|
EXECUTE AS USER = 'USR_ECRIVAIN'
|
|||
|
|
|||
|
RAISERROR('Mon erreur', 16, 1) WITH LOG;
|
|||
|
|
|||
|
-- IDERA, QUEST, APEX, REDGATE, SOLAR WINDS, SENTRY SQL
|
|||
|
-- KUKANRU gratuit et l<>ger
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|