MS-SQL 2005/2008 Database Connection Strings

This article guides the Plesk reseller when a client asks about connection strings to Microsoft SQL Server (MSSQL) on Windows hosting. It is not a .NET programming manual; it indicates what data the client must have and what needs to be configured in the service plan.

Reseller scope: You define whether the subscription includes MSSQL (service plan). The client creates the database and user in their panel and builds the string in their application. Detailed VB/C# code examples belong to the documentation of individual Windows plans, not this resale section.

Environment: MSSQL 2005/2008 on Windows servers with Plesk Onyx. Client SQL Native versions may vary; if the app fails due to an obsolete provider, the developer must update drivers or provider in their code.

What you check before replying

  1. The subscription has a plan with Microsoft SQL databases enabled (Service Plans).
  2. The client has already created the database and user in their panel (if not, instruct them to do it there — not from the reseller panel).
  3. If they request remote access (from another server or their PC), it may require firewall rules and additional permissions → escalate to the provider's support if it is not enabled.

Data the client needs for the string

Parameter Usual origin
Server / Data Source From the app on the same server: localhost or (local). From outside: hostname or IP indicated by the panel or support.
Database / Initial Catalog Name of the database created in the client panel.
User ID SQL user created and associated with that database (not the Plesk panel user).
Password SQL user password defined when creating it.

Reference format (SqlClient — .NET)

To guide the client or their developer, a typical string is:

Server=localhost;Database=DatabaseName;User Id=SQLUser;Password=SQLPassword;

Equivalent with Data Source and Initial Catalog:

Data Source=localhost;Initial Catalog=DatabaseName;User Id=SQLUser;Password=SQLPassword;

In .NET code, System.Data.SqlClient (namespaces System.Data and System.Data.SqlClient) is usually used. Legacy OLE DB providers (SQLNCLI, SQLNCLI10) are from old versions; recommend SqlClient unless the legacy app requires it.

Frequent errors (reseller support view)

Symptom Usual cause
Login failed for user Incorrect user/password or user without permission on that database.
Cannot open database Misspelled database name or database not created.
Does not connect from the internet Uses localhost from outside the server; needs remote host and port 1433 enabled.
Cannot create more databases Plan limit → service plan upgrade.

What the reseller does not do in Plesk

  • You do not write or debug the client's application code.
  • You do not create SQL users within the subscription from the reseller panel (except logging into the client panel as support, outside the scope of this KB).
  • You do not modify server OLE DB providers.

Related

  • Plans and subscriptions: enable MSSQL and number of databases in the service plan.
  • Individual plans: database/user creation and code examples for the client's developer.

If the client needs remote access to MSSQL or the connection fails after verifying data, open a ticket from the client portal with the domain, database name, and error message. You can also use the site's online chat.

  • cadena conexión base de datos, ms-sql 2005/2008
  • 18 Users Found This Useful
Was this answer helpful?