Collections:
Privilege to Create Views in Oracle
What Privilege Is Needed for a User to Create Views in Oracle?
✍: FYIcenter.com
To be able to create views in a user's own schema, the user needs to have the CREATE VIEW privilege, or the CREATE ANY VIEW privilege, which is more powerful, and allows the user to create views in other user's schema. The following tutorial exercise gives you a good example on CREATE VIEW privilege:
>.\bin\sqlplus /nolog SQL> CONNECT DEV/developer SQL> CREATE VIEW fyi_view AS SELECT * FROM fyi; ORA-01031: insufficient privileges SQL> disconnect SQL> connect SYSTEM/fyicenter SQL> GRANT CREATE VIEW TO dev; Grant succeeded. SQL> disconnect SQL> CONNECT DEV/developer SQL> CREATE VIEW fyi_view AS SELECT * FROM fyi; View created. SQL> DROP VIEW fyi_view; View dropped. SQL> CREATE VIEW fyi_view AS SELECT * FROM fyi; View created.
As you can see, "dev" can create and drop views now.
2019-06-29, 951👍, 0💬
Popular Posts:
What Is the Difference Between GETDATE() and GETUTCDATE() in SQL Server Transact-SQL? The difference...
How To Create a Stored Program Unit in Oracle? If you want to create a stored program unit, you can ...
How To Download Oracle Database 10g XE in Oracle? If you want to download a copy of Oracle Database ...
How To Define an External Table in a Text File in Oracle? You can use the CREATE TABLE statement to ...
What is SQL Server Transact-SQL (T-SQL)? SQL Server Transact-SQL, also called T-SQL, is an extension...