Solving SQL Server Connection Problem
Upon database modeling with Visual Paradigm, you always need to connect to the database server to perform generation of your database and reverse engineering of your ER model. However, you may encounter problem in connecting to the Microsoft SQL Server, which is a great obstruction to your modeling. In this article, we will provide ways to help you to check whether your configurations for connecting to SQL Server are correct.
Inspect Server Settings
There are three significant aspects that users may neglect, which lead to the failure of the connection to the SQL Server.
Enable TCP/IP Connection
To check whether your server enabled to TCP/IP connections:
- Open your SQL Server Configuration Manager.
- Expand SQL Server Network Configuration and select Protocols for SQLEXPRESS.
- Take a look at TCP/IP, which requires to be Enabled. If yours is Disabled, right-click on it and select Enable in the popup menu.
- Also, you may take a look at the Port setting of your server. Right-click on TCP/IP and select Properties in the popup menu.
- Click the IP Address tab in the TCP/IP Properties dialog box.
- Under IPAll section, you can see the TCP Port (default: 1433) and you can edit the port of your server.
- You will need to restart server after changing any setting in SQL Server Configuration Manager. You can right click on the server instance and select Restart from popup menu.
Allow Remote Connection
Your need to make sure that remote connection to your SQL Server is enabled. To verify this setting:
- Startup your SQL Server Management Studio.
- Right-click on the server and select Properties in the popup menu.
- In the Server Properties dialog box, select Connections.
- Check the checkbox of Allow remote connections to this server.
Authentication Method
We recommend users to run their SQL Server with mixed authentication mode. To inspect the authentication mode of your SQL Server:
- Open SQL Server Management Studio. Then, right-click on the server and select Properties in the popup menu.
- In the Server Properties dialog box, select Security.
- Make sure Server Authentication is set to SQL Server and Windows Authentication Method.
Make sure Hostname and Port are correct
Back to your VP application, have a check in your database configuration and see if you have entered the Hostname and Port correctly.
- Select Tools > Database > Database Configuration… in the VP application.
- Select the Language, Server, Version and the Driver in Database Configuration dialog.
- Enter Hostname, which must be either the IP address of your computer, a mapped host name or the computer name.
- Enter the port of your SQL Server. It’s 1433 by default, but if you have edited the port for your SQL Server or running on other named instance, you need to enter the corresponding port.
Driver File
Visual Paradigm supports to connect to SQL Server with various JDBC driver files. But we recommend users to use the jDTS driver. Visual Paradigm can help you to download and setup the jDTS driver automatically. To download the driver:
- Select Tools > Database > Database Configuration.
- After you have chosen the language, server and driver, click the green down arrow button beside the Driver file field.
- VP will download the adapter file for you.
Please note that VP will need to run with sufficient permission in-order to download and install the driver file. You may need to right click on VP’s shortcut and select Run as administrator in order acquire sufficient permission.
Some driver files cannot be automatically downloaded. In this case, you can press the … button beside the Driver file field to specify driver file from your file system to make connection with your SQL Server.
Adapter File (Specific for language specified as .NET)
While you are using non-compatible adapter file, you will not be able to connect to the server. The simplest way to get the compatible adapter file is let our application download it for you:
- Select Tools > Database > Database Configuration.
- After select .NET as language, MS SQL Server as the server, click the green down arrow button beside the Adapter file field.
- VP will download the adapter file for you.
Again, VP will need to run with sufficient permission in-order to download and install the driver file. You may need to right click on VP’s shortcut and select Run as administrator in order acquire sufficient permission.
SQL Server with Windows Authentication
If you are using the Windows Authentication Method, you will need another connection URL in order to connect to the SQL Server.
Java (SQL Server 2005 Microsoft Driver)
jdbc:sqlserver://<server_host>;databaseName=<database_name>;integratedSecurity=true;
Java (jDTS)
jdbc:jtds:<server_type>://[<server_host>:<port>][/<database_name>];domain=XXX
where <server_type> = sqlserver
** Domain Server is required. If no domain server is available, please try domain=workgroup
.NET
Server=%HOST%,%PORT%;Database=%DATABASE%;User ID=%USER_ID%;Password=%PASSWD%;Trusted_Connection=Yes;Domain=%WINDOW_DOMAIN%
You can enter the proper connection URL in the Connection String field in the Database Configuration dialog box to establish connection with your SQL Server.
Diagnose Connection Issue in Command Line
You can diagnose whether your SQL Server is ready for making connection by using Telnet command. For Microsoft Windows, Telnet is not installed by default, you need to install it before running the telnet command.
Install Telnet Client
To install the Telnet client on your Windows:
- Open Control Panel from the Start.
- Select Programs and Features in the Control Panel.
- Under Programs and Features, select Turn Windows features on or off.
- Scroll down to find the option Telnet Client, check this option and press OK.
Use Telnet Command to Check is SQL Server Ready for making TCP/IP connection
- Enter telnet %host% %port% in the command prompt, where %host% and %port% are the host and port of your SQL Server.
- Press Enter to see if it can call the SQL Server. If the telnet can communicate with the host and port you have specified, a blank dialog box will be shown. This means your SQL Server is able to be connected.
- If it fails to connect to your SQL Server, there will be a message of failure.
If you still fail to connect to SQL server with all the above steps of checking, please contact Visual Paradigm Support Team for technical support.
Related Articles |
Related Links |
hi, I have some problem for database configure. When test connection, it have connection time out error (v.yj.aw: Connection timeout!)
I am using the wampp locathost MySQL database.
the setting as below:
Version: 5.0.5 or higher
Driver: MYSQL5
Driver file: (Auto Download )
Connection URL: jdbc:mysql://localhost:8080/JRSDD
Engine: InnoDB
Please help! thanks.
Regards,
Eric
Hi tkchung23,
Thank you for your post. Are you sure your hostname and ports are correct? If yes, please submit a support ticket for our support team for check with you. Please send us your log file for checking. You can export it from the About window (Help > About). You can submit a ticket at:
https://www.visual-paradigm.com/support/
Best regards,
Jick Yeung
OMG, the very first method worked like a charm!
Thank you so much! I’ve beeing searching this for HOURS!