Topic
  • 5 replies
  • Latest Post - ‏2013-09-28T08:48:48Z by 1XWY_TS_Teh
Javier_Balles
Javier_Balles
25 Posts

Pinned topic How to catch Error Code from DBServer

‏2013-09-20T23:15:45Z |

Hi All,

I have an Exception Type Rule in my Policy where the Exception Type field of the criteria of the rule is SQL_ERROR and Error Code addressed to Failed_Error_Code Group, i.e I have in this group different error_codes members from ORACLE and DB2 like these: ORA-01045, ORA-01031, (DB2) SQL0103N and others. So I executed the commands on the DBServer (ORACLE,DB2) to get the Error_Codes, like this:

For ORACLE:

SYS@faxflow>conn PERRITA/Lserdt99
ERROR:
ORA-01045: user PERRITA lacks CREATE SESSION privilege; logon denied

PERRO@faxflow>create user PERRITA identified by Lserdt99;
create user PERRITA identified by Lserdt99
ERROR at line 1:
ORA-01031: insufficient privileges

FOR DB2

mxemch010503ads:db2admrt:/db2/db2admrt $  db2 select * from TW1_CAMPANIALEAP_D
SQL0103N  The numeric literal "1crmrt_campanialeap_d" is not valid. 
SQLSTATE=42604

But when I run my Report within Guardium it just obtains the ORA-01045 in the Error Code Colum an their description in the Database Error Text Column and the others ErrorCodes I do not catch them. Do you know what is the reason? Why do not I catch the others ErrorCodes?

 

ORA-01045 Error Code

 

user string lacks CREATE SESSION privilege; logon denied Database Error Text

Note:

The inspection Engine is working in the Databases and the STAP too in the DBServers

 

Thanks in advance!

 

  • 1XWY_TS_Teh
    1XWY_TS_Teh
    212 Posts

    Re: How to catch Error Code from DBServer

    ‏2013-09-21T10:32:25Z  

    May I know you are using the default SQL Error query or is your own customization? By right it should show all if it is an SQL error. Mind to share the query template?

  • Javier_Balles
    Javier_Balles
    25 Posts

    Re: How to catch Error Code from DBServer

    ‏2013-09-21T22:49:42Z  

    May I know you are using the default SQL Error query or is your own customization? By right it should show all if it is an SQL error. Mind to share the query template?

    Hi,

     

    Yes of course.

     

    Thanks!

  • 1XWY_TS_Teh
    1XWY_TS_Teh
    212 Posts

    Re: How to catch Error Code from DBServer

    ‏2013-09-22T03:47:09Z  

    Hi,

     

    Yes of course.

     

    Thanks!

    Thanks. Have you try removed the Error Code group from the Condition and leave it blank. Does the result appear in your report if without any conditions?

  • Javier_Balles
    Javier_Balles
    25 Posts

    Re: How to catch Error Code from DBServer

    ‏2013-09-22T22:01:09Z  

    Thanks. Have you try removed the Error Code group from the Condition and leave it blank. Does the result appear in your report if without any conditions?

    Hi,

    Yes, I removed the condition from my query and I ran my Report again I saw others SQL-Errors that I did not execute and my SQL-Erros do not appear.

    I attached the output of my Report.

     

    Thanks a lot!

     

  • 1XWY_TS_Teh
    1XWY_TS_Teh
    212 Posts

    Re: How to catch Error Code from DBServer

    ‏2013-09-28T08:48:48Z  

    Hi,

    Yes, I removed the condition from my query and I ran my Report again I saw others SQL-Errors that I did not execute and my SQL-Erros do not appear.

    I attached the output of my Report.

     

    Thanks a lot!

     

    Hi, may I know what is your OS and DB version?