[ADW/ATP] Users other than admin can not create database link by ora-01031
(Doc ID 2561130.1)
Last updated on MARCH 01, 2024
Applies to:
Autonomous Database Serverless - Version N/A and laterAutonomous Transaction Processing - Version NA and later
Information in this document applies to any platform.
Symptoms
Even ran "GRANT EXECUTE ON DBMS_CLOUD_ADMIN TO adwc_user;", the users other than ADMIN can NOT create database link by ORA-01031.
$ sqlplus admin@adw_high
SQL> GRANT EXECUTE ON DBMS_CLOUD_ADMIN TO adwc_user;
Grant succeeded.
SQL> GRANT WRITE ON DIRECTORY data_pump_dir TO adwc_user;
Grant succeeded.
SQL> conn adwc_user@adw_high
Enter password:
Connected.
SQL> BEGIN DBMS_CLOUD.CREATE_CREDENTIAL (
credential_name => 'DB_LINK_CRED'
, username => 'abc'
, password => '123' );
END;
/
PL/SQL procedure successfully completed.
SQL> BEGIN DBMS_CLOUD_ADMIN.CREATE_DATABASE_LINK (
db_link_name => 'LOCAL_LINK',hostname => 'test.example.com',port => '1521', service_name => 'Test',
ssl_server_cert_dn => 'CN= adwc.example.oraclecloud.com ,OU=Oracle BMCS FRANKFURT,O=Oracle Corporation,L=Redwood City,ST=California,C=US',
credential_name => 'DB_LINK_CRED');
END;
/
BEGIN DBMS_CLOUD_ADMIN.CREATE_DATABASE_LINK (
*
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD_DBLINK_INTERNAL", line 215
ORA-06512: at "SYS.DBMS_SYS_SQL", line 1412
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD_DBLINK_INTERNAL", line 208
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD_DBLINK", line 18
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD_ADMIN", line 114
ORA-06512: at line 1
SQL> GRANT EXECUTE ON DBMS_CLOUD_ADMIN TO adwc_user;
Grant succeeded.
SQL> GRANT WRITE ON DIRECTORY data_pump_dir TO adwc_user;
Grant succeeded.
SQL> conn adwc_user@adw_high
Enter password:
Connected.
SQL> BEGIN DBMS_CLOUD.CREATE_CREDENTIAL (
credential_name => 'DB_LINK_CRED'
, username => 'abc'
, password => '123' );
END;
/
PL/SQL procedure successfully completed.
SQL> BEGIN DBMS_CLOUD_ADMIN.CREATE_DATABASE_LINK (
db_link_name => 'LOCAL_LINK',hostname => 'test.example.com',port => '1521', service_name => 'Test',
ssl_server_cert_dn => 'CN= adwc.example.oraclecloud.com ,OU=Oracle BMCS FRANKFURT,O=Oracle Corporation,L=Redwood City,ST=California,C=US',
credential_name => 'DB_LINK_CRED');
END;
/
BEGIN DBMS_CLOUD_ADMIN.CREATE_DATABASE_LINK (
*
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD_DBLINK_INTERNAL", line 215
ORA-06512: at "SYS.DBMS_SYS_SQL", line 1412
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD_DBLINK_INTERNAL", line 208
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD_DBLINK", line 18
ORA-06512: at "C##CLOUD$SERVICE.DBMS_CLOUD_ADMIN", line 114
ORA-06512: at line 1
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |