VERIFIED SOLUTION i

Resolve Spectrum error when connecting to SQL database resource "The connection test failed"

Product Feature: JDBC Drivers

Operating System: Windows 2008

Version: 7,8,9

Issue

Connecting to an SQL database in Spectrum. Running into an error message:

The connection test failed.

Reason: Exception while trying to connect to DataSource: java.net. Connection.Exception: Connection timed out: connect

Cause

This error means the wrong port number is being used. For example, if inputting "22" as the port, port 22 is for SSH secure logins, scp, sftp.
 

Resolution

UPDATED: April 14, 2017
Port 1433 is the default port if using MS SQL 2005 or 2008.

If 1433 does not work, use "netstat -aon" command to identify the ports that the SQL processes use.