notebook/IT/SQL/SCRIPTS SQL QSA ORSYS/EXO 6 tache plainfiées.sql

35 lines
814 B
MySQL
Raw Normal View History

2020-11-26 17:38:25 +00:00
-- 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