How To Perform Scheduled Backups For SQL Server 2005 Express How To Perform backup pianificati per SQL Server 2005 Express

SQL Server 2005 Express edition is a free, lightweight and embeddable version of SQL Server 2005 which includes SQL Server Management Studio Express for users to easily manage that databases. SQL Server 2005 Express Edition è una versione libera, leggera e incorporabile di SQL Server 2005 che include SQL Server Management Studio Express per gli utenti di gestire facilmente che i database. Although SQL Server 2005 Express edition supports backup and restore database but it does not supports scheduling backups. Anche se SQL Server 2005 Express Edition supporta il backup e il ripristino del database, ma non supporta la pianificazione dei backup.

SQLServer

Below are the simple steps to perform in order to enable scheduling backups for SQL Server 2005 Express: Di seguito sono riportati i semplici passi per eseguire al fine di consentire la pianificazione di backup per SQL Server 2005 Express:

  1. Create a store procedure that allows generate the dynamic backup file name, with types of backup to run such as full, differential or transaction log backups and location of the Backup files. Creare una procedura di negozio che permette di generare il nome del file di backup dinamico, con tipi di backup per eseguire come completo, differenziale o di backup del log delle transazioni e il percorso del file di backup.
     USE [master] USE [master] 
    
     CREATE PROCEDURE [dbo].[sp_BackupDatabase] CREATE PROCEDURE [dbo]. [Sp_BackupDatabase] 
     @databaseName sysname, @backupType CHAR(1) @ databaseName sysname, @ CHAR TipoBackup (1) 
     AS AS 
     BEGIN BEGIN 
     SET NOCOUNT ON; SET NOCOUNT ON; 
    
     DECLARE @sqlCommand NVARCHAR(1000) DECLARE @ NVARCHAR SqlCommand (1000) 
     DECLARE @dateTime NVARCHAR(20) DECLARE @ dateTime NVARCHAR (20) 
    
     SELECT @dateTime = REPLACE(CONVERT(VARCHAR, GETDATE(),111),'/','') + @ Datetime = SELECT REPLACE (CONVERT (VARCHAR, GETDATE (), 111 ),'/','') + 
     REPLACE(CONVERT(VARCHAR, GETDATE(),108),':','') REPLACE (CONVERT (VARCHAR, GETDATE (), 108 ),':','') 
    
     IF @backupType = 'F' IF @ TipoBackup = 'F' 
     SET @sqlCommand = 'BACKUP DATABASE ' + @databaseName + SET @ SqlCommand = 'BACKUP DATABASE' + @ databaseName + 
     ' TO DISK = ''C:\Backup\' + @databaseName + '_Full_' + @dateTime + '.BAK''' 'TO DISK =''C: \ Backup \' + @ databaseName + '_Full_' + @ dateTime + '. BAK''' 
    
     IF @backupType = 'D' IF @ TipoBackup = 'D' 
     SET @sqlCommand = 'BACKUP DATABASE ' + @databaseName + SET @ SqlCommand = 'BACKUP DATABASE' + @ databaseName + 
     ' TO DISK = ''C:\Backup\' + @databaseName + '_Diff_' + @dateTime + '.BAK'' WITH DIFFERENTIAL' 'TO DISK =''C: \ Backup \' + @ databaseName + '_Diff_' + @ dateTime + '. BAK''con differenziale' 
    
     IF @backupType = 'L' IF @ TipoBackup = 'L' 
     SET @sqlCommand = 'BACKUP LOG ' + @databaseName + SET @ SqlCommand = 'BACKUP LOG' + @ databaseName + 
     ' TO DISK = ''C:\Backup\' + @databaseName + '_Log_' + @dateTime + '.TRN''' 'TO DISK =''C: \ Backup \' + @ databaseName + '_Log_' + @ dateTime + '. TRN''' 
    
     EXECUTE sp_executesql @sqlCommand Sp_executesql EXECUTE @ SqlCommand 
     END END 
    
  2. Create a SQL script to run the backup. Creare uno script SQL per eseguire il backup. In this example, we will backup database master and saved the below SQL script as dbbackup.sql and save in “c:\Backup” folder. In questo esempio, si master del database di backup e ho salvato il seguente script SQL come dbbackup.sql e salvare in "C: \ Backup" cartella.

    sp_BackupDatabase 'master', 'F'
    GO
    QUIT

  3. Create a scheduled task in Windows which can be found in Control Panel or Accessories -> System Tools -> Scheduled Tasks or Task Scheduler. Creare un'operazione pianificata in Windows che può essere trovato nel Pannello di controllo o Accessori -> Utilità di sistema -> Operazioni pianificate o Utilità di pianificazione.

    scheduledtask

  4. Click on Add Scheduled Task or Create Task. Fare clic su Aggiungi operazione pianificata o Crea attività. Scheduling wizard will be displayed. Pianificazione guidata verrà visualizzato. Click Next, then click the Browse button to find SQLCMD.EXE from “C:\Program Files\Microsoft SQL Server\90\Tools\Binn”. Fare clic su Avanti, quindi fare clic sul pulsante Sfoglia per trovare SQLCMD.exe da "C: \ Program Files \ Microsoft SQL Server \ 90 \ Tools \ Binn".

    scheduledtask2

    In Task Scheduler, define the above in Action tab. In Utilità di pianificazione, di definire la scheda di cui sopra in azione.

  5. Specify when to perform the task as well as the user name and password to run the operation. Specificare quando eseguire l'operazione, nonché il nome utente e password per eseguire l'operazione. Once finished, give the scheduled task a name and save the task. Una volta finito, l'operazione pianificata dare un nome e salvare l'attività.
  6. Click on the “Open advanced properties” to edit the command. Fare clic su "Apri proprietà avanzate" per modificare il comando.

    SQLBackup5

    Type the following command in Run: Digitare il seguente comando in Esegui:

    sqlcmd -S serverName -E -i C:\Backup\sqlBackup.sql sqlcmd-S nomeserver-E-i C: \ Backup \ sqlBackup.sql

    The meaning of the command: Il significato del comando:

    • sqlcmd sqlcmd
    • -S (this specifies the server\instance name for SQL Server) -S (questa specifica il server \ nome di istanza di SQL Server)
    • serverName (this is the server\instance name for SQL Server) serverName (questo è il server \ nome di istanza di SQL Server)
    • -E (this allows you to make a trusted connection) -E (questo ti permette di fare una connessione trusted)
    • -i (this specifies the input command file) -i (questo comando specifica il file di input)

If you want to test the task which has been created then you can go back to the Scheduled Tasks or Task Scheduler, right click on the task and select “Run”. Se si desidera verificare il compito che è stato creato allora si può tornare alla Operazioni pianificate oppure il Task Scheduler, fate clic destro sul compito e selezionare "Esegui".

IMPORTANT : The page is machine translated and provided "as is" without warranty. IMPORTANTE: La pagina è tradotta e fornite "come sono" senza garanzia. Machine translation may be difficult to understand. La traduzione automatica può essere difficile da capire. Please refer to Si prega di fare riferimento alla original English article L'articolo originale inglese whenever possible. quando possibile.


3 Responses to “How To Perform Scheduled Backups For SQL Server 2005 Express” 3 risposte a "Come eseguire backup pianificati per SQL Server 2005 Express"

  1. Reuben Barajas Reuben Barajas
    September 10th, 2009 02:32 10 settembre 2009 02:32
    3 3

    Excellent article, I´ve just modify it a little and now I can make backup of all my DB´s in a single scheluded task. Ottimo articolo, ho solo modificare un po 'e ora posso fare il backup di tutti i miei PB in una singola attività scheluded.

    Thank you! Grazie!

  2. Reuben Barajas Reuben Barajas
    September 10th, 2009 02:31 10 settembre 2009 02:31
    2 2

    Excelent article, I´ve just modify it a little and now I can make backup of all my DB in a single scheluded task. Ottimo articolo, ho solo modificare un po 'e ora posso fare il backup di tutti i miei PB in una singola attività scheluded.

    Thank you! Grazie!

  3. pradeep Pradeep
    August 26th, 2009 20:58 26 agosto 2009 20:58
    1 1

    shah_pradeep@yahoo.in shah_pradeep@yahoo.in

Leave a Reply Lasci una risposta

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> È possibile utilizzare questi tag: href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Iscriviti ai commenti funzione è stata disattivata. To receive notification of latest comments posted, subscribe to Per ricevere la notifica degli ultimi commenti inviati, iscriviti alla My Digital Life Comments RSS feed My Digital Life Commenti RSS feed or o register to receive Registrati per ricevere new comments in daily email digest. nuovi commenti in email al giorno digerire.
Custom Search

New Articles Nuovi articoli

Incoming Search Terms for the Article Cerca in arrivo Condizioni per l'articolo

sql server express backup backup di SQL Server Express - -- Task Scheduler to call SQLCmd server 2008 express Utilità di pianificazione per chiamare SQLCMD Server 2008 Express - -- schedule backup sql server 2005 server di backup calendario SQL 2005 - -- sql server management studio schedule backup gestione di SQL Server Backup Schedule studio - -- sql server 2005 scheduled backups SQL Server 2005 backup pianificati - -- sql scheduled task SQL operazione pianificata - -- How to schedule a database backup operation by using SQL Server Management Studio in SQL Server 2005 Express Come pianificare un'operazione di backup di un database utilizzando SQL Server Management Studio in SQL Server 2005 Express - -- schedule a sql task with task scheduler 2008 pianificare un'operazione SQL con task scheduler 2008 - -- run sql script from desktop sql2005 eseguire script SQL dal desktop SQL2005 - -- sql server task backup backup task sql server - -- SQL Express scheduled backups SQL Express backup pianificati - -- sql express 2005 sheduled SQL Server 2005 Express sheduled - -- an instance of this task is already running SQL Express backup un esempio di questo compito è già in esecuzione di backup di SQL Express - -- sql express backups backup di SQL Express - -- SQL Server 2005 how to perform scheduled backups to disk SQL Server 2005 come eseguire backup pianificati su disco - -- run sql file scheduled task eseguire sql file un'operazione pianificata - -- schedule backup sql express SQL Express Backup Schedule - -- script backup Studio Express Studio di backup script Express - -- download sql server express Download Server SQL Express - -- sql express schedule backup SQL Express Backup Schedule - -- sql management express 2005 scheduled backup di gestione di SQL Express 2005 backup pianificato - -- how to run scheduled job in sql server Come per l'esecuzione di posti di lavoro in linea di SQL Server - -- sql express synchronisation sincronizzazione SQL Express - -- backup task ms sql 2005 expres ms attività di backup SQL 2005 expres - -- sql server scheduled tasks sql server le operazioni pianificate - -- microsoft sql 2005 express backup video Microsoft SQL 2005 Express video backup - -- schedule backup sql express 2005 sql backup calendario Express 2005 - -- sql server express backup schedule SQL Server Express pianificazione del backup - -- backup sql server 2005 backup di SQL Server 2005 - -- cmd backup von allen sql instanz cmd allen von backup Instanz sql - -- Scheduling backups Microsoft SQL Server Management Studio Express Pianificazione dei backup di Microsoft SQL Server Management Studio Express - -- sql2005 express studio backups SQL2005 backup Studio Express - -- script backup log file "sql express" trn registro di backup file di script "SQL Express" trn - -- sql express 2005 schedule backup SQL Express 2005 pianificazione del backup - -- scheduled backups in sql express 2005 backup programmati nel 2005, SQL Express - -- sql 2008 scheduled backups SQL 2008 backup pianificati - -- sql sheduled backup sql backup sheduled - -- sql 2005 express management studio backup SQL Server 2005 Management Studio Express backup - -- sql server 2005 express mail SQL Server 2005 Express mail - -- where are the backups in sql 2005 in program files dove sono le copie di backup nel 2005 SQL in file di programma - -- Windows Task Scheduler to call SQLCmd Windows Task Scheduler per chiamare SQLCMD - -- "sql server" scheduled task new server "sql server" operazione pianificata nuovo server - -- (oracle OR interbase OR postgresql OR db2 OR "sql server" OR mysql OR firebird OR dbisam) AND database AND article (Oracle o PostgreSQL o interbase o DB2 OR "SQL Server" o MySQL Firebird O O DBISAM) e il database e l'articolo - -- backup sql 2005 express backup di SQL Server 2005 Express - -- management studio express 2005 scheduled Management Studio Express 2005 in programma - -- scheduled backup database mail to gmail account sql server 2005 prevista mail database di backup a Gmail account di SQL Server 2005 - -- schedule backup sql server management studio express Backup Schedule studio sql server management express - -- sql server 2005 types of backup code SQL Server 2005 i tipi di codice di backup - -- sqlcmd backup to remote server disk sqlcmd backup su disco server remoto - -- sql express scheduled tasks SQL Express operazioni pianificate - --