Help: SQL Server

Sharing my knowlege about SQL Server Troubleshooting Skills

    Advertisements
  • Blog Stats

    • 1,616,764 hits
  • Select GETDATE()

    May 2019
    M T W T F S S
    « Apr    
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  
  • Advertisements

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

Advertisements

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

Solution – Unable to install SQL Server 2008 on Windows Server 2012 Server – Error – The service did not respond to the start or control request in a timely fashion

Posted by blakhani on June 10, 2015


Recently I was trying to do some test with old version of SQL and ran into interesting issue. I ran the setup of SQL Server 2008 RTM on Windows Server 2012. It failed with error

The service did not respond to the start or control request in a timely fashion

The error means that SQL Setup was unable to start the SQL Server service in middle of the installation. I had no choice but  to cancel the installation. Here are the messages logged in various setup logs. here is the snip from Summary.txt

Overall summary:

  Final result:                  SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.

  Exit code (Decimal):           -595541211

  Exit facility code:            1152

  Exit error code:               49957

  Exit message:                  SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.

  Start time:                    2015-05-08 21:26:19

  End time:                      2015-05-08 21:37:05

  Requested action:              Install

  Log with failure:              C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20150508_212400\Detail.txt

Detailed results:

  Feature:                       Database Engine Services

  Status:                        Failed: see logs for details

  MSI status:                    Passed

  Configuration status:          Failed: see details below

  Configuration error code:      0xDC80C325

  Configuration error description: The service did not respond to the start or control request in a timely fashion. 

  Configuration log:             C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20150508_212400\Detail.txt

I love the error message in summary as it tells me what exactly need to be done. Investigate, correct the cause, uninstall SQL and re-run setup. Perfect! So let’s investigate. Detail.txt had nothing interesting than telling that I am not able to start SQL Service. Since SQL service was present after cancelling the setup, I tried to start manually but it was same error via services.msc. So I tried to start SQL Server executable via command prompt by running sqlserver.exe –c –sMSQLSERVER command and it gave me below popup message.

Problem signature:

  Problem Event Name:         BEX64

  Application Name:           sqlservr.exe

  Application Version:        2009.100.1600.1

  Application Timestamp:      4bb6b40b

  Fault Module Name:          StackHash_120f

  Fault Module Version:       0.0.0.0

  Fault Module Timestamp:     00000000

  Exception Offset:           PCH_EF_FROM_ntdll+0x000000000009177A

  Exception Code:             c0000005

  Exception Data:             0000000000000008

  OS Version:                 6.3.9600.2.0.0.272.7

  Locale ID:         1033

  Additional Information 1:         120f

  Additional Information 2:         120feecb532e5330843bb85768dc5d8d

  Additional Information 3:         86ef

  Additional Information 4:         86ef44a294d70f6087e5d1fcc74465eb

 

Read our privacy statement online:

  http://go.microsoft.com/fwlink/?linkid=280262

 

If the online privacy statement is not available, please read our privacy statement offline:

  C:\Windows\system32\en-US\erofflps.txt

The code highlighted above is Access Violation hex code. I did some more search and found below KB

https://support.microsoft.com/en-us/kb/2681562 (How to use SQL Server in Windows 8, Windows 8.1, Windows Server 2012, and Windows Server 2012 R2)

 

So, now I know that my issue is that RTM version of SQL Server 2008 is not supported on Windows Server 2012 and I have to do slipstreaming of media so that SP2 is installed along with RTM.

I Slipstreamed media using Peter’s blog http://blogs.msdn.com/b/petersad/archive/2011/07/13/how-to-slipstream-sql-server-2008-r2-and-a-sql-server-2008-r2-service-pack-1-sp1.aspx

After making media ready, I uninstalled SQL, restarted machine and used the slipstream media. This time I was able to install SQL without any error.

