Ad Widget

Collapse

ODBC Get - switch Database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zablab
    Junior Member
    • Jan 2022
    • 28

    #1

    ODBC Get - switch Database

    I'm unable to find how to use a specific Database using the db.odbc.get key.

    I'm using the Database Monitor and passing a Query to SQL. It works well enough, but it seems I cannot switch Databases.

    For example, I receive "[]" if I execute the following query, which should be returning some Data.

    USE tempdb;
    SELECT TOP (1) [object_id]
    ,[name]
    FROM [tempdb].[sys].[all_columns]



    Is it possible to switch between Databases?

    With appreciation,
  • Zablab
    Junior Member
    • Jan 2022
    • 28

    #2
    Update:

    Although it would be nice to do this in the query and if anybody has a better idea, I'd greatly appreciate it!

    As a workaround, or perhaps this is how things are, I created a specific DSN\Database connection in my ODBC.ini that I use in the Zabbix template.

    Comment

    Working...