Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have certain synonyms in my schema which represent views from another schema. Now in oracle sqldeveloper, I am unable to see the actual SQL for those views but I see only an SQL like:

CREATE OR REPLACE SYNONYM "ABC"."ABC_CHAR" FOR "XYZ"."ABC_CHAR";

Now my question is: is there a way for me to see the Actual SQL for the View XYZ.ABC_CHAR that is in the other schema?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

In the tree view on the left-hand-side, expand the tree for your database connection. Expand "Other Users", then "XYZ", then "Views". Double-click on the view name "ABC_CHAR" - this will open the column list. Click "SQL" above the column list to see the query that created the view.

The other way to achieve this is to use SQL:

select text 
from all_views
where owner='XYZ' 
and view_name = 'ABC_CHAR';

This all assumes you have the correct grants to see the view text.

share|improve this answer
    
Thanks a lot! Made my day! –  MozenRath Dec 17 '12 at 6:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.