• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

How connect to sql server express

P

placom

Guest
Hi, I have a windows 2003 web edition server with plesk 8.1

I can't connect from my sites to SQL server express databases.

This is conection string I'm using:

<add key="connectionString" value="Server=.\SQLEXPRESS;Trusted_Connection=true;database=mydatabase" />

that works in my old iis server without plesk

this is the error:

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)



What is the correct conecction string or what can i do to be able to use sql server express in my asp.net sites with plesk 8.1

thanks
 
First of all you will probably have to set the surface area of SQL Express so it can listen on TCP/IP for SA authentication.

Your connection string needs to look something like this:

If you are migrating from SQL Express to SQL 2005 server you will need to change your connection string in the web config file to contain the following values:

<connectionStrings>
<clear />
<add name="CommerceTemplate" connectionString="Data Source=; initial catalog=database name; user ID=username; password=password;" providerName="System.Data.SqlClient" />

<add name="LocalSqlServer" connectionString="Data Source=; initial catalog=database name; user ID=username; password=password;" providerName="System.Data.SqlClient" />
</connectionStrings>

Replace the values (source, database name, username, password) with your own database values.

Make adjustments to the connection string depending upon the database name you have entered in dot net panel as well as the username and password. Your application add name may also be different from that above.
 
Well, in this try the given steps hope this will help you:
  • Launch the SQL Server Configuration Manager Click on Start > Programs > Microsoft SQL Server 2005 > Configuration Tools start menu option.
  • Select the SQL Server 2005 Network Configuration tab. There should be Protocols for SQLExpress option, and one of the protocols should be TCP IP.
  • Enable the TCP IP protocol if it is not enabled.
  • The default port for SQL Express may not be 1433. To find the port it is listening on, right-click on the TCP IP protocol and scroll all the way down to the IP All heading. There should be a section called TCP Dynamic Ports. This should list the port SQL Express is listening on. You can then put this value into the port field when adding the connection profile.
These steps are similar for both MS SQL Server Express 2005 and 2008.

Hope this will help you. But if not then might happen due to any type of corruption or error you are not able to connect to SQL server express.Then in case make use of advanced MS SQL File Repair Tool, this is best to repair any type of corruption, damages and errors in SQL server database and recover the lots objects without any hassle.
 
Back
Top