2015-11-19 27 views
0

我被給了一個oracle連接,SID = xcom和user = sa。我連接用sqlplus,但是當我做了一個「描述表」它說,它不存在:oracle如何使用與當前用戶不同的模式?

SQL> describe equip_inst; 
ERROR: 
ORA-04043: object equip_inst does not exist 
SQL> 

我需要以包括SCHEMANAME「newpoc」得到它:

SQL> describe newpoc.equip_inst; 
Name          Null? Type 

那麼,有什麼竅門?我想要默認登錄這個模式名稱爲「newpoc」的所有我的對象。

+1

您可能沒有從'equip_inst'表中讀取的權限。 '從table_name ='EQUIP_INST''的all_tables中選擇owner顯示你? –

回答

0

作爲你的榜樣,你所描述的所有權限進行了相應的授權,可以執行

ALTER SESSION SET CURRENT_SCHEMA = <schema name> 

在你的情況下,用戶「sa」執行:

ALTER SESSION SET CURRENT_SCHEMA = NEWPOC ; 

所以,在你例如:

SQL> show user 
USER is "SA" 
SQL> 
SQL> desc equip_inst 
ERROR: 
ORA-04043: object equip_inst does not exist 


SQL> alter session set current_schema = NEWPOC ; 

Session altered. 

SQL> desc equip_inst 
Name          Null? Type 
----------------------------------------- -------- ---------------------------- 
NAME            VARCHAR2(100) 

SQL> 

問候

相關問題