Data dictionary viewsgreenspun.com : LUSENET : DBAzine : One Thread
Hi, I am working on Oracle 8.0.3 which is on Open VMS 7.1 version. I have to prefix SYS to describe Data dictionary views such as DBA_USERS, ALL_TABLES etc. while working in SYSTEM account or other user accounts.
How can I describe Data dictionary views without specifying "SYS." as prefix. Is there some script to be run? or some privilege to be granted to SYSTEM account/other accounts?
-- Durga Srigiriraju (email@example.com), March 15, 2001
you gotta grant the select_catalog_role to the user who needs to query the data dictonary views additonaly you also gotta create synonyms to these views in order that you dont have to prefix sys against those views.
-- hrishikesh (firstname.lastname@example.org), May 07, 2001.
Thank you very much for your reply and information. But I already did Grant SELECT_CATALOG_ROLE and created the Synonyms. My question is related to SQL*PLUS DESCRIBE command. I guess, even after you do the above (i.e., Grant SELECT_CATALOG_ROLE and created Synonyms), in SQL*PLUS when we use describe command we have to prefix the schema name (Schema.Object_Name) to describe an object Example: SQL_SYSTEM_ACCOUNT> Desc SYS.DBA_USERS -- this works. SQL_SYSTEM_ACCOUNT> Desc DBA_USERS -- this does not work. Where as, when we reference the same object in SQL statements, we need not prefix schema name. Example: SQL_SYSTEM_ACCOUNT> Select * from DBA_USERS; -- works.
I guess SQL*PLUS Describe command works differently. Is there any other explanation/solution?
Thanks and regards, Durga
-- Durga Srigiriraju (email@example.com), May 07, 2001.