Git Product home page Git Product logo

Comments (5)

olahallengren avatar olahallengren commented on August 25, 2024 1

How about this?

I have the parameter description.
https://ola.hallengren.com/sql-server-backup.html#Description

Some time ago I added support for configuring the file name.
https://ola.hallengren.com/sql-server-backup.html#FileName

I could add a token for Description.

You could then do like this:

@Description = 'BeforeMigration',
@FileName =  '{ServerName}${InstanceName}_{DatabaseName}_{BackupType}_{Partial}_{CopyOnly}_{Description}_{Year}{Month}{Day}_{Hour}{Minute}{Second}_{FileNumber}.{FileExtension}'

from sql-server-maintenance-solution.

sam-bryant avatar sam-bryant commented on August 25, 2024

I missed that functionality release. It looks like I could probably make that work without any change on your end:

DECLARE @Description NVARCHAR(MAX) = '_TicketNNNN_BeforeManualUpdate_sbryant'
DECLARE @FileName NVARCHAR(MAX) = '{ServerName}${InstanceName}_{DatabaseName}_{BackupType}_{Partial}_{CopyOnly}_'+@Description+'_{Year}{Month}{Day}_{Hour}{Minute}{Second}_{FileNumber}.{FileExtension}'
EXECUTE [dbo].[DatabaseBackup] ... @FileName = @FileName

It sounds like I could take this 3 liner down to 1 if you added that token, but I will leave that up to you since it appears I have a workaround.

Thanks for the information.

from sql-server-maintenance-solution.

srutzky avatar srutzky commented on August 25, 2024

@olahallengren Thanks for adding this ability. I remember asking for it a couple few years ago (pre-GitHub days) and had not noticed that it had been added.

from sql-server-maintenance-solution.

olahallengren avatar olahallengren commented on August 25, 2024

I have added the token {Description} now. It can be used in both file names and directories.
https://ola.hallengren.com/versions.html

Any characters that are not allowed in the file system are removed.

from sql-server-maintenance-solution.

sam-bryant avatar sam-bryant commented on August 25, 2024

Wow, super fast turnaround! Thanks Ola!

from sql-server-maintenance-solution.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.