Sometimes I feel that one error can be caused due to multiple reasons and there are different ways to solve it. I already have two blogs for the error message. As they say, there are is no silver bullet when it comes to solving some of the issues. SQL Server might through a generic message, but it all lead to the same problem related to master database:
In my recent client’s case, from SQL Error Log see this error in the running upgrade script:
2016-06-21 15:55:45.40 Server Microsoft SQL Server 2008 (SP4) – 10.0.6000.29 (X64)
Sep 3 2014 04:11:34
Copyright (c) 1988-2008 Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.0 (Build 6002: Service Pack 2)
2016-06-21 15:55:46.11 spid9s Server name is ‘SQLPROD-N1’. This is an informational message only. No user action is required.
2016-06-21 15:55:46.11 spid9s The NETBIOS name of the local node that is running the server is ‘CLUSTER’. This is an informational message only. No user action is required.
2016-06-21 15:56:07.91 spid9s Error: 5184, Severity: 16, State: 2.
2016-06-21 15:56:07.91 spid9s Cannot use file ‘F:\SQLData\temp_MS_AgentSigningCertificate_database.mdf’ for clustered server. Only formatted files on which the cluster resource of the server has a dependency can be used. Either the disk resource containing the file is not present in the cluster group or the cluster resource of the SQL Server does not have a dependency on it.
2016-06-21 15:56:07.91 spid9s Error: 1802, Severity: 16, State: 1.
2016-06-21 15:56:07.91 spid9s CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
2016-06-21 15:56:07.91 spid9s Error: 912, Severity: 21, State: 2.
2016-06-21 15:56:07.91 spid9s Script level upgrade for database ‘master’ failed because upgrade step ‘sqlagent100_msdb_upgrade.sql’ encountered error 598, state 1, severity 25. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the ‘master’ database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.
2016-06-21 15:56:07.92 spid9s Error: 3417, Severity: 21, State: 3.
2016-06-21 15:56:07.92 spid9s Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.
My client contacted me because of below error (which is side effect of earlier errors not a real corruption of master database)
Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it
When we checked failover cluster manager and checked the properties of SQL Server resource, we found that F drive dependency to SQL was missing. So, we added all the 3 drives in SQL Server resource properties as dependency.
Once we added dependencies, upgrade script to run fine and we were able to bring SQL resource online. I know this was more of a clustering / configuration problem. But these things do happen and we are sent clueless on the possible root cause. Hope this blog helps you just in case you get this error.
Reference: Pinal Dave (https://blog.sqlauthority.com)