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 questions
1.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 = @Title
WITH NOFORMAT, INIT, 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.
Thank you in advance
View Complete Post