-
Notifications
You must be signed in to change notification settings - Fork 9
Doesn't handle named instances fully #3
Description
The script which creates the job steps doesn't take into account named instances and how the backup directories are named by Ola's backup process.
For a named instance, the two instances of $(ESCAPE_SQUOTE(SRVR)) in the output file path need to be replaced with $(ESCAPE_SQUOTE(MACH))$$(ESCAPE_SQUOTE(INST))
I also see that there are issues with the registry key used in the script to identify the default backup directory. Currently SOFTWARE\Microsoft\MSSQLServer\MSSQLServer is used but from a couple of servers I have it seems that the proper key is SOFTWARE\Microsoft\Microsoft SQL Server. Within that, in Instance Names\SQL the data of the appropriate string value contains the name of the key within SOFTWARE\Microsoft\Microsoft SQL Server for the instance, and BackupDirectory can be found in the MSSQLServer key inside the instance key.
For example, BackupDirectory is found within the following keys: (2005 default instance and 2008R2 named instance)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10_50.PRIORITY\MSSQLServer