You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Rob-S
added a commit
to Rob-S/sql-server-maintenance-solution
that referenced
this issue
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
The text was updated successfully, but these errors were encountered: