Monday, March 19, 2012

cannot create new sql express database

Hi,

I am trying to create a new Sql Express Database (.mdf file) from inside Visual Studio 2005. I did the following:

1) Created a Database Project in Visual Studio.

2) Choose Data Source to be Microsoft SQL Server Database File

3) Browse to a directory and enter a file name for the new database, say abc.mdf

4) When I click OK, Visual Studio prompts me if I want to create the database file, I click yes.

5) After a while, I get this error message:

An error has occurred while establishing a connection 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: 26 - Error Locating Server/Instance Specified)

Then I opened SQL Server Configuration Manager, and I enabled Named Pipes and TCP/IP for both SQLEXPRESS and MSSQLSERVER. It prompts me that the settings will not change until the service is re-started.

When I go to Administrative Tools -> Services, I see that SQLServer (MSSQLSERVER) is started, and SQL Server (SQLEXPRESS) is stopped. I can stop the MSSQLSERVER service. But when I tried to start SQLEXPRESS service, I get the following error message:

Windows could not start the SQL Server (SQLEXPRESS) on Local Computer. For more information, review the System Event Lo9g. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 17058.

I have Visual Stuio 2005 and Sql Server 2005 Installed on my machine, and I believe I am logged on using an administrator account.

Can someone help me to figure out what's wrong please?

Thanks and regards,

Alice

It seems that something is wrong with your SQL Express isntallation if it won't start. You should check the error log to see if it give more details about the problem starting the service. The error log is generally located at C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG (Your InstanceID may be different).

When you check the error log, please also verify that you are not running a beta version of SQL Express. The version number should contain either 9.00.1399 or 9.00.2047.

Mike

|||

Hi,

It turns out SQL Express wasn't installed properly. I re-installed it and it works fine now. Thanks a lot.

Alice

No comments:

Post a Comment