Help: SQL Server

Sharing my knowlege about SQL Server Troubleshooting Skills

SQL Server Cluster – Could not register Service Control Handler. Operating system error = 2310(This shared resource does not exist.).

Posted by blakhani on February 16, 2016


This is one of an interesting issue I faced with one of my customer. Its worth to share as this is NOT a very common issue and I was not able to find the solution which we discovered. We were having 2 nodes windows cluster running single clustered instance of SQL Server. Node names were SRV1 and SRV2.

Log Name:      Application
Source:        MSSQLSERVER
Date:          1/22/2016 6:10:33 AM
Event ID:      17141
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      SRV2.myDomain.com
Description:
Could not register Service Control Handler. Operating system error = 2310(This shared resource does not exist.).

  • Checked the log folder to see SQL server error log but there was no file generated there.
  • We tried starting the SQL server service via services.msc applet but that also did not work
  • net start mssqlserver also gives same
  • Interestingly, when we start sqlservr.exe from the command prompt it works fine.

Cluster Log shows below:

00000f44.00000ad8::2016/01/22-11:06:32.221 ERR   [RES] SQL Server <SQL Server>: [sqsrvres] StartResourceService: Failed to start MSSQLSERVER service.  CurrentState: 1
00000f44.00000ad8::2016/01/22-11:06:32.221 ERR   [RES] SQL Server <SQL Server>: [sqsrvres] OnlineThread: ResUtilsStartResourceService failed (status 435)
00000f44.00000ad8::2016/01/22-11:06:32.221 ERR   [RES] SQL Server <SQL Server>: [sqsrvres] OnlineThread: Error 435 bringing resource online.
00000f44.00000ad8::2016/01/22-11:06:32.221 ERR   [RHS] Online for resource SQL Server failed.
0000091c.00001230::2016/01/22-11:06:32.221 WARN  [RCM] HandleMonitorReply: ONLINERESOURCE for ‘SQL Server’, gen(1) result 5018.
0000091c.00001230::2016/01/22-11:06:32.221 INFO  [RCM] TransitionToState(SQL Server) OnlinePending–>ProcessingFailure.
0000091c.00001230::2016/01/22-11:06:32.221 ERR   [RCM] rcm::RcmResource::HandleFailure: (SQL Server)
0000091c.00001230::2016/01/22-11:06:32.221 INFO  [RCM] resource SQL Server: failure count: 2, restartAction: 0.
0000091c.00001230::2016/01/22-11:06:32.221 INFO  [RCM] resource SQL Server will not be restarting; isLowPriority: false; numDependents: 1, failureCount: 2, restartAction: 0
0000091c.00001230::2016/01/22-11:06:32.221 INFO  [RCM] TransitionToState(SQL Server) ProcessingFailure–>[WaitingToTerminate to Failed].
0000091c.00001230::2016/01/22-11:06:32.221 INFO  [RCM] TransitionToState(SQL Server) [WaitingToTerminate to Failed]–>[Terminating to Failed].
0000091c.00001230::2016/01/22-11:06:32.221 INFO  [RCM] Will retry online of SQL Server in 3600000 milliseconds.
0000091c.00001230::2016/01/22-11:06:32.221 INFO  [RCM] TransitionToState(SQL Server Agent) WaitingToComeOnline–>OfflineDueToProvider.
0000091c.00001450::2016/01/22-11:06:32.221 INFO  [RCM] HandleMonitorReply: TERMINATERESOURCE for ‘SQL Server’, gen(2) result 0.
0000091c.00001450::2016/01/22-11:06:32.221 INFO  [RCM] TransitionToState(SQL Server) [Terminating to Failed]–>Failed.

 

We also had a file share resource in cluster. Interestingly that failed with error:

File system check failed because scoped network name appears not to be registered with Server service, number of shares verified: 3.

Solution: Restart the “Server” Service. We tried keeping this server is delayed start mode but that didn’t help. We found that every time we restarted the node, we had same problem. So solution was to restart the “Server” service after reboot and then failover works without problem.

Advertisements

Posted in Cluster, SQL Server | Tagged: , , | 10 Comments »

Help : Get-AzureVM – WARNING: No deployment found in service: ‘domainctrler’.

Posted by blakhani on July 9, 2015


As a part of my role, I also assist customers in getting their issue fixed on Microsoft Azure environment as well. Sometime to reproduce the error, I also need to create replica of their environment. In one of such deployment, while create domain controller, one of the step was to set static internal IP for domain controller. Here is the command which I ran.

PS C:\> Get-AzureVM -ServiceName domainctrler -Name MyAzureDC1 | Set-AzureStaticVNetIP -IPAddress 10.0.0.4 | Update-AzureVM

and I was welcomed with below message.

WARNING: No deployment found in service: ‘domainctrler’.

PS-01

While researching, I realized that I recently added another subscription to my account and now I have two subscriptions associated with my login. You can confirm that using below command

Get-AzureSubscription | Select SubscriptionName

PS-02

To switch to a different subscription, I used

Select-AzureSubscription -SubscriptionName "Your-Desired-Subscription-Name-Here"

… and after that whole world was so beautiful because I was able to execute the command which I needed. To avoid this in future, I have changed my login default to the one which I would be using frequently.

Select-AzureSubscription -SubscriptionName "Your-Default-Subscription-Name-Here" –default

In summary, if you have multiple subscription then you might face the error. You can either switch “current” subscription or set most used one as “default” using Set-AzureSubscription command.

  • Cheers,
  • Balmukund Lakhani
  • Twitter @blakhani
  • Author: SQL Server 2012 AlwaysOnPaperback, Kindle
  • Posted in Microsoft Azure, PowerShell | Tagged: , | 5 Comments »

    Tips and Tricks – Hide Server Manager Dashboard on Startup

    Posted by blakhani on July 7, 2015


    Whenever I login at any server, I see below screen and I don’t like seeing it every time.

    SM-01

    Like me, you might not want Server Manager to automatically be displayed after each logon. I found that there are various options to disable this behavior.

    • Disable it via server manager:  If it’s not needed for many server then we can do it directly via Server Manager itself. On Server Manager console, choose Manage and then click “Server Manager Properties”.

    image

    Over there, there is a checkbox “Do not start Server Manager automatically at logon“.
    image

    Check the tick mark and Click OK.

    I work in troubleshooting issues and try to find what happens when the box is checked. So I captured Process Monitor and noted all registry access done by ServerManager.exe and found below

    SM-02

    Here are the keys which are used by Server Manager.

    DoNotOpenServerManagerAtLogon under HKEY_CURRENT_USER\Software\Microsoft\ServerManager

    DoNotOpenServerManagerAtLogon under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ServerManager

    When I check the box and hit OK, it is set by “RegSetValue” under Current User. If you are a scripting guy then you can also run below on command prompt to add registry value for your login.

    Reg Add "HKEY_CURRENT_USER\Software\Microsoft\ServerManager" /V "DoNotOpenServerManagerAtLogon" /D 1 /T REG_DWORD /F

     

    • Disable it via Task Scheduler:  Another method to not to launch Server Manager dashboard is using task scheduler. We can do this by launching the “Task Scheduler” on the local machine. In the Task Scheduler console (On the right hand side) navigate to Task Scheduler library > Microsoft > Windows > Server Manager. Now choose “ServerManager” task, right click and click on Disable.

    image

    Same thing can be done via command line as ‘

    schtasks.exe /change /tn "Microsoft\Windows\Server Manager\ServerManager" /disable

    • Disable it via Global Policy (GPEDIT):  If you are a domain admin and want to apply policy then you can use gpedit.msc. Once opened, navigate to “Computer Configuration”, > Administrative Templates > System > Server Manager. Under setting look for “Do not display Server Manager automatically at logon”, right click and choose Enabled.

    image

    Hope this helps

    Posted in Server Manager Dashboard | Tagged: , , | 4 Comments »