Grazie mille!!! Solo un dubbio, devo crare un task con questo comando:
sqlcmd -i "Full Backup.sql" -o "Logs\Full Backup.log"
ma in Windows 2008 come posso creare un task pianificato?
in sintesi nel mio script dovrei inserire solo:
USE mioDB;
GO
DECLARE @Device varchar(100);
BEGIN TRY
/* Eseguo il full backup di mioDB */
PRINT N'Backup database mioDB in corso...';
SET @Device = '<percorso>\mioDB_Full_' + CONVERT(char(10), CURRENT_TIMESTAMP, 120) + '.bak';
BACKUP DATABASE mioDB
TO DISK = @Device;
PRINT N'Backup database mioDB eseguito correttamente.';
PRINT N'';
END TRY
BEGIN CATCH
PRINT N'';
PRINT N'Durante il backup si è verificato il seguente errore:';
PRINT N'Codice: ' + CAST(ERROR_NUMBER() AS nvarchar(10));
PRINT N'Descrizione: ' + ERROR_MESSAGE();
END CATCH
Senza Model e Master
corretto??
Grazie ancora!!!!