Splunk Dev

Splunk DB connect MSSQL connection params

wellsajs
Explorer

Hi

I am having issues connecting to a Microsoft MSSQL server using the Splunk DB connect app.
I have tested connectivity from a GUI windows client to the database and it works fine but the connection string maybe the issue in SPLUNK , as I have not seen any examples in the docs that show you how to connect with these params.

Database = SQLSERVER\BETA.ServiceDesk

I have tried many different combinations to try and connect, but cannot get splunk to successfully connect.

In the GUI Client the params below work

Server = SQLSERVER\BETA
Username = test
Password = ********

This takes me straight into the correct database. any help would be greatly appreciated.

Cheers
J

0 Karma
1 Solution

wellsajs
Explorer

Hi

I found a solution to my issue, as MSSQL 2008 was running as a named instance, I needed to find out the dynamically allocated TCP port. The below URL helped me find this information via the Windows Registry.

http://sqlserverpedia.com/blog/sql-server-bloggers/what-tcp-port-is-sql-server-running-under/

I hope this helps out other people who had the same issue as I have had.

Cheers
J

View solution in original post

wellsajs
Explorer

Hi

I found a solution to my issue, as MSSQL 2008 was running as a named instance, I needed to find out the dynamically allocated TCP port. The below URL helped me find this information via the Windows Registry.

http://sqlserverpedia.com/blog/sql-server-bloggers/what-tcp-port-is-sql-server-running-under/

I hope this helps out other people who had the same issue as I have had.

Cheers
J

Dan
Splunk Employee
Splunk Employee

You could also specify a named instance rather than converting to the tcp port http://splunk-base.splunk.com/answers/66459/connect-to-a-non-default-instance-of-ms-sql-server

0 Karma

ziegfried
Influencer

Have you checked that there is no firewall blocking connections from your Splunk instance to you database server?

0 Karma

wellsajs
Explorer

I forgot to mention I tried using the host option as well and I also used the port option as well and still could not connect. The error I get is connection refused.

Also I made a slight typo

Server = SQLSERVER\BETA

Database = ServiceDesk

Cheers
J

0 Karma

ziegfried
Influencer

Also please let us know which values you tried for host and database.

0 Karma

ziegfried
Influencer

Is it a named instance?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...