Andy
Andy

Reputation: 169

Connecting to new SQL Server 2012 database in Coldfusion 11

I have an existing instance of ColdFusion 11 server and SQL Server 2012 on a Windows 7 Ultimate platform.

I have several SQL Server datasources already connected successfully connected using: localhost\SQLEXPRESS, username "sa" and my password. When I try to add a new database in the CF Administrator I get this error:

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

It appears to be a login issue, not a connection issue so I don't think it has to do with source limits on Developer platforms.

Upvotes: 0

Views: 577

Answers (1)

Mark A Kruger
Mark A Kruger

Reputation: 7193

In 2012 or beyond you will not be able to us "sa" - and you should never use it anyway to set up a datasource. Doing so opens up a huge attack vector directly to your data and your server itself.

You will need to set up a separate username and password and give it DBO permissions to your DB. This will expose only your specific database to your CF connection. If you can you should narrow permissions further - do you really need "create" permissions for example?

Upvotes: 1

Related Questions