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!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...