0

I already have SQL Server Enterprise 2012 on my PC and the service that is running is MSSSQLSERVER (found on SQL Server Configuration manager).

I am trying to attach a database which requires SQL Server Express!

I downloaded SQLEXPR_x64_ENU and installed it, unfortunately SQLEXPRESS is not shown in my Configuration manager.

What shall I do to attach this database?

The attempts I've done:

First I tried with SQL Server Management Studio: while attaching gives this problem message:

An error occurred when attaching the database(s). Click the hyperlink in the message column for details.

and the progress box shows:

Error occurred.

While I try to add a data connection to the database in VS2012 I receive these errors:

  1. If I use Data Source "Microsoft SQL Server" I receive this message:

    The user instance login flag is not supported on this version of SQL Server. The connection will be closed.

  2. If I use Data Source "Microsoft SQL Server Database File" and I browse the database file, I get this error message:

    A network related or instance specific error occurred while establishing oa connection to sql server. the server was not found or was not accessible. verify that the instance name is correct and that sql server is configured to allow remote connections. (provider: Sql network interface, error 52 - unable to locate a local database runtime installation. verify that SQL Server Express is properly installed ant that the local database runtime feature is enabled)

As you see SQL Server Express is required.

Ken White
  • 123,280
  • 14
  • 225
  • 444
user3077814
  • 1
  • 1
  • 2
  • What happens when you try to attach it? Be specific. – RBarryYoung Dec 07 '13 at 15:43
  • Can you show us the connection string you're trying to use? If you want to use the `AttachDbFile=` feature (I would strongly recommend **against** it, though), then **YES**, this feature is available in the **Express** editions exclusively. – marc_s Dec 07 '13 at 16:38
  • You were right, 'AttachDbFile' doesn't work well. I changed my webconfig code with bellow: ' ' – user3077814 Dec 08 '13 at 12:51

1 Answers1

0

If you correctly installed SQL Express on a laptop that already had the MSDN developer version, you should see two instances in the services.

MSSQLSERVER - developer version
SQLEXPRESS - express version

SQL Express does not come with services like the SQL Server agent. But it should be listed as the database engine SQL SERVER (SQLEXPRESS) under the configuration manager, SQL Server Services.

Make sure this service is started as well as the Browser service. Under network configuration, make sure TCP/IP is enabled. Under client protocols make sure TCP/IP is enabled.

Since you have the development version of SQL Server, you can connect and manager the express instance like the default instance. Just use your SSMS query window with the correct TSQL.

Here is a link on my blog on how to create a database for attach.

http://craftydba.com/?p=1753

Please respond back if you still have issues with a screen shot or two of the settings I just discussed.

CRAFTY DBA
  • 14,351
  • 4
  • 26
  • 30
  • I mentioned at the begining, I already have ENTERPRISE edition. I guess I should uninstall that and use EXPRESS edition. – user3077814 Dec 08 '13 at 12:53
  • I do not think that is necessary. I have servers in which express and standard co-exist. If you can connect to .\SQLEXPRESS via SSMS, then the above settings I suggested are fine. Remember, this is a named instance probably not on port 1433, you have to reference it by \ . – CRAFTY DBA Dec 08 '13 at 15:39