Getting Data In

Splunk DB Connect MS SQL DB - Connection refused

marellasunil
Communicator

I am getting the following error while I am tring to connect Microsoft SQL database,

Encountered the following error while trying to update: In handler 'dbx-databases': Error connecting to database: java.sql.SQLException: Network error IOException: Connection refused: connect

Can anybody tell me where my setup whent wrong?

0 Karma

miteshvohra
Contributor

Couple of things:
1. Grab MS SQL Server JDBC Driver 4.0 from here. Extract and drop the sqljdbc4.jar file to $SPLUNK_HOME/etc/apps/splunk_app_db_connect/bin/lib directory.
2. Restart Splunk.
3. Download the DB Connect App 2.0.4.
4. Configure MS SQL Server to use Mixed Authentication (try it before-hand via Management Console or CLI, your choice).

More Troubleshooting steps can be referred here.

If this answer has helped you, please vote and mark this as accepted answer.

Thanks, Mitesh.

0 Karma

miteshvohra
Contributor

I have updated the answer with path to the directory where the jar file needs to be copied.

Hope this helps.

Mitesh.

0 Karma

rupesh_patil20
Path Finder

Thank You Mitesh for your quick response . Give me few time. i will do it as you suggested. Will surely vote for you.

0 Karma

rupesh_patil20
Path Finder
  1. Grab MS SQL Server JDBC Driver 4.0 from here. Extract and drop the sqljdbc4.jar file in the right path.

As i did this step earlier also. just wanted to know which is the right path. If I placed it wrongly I can do correct it now.

0 Karma

rupesh_patil20
Path Finder

Hi Mitesh,
Just check and let me know if it is correct http://screencast.com/t/LgULwePy

0 Karma

djarmoluk
Explorer

I've tried every variation and have followed the documentation to perfection. I am not able to connect my SQL server. Keep getting java.sql.SQLException: Network error IOException: Connection refused: connect.

I'd attach a screen shot, but since I'm a loser and don't have enough Karma points, I'm not able to?!

0 Karma

rupesh_patil20
Path Finder

I am also getting the same error.. can someone help us out from this. Or anyone who has did this before.. can help me to solve the issue..
I can communicate via Skype.
Awaited for your response.
Thank you

0 Karma

anwarmian
Communicator

Hello Sunil,

You may have already found the solution to your query. I've encountered the same problem. Here are the two things I did to make it work. Keep in mind that it's for MS SQLServer connection only.

  1. In db connect app: Click "Database connections in Splunk Manager" then click "New" to open the "External Databases" window. Fill in the necessary fields. Make sure "Additional JDBC Parameters" field is filled in with useCursors=true

  2. Make sure sqlbrowser is running. sqlbrowser.exe is located in "Microsoft SQL Server" folder, for example: C:\Program Files (x86)\Microsoft SQL Server\90\Sharedsqlbrowser.exe. You can manually start the sqlbrowser by the following command: <drive>\<path>\sqlbrowser.exe -c where <drive>\<path>\ would be something like C:\Program Files (x86)\Microsoft SQL Server\90\Shared\

Check this site for database connection information: http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Addadatabaseconnection

The database.conf file stores the connection information. You can find this in dbconnect app's (dbx) local folder.

Hope this helps.

Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...