Monday, March 19, 2012

I can't connect to my local database.mdf file

I have just upgraded to Microsoft SQL Server 2005 Express Edition with Advanced Services SP2.

Now I can't connect to my local database.mdf file.

When trying to open or doubleclick or expand my .mdf file the following message pops up:

Generating user instances in SQL Server is disabled. Use sp_configure 'user instance enabled' to generate user instances.

What is the solution for this problem?

hi,

by default, User Instances feature is disabled when you install a SQLExpress instance.. the Install Wizard provides an option to enable it at install time, but you can enable it via sp_configure execution as

EXEC sp_configure 'show advanced option', '1'; GO EXEC sp_configure 'user instances enabled','1'; GO RECONFIGURE GO EXEC sp_configure 'show advanced option', '0'; GO

(restart the SQLExpress service)

that can be executed both in SqlCmd.exe (command line tool) or in a SQL Server Management Studio Express query window (or even via an ADO/Ado.Net connection)..

you can have a look at all "configurable" options at http://msdn2.microsoft.com/en-us/library/ms189631.aspx

regards

|||

Hi Andrea.

I have entered your code in the query editor and saved it as SQLQuery5.sql.
SQL server is restarted.

I right clicked in the query editor and hit Execute and get the folloving error:

Msg 233, Level 20, State 0, Line 0
A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)

The problem is still there?...

|||

Hi again :)

I right clicked in the query editor and hit Execute again after a while. It works now.

Thanks :)

No comments:

Post a Comment