Reputation: 467
I'm trying to use Data-Atom package in the Atom Editor to connect to a SQL Server 2012 database. I can connect to the database with SQL Server Managment Studio using Windows Authentication or SQL Server Authentication. How the data-atom-connections.cson
file should be using these two authentication methods?
My data-atom-connections.cson
file looks like this:
[
{
name: "WindowsAuthentication"
protocol: "sqlserver"
user: "username"
password: "password"
server: "apphost/Username"
database: "master"
options: ""
}
{
name: "SQLServerAuthentication"
protocol: "sqlserver"
user: "userlogin"
password: "password"
server: "apphost/sqlexpress"
database: "master"
options: ""
}
]
But I get this error:
Error(ESOCKET) - Failed to connect to apphost:1433 - connect ECONNREFUSED 192.168.56.1:1433
Note: for specifying the server name I saw this post Logging In to SQL Server
Upvotes: 1
Views: 2674
Reputation: 1389
When this pull request is merged into data-atom you should have more luck.
SERVER\INSTANCE
in the server field, or SERVER\\INSTANCE
if you're editing data-atom-connections.cson
directly, to connect to a named instance.domain=YOUR_DOMAIN
to the options string to use Windows authentication (see more options for SQL Server here)~/.atom/packages
.mssql
for SQL Server to align with node-mssql
.Upvotes: 0