Getting Data In

How to configure Splunk DB Connect connection type to dedicated rather than the default shared mode?

antonio_donatac
New Member

Hi all,

I am usind the app Splunk DB Connect (version 1.0.8) to connect to a Oracle DB to fetch production data.
The issue is: the app establishes a connection link in shared mode by default.

I need to set the connection type to dedicated. Here you can find an example of the connection string I need to set up:

(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=XXXXXX-XXXXXX.it)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=XXXXX-XXXXXX.it)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=XXXX-XXXXXXXXX.it)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XXXXXX.XXXXX.it)))

How can I solve this configuration issue?

Thanks in advance for help.
Kind regards,
Antonio

0 Karma

fdi01
Motivator

So there are two easy ways to make this work. The solution posted by Bert F works fine if you don't need to supply any other special Oracle-specific connection properties. The format for that is:

jdbc:oracle:thin:@//HOSTNAME:PORT/SERVICENAME

However, if you need to supply other Oracle-specific connection properties then you need to use the long TNSNAMES style. I had to do this recently to enable Oracle shared connections (where the server does its own connection pooling). The TNS format is:

jdbc:oracle:thin:@(description=(address=(host=HOSTNAME)(protocol=tcp)(port=PORT))(connect_data=(service_name=SERVICENAME)(server=SHARED)))

see this link below, it can help you very fine:
http://www.orafaq.com/wiki/JDBC

0 Karma

pmdba
Builder

Unfortunately, Splunk constructs the JDBC Thin connection URL internally based on the username/password/service name parameters provided in the database.conf file. There doesn't appear to be way to provide any other details in the file specification. As such I don't think you can currently provide the sort of detailed connection information you specify above.

It also appears that there is no way to define a shared/dedicated preference on a service name basis on the server side of the connection, so if you can't override the default from the client then you're pretty much stuck with the server's default. Is there a particular reason you need to have a dedicated session instead of a shared one?

0 Karma

pmdba
Builder

I've never done this, but it might be possible to configure a second network listener on the database server and only register it to connect dedicated server sessions (i.e. not register it with the dispatcher).

0 Karma

antonio_donatac
New Member

Thank you pmdba for the reply (sorry for my delay in answering). We decided to open a case related to the app to configure the change from the client side of the connection (i.e. have the opportunity to modify that parameter).

Thank you for your support.
Kind regards,
Antonio

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!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...