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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...