Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Option to escape invalid characters in directory names #522

Open
Rob-S opened this issue May 7, 2021 · 0 comments
Open

Comments

@Rob-S
Copy link

Rob-S commented May 7, 2021

In some SQL Server instances, we have an arrangement where there is one database per customer and the database name is based on user input. In these instances, where there might be thousands of databases, there are occasionally databases created based on company names containing characters that are not valid in Windows directory names, such as a slash or colon. (Or the customer service user creating the database on behalf of the customer could make a typo or accidently add special characters, which is what caused Issue #145.)

In addition, for the reasons above and since one of the frequently used strings in our environment is "M5" (due to acquisitions including a company by that name), it's almost expected that we'll have databases with names that are not valid directory names, such as "CoM5" and "Con".

An option could be added to escape any characters which are valid in SQL Server database names but are not valid in directory names. Invalid directory names could be handled by escaping any one of the characters in the name, such as the last character (preserving the sort order and visual association of the backup file to the database name). See https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants