• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • 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.
  • The ImunifyAV extension is now deprecated and no longer available for installation.
    Existing ImunifyAV installations will continue operating for three months, and after that will automatically be replaced with the new Imunify extension. We recommend that you manually replace any existing ImunifyAV installations with Imunify at your earliest convenience.

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