Skip to main content
Participant
September 29, 2022
Question

Enable to connect to mssql to test failover

  • September 29, 2022
  • 1 reply
  • 425 views

I have a db connection( xxxdev2) on a UAT server.

I am trying to setup a duplicate db( xxxdev2b) opn my local server to test db failover if the primary server goes down.

For some reason, I connot get the connection working in the coldfusion Datasource section.

I can login in to the server using sql studio, but I get the following error on the datsopurce page of CF.

 

"Connection verification failed for data source: xxxdev2b
java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]Error establishing socket to host and port: LAPTOP-Rick:1433. Reason: Connection refused: connect"

    This topic has been closed for replies.

    1 reply

    Community Expert
    September 30, 2022

    When you use a hostname or machine name, the connection will use your machine's "real" IP address. Instead, use localhost or 127.0.0.1 for your connection.

     

    Dave Watts, Eidolon LLC 

    Dave Watts, Eidolon LLC
    Participant
    September 30, 2022

    Thank you for the response. I tried both those ideas previously, and niether worked. JUst for fun I tried it again and same result, still not connecting.

    Community Expert
    September 30, 2022

    In that case, you have a different problem! If you set up MS SQL Server locally, it probably won't accept connections over TCP/IP, so you'll have to enable that in the SQL Server Configuration Manager.

     

    https://learn.microsoft.com/en-us/sql/relational-databases/sql-server-configuration-manager?view=sql-server-ver16

     

    Dave Watts, Eidolon LLC

    Dave Watts, Eidolon LLC