Reputation: 6993
I'm trying to create a data source for my local sql server using the server name (local)
. But I keep getting the following error
Connection verification failed for data source: sqlserver
java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Unknown host: (local)
The root cause was that: java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Unknown host: (local)
On the reporting services I'm using (local)
as the server name and it is working fine,
Ted
Upvotes: 1
Views: 3541
Reputation: 4758
You can't use (local) this is a Microsoft ONLY term and won't be understood by anything external.
You need to specify the servername as the name of the server.
If the SQL Server is the same server as ColdFusion you can then use localhost
If not use the DNS or local IP name of the sever, ie sql.local or 192.168.1.22
If the server is external to your You will need TCP/IP configured and port 1433 open also. But by default this should be setup, you may just need to open your firewall to allow access through port 1433.
In a network environment, you would normally use local IP to get LAN access to your DB, but if database is really external you need a real IP / domain
Upvotes: 4
Reputation: 8324
Have you enabled external TCP connections on your sql server?
Try using localhost
instead of local
. (or add 127.0.0.1 local
to your hosts file)
Upvotes: 4