how to find the default instance

  • Hello All,

    How to find out default sql instance on a machine. I am aware that running the below script would give all the instances on that machine, but how to find out which one is default among them.

    master..xp_regenumvalues

    'HKEY_LOCAL_MACHINE',

    'SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL'

    Is there any better approach for getting the default instance name.

    Thanks

    Naresh

  • Default instance name is always same to your machine name. for example if your server name is mydbprodsvr, the default instance name will be same as SQL Server (mydbprodsvr).

    -Forum Etiquette: How to post Performance Problems[/url]

    -Forum Etiquette: How to post data/code to get the best help [/url]

Viewing 2 posts - 1 through 1 (of 1 total)

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