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!

Developer Spotlight with Brett Adams

In our third Spotlight feature, we're excited to shine a light on Brett—a Splunk consultant, innovative ...

Index This | What can you do to make 55,555 equal 500?

April 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...