Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8754545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:38:48+00:00 2026-06-13T13:38:48+00:00

Is it normal for an oracle view to loose all its grants when modifying

  • 0

Is it normal for an oracle view to loose all its grants when modifying the source SQL?
I am using SQL Developer if that has anything to do with it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:38:49+00:00Added an answer on June 13, 2026 at 1:38 pm

    First of all, you don’t have “grants” – “grant” is an operation. You have “roles” and “privileges”.

    Second, views have neither roles nor privileges themselves – schemas do have. Basically, a self-descriptive command is: grant select on view_1 to schema_1.

    Third, schemas do not lose their privileges if you create or replace your view. Here’s a quick sample:

    11:03:07 @> conn system/sys@oars_sandbox                                                                                                                            
    Connected.                                                                                                                                                          
    11:03:15 SYSTEM@oars_sandbox> create user test1 identified by test1;                                                                                                
    
    User created.                                                                                                                                                       
    
    11:03:39 SYSTEM@oars_sandbox> create user test2 identified by test2;                                                                                                
    
    User created.                                                                                                                                                       
    
    11:03:48 SYSTEM@oars_sandbox> create view test1.view1 as select * from dual;                                                                                        
    
    View created.                                                                                                                                                       
    
    11:04:03 SYSTEM@oars_sandbox> grant select on test1.view1 to test2;                                                                                                 
    
    Grant succeeded.                                                                                                                                                    
    
    11:04:15 SYSTEM@oars_sandbox> select grantee, owner, table_name, privilege, grantor from dba_tab_privs where grantee = 'TEST2';                                     
    
    GRANTEE                        OWNER                          TABLE_NAME                     PRIVILEGE                                GRANTOR                       
    ------------------------------ ------------------------------ ------------------------------ ---------------------------------------- ------------------------------
    TEST2                          TEST1                          VIEW1                          SELECT                                   TEST1                         
    
    11:05:13 SYSTEM@oars_sandbox> create or replace view test1.view1 as select * from dual;                                                                             
    
    View created.                                                                                                                                                       
    
    11:05:24 SYSTEM@oars_sandbox> select grantee, owner, table_name, privilege, grantor from dba_tab_privs where grantee = 'TEST2';                                     
    
    GRANTEE                        OWNER                          TABLE_NAME                     PRIVILEGE                                GRANTOR                       
    ------------------------------ ------------------------------ ------------------------------ ---------------------------------------- ------------------------------
    TEST2                          TEST1                          VIEW1                          SELECT                                   TEST1                         
    

    However, it is quite possible that SQL developer invokes drop view first instead of create or replace. In this case, your privileges are automatically removed.

    11:05:26 SYSTEM@oars_sandbox> drop view test1.view1;                                                                            
    
    View dropped.                                                                                                                   
    
    11:10:21 SYSTEM@oars_sandbox> select grantee, owner, table_name, privilege, grantor from dba_tab_privs where grantee = 'TEST2'; 
    
    no rows selected                                                                                                                
    
    11:10:24 SYSTEM@oars_sandbox> create or replace view test1.view1 as select * from dual;                                         
    
    View created.                                                                                                                   
    
    11:10:26 SYSTEM@oars_sandbox> select grantee, owner, table_name, privilege, grantor from dba_tab_privs where grantee = 'TEST2'; 
    
    no rows selected                                                                                                                
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using an Oracle temporary table does not generate much redo log as a normal
By using normal minus '-' function between two timestamps, the answer given from oracle
Is there a way to tune the Oracle client (InstantClient or the normal one)?
In normal sql I could do joins on tables in different databases as long
In Oracle Lite, you can create a SNAPSHOT table which is like a normal
I'm using following update or insert Oracle statement at the moment: BEGIN UPDATE DSMS
I have already changed the priority of all the processes of oracle to high.
I am trying a different kind of sorting in Oracle.Its like I have three
We have developed a Web Application using grails, groovy and oracle as database with
Is it possible to return an Oracle Ref Cursor to a caller that is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.