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
Get Updates on the Splunk Community!

Exciting News: The AppDynamics Community Joins Splunk!

Hello Splunkers,   I’d like to introduce myself—I’m Ryan, the former AppDynamics Community Manager, and I’m ...

The All New Performance Insights for Splunk

Splunk gives you amazing tools to analyze system data and make business-critical decisions, react to issues, ...

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...