1

I am trying to connect datasource in coldfusion admin with my local sql server 2014 but it is not connecting . I have tried every method to do this but no success. I have also created new user but it is also not working. I am getting this error

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

the datasource details are

datasource name: mlc_new db name: mlc_new sever: DEV-PC\SQLEXPRESS username: tester password : somestring

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
dev
  • 555
  • 1
  • 13
  • 31
  • What happens when you try to connect with SSMS using those credentials? – Dan Bracuk Feb 23 '17 at 16:06
  • What version of Coldfusion? Have you enabled mixed mode authentication on the SQL server? – haxtbh Feb 23 '17 at 16:15
  • ssms is connecting normally with windows authentication. – dev Feb 23 '17 at 16:15
  • coldfusion 2016 release and i am connecting with sql server in ssms with windows authenticationj @haxtbh – dev Feb 23 '17 at 16:16
  • 1
    Are these windows credentials in the question? – haxtbh Feb 23 '17 at 16:16
  • no, they are not windows credentials . These are the Credentials of new user that i had created for database that i want to connect. – dev Feb 23 '17 at 16:19
  • What I'm getting at is if these are not windows credentials then you probably don't have mixed mode enabled on the sql server. See http://stackoverflow.com/questions/25433235/coldfusion-10-windowns-7-pro-64bit-connection-verification-failed-for-data-sourc/25433701 – haxtbh Feb 23 '17 at 16:19
  • but why i am getting this error cant we connect coldfusion with windows authentication? – dev Feb 23 '17 at 16:21
  • 5
    You are not supplying windows credentials so you have to log in using sql authentication. I don't think CF supports windows credentials out of the box. You just have to configure sql server to allow both login methods. – haxtbh Feb 23 '17 at 16:24
  • it works .Thanks a lot @haxtbh – dev Feb 23 '17 at 16:28
  • @haxtbh - Yep, that is the issue. Though fwiw, CF does support windows authentication (if needed). – Leigh Feb 23 '17 at 18:41

1 Answers1

2

Some details on SQL Server mixed authentication. To enable do, the following:

  1. Connect to DB server (presumably via Windows Authentication
  2. Right click for properties on the server icon
  3. On the properties dialog go to Security
  4. Select "SQL Server and Windows Authentication mode". Save.

enter image description here

James A Mohler
  • 11,060
  • 15
  • 46
  • 72