Splunk Search

DB Connect with instance name and integrated security

reed_kelly
Contributor

Most of our MS SQL Servers require integrated security and the databases are not on the default instance. Our Splunk servers are all on Linux. I know how to use Java to configure JTDS to connect to these SQL instances using Integrated security, e.g.:

java -classpath ./lib/jisql.jar:./lib/jtds-1.2.6.jar com.xigole.util.sql.Jisql -user ...
... -cstring "jdbc:jtds:sqlserver://host_name:port_no/db_name;domain=domain_name;instance=instance_name" ....

Is there a way to do this in Splunk DB Connect (DBX)?

Tags (2)
0 Karma
1 Solution

ziegfried
Influencer

Windows Authentication (NTLMv2) can be enabled by specifying the user in the form of DOMAIN\username. This will result in a JDBC URL like this:

jdbc:jtds:sqlserver://hostname:port/db;domain=DOMAIN;useNTLMv2=true;otherparams=....

In addition, other parameters for the JDBC URL of an MSSQL database connection can be specified in the database.conf stanza by adding arg.<paramName>=<value>:

[mysqlserver]
host = ...
database = ...
username = ...
password = ...
arg.useNTLMv2 = false
arg.socketTimeout = 300

View solution in original post

ziegfried
Influencer

Windows Authentication (NTLMv2) can be enabled by specifying the user in the form of DOMAIN\username. This will result in a JDBC URL like this:

jdbc:jtds:sqlserver://hostname:port/db;domain=DOMAIN;useNTLMv2=true;otherparams=....

In addition, other parameters for the JDBC URL of an MSSQL database connection can be specified in the database.conf stanza by adding arg.<paramName>=<value>:

[mysqlserver]
host = ...
database = ...
username = ...
password = ...
arg.useNTLMv2 = false
arg.socketTimeout = 300

reed_kelly
Contributor

I found the non-default instance name part: http://splunk-base.splunk.com/answers/66459/connect-to-a-non-default-instance-of-ms-sql-server. The remaining question is whether Integrated security can be used for MS SQL.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...

Laser Bananas and Edge Hubs: Exploring Operational Technology (OT) Data Through a ...

  OT is a different environment to traditional IT and can have interesting challenges when interfacing the ...

Event Series: Mastering AI Tokenomics and Splunk Agent Observability

Beyond the Black Box: Correlating AI Performance and Tokenomics with Splunk Agent Observability   As ...