Change backup name format

Hi..
I just create maintenance backup of my database, and I want to change the format file name of the backup data file name. does anyone can help?

thx

Doesn't sound like Microsoft SQL Server - some other flavour of SQL perhaps?

... or I'm going to learn something new!

it is sql server..we can find it on maintenance plan ..and I have a req. to change the name..

thx

We don''t use Maintenance Plans, never found them fit for purpose, so can't help, sorry.

I think I understand your question better though - you want to change the "template" that generates the filename of the backup file. Don't know if you can do that, but when I did use Maintenance Plans, many years ago, the normal way to "fix anything" was to delete the plan and make a new one ... bit of a nuisance though, but maybe that would work for you ...

You cannot change how the backup task in maintenance plans names the files - that is generated by the task. If you need to specify the file name you will need to script the backup and generate it yourself.

ok..thx

Suggest having a look at Minion Backup, if you are looking for a tool to make backups. Maintenance Plans has, historically, been a very blunt weapon ...

You can use PowerShell to perform this action once the backup completes.

https://msdn.microsoft.com/en-us/powershell/reference/5.0/microsoft.powershell.management/rename-item

Although ... then the maintenance plan won't be able to find the file to delete it (after the retention period expires)

Use the powershell to delete the file as well.

Well ... surely the point of using the Maintenance Plans is that its all self contained, doesn't need a whole lot of testing, and is reliable version-to-version, has no surprises for other/future DBAs, and so on.

Once you start going outside that, renaming files, setting up routines to delete old files, and so on, you have built a hybrid that needs testing and looking after ...

... personally I would either stick with Maintenance Plans or use something different, rather than have to develop and maintain a hybrid.