Hope this helps.

  • Cheers,
  • Balmukund Lakhani
  • Twitter @blakhani
  • Posted in Installation, Setup, SQL Server, SQL Server 2008 | Tagged: , , | 2 Comments »

    Restore ERROR : This backup cannot be restored using WITH STANDBY because a database upgrade is needed

    Posted by blakhani on May 21, 2015


    One of my colleague in office sent an email to find the cause of the error. He wanted to configure Log-Shipping with secondary on Standby mode. Rather than “reply to all”, I generally ping the person directly to tell the possible reason of error. Here is what we discussed (let’s assume that his name is Manoj – M)

    B: Hi Manoj
    M: Hello
    B: Saw you email to DL about log shipping problem.
    M: Oh yeah. Thanks for reaching out.
    B: No problem.
    B: Are you restoring database from lower version to higher version of SQL?
    M: No, both are 2008.
    B: That’s doesn’t sound right. Can you please run Select @@version command in Management Studio on both the server and share the output?
    M: Sure. Give me a minute to connect and run the query.
    B: Sure

    <1 min pause>

    M: There you go

    Source:
    Microsoft SQL Server 2008 (SP1) – 10.0.2573.0 (X64)
    Feb 4 2011 11:27:06
    Copyright (c) 1988-2008 Microsoft Corporation
    Developer Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)

    Destination:
    Microsoft SQL Server 2008 R2 (RTM) – 10.50.1600.1 (X64)
    Apr 2 2010 15:48:46
    Copyright (c) Microsoft Corporation
    Enterprise Edition (64-bit) on Windows NT 6.0 (Build 6002: Service Pack 2)

     

    B: Okay. that is the problem. You are taking backup from SQL 2008 and restoring on SQL 2008 R2 in standby mode.
    M: Both are not 2008?
    B: No, destination is 2008 “R2” which is the next release after 2008.
    M: Oh.. I thought its like a service pack on top of SQL 2008.
    B: Unfortunately, its not a service pack. It’s fresh release having some enhancements.
    M: Okay. So error message is correct.
    B: Yeah. If you want to use secondary for reporting then you have to use standby mode. This can only be done on destination which has same version of SQL. Or you need to upgrade current primary server.
    M: Hmm.. I got it now. Let me check with my DBA team and management to decide the next action.
    B: Sure Manoj. Is there any other clarification you might need?
    M: No Balmukund. I am good at this point. You have been very helpful. Appreciate it.
    B: My pleasure. Bye for now.
    M: Bye!

    In summary, Here is what you would get in SSMS if we try to restore a backup from lower version of SQL to higher version of SQL in standby mode.

    TITLE: Microsoft SQL Server Management Studio
    ——————————
    SQL Server Management Studio restore database ‘DabbaWala’
    ——————————
    ADDITIONAL INFORMATION:
    Restore failed for Server ‘Destination’.  (SqlManagerUI)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=12.0.2000.8+((SQL14_RTM).140220-1752)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476
    ——————————
    System.Data.SqlClient.SqlError: This backup cannot be restored using WITH STANDBY because a database upgrade is needed. Reissue the RESTORE without WITH STANDBY. (Microsoft.SqlServer.Smo)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=12.0.2000.8+((SQL14_RTM).140220-1752)&LinkId=20476
    ——————————
    BUTTONS:
    OK
    ——————————

     

    The error is raised because during restore from lower to higher version the database version needs an upgrade to match with system table (or any other) change in higher version. Here is the query to see the version I am talking about.

    Select name, version from sys.sysdatabases
    

    This version upgrade is part of recovery process and we can’t pause recovery in middle and view the database state (that’s what is done in standby mode). So, the only way to restore that would be to use “with recovery” or “with norecovery” option.

    Hope this helps!

  • Cheers,
  • Balmukund Lakhani
  • Twitter @blakhani
  • Author: SQL Server 2012 AlwaysOnPaperback, Kindle
  • Posted in Error, Logshipping, Restore, SQL Server | Tagged: , , | 2 Comments »