Splunk Search

A database error occurred: ORA-00942: table or view does not exist.

rahul2gupta
Path Finder
Hi All,
 
When I am trying to run the following search in splunk:
 
|dbquery wmsqlprd "select REC_TYPE, CODE_TYPE, CODE_DESC, SHORT_DESC, USER_ID from SYS_CODE_TYPE" it is throwing an error A database error occurred: ORA-00942: table or view does not exist.
 
db2.PNG
 
But when I try to run with the same saerch with wmsql.sys_code_type it is giving result.
 
|dbquery wmsqlprd "select REC_TYPE, CODE_TYPE, CODE_DESC, SHORT_DESC, USER_ID from wmsql.SYS_CODE_TYPE" . 
db3.PNG
 
what needs to be done to get results using the first query.
 
Regards,
Rahul Gupta
0 Karma

niketn
Legend

@rahul2gupta  this is not a Splunk DB Connect issue. The error is coming from Oracle engine. Google ORA-00942 for more details.

In fact this is not even an issue. This is expected behavior as per DB Design and Architecture. You need right schema for accessing the Tables. You either need wmsql to be your default schema or need to explicitly include the schema name. Any changes you would need to contact your Database administrator. 

https://www.tekstream.com/resource-center/ora-00942-table-or-view-does-not-exist/

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

rahul2gupta
Path Finder

Hi @niketn ,

Do I need to make any changes in these as well.

rahul2gupta_0-1595832348959.png 

Do we need to change the username and password ?

Regards,

Rahul

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Agent Mode Engaged! Enchaining Agentic Operations with Splunk AI Assistant 2.0

    Are you ready to transform how your team handles complex data requests? We invite you to our upcoming ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...