The user instance
Hello,
I have a problem with setting up a connection in visual studio 2005 professional.
Sqlserver express is installed on the machine so I try to set up a connection by means of a
microsoft sql server databasefile. When I click ok I get the error :
The user instance login flag is not supported on this version of sql server.
Can someone help me to resolve this problem.
Thanks in advance Ilja zwolsman
Hello, Thanks for the reply.
I used the stored procedure sp_configure in sqlexpress :
sp_configure 'user instance enabled', '1'
Reconfigure;
Go
Then I get the message:
The configuration option
'user instance enabled' does not exist, or it may be an advanced option.
Sqlexpress was installed during installation of vs2005 professional.
I wonder if I am using the good sqlexpress edition.
Best regards, Ilja zwolsman
hi,
'user instances enabled' is not an advanced option requiring 'advanced options' to be set like
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
...
if you try to enable user instances on an edition other than SQLExpress you'll be prompted with the exception you reported..
on my Developer Edition:
EXEC sp_configure 'user instances enabled','1' ;
RECONFIGURE;
GO
SELECT @@VERSION;
--<-
Msg 15123, Level 16, State 1, Procedure sp_configure, Line 51
The configuration option 'user instances enabled' does not exist, or it may be an advanced option.
-
Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86)
Apr 14 2006 01:12:25
Copyright (c) 1988-2005 Microsoft Corporation
Developer Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
as expected.. check the SQL Server edition you are connected to..
regards
Hello,
You are right. I have two instances installed : sqlexpress edition and sql developer edition .
But it is a little strange, as far as I now I connected to "machineName\sqlexpress" and executed the stored procedure.
Anyway I uninstalled both and installed sqlexpress from the second vs2005 cd and now it works
fine!!
Thanks for your help, Ilja Zwolsman
OK!
I know why the User Instances are giving you trouble.
You need them for ASP.NET authentication since the maching.config requires it in LocalSqlServer connection string.
Resolution is as follows:
First run aspnet_regsql.exe command-line tool (in c:\windows\Microsoft.Net\Framework\v2.0.50727) and it will create a database on your MSSQL (developer, standard... edition) server. The name of database is aspnetdb.
Next, change the connection string 'LocalSqlServer' in your c:\windows\Microsoft.Net\Framework\v2.0.50727\maching.config to:
<add name="LocalSqlServer" connectionString="Data Source=MYSERVERNAME;Initial Catalog=aspnetdb;Integrated Security=True" providerName="System.Data.SqlClient" />
Do not forget to change MYSERVERNAME in connection string