SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Automatic Backup
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sunny_10
Yak Posting Veteran

65 Posts

Posted - 03/04/2014 :  10:03:23  Show Profile  Reply with Quote
Hi

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

Thanks

djj55
Constraint Violating Yak Guru

USA
336 Posts

Posted - 03/04/2014 :  11:45:44  Show Profile  Reply with Quote
One way is to setup a job that executes the BACKUP DATABASE command

djj
Go to Top of Page

sunny_10
Yak Posting Veteran

65 Posts

Posted - 03/05/2014 :  02:32:21  Show Profile  Reply with Quote
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)

Singapore
17642 Posts

Posted - 03/05/2014 :  02:37:05  Show Profile  Reply with Quote
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
Time is always against us

Go to Top of Page

sunny_10
Yak Posting Veteran

65 Posts

Posted - 03/05/2014 :  05:46:57  Show Profile  Reply with Quote
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)

Singapore
17642 Posts

Posted - 03/05/2014 :  06:56:46  Show Profile  Reply with Quote
create a job in SQL Server Agent to schedule it to run periodically

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


KH
Time is always against us

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000