ORA-01031 Insufficient privileges while CREATING a VIEW?
Then probably you may not have the privileges to perform the CREATE VIEW
command in your database schema... Log in into SYSDBA account and issue the command
GRANT CREATE VIEW TO <dbusername>;
Here <dbusername>
should be replaced with the name of the user you want to give access to the CREATE VIEW
command.
You can check if your user has VIEW
creation privileges using select * from session_privs
.
Note that to be able to create a view, the user that is creating it needs to have been granted SELECT
privileges on all the objects being used, as well as the mentioned CREATE VIEW
privilege. You can also check that by querying to USER_TAB_PRIVS
with the user getting the error.