In SQL Server 2008 how do I make sure that I am specifying correct instance name and that instance name actually exists on target server and is running.
In SSMS, you can double click your server to open the Object Explorer, then right click and select Propties, General Tab. Here you will see the sql server instance name.
You can also do this with a query by executing the following:
If this from your Application's perspective, you will get an error describing the situation of your server instance name, you can catch that. Also there are plenty of scripts on the web to get all the SQL instances available in your network,
You can also do this with a query by executing the following:
SELECT @@SEVERNAME