Splunk Search

db connect query

a212830
Champion

Hi,

I'm trying to execute the following query, and it keeps getting rejected with "command="dbquery", A database error occurred: ORA-00911: invalid character". If I try it without the ending semi-colon, I get command="dbquery", A database error occurred: ORA-00904: "HD"."s Activity": invalid identifier ".

Any suggestions? I don't want to grab the whole table, as there are a lot of useless columns.

SELECT hd.TIMEFRAME ,
hd.MA_ID ,
hd.ORIGINATING_PATH_INDEX ,
hd.AVERAGE ,
hd.VARIANCE ,
hd.VALUE_COUNT ,
hd.MAXIMUM ,
hd.STATUS_COUNT_NORMAL ,
hd.STATUS_COUNT_MINOR ,
hd.STATUS_COUNT_MAJOR ,
hd.STATUS_COUNT_CRITICAL ,
hd.PROFILE_STATUS_COUNT_NORMAL ,
hd.PROFILE_STATUS_COUNT_MINOR ,
hd.PROFILE_STATUS_COUNT_MAJOR ,
hd.PROFILE_STATUS_COUNT_CRITICAL ,
hd.THRESH_STATUS_COUNT_NORMAL ,
hd.THRESH_STATUS_COUNT_MINOR ,
hd.THRESH_STATUS_COUNT_MAJOR ,
hd.THRESH_STATUS_COUNT_CRITICAL ,
hd.Measurement ,
hd."g Measurement Type" ,
hd."s Measurement Type",
hd."g Application" ,
hd."s Application",
hd."g Activity" ,
hd."s Activity"
FROM ATERNITY.HISTORICAL_DATA_VW_1

Tags (1)
0 Karma

lidbbn7
New Member

just a thought -- the database table alias name hd is not in the example ATERNITY.HISTORICAL_DATA_VW_1 hd

0 Karma

Sammich
New Member

This would be my guess. Also I'm finding out that you need to escape the quotes that you use with a column alias.

0 Karma

stefandagerman
Path Finder

Does the query get executed successfully outside of Splunk, say using an Oracle client?

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...