Toad World® Forums

Ora-00904 ref invalid identifier

Hi,
I am have toad 13.2.0.258 running on 18c client. When I use schema browser to view views or mviews I get ora-00904 ref invalid identifier.
Any suggestions? The database i am viewing is 19c. That cannot be the issue because other people in the group can see the views. I am leaning towards my setting. Any help appreciated.

FYI I copied another users setting and it fixed it. I still do not know whet setting, but its working.

If it happens again, go to main menu: Database->Spool SQL->Spool to screen. That will capture the SQLs that Toad executes. Then you'll be able to see where the error comes from.

Hi.
I get the same error, whenever I open a package from schema browser in the editor. The statement causing problems:

SELECT *
FROM sys.user_obj_audit_opts
WHERE (SUBSTRB (alt, 1, 1) IN ('-', 'A', 'S')) AND
((alt <> '-/-') OR (aud <> '-/-') OR (com <> '-/-') OR
(del <> '-/-') OR (gra <> '-/-') OR (ind <> '-/-') OR
(ins <> '-/-') OR (loc <> '-/-') OR (ren <> '-/-') OR
(sel <> '-/-') OR (upd <> '-/-') OR (REF <> '-/-') OR
(exe <> '-/-') OR (rea <> '-/-') OR (wri <> '-/-') OR (fbk <> '-/-'))
and OBJECT_NAME = :OneObjectName
ERROR: ORA-00904: "REF": ungültige ID

Do you know, wich option is causing the problems? The error seems only to occour on Oracle 19 Databases.

Additional Information:
Oracle Database Version: 19
Oracle Client Version: 12, 32 Bit
Toad Version: 13.1.1.5

Oracle 19 changed some things that made this query no longer valid.

This is fixed in the current version of Toad.

Uncheck here, that should fix it.

Thanks for the fast reply!

Unchecking this option helped when exporting the DDL. But the error also occurs, when double-clicking the the package to open it in the Editor and everytime you compile a package.
Is there an option to turn off audit statements everywhere?

I can't get that query to fire when I double-click a package in the schema browser. For me, it doesn't even get near that code with the audit statements.

Can you let me know your exact steps?

That's strange.. I navigate to the packages in the Schema Browser and double click on the package name. The Editor opens and the error message pops up:
image

After closing it, the error appears three or four times more. Same thing when I compile a package in the Editor.

Does this help? I could try to make a video next monday, if this would help?

I just tried a few more different objects. Same behaviour with procedures and functions, that open in the editor (but the error gets displayed only twice). When double clicking a view to get into "Alter View"-Dialog the error gets displayed once.
It doesn't happen when double clicking on tables and opening the "Alter Table"-Dialog.

Do you use Team Coding? If so, uncheck this option:
image

That's it! Awesome, I unchecked the option and now it works. Thank you for the fast support!

1 Like

I get this error as well. I upgraded toad to 13.2.0.258 and am running against a 19c database. I get the following error when trying to script tables and views:

ORA-00904: "REF": invalid identifier

We are not using Team coding

Uncheck this. Repeat for Views and any other object type that you get the error on.

Thanks. Had to change to tabbed view to find that option but its working now.

FYI, you can also get to it from the right hand side script tab.