All Apps and Add-ons

DB connect- Can I use single DB connection to read datas from multiple databases

vivintom
New Member

I need to run same query in multiple DB servers, is there any option to use same connection to read data from multiple database. any options like to pass the DB server name and port numbers from a look up table to one connection and read the data ?
or do i need to create separate connections for each and every DB servers ?

0 Karma

jkat54
SplunkTrust
SplunkTrust

Most people create one for each. There is a bulk upload/configure option in the latest releases that helps you speed this process up.

You could also use the search commands in conjunction with sub searches or the map command, etc. to do something like this:

search that creates a field of db connection names space separated called connectionNames
| mvexpand connectionNames
| map search=“|dbxquery connection=$connectionNames$ query=your query”
| additional SPL commands to make it like you want
| collect index=yourIndex

See the dbxquery command syntax here for other options:
http://docs.splunk.com/Documentation/DBX/3.1.3/DeployDBX/Commands

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...