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.
| Author |
Topic |
|
jay1
Starting Member
17 Posts |
Posted - 2010-08-26 : 10:41:18
|
| Hi All,I have SQL Servers both 2000 and 2005 and I wanted to perform backups daily, so I want the backups to have Datetime stamp therefore I can distinguish between the different files. I have 2 questions1.I'm going to use the following script to run a full backup on the sql 2005 server but I wanted to know if there is a way to perform the same thing in the sql server 2000 server. declare @CheckDate [nvarchar](50), @Title [nvarchar](100)set @CheckDate = replace(replace(convert(nvarchar(50),getdate(),120),':',''), ' ', '_')set @Title = N'E:\DataWarehouse_Microstrategy_'+@CheckDate+''+'.bak' BACKUP DATABASE [DataWarehouse_Microstrategy] TO DISK = @TitleWITH NOFORMAT, NOINIT, NAME = N'DataWarehouse_Microstrategy-Full Database Backup',SKIP, NOREWIND, NOUNLOAD,STATS = 10 ;2. I need to perform a differential backup for both on sql 2000 and sql 2005 and I wanted to know a way of doing the differential backup but delete files that are old e.g any files that are older then 4 weeks. |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
|
|
|
|
|
|
|