解決Oracle在scott用戶下創建視圖(VIEW)權限不足的方法


問題描述:在scott用戶下創建視圖的時候,報錯:權限不足。(其他用戶以此類推)
解決方法

    1. 以dba用戶登錄
      [sql]  view plain  copy
       
       print?
      1. sqlplus / as sysdba  
    2. 賦予scott用戶創建VIEW的權限
      [sql]  view plain  copy
       
       print?
      1. grant create view to scott  
    3. 以scott用戶登錄oracle
      [sql]  view plain  copy
       
       print?
      1. conn scott/tiger  
    4. 創建視圖成功
      [sql]  view plain  copy
       
       print?
      1. CREATE OR REPLACE VIEW myview AS  
      2.     SELECT * FROM emp where deptno = 20; 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM