Toad World® Forums

Search error


#1

I searched for code in a users schema for triggers that I do not have permission to. The search result returned 4 lines (as I would expect since dba_views is turned on). When I click the trigger I get Invalid SQL. So I shut Navigator completly down, brought it back up and did the same search again and turned Monditor on and got this:

Timestamp: 10:29:50.845
Runtime error occurred: 900 (ORA-00900: invalid SQL statement)

I will tell you while it was searching I was pulling up some queries from history…


#2

Hi Dale,

Would you please post a snapshot of the error? I also searched for code in a trigger that I don’t have permission to open and when I double clicked I got error ‘trigger hpham.emp-trigger not found’. This is quite reasonable considering I don’t have permission to view it.

Gwen


#3

Again, it only seems to happen when I am searching and selecting from History while the search is going (this search takes about 2 minutes). Attached is the output window, if I have misunderstood what you are asking let me know. I would agree with your statement about not being able to view a trigger because you don’t have permission unless you have permission to view dba_triggers. This is how we are able to review and support our code without having permission to change anything. My argument would be if you can search and find it you should be able to view it.
invalidsql.gif


#4

I tried your suggestions but still couldn’t get it. I still had the same error as before. I’m not sure why you got that error considering you didn’t run any statements.


#5

Really, I can recreate it every time. First a few notes about the searched for text. 1 it is in a trigger, 2 it is only visible because of dba_views, I do not have “real” permissions to it. So with all that, This last time I searched, when back to db_explorer and switch to history tab, search and selected in history intil the output window did a brief popup stating 5 occurances found. Then I go back to the search page and it gives me the error.


I have now even stopped checking history and am getting it. Here is what monitor is reporting…
Timestamp: 07:47:39.271
SELECT /+FIRST_ROWS/ OWNER, NAME, TYPE, LINE, TEXT T FROM sys.dba_SOURCE WHERE TYPE IN (‘TRIGGER’) AND OWNER LIKE ‘S%’
AND UPPER(TEXT) LIKE ‘%LWKAUDIT%’ ESCAPE ’ ’

Timestamp: 07:47:39.333
SELECT /+FIRST_ROWS/ OWNER,TRIGGER_NAME NAME, TRIGGER_TYPE, TRIGGERING_EVENT, TABLE_OWNER, TABLE_NAME, ‘TRIGGER’ TYPE,
TRIGGER_BODY T FROM sys.dba_TRIGGERS WHERE OWNER LIKE ‘S%’

Timestamp: 07:48:23.804
Runtime error occurred: 900 (ORA-00900: invalid SQL statement)

Timestamp: 07:48:24.023
Runtime error occurred: 900 (ORA-00900: invalid SQL statement)

Timestamp: 07:48:27.883
Runtime error occurred: 900 (ORA-00900: invalid SQL statement)

Wish I could be more help, but this does happen almost every time. It reports the invalid sql on a single click not necessarily a double click.


#6

Hi Dale,

I suspect that this bug causes by some privilege or role that your user has. I think the only way for me to be able to reproduce it is by having a user with the exact provileges and roles as your user? Would it be possible for you to provide us with the extract ddl of this user?

Gwen