I'm building a Node.js application which is trying to connect to a very specific SQL Server configuration: It's running as an instance, with a custom port and users need to login through Active Directory-- hence the connection should be done using domain
I'm using mssql package using tedious API, and this is my configuration:
connectionOptions = {
server: 'USRCMX01\\INSTANCE1',
port: 1367,
domain: 'stagingsv',
user: 'x.myuser.01',
password: 'myuserpassword',
options: {
instanceName: 'INSTANCE1',
trustServerCertificate: true,
enableArithAbort: true
}
};
However, when using this configuration I get a timeout error from SQL Server. After initiating SQL Server Browser service and opening port 1434 from my SQL Server instance server, I tried again but had the same luck
The connection string I was using before from SQL Server Management studio looks like this:
Driver={SQL Server Native Client 11.0};Server={USRCMX01\\INSTANCE1,1367};Uid={stagingsv\\x.myuser.01};Pwd={myuserpassword};Trusted_Connection={true};
.. And it works flawlessly
Is there any way to connect to a SQL Server instance using instance name, domain, and port at the same time from Node.js?