Create and manage database connections (2024)

A database connection object contains the necessary information for connecting to a remote database.

Create a database connection

To create a new connection:

  1. From within Splunk DB Connect, select the Configuration > Databases > Connections tab.
  2. select New Connection.

    Note: If you have not yet created an identity, the New Identity window appears. Create a new identity, and then you can create a new connection.

  3. On the New Connection page, complete the following fields:
  • Connection name
  • Identity: Select the identity you want to use with this connection.
  • Connection Type: A list of supported databases. Select the type of database to which you're connecting.

    Note: This list contains all supported databases, regardless of whether you installed their drivers. You must first install the database driver for the database type you want to use. If not already installed, you can install JDBC Add-ons directly from the DB Connect application during connection setup. In that case, a pop-up window will appear and you will need to follow the installation instructions. After the driver is installed, it takes approximately 10 seconds for it to be available on the system. You must first install the corresponding driver in order to select a database from this list. For information about the Microsoft SQL Server options listed here, see "Microsoft SQL Server".

  • Timezone: If you want to convert data of date and time types read from the database into the Splunk server's local time zone, enter the source database time zone for the conversion. When you set the time zone, you have two time zone conversion options depending on the localTimezoneConversionEnabled setting in db_connections.conf:
    • When you don't define localTimezoneConversionEnabled or set it to false, the system only converts index time values read from table columns in the source database into the local time zone. This conversion option only applies to inputs.
    • When you set localTimezoneConversionEnabled to true, the system converts all date and time data type (datetime, time, date, timestamp) values into the local time zone except source datetime values that already include time zone information For example, TIMESTAMP WITH TIMEZONE). This conversion option applies to inputs, dbxqueries, and dblookups.
    If you leave the Timezone field blank, the system assumes that the source database time zone and Splunk server's local time zone are the same and reads the date and time data as is.
    Example
    Timestamp in database Database time zone Splunk Server (JVM) time zone Indexed timestamp value
    Without timezone conversion 2006-02-15 04:34:33 UTC Asia/Shanghai (GMT+8) 2006-02-15 04:34:33 in Asia/Shanghai time zone
    With timezone conversion 2006-02-15 04:34:33 UTC Asia/Shanghai (GMT+8) 2006-02-15 12:34:33 in Asia/Shanghai time zone

    Note:

    • If the column in your database contains timezone information For example, for the column with a TIMESTAMP WITH TIMEZONE type), Splunk ignores the timezone you set here.
    • The timezone setting defaults to JVM time zone. If there are no JVM time zone settings, Splunk uses the time zone of your operating system.
    • For MySQL database driver, you need to set useLegacyDatetimeCode setting to false in the JDBC URL if you want to use the timezone setting.

JDBC URL Settings

  • Host: Enter the address, or host, of the database.
  • Port: (Optional.) Enter the port number of the database. You don't need to enter a port number here if your database is using its default port.
  • Default Database: Enter the default database or catalog name for the database type you chose. The usage and meaning of this parameter varies between database vendors, so check your database vendor's documentation. For more information, see supported databases matrix.
  • Enable SSL: Select this check box to enable Secure Sockets Layer (SSL) encryption for the connection. SSL support is not available for all connection types. For further information, see supported databases matrix and Enable SSL for your database connection. To find out how to connect to Oracle using SSL for encryption, see Connect to Oracle using SSL (for encryption only).
  • Certificate: When you select the Enable SSL check box, the Certificate field appears for the MySQL, MSSQL and Oracle connection types. You can pass a certificate which Splunk automatically adds to the Java TrustStore and uses it for the server authentication. If you select the Enable SSL check box but leave the certificate field empty, then DB Connect ignores the certificate and functions as before.
  • JDBC URL Preview A Java Database Connectivity (JDBC) Uniform Resource Locator (URL) is a URL that encodes all the necessary information for connecting to your database. The JDBC URL Preview field is not editable by default, but Splunk populates this field, using placeholder values, with the correct URL format according to the database type you have chosen.
  • Connection properties Splunk uses the provided properties during the creation of the connection. Splunk provides properties either here or through the editing of the JDBC URL. You can find a list of all valid driver connection properties in the official database documentation. Splunk ignores incorrect properties.
  • You can manually edit the URL format by selecting Edit JDBC URL. When you select this field, the JDBC URL Preview becomes editable. This is useful if you need to add customized JDBC URL parameters to the JDBC URL, but that is not Splunk best practice unless you already know what customizations you want to add. Connection parameters vary among JDBC drivers. Consult your database vendor's documentation for a list of supported parameters and values.
  • Note: DB Connect supports LDAP connection, you need to select the LDAP URL in JDBC URL field. Consult your database vendor's documentation on how to generate LDAP URL.

Advanced Settings

  • Fetch Size: (Optional.) Enter the number of rows to return at a time from the database. If you leave this field blank, it defaults to 300.
  • Readonly: Select this check box to indicate your intention for users to only use SELECT statements with the database. Be aware that this cannot always guarantee read-only access. DB Connect tries to ensure that it's read-only, but it is the database driver that ultimately allows or prevents changes. If you intend to use the read-only option, ensure that, on the database itself, the user you're connecting as only has read-only access. See Read-only connections for more details.
  • In the Permissions table, update the Splunk Enterprise permissions for this database connection. For more information, see Permissions.
  • Select Save to save the connection.

    Note:If the connection you create is valid, you can save the connection succesfully. Otherwise Splunk displays an the error message for you to check the configuration of the connection and save again.

  • Edit connections

    Go to Configuration > Databases > Connections to see a list of the defined database connections.
    Note: The list of connections that you can see depends on the permissions set on each connection. For more information, see Permissions.

    Connection actions

    You can make changes to a connection using the following buttons on the connection page under the Edit tab:

    • Disable/Enable: Disable/Enable a connection by selecting Disable/Enable here. You cannot disable a connection if any inputs, outputs, or lookups are using it. In that case, Splunk greys out this button.
    • Edit: Edit the connection by clicking its name or edit button.
    • Clone: Creates a copy of the connection. You must give the copy a new name.
    • Delete: Deletes the connection. You cannot delete a connection if any inputs, outputs, or lookups are using it. In that case, Splunk greys out this button.

    You can also edit the attributes of a connection listed in Create a database connection, except its name. To change the name of a connection, clone it, give the clone the name you want, and then delete the original connection.

    Permissions

    The Permissions table is where you select the Splunk Enterprise roles that have read, read-write, or no access to the connection.

    • Read access means that Splunk Enterprise roles can use the connection.
    • Write access means that Splunk Enterprise roles can use and modify the connection.

    By default, the Splunk Enterprise "admin" and "db_connect_admin" roles have write access to a new connection, the "db_connect_user" role has read access, and all other roles have no access.

    Add support for a new database vendor

    You may need to ingest data into Splunk from a database not supported in DB Connect. If you've found a JDBC driver for that specific database vendor, you'll probably be able to handle it.

    1. Download the JDBC driver.
    2. Copy the driver under $SPLUNK_HOME/etc/apps/splunk_app_db_connect/drivers directory.
    3. Edit or create $SPLUNK_HOME/etc/apps/splunk_app_db_connect/local/db_connection_types.conf file.
      [<Stanza for the new database vendor>] displayName = <Name to identify the database vendor from the UI>serviceClass = NonejdbcUrlFormat = <Review the JDBC driver documentation and look for information about the connection URL format. <host>, <port> and <database> are tags you can use to help build it dynamically>jdbcDriverClass = <Review the JDBC driver documentation and look for information about the driver class>port = <Default port>testQuery = <A generic SQL query to make it possible to test the connection configuration>

      Note: For more information on all configuration options, see Connection Type Specifications file.

    4. Restart Splunk.

    Connection type deprecation

    Since version 3.16.0 we have introduced a feature to deprecate connection types. It is useful when we need to switch from legacy JDBC drivers to new solutions and ensure a seamless configuration.

    Please note that if you are using a connection type that is deprecated, you will still be able to use it, in which case a warning message will be displayed like: Connection type <Name> is deprecated since version <Version>.

    You will not be able to create new connections for deprecated connection types.

    Create and manage database connections (2024)

    FAQs

    How to manage database connections? ›

    Manage In-Database Connections
    1. Add a Connect In-DB tool, and select Connection Name > Manage Connections in the Configuration window.
    2. Select Options > Advanced Options > Manage In-DB Connections.

    How do you create and manage a database? ›

    Create a blank database

    Type a file name in the File Name box. To change the location of the file from the default, click Browse for a location to put your database (next to the File Name box), browse to the new location, and then click OK. Click Create.

    What is an example of a database connection? ›

    Connections are built by supplying an underlying driver or provider with a connection string, which is a way of addressing a specific database or server and instance as well as user authentication credentials (for example, Server=sql_box;Database=Common;User ID=uid;Pwd=password;).

    What are two types of database connection methods? ›

    Open database connectivity (ODBC) and Java database connectivity (JDBC) are heavily used with relational databases and other structured sources.

    How do I check database connections? ›

    Launch the Web browser and navigate to: https://localhost:8443/jmx-console.
    1. Under UCMDB, click UCMDB:service=Dal Services to open the JMX MBean View.
    2. Invoke the function getDbContext with a customerID parameter value of 1.
    3. Check that the operation result shows no problems.

    How does a database connection work? ›

    A database connection is a configuration file where you specify a database's physical details such as database type and version, and parameters to enable a JDBC connection from IBM® App Connect Enterprise Toolkit to the database.

    How to create a database step by step? ›

    The design process
    1. Determine the purpose of your database. This helps prepare you for the remaining steps.
    2. Find and organize the information required. ...
    3. Divide the information into tables. ...
    4. Turn information items into columns. ...
    5. Specify primary keys. ...
    6. Set up the table relationships. ...
    7. Refine your design. ...
    8. Apply the normalization rules.

    What do you mean by database connectivity? ›

    Database Connectivity refers to the mechanisms that enable application software to communicate with database management systems (DBMS). Establishing a connection is essential for performing operations such as creating, reading, updating, and deleting data within a database.

    What does it mean to manage a database? ›

    Database Management allows a person to organize, store, and retrieve data from a computer. Database Management can also describe the data storage, operations, and security practices of a database administrator (DBA) throughout the life cycle of the data.

    What are the 4 types of database management system? ›

    The four types of database management systems are: Hierarchical DBMS, Network DBMS, Relational DBMS (RDBMS), and Object-oriented DBMS (OODBMS). Each type employs different structures and principles to organise, store and manage data.

    Can I create my own database management system? ›

    There are plenty of tools and technologies on the market to help you build your own database. From open-source databases like MySQL to NoSQL databases like MongoDB, there's a wide range of options. When making your decision, consider factors such as scalability, performance, costs, and compatibility with other systems.

    What is the correct sequence to create a database connection? ›

    Explanation: To create a database connection in Java, we must follow the sequence given below: Import JDBC packages. Load and register the JDBC driver. Open a connection to the database.

    What is the ideal way to connect to databases? ›

    2 Database connection methods

    For instance, direct connection is the simplest and most straightforward approach, where your app connects directly to the database server using a driver. This method is suitable for small and simple applications that do not need high security or scalability.

    What is an example of a data connection? ›

    A data connection is a network of connection that can send or receive information. For example, a smartphone may have a wireless data connection, which enables the phone to send or receive information over the internet.

    How do I monitor my database connection? ›

    In Developer, log in to a project source. You must log in as a user with the Monitor Database Connections privilege. Expand Administration, then expand System Monitors, and then select Database Connections. The database connection information displays on the right-hand side.

    How do you handle one-to-many relationships in database? ›

    To implement a one-to-many relationship between two tables, insert a column that holds a foreign key into the table that is described by the sentence “One of x can have many of y”. In our case: one country can have many cities. The table storing your y's must contain the foreign key of x.

    Top Articles
    Your weekly tarot horoscope reading for August 12 to August 18
    Your Weekly Tarot Horoscope Says the High Priestess Is Guiding You Forward
    Spasa Parish
    Rentals for rent in Maastricht
    159R Bus Schedule Pdf
    Sallisaw Bin Store
    Black Adam Showtimes Near Maya Cinemas Delano
    Espn Transfer Portal Basketball
    Pollen Levels Richmond
    11 Best Sites Like The Chive For Funny Pictures and Memes
    Things to do in Wichita Falls on weekends 12-15 September
    Craigslist Pets Huntsville Alabama
    Paulette Goddard | American Actress, Modern Times, Charlie Chaplin
    Red Dead Redemption 2 Legendary Fish Locations Guide (“A Fisher of Fish”)
    What's the Difference Between Halal and Haram Meat & Food?
    R/Skinwalker
    Rugged Gentleman Barber Shop Martinsburg Wv
    Jennifer Lenzini Leaving Ktiv
    Justified - Streams, Episodenguide und News zur Serie
    Epay. Medstarhealth.org
    Olde Kegg Bar & Grill Portage Menu
    Cubilabras
    Half Inning In Which The Home Team Bats Crossword
    Amazing Lash Bay Colony
    Juego Friv Poki
    Dirt Devil Ud70181 Parts Diagram
    Truist Bank Open Saturday
    Water Leaks in Your Car When It Rains? Common Causes & Fixes
    What’s Closing at Disney World? A Complete Guide
    New from Simply So Good - Cherry Apricot Slab Pie
    Drys Pharmacy
    Ohio State Football Wiki
    Find Words Containing Specific Letters | WordFinder®
    Abby's Caribbean Cafe
    Joanna Gaines Reveals Who Bought the 'Fixer Upper' Lake House and Her Favorite Features of the Milestone Project
    Tri-State Dog Racing Results
    Navy Qrs Supervisor Answers
    Trade Chart Dave Richard
    Lincoln Financial Field Section 110
    Free Stuff Craigslist Roanoke Va
    Wi Dept Of Regulation & Licensing
    Pick N Pull Near Me [Locator Map + Guide + FAQ]
    Crystal Westbrooks Nipple
    Ice Hockey Dboard
    Über 60 Prozent Rabatt auf E-Bikes: Aldi reduziert sämtliche Pedelecs stark im Preis - nur noch für kurze Zeit
    Wie blocke ich einen Bot aus Boardman/USA - sellerforum.de
    Infinity Pool Showtimes Near Maya Cinemas Bakersfield
    Dermpathdiagnostics Com Pay Invoice
    How To Use Price Chopper Points At Quiktrip
    Maria Butina Bikini
    Busted Newspaper Zapata Tx
    Latest Posts
    Article information

    Author: Rev. Leonie Wyman

    Last Updated:

    Views: 5597

    Rating: 4.9 / 5 (59 voted)

    Reviews: 90% of readers found this page helpful

    Author information

    Name: Rev. Leonie Wyman

    Birthday: 1993-07-01

    Address: Suite 763 6272 Lang Bypass, New Xochitlport, VT 72704-3308

    Phone: +22014484519944

    Job: Banking Officer

    Hobby: Sailing, Gaming, Basketball, Calligraphy, Mycology, Astronomy, Juggling

    Introduction: My name is Rev. Leonie Wyman, I am a colorful, tasty, splendid, fair, witty, gorgeous, splendid person who loves writing and wants to share my knowledge and understanding with you.