sql-server-maintenance-solution icon indicating copy to clipboard operation
sql-server-maintenance-solution copied to clipboard

Issue 726 : BackupType - Option to use lower case in URL

Open mdaniou opened this issue 2 years ago • 1 comments

Adding a bit of code to lowercase urls all the time. I hope this will answer this issue

mdaniou avatar May 03 '23 08:05 mdaniou

I have similar requirement asking for ability to lower() the backup path. In our case we have Always On AGs that have databases that were not properly cased equivalently between restore operations by dbas and having ability to send at least the database name to lower or upper would help to guarantee the file has some consistent convention making its way to case sensitive systems (storage gateways and s3 in AWS in our case).

sethmgray avatar Aug 30 '24 15:08 sethmgray

Would you like to have a parameter here to make the directory path lower case or upper case?

olahallengren avatar Oct 27 '24 18:10 olahallengren

Would you like to have a parameter here to make the directory path lower case or upper case?

In our case it's best that the path and database name has separate params to put each to upper/lower, but the full path (including db name) would at least allow for predictable and repeatable casing

sethmgray avatar Oct 27 '24 18:10 sethmgray

Another option could be to introduce new lower/upper case tokens in these parameters: https://ola.hallengren.com/sql-server-backup.html#DirectoryStructure https://ola.hallengren.com/sql-server-backup.html#FileName

olahallengren avatar Oct 27 '24 19:10 olahallengren

I assume the addition of two casing versions of each token would be the most flexible and least/no impact to the procs arguments.

On Sun, Oct 27, 2024, 12:16 PM Ola Hallengren @.***> wrote:

Another option could be to introduce new lower/upper case tokens in these parameters: https://ola.hallengren.com/sql-server-backup.html#DirectoryStructure https://ola.hallengren.com/sql-server-backup.html#FileName

— Reply to this email directly, view it on GitHub https://github.com/olahallengren/sql-server-maintenance-solution/pull/745#issuecomment-2440142765, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPICOYHTCGIHVZCLGVWVNTZ5UUZBAVCNFSM6AAAAABNMVNWQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBQGE2DENZWGU . You are receiving this because you commented.Message ID: @.*** .com>

sethmgray avatar Oct 27 '24 21:10 sethmgray

I assume the addition of two casing versions of each token would be the most flexible and least/no impact to the procs arguments.

It would be the most flexible, but also quite cumbersome to pass the parameters correctly, especially if you have both standalone databases and databases in availability groups.

The other option would be to introduce two new parameters, @DirectoryStructureCase and @FileNameCase, where NULL is the default (as today), but you could set them to LOWER and UPPER.

olahallengren avatar Nov 03 '24 00:11 olahallengren

I have been doing some work on this. Please have a look at https://github.com/olahallengren/sql-server-maintenance-solution/pull/840.

olahallengren avatar Nov 15 '24 23:11 olahallengren

I have released this now. Here is the documentation: https://ola.hallengren.com/sql-server-backup.html#DirectoryStructureCase https://ola.hallengren.com/sql-server-backup.html#FileNameCase

olahallengren avatar Nov 21 '24 20:11 olahallengren