Identity Default Instance or Named Instance

  • Hi All,

    How can i identify whether my Sql Server has Default Instance or Named Instance? I am using SQL Server 2005.

    ---

  • check the services.msc console or enumerate through code

    a default installation of SQL server will have the following service name

    MSSQL$SERVER

    for a named instance it will be

    MSSQL$instancename

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Perry Whittle (7/16/2008)


    check the services.msc console or enumerate through code

    a default installation of SQL server will have the following service name

    MSSQL$SERVER

    for a named instance it will be

    MSSQL$instancename

    Hi Perry,

    Could you please elaborate more for the same?

    ---

  • Hi, you could find out if the default named instance is used, you reference the instance as computernameame:)

  • : computername\instancename

  • sqluser (7/16/2008)


    Hi Perry,

    Could you please elaborate more for the same?

    ---

    open the services console from administrative tools and check the sql service properties. A default instance will have the service name MSSQL$SERVER. If named instance then service name will be MSSQL$instancename.

    if your doing it through code, then just enumerate through the installed services (using WMI maybe) and check for the service names

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • I think the same could be found through the windows registry;)

  • yes, its under HKLM\SYSTEM\currentcontrolset\services but i find a WMI query easier personally

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Tks all for your valuable post. 🙂

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply