Toad World® Forums

Toad 14c - ora904 - c.origin_con_id invalid identifier

Had on 13c Oracle , upgraded to 14c
trying to access a view script

Can you turn on Spool SQL (Main menu -> Database -> Spool to Screen)
Then make the error happen, and post the spool SQL output here. You'll be able to see what the query is that is causing the problem.

Tried that and still just get the pop up issue
this happens when I try to look at the scripts views.
I don't get this for tables or anything else just the views
I can see the data, I can get the scripts, it is just accessing the script for views and just in the one database that I can tell

I tried to spool the script to a file and I get the same thing

I didn't mean to imply that turning on spool SQL would solve anything. Rather, it will identify the exact query that is causing the error, so that I can tell you what the problem is, and hopefully how to avoid it.

No query just that error pops up

Toad is running a query in the background to get the script for the view. That's where the error comes from. Nevermind on spool SQL, I found the query without it.

Your database version is 12.1.0.2 or newer. In that case, Toad expects you to have the column ORIGIN_CON_ID on these data dictionary views. See Oracle documentation here. I believe that ORIGIN_CON_ID is missing from one or more of the views listed below, and that's why you are getting the error.

USER_TAB_COMMENTS
USER_COL_COMMENTS
ALL_TAB_COMMENTS
ALL_COL_COMMENTS
DBA_TAB_COMMENTS
DBA_COL_COMMENTS

If your database was recently upgraded, then I think this got missed, so talk to your DBA about that.

In the meantime, in Toad, you can prevent the error by unchecking this option, to exclude comments from your view script:

That worked!
I had to do for the views and tables
thanks

You're welcome. You should try to get it fixed in the database though.

The fix was to shutdown the database, startup upgrade, run catalog, catproc, utlrp, bounce database
In my case the dba_registry showed the catalog was invalid and it is not valid and I can do the toad compares.

I am not sure how this happened as I am new to this database.

1 Like