Skip to main content
November 16, 2020
Question

Can anyone please help me with Datasource connection issue (SQL Server)?

  • November 16, 2020
  • 2 replies
  • 241 views

Hi, 

I'm really hoping someone can help me.  

Since recent CF updates, then SQL Server updates, both within a week, connection to db is broken and I can't create the datasource in CF Admin anymore.  I've reinstalled CF and SQL server mulitple times, but that didn't help.

 

In SQL server I:  checked ports: All 1433, All TCP/IP. All set to 127.0.0.1

I've tried mixed mode authentication and Windows.  Was using Windows authentication before and it worked fine. So, leaving it on Windows Authentication.  I checked firewall.

 

I ran queries in SQL Server to see if I am the user of the db, I am.

 

I've done more things, just can't remember them all.  A troubleshooting guide would be awesome.  But I don't think such a thing exists for ColdFusion.

 

Here's the error in CF Admin I'm getting:

Thanks in Advance...!

 

 

  • Connection verification failed for data source: Organizations2
    java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver][SQLServer]Cannot open database "Organizations2" requested by the login. The login failed.
    The root cause was that: java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver][SQLServer]Cannot open database "Organizations2" requested by the login. The login failed.

 

 

 

 

    This topic has been closed for replies.

    2 replies

    Community Expert
    November 16, 2020

    If you don't know the difference between Windows authentication and mixed-mode authentication, I would recommend you choose mixed-mode instead. This will allow both Windows authentication and "native" SQL Server authentication. Typically, most ColdFusion applications use native SQL Server authentication, and it wasn't until recently that ColdFusion supported Windows authentication.

     

    Dave Watts, Eidolon LLC

    Dave Watts, Eidolon LLC
    November 16, 2020

    I've tried that too.  Made no difference.

    Could it be a driver issue?  I downloaded the most recent JDBC driver from MS.  The zip file contains 4 of them.  I used the most recent version.  Not sure if that's the one to use or not. How would one know?

     

    Does anyone have a link to a step by step trouble shooting guide for troubleshooting connection errors?

     

    Below is a snippet of web page error:

     

     

    java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver][SQLServer]Cannot open database "Organizations2" requested by the login. The login failed.
    
    	at macromedia.jdbc.sqlserver.tds.ddj.a(Unknown Source).....................................
    ...................
    ...................
    BKBK
    Community Expert
    Community Expert
    November 16, 2020

    Make sure the datasource setting for "Organizations2" has the correct Username and Password.

    November 16, 2020

    Not sure which username and password you mean.  I didn't set a username and password on the database.  

    I've tried using my Windows credentials when creating the datasource connection in CFAdmin, it makes no difference.

    I get this error:

     

     

     

    • Connection verification failed for data source: Organizations2
      java.sql.SQLInvalidAuthorizationSpecException: [Macromedia][SQLServer JDBC Driver][SQLServer]Login failed for user 'Laura'.
      The root cause was that: java.sql.SQLInvalidAuthorizationSpecException: [Macromedia][SQLServer JDBC Driver][SQLServer]Login failed for user 'myUserName'.