I have the following procedure running automatically to execute fll backups of a MS-SQL 2005 DB.
DECLARE @return_value int
EXEC @return_value = [dbo].[BackupDb] @DB = N'mydbname',
@ImagePath = N'd:\dbbackups\',
@ImageFileName = N'mydbnamefull.bak',
@IsDifferential = 0
SELECT 'Return Value' = @return_value
Is there any way this procedure can change the name of the .bak file to a different name everytime it runs. Let's say adding the date to the name?
Currently, everytime the procedure runs, it replaces the file with the new one. I'd like to keep the old files all the time.
Another option could be adding "something" to the procedure to create a new folder (with new name) everytime and store the .bak file there.
Any way to run this procedure without replacing the previous .bk file?