Applicable to:
- Plesk for Windows
Symptoms
-
Unable to change properties of MS SQL database server or create database in Plesk due to the following error:
PLESK_ERROR: Error: The test connection to the database server has failed because of network problems:
Get database server version failed: mssqlmng failed: [DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection.
at (VADOConnection::open line 48)
at Unable to ADO conect with connection string: Provider=SQLOLEDB.1;Initial Catalog=master;Data Source=,\localhost(VADODatabaseProvider::connect line 182)
at execute console command --get-server-version(vconsoleapp::start line 100)
at execute "C:\Program Files (x86)\Parallels\Plesk\admin\bin\mssqlmng.exe" --get-server-version "--server=,\localhost" "--login=sa" "--password=*"(vconsoleapp::run line 117)
(Error code 1) -
Additionally, it is not possible to create a backup or migrate databases due to the same error.
OR
-
Unable to add or update an MS SQL database server in Plesk, it fails with one of the errors below:
PLESK_ERROR: Error: The test connection to the database server has failed because of network problems:
Try to establish connection failedOR
PLESK_ERROR: Get database server version failed: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. (Error code 1)
-
It's not possible to export, import or to manage an MS SQL database, the following message is shown:
CONFIG_TEXT: The server is unavailable.
-
The following error might be shown in the
%plesk_dir%\admin\php_error.log file:
CONFIG_TEXT: ERR [panel] "C:\Program Files (x86)\Parallels\Plesk\admin\bin\mssqlmng" --check "--server=.\MSSQLSERVER2012" "--login=sa" "--password=******" failed with code 1.
stdout:
Login failed for user 'sa'.
at (VADOConnection::open line 48)
at Unable to ADO conect with connection string: Provider=SQLNCLI11;Initial Catalog=master;Data Source=.\MSSQLSERVER2012(VADODatabaseProvider::connect line 182)
at execute console command --check(vconsoleapp::start line 93)
at execute "C:\Program Files (x86)\Parallels\Plesk\admin\bin\mssqlmng" --check "--server=.\MSSQLSERVER2012" "--login=sa" "--password=*"(vconsoleapp::run line 110)
stderr: -
The following message can be found in Start > Event Viewer > Applications and Services Logs > Plesk:
CONFIG_TEXT: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. at (VADOConnection::open line 62) at Unable to ADO conect with connection string: Provider=SQLOLEDB.1;Initial Catalog=master;Data Source=203.0.113.2\SQL2008(VADODatabaseProvider::connect line 181) at execute console command --check(vconsoleapp::start line 132) at execute "C:\Program Files (x86)\Parallels\Plesk/admin/bin/mssqlmng" --check "--server=203.0.113.2\SQL2008" "--login=sa" "--password=*"(vconsoleapp::run line 143) Execute file name: C:\Program Files (x86)\Parallels\Plesk\admin\bin\mssqlmng.exe
Cause
There are several possible causes:
-
Connection issue.
-
Incorrect login/password credentials.
-
The disabled login.
Resolution
-
Connect to the server via RDP.
-
Go to Start > Services and make sure that the SQL Server (MSSQLSERVERXXXX) and SQL Server browser services are running on the server and start them if they are stopped.
Note: The SQL Server (MSSQLSERVERXXXX) can take one of the following values depending on which MSSQL server the issue occurs:
SQL Server (MSSQLSERVER)
SQL Server (MSSQLSERVER2012)
SQL Server (MSSQLSERVER2014)
SQL Server (MSSQLSERVER2016) -
Ensure that the SQL Server and Windows Authentication mode and login for the user (usually it is the "sa" user) are enabled.
-
Make sure that you can log in to MS SQL server, e.g. via SQL Server Management Studio, with the same username (usually it is the "sa" user) and password that was specified in Plesk > Tools & Settings > Database Servers > MS SQL server.
In case the password is incorrect, update it by following this article:
-
Make sure that you can log in to MS SQL server, e.g. via SQL Server Management Studio with the "hostname\instance" name mentioned in the Plesk > Tools and Settings > Database Servers > MS SQL server.
-
Open the port for MS SQL instance in the server firewall (by default it is 1433) and make sure it is listening on it:
Note: if another port was specified during the MSSQL server configuration, change the "1433" port to this one in the command below.
C:\>netstat -anb | findstr 1433
TCP [::]:1433 [::]:0 LISTENING - Run the following query to check if shared memory protocol is being used:
MYSQL_WIN: SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS ServerName, @@SERVERNAME AS FullInstanceName, @@SERVICENAME AS InstanceName, local_net_address AS InstanceIPAddress, local_tcp_port AS InstancePort FROM sys.dm_exec_connections WHERE session_id = @@spid
If port and IP address values are NULL disable shared memory
ServerName example
FullInstance Name example
InstanceName MSSQLSERVER
InstanceIPAddress NULL
InstancePort NULL -
Make sure that the Named Pipes connection method is enabled in the SQL Server Configuration Manager > SQL Server Network Configuration > Protocols for MSSQLSERVERXXXX.
Note: The Protocols for MSSQLSERVERXXXX can take one of the following values depending on which MSSQL server the issue occurs:
Protocols for MSSQLSERVER
Protocols for MSSQLSERVER2012
Protocols for MSSQLSERVER2014
Protocols for MSSQLSERVER2016If it disabled, enable it by performing the following actions:
Additional information
Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager)
Comments
2 comments
I got this error while following the instructions for MYSERVER:
Hostname or IP Address: .\MYSERVER
As my SQL Server instance was installed as the default instance, MYSERVER was displayed in step 3 in SSMS.
So I needed to change the Hostname to ".\" as that means, the local server, using the default instance. Then the connection was made.
Hi @Pieter van Kampen,
Thanks for sharing this solution - other users may find it helpful!
Please sign in to leave a comment.