I have created an MV which calls a query over a DB link. When I create the object, the SQL passes validation and the MV is created.
If I try to run DMBS_MVIEW.refresh, I get the error below.
I tried in a lower environment, but using the exact same DBLink, and it works fine. So my interpretation is, it is not related to permissions on the remote side, it must be something related to my environments.
<code>> BEGIN DBMS_MVIEW.REFRESH('MV_PHOENIX_SUBMISSIONS', 'C', '', TRUE,
> FALSE, 0,0,0,FALSE, FALSE); END; Error report - ORA-20000: ORA-01031:
> insufficient privileges ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line
> 3020 ORA-06512: at "SYS.DBMS_IREFRESH", line 186 ORA-06512: at
> "SYS.DBMS_ISNAPSHOT", line 189 ORA-06512: at
> `"SYS.DBMS_SNAPSHOT_KKXRCA",` line 2852 ORA-06512: at
> "SYS.DBMS_SNAPSHOT_KKXRCA", line 3263 ORA-06512: at
> "SYS.DBMS_SNAPSHOT_KKXRCA", line 3295 ORA-06512: at
> "SYS.DBMS_SNAPSHOT", line 16 ORA-06512: at line 1
> 20000. 00000 - "%s"
> *Cause: The stored procedure 'raise_application_error'
> was called which causes this error to be generated.
> *Action: Correct the problem as described in the error message or contact
> the application administrator or DBA for more information.
</code>
<code>> BEGIN DBMS_MVIEW.REFRESH('MV_PHOENIX_SUBMISSIONS', 'C', '', TRUE,
> FALSE, 0,0,0,FALSE, FALSE); END; Error report - ORA-20000: ORA-01031:
> insufficient privileges ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line
> 3020 ORA-06512: at "SYS.DBMS_IREFRESH", line 186 ORA-06512: at
> "SYS.DBMS_ISNAPSHOT", line 189 ORA-06512: at
> `"SYS.DBMS_SNAPSHOT_KKXRCA",` line 2852 ORA-06512: at
> "SYS.DBMS_SNAPSHOT_KKXRCA", line 3263 ORA-06512: at
> "SYS.DBMS_SNAPSHOT_KKXRCA", line 3295 ORA-06512: at
> "SYS.DBMS_SNAPSHOT", line 16 ORA-06512: at line 1
> 20000. 00000 - "%s"
> *Cause: The stored procedure 'raise_application_error'
> was called which causes this error to be generated.
> *Action: Correct the problem as described in the error message or contact
> the application administrator or DBA for more information.
</code>
> BEGIN DBMS_MVIEW.REFRESH('MV_PHOENIX_SUBMISSIONS', 'C', '', TRUE,
> FALSE, 0,0,0,FALSE, FALSE); END; Error report - ORA-20000: ORA-01031:
> insufficient privileges ORA-06512: at "SYS.DBMS_SNAPSHOT_KKXRCA", line
> 3020 ORA-06512: at "SYS.DBMS_IREFRESH", line 186 ORA-06512: at
> "SYS.DBMS_ISNAPSHOT", line 189 ORA-06512: at
> `"SYS.DBMS_SNAPSHOT_KKXRCA",` line 2852 ORA-06512: at
> "SYS.DBMS_SNAPSHOT_KKXRCA", line 3263 ORA-06512: at
> "SYS.DBMS_SNAPSHOT_KKXRCA", line 3295 ORA-06512: at
> "SYS.DBMS_SNAPSHOT", line 16 ORA-06512: at line 1
> 20000. 00000 - "%s"
> *Cause: The stored procedure 'raise_application_error'
> was called which causes this error to be generated.
> *Action: Correct the problem as described in the error message or contact
> the application administrator or DBA for more information.