Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Automatic Backup

Author  Topic 

sunny_10
Yak Posting Veteran

72 Posts

Posted - 2014-03-04 : 10:03:23
Hi

How we can schedule automatic backup of Particular database . I am using Sql Server 2008 R2

Thanks

djj55
Constraint Violating Yak Guru

352 Posts

Posted - 2014-03-04 : 11:45:44
One way is to setup a job that executes the BACKUP DATABASE command

djj
Go to Top of Page

sunny_10
Yak Posting Veteran

72 Posts

Posted - 2014-03-05 : 02:32:21
Hi

Is it possible that database backup should be saved as date wise automatically .

Thanks
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2014-03-05 : 02:37:05
yes. it is possible. Use the backup database command with dynamic sql

select @sql = N'Backup Database yourdb to disk = '''C:\yourdb' + convert(varchar(10), getdate(), 112) + ''''
exec (@sql)



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

sunny_10
Yak Posting Veteran

72 Posts

Posted - 2014-03-05 : 05:46:57
Hi Khtan

Where i should wrote this code so that it should run automatically.

Thanks
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2014-03-05 : 06:56:46
create a job in SQL Server Agent to schedule it to run periodically

http://technet.microsoft.com/en-us/library/ms190268.aspx


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -