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!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...