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!

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...