olahallengren / sql-server-maintenance-solution

SQL Server Maintenance Solution
https://ola.hallengren.com
MIT License
2.91k stars 756 forks source link

Why Binary choices have (n)varchar(max) on DatabaseBackup parameters? #751

Closed SysDaemon closed 2 weeks ago

SysDaemon commented 1 year ago

Declaring a variable with maximum space, when the choices are binary

Hence, the choices will be "Y" or "N", why declare nvarchar(max) on these parameters?

olahallengren commented 3 weeks ago

This was a decision long time ago and then I have followed this standard.

Here are some of the arguments as I recall them:

It could be argued that a bit column is a more natural choice for the "Y" or "N".