How To Perform Scheduled Backups For SQL Server 2005 Express Paano upang maisagawa ang mga naka-iskedyul na Backups Para sa SQL Server Express 2,005
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 Express 2,005 edisyon ay isang libre, magaan at embeddable bersyon ng SQL Server 2,005 na kinabibilangan ng SQL Server Management Studio Express para sa mga gumagamit upang madaling mapamahalaan ang mga database. Although SQL Server 2005 Express edition supports backup and restore database but it does not supports scheduling backups. Kahit na SQL Server Express 2,005 edisyon ay sumusuporta sa backup at ibalik ang database ngunit ito ay hindi sumusuporta sa pag-iiskedyul ng backups.

Below are the simple steps to perform in order to enable scheduling backups for SQL Server 2005 Express: Sa ibaba ay ang mga simpleng hakbang upang gawin upang paganahin ang pag-iiskedyul ng backups para sa mga SQL Server Express 2,005:
- 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. Gumawa ng isang tindahan ng paraan na nagbibigay-daan sa pagbuo ng mga dynamic na backup file na pangalan, may mga uri ng mga backup na tumakbo tulad ng buo, kaugalian o mga transaksyon na mag-log backups at lokasyon ng backup ng mga file.
USE [master] PAGGAMIT [master] CREATE PROCEDURE [dbo].[sp_BackupDatabase] Gumawa ng Pamamaraan [dbo]. [Sp_BackupDatabase] @databaseName sysname, @backupType CHAR(1) @ databaseName sysname, @ backupType char (1) AS AS BEGIN Simulan SET NOCOUNT ON; Set NOCOUNT SA; DECLARE @sqlCommand NVARCHAR(1000) Ipinahahayag @ sqlCommand NVARCHAR (1000) DECLARE @dateTime NVARCHAR(20) Ipinahahayag @ dateTime NVARCHAR (20) SELECT @dateTime = REPLACE(CONVERT(VARCHAR, GETDATE(),111),'/','') + PUMILI @ dateTime = palitan (-convert (VARCHAR, GETDATE (), 111 + ),'/','') REPLACE(CONVERT(VARCHAR, GETDATE(),108),':','') Palitan (-convert (VARCHAR, GETDATE (), 108 ),':','') IF @backupType = 'F' KUNG @ backupType = 'F' SET @sqlCommand = 'BACKUP DATABASE ' + @databaseName + Set @ sqlCommand = 'backup DATABASE' + @ databaseName + ' TO DISK = ''C:\Backup\' + @databaseName + '_Full_' + @dateTime + '.BAK''' 'Sa disk =''C: \ I-backup \' + @ databaseName + '_Full_' + @ dateTime + '. BAK''' IF @backupType = 'D' KUNG @ backupType = 'D' SET @sqlCommand = 'BACKUP DATABASE ' + @databaseName + Set @ sqlCommand = 'backup DATABASE' + @ databaseName + ' TO DISK = ''C:\Backup\' + @databaseName + '_Diff_' + @dateTime + '.BAK'' WITH DIFFERENTIAL' 'Sa disk =''C: \ I-backup \' + @ databaseName + '_Diff_' + @ dateTime + '. BAK''MAY kaugalian' IF @backupType = 'L' KUNG @ backupType = 'L' SET @sqlCommand = 'BACKUP LOG ' + @databaseName + Set @ sqlCommand = 'backup LOG' + @ databaseName + ' TO DISK = ''C:\Backup\' + @databaseName + '_Log_' + @dateTime + '.TRN''' 'Sa disk =''C: \ I-backup \' + @ databaseName + '_Log_' + @ dateTime + '. TRN''' EXECUTE sp_executesql @sqlCommand Pugutan ng ulo sp_executesql @ sqlCommand END END
- Create a SQL script to run the backup. Gumawa ng isang SQL script na tumakbo ang backup. In this example, we will backup database master and saved the below SQL script as dbbackup.sql and save in “c:\Backup” folder. Sa halimbawa na ito, kami ay backup database master at nai-save sa ibaba SQL script bilang dbbackup.sql at i-save sa "c: \ Backup" folder.
sp_BackupDatabase 'master', 'F'
GO
QUIT - Create a scheduled task in Windows which can be found in Control Panel or Accessories -> System Tools -> Scheduled Tasks or Task Scheduler. Gumawa ng isang naka-schedule na gawain sa Windows na kung saan ay matatagpuan sa Control Panel o Kagamitan -> System Tools -> Naka-iskedyul na mga Gawain o Task scheduler.

- Click on Add Scheduled Task or Create Task. I-click ang Magdagdag ng mga naka-iskedyul na Gawain o Gumawa ng Gawain. Scheduling wizard will be displayed. Scheduling wizard na ito ay ipapakita. Click Next, then click the Browse button to find SQLCMD.EXE from “C:\Program Files\Microsoft SQL Server\90\Tools\Binn”. I-click ang Susunod na, pagkatapos ay i-click ang Browse button upang hanapin SQLCMD.EXE mula sa "C: \ Program Files \ Microsoft SQL Server \ 90 \ Tools \ Binn".

In Task Scheduler, define the above in Action tab. Sa Task scheduler, tukuyin ang sa ibabaw sa Aksyon na tab.
- Specify when to perform the task as well as the user name and password to run the operation. Tukuyin kapag na gawin ang gawain pati na ang user name at password upang patakbuhin ang operasyon. Once finished, give the scheduled task a name and save the task. Kapag tapos na, magbigay ng mga naka-schedule na gawain ng isang pangalan at i-save ang mga gawain.
- Click on the “Open advanced properties” to edit the command. I-click ang "Buksan mga advanced na pag-aari" upang i-edit ang command.

Type the following command in Run: I-type ang mga sumusunod na utos sa Run:
sqlcmd -S serverName -E -i C:\Backup\sqlBackup.sql sqlcmd-S serverName-E-i C: \ Backup \ sqlBackup.sql
The meaning of the command: Ang kahulugan ng utos:
- sqlcmd sqlcmd
- -S (this specifies the server\instance name for SQL Server) -S (ito ang tumutukoy sa server \ Halimbawa pangalan para sa SQL Server)
- serverName (this is the server\instance name for SQL Server) serverName (ito ay sa server \ Halimbawa pangalan para sa SQL Server)
- -E (this allows you to make a trusted connection) -E (ito ay nagbibigay-daan sa iyo upang gumawa ng isang mapagkakatiwalaang koneksyon)
- -i (this specifies the input command file) -i (ito ang tumutukoy sa input na command file)
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”. Kung nais mong subukan ang mga gawain na kung saan ay nagawa na pagkatapos ay maaari kang bumalik sa naka-iskedyul na mga Gawain o Task scheduler, i-right click sa gawain at piliin ang "Run".
IMPORTANT : The page is machine translated and provided "as is" without warranty. MAHALAGA: Ang pahina ng makina ay isinalin at ibinigay "bilang ganito" walang warranty. Machine translation may be difficult to understand. Machine pagsasalin ay maaaring mahirap maintindihan. Please refer to Mangyaring sumangguni sa original English article orihinal na Ingles na artikulo whenever possible. hangga't maaari.
Related Articles Mga Kaugnay na Akda
- Error Has Occurred While Establishing A Connection To SQL Server 2005 Which Does Not Allow Local and Remote Connections Error Has Nangyari Habang Itinataguyod ang isang koneksyon Upang SQL Server 2,005 Aling ba Hindi Payagan Lokal at Remote Connections
- Uninstall and Remove Multiple Database Instances of Microsoft SQL Server 2005 Uninstall at Tanggalin ang Maramihang Database mga pagkakataon ng Microsoft SQL Server 2,005
- How to Set Compatibility Level for SQL Server 2008 or 2005 Database Paano Itakda Kaangkupan Level para sa mga SQL Server 2,008 o 2,005 Database
- Microsoft Virtual Server 2005 R2 SP1 (Enterprise Edition) Direct Download Links Microsoft Virtual Server 2,005 R2 SP1 (Enterprise Edition) Direct Download Links
- Internet Explorer (IE) Hang When Opening Virtual Server 2005 Web Administration Site Internet Explorer (IE) pagkakasabit Kapag Pagbubukas ng Virtual Server 2,005 Web Pangangasiwa ng Site
- Microsoft Virtual Server 2005 R2 Download Available for Free Microsoft Virtual Server 2,005 R2-download ng mga Magagamit na para sa mga Libreng
- Microsoft DreamSpack Offers Free Download and License of Visual Studio 2008, Server 2003, SQL Server 2005 and More Microsoft Offers DreamSpack Libreng Download at License ng Visual Studio 2008, Server 2003, SQL Server 2005 at Higit pang mga
- Restore Windows XP and 2003 .bkf Backups in Windows Vista and Longhorn Server with NT Backup Restore Utility Ibalik ang Windows XP at 2003. Bkf Backups sa Windows Vista at Longhorn Server sa NT Backup Ibalik Utility
- Optimize SQL Server 2000, 2005 or 2008 in Large RAM System by Locking Pages in Memory and AWE I-optimize ang SQL Server 2000, 2,005 o 2,008 sa mga malalaking RAM System sa pamamagitan ng pagsasara ng Pahina sa Memory at mangha
- Download Paragon Drive Backup 9.0 Free Edition (Express) I-download ang huwaran Drive Backup 9.0 Free Edition (Express)










































September 10th, 2009 02:32 Septiyembre 10, 2009 02:32
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. Magaling article, lamang ko na baguhin ang mga ito ng isang maliit at ngayon ako gumawa ng mga backup ng lahat ng aking mga DB's sa isang solong scheluded gawain.
Thank you! Salamat!
September 10th, 2009 02:31 Septiyembre 10, 2009 02:31
Excelent article, I´ve just modify it a little and now I can make backup of all my DB in a single scheluded task. Magaling article, lamang ko na baguhin ang mga ito ng isang maliit at ngayon ako gumawa ng mga backup ng lahat ng aking mga DB sa isang solong scheluded gawain.
Thank you! Salamat!
August 26th, 2009 20:58 Agosto 26, 2009 20:58
shah_pradeep@yahoo.in shah_pradeep@yahoo.in