Friday, March 30, 2012

Instance naming problems

When I try to Add New Item - Database in VS C# Express, I get "An error has occurred while establishing a conncection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid)"

When I open the management studio, I can connect to a database named Dev, and when I try to "Browse for more" from the server selector combobox, it is the only one found. I believe "Dev" was my old MSDE name, although this is also what my "Computer Name" is set to. Unfortunetly the setup of SQL Express didn't ask me what to name my instance.

I thought maybe the SQL Server 2005 Express Toolkit installation didn't actually contain the server software, and only installed the tools, as during the installation the section where I select components only listed things like client tools and what not, with not mention of the server software.

So I thought maybe it didn't install the server, so I downloaded the server installation that is by itself, and installed it, this time I saw the check for hide advanced options, so I went through the advanced options this time. I've have been through this same setup before at work, and both times it has confused me. It seems very different from installing previous versions of SQL server.

Where I choose to create a new instance or upgrade, I choose to upgade, and it is not clear what I'm upgrading, the selector does not display instance names.

At another point it asks me about configuring it to use the Local service, local system, or network account. The documentation of how these differ is vauge. For example, the network account is described basically as "don't use this" without saying what it is.

I was accustomed to just a local account, and network account settings from previous versions, and network was always the logical choice for me to use intergrated security. I don't understand what the new catagories represent and what will be functionally different in the way I connect.

So I'm really confused, and getting back to the instance names. In the surface area configuration as well as the VS Express, it only sees the name as MSSQLSERVER

For example if I "add new connection" from database explorer and click advanced, the datasource drop down lists only ".\MSSQLSERVER"

So I'm thoroughly confused at this point and not sure what to do.

Let's see if I can help you some:

* By default, if you install the SQL Server Express engine and you do not specify the instance name the instance name would be SQLEXPRESS.

* Connect to a named instance by specifying "<Computer Name>\<Instance Name>" (without the quotes). ".\<Instance Name> will also work when connect to a local instance.

* For the service account, using Network Service or domain account without administrator rights on the local server is recommended. Network Service work best if SQL Server does not need to perform functions on the network which requires more permission than Network Service has. If this is the case, use a low-privilege domain account.

* Use SQL Server Configuration Manager to view all SQL services (instances) installed. (I am not sure if SQL 2000 instance include MSDE are shown -- if not use SQL Manager or Control Panel | Services to see if MSDE is installed)

Hope this helps,

Peter Saddow

No comments:

Post a Comment