Starting with 11.2, if the database chain is established with a username password that is incorrect, or if you need to change the database chain validation settings, and you do not need to rebuild the database chain, Oracle provides the syntax for ALTER DATABASE link.
This is only a small change, but makes the database chain operation convenient many. There is no need to rebuild the database chain in order to enter an error or change the username password.
Sql> CREATE DATABASE Link test
2 Connect to test
3 Identified by password
4 using ' 172.25.13.229/test08 ';
The database link has been created.
Sql> select * from Global_name@test;
SELECT * FROM Global_name@test
*
Line 1th Error:
Ora-01017:invalid Username/password; Logon denied
ORA-02063: Line immediately (from test)
sql> ALTER DATABASE Link test
2 Connect to test
3 identified by test;
ALTER DATABASE LINK test
*
Line 1th Error:
ORA-01031: Insufficient Permissions
Sql> select * from Session_roles;
Role
------------------------------
CONNECT
RESOURCE
Dba
Select_catalog_role
Hs_admin_select_role
Execute_catalog_role
Hs_admin_execute_role
Delete_catalog_role
Exp_full_database
Imp_full_database
Datapump_exp_full_database
Datapump_imp_full_database
Gather_system_statistics
Scheduler_admin
Wm_admin_role
Java_admin
Java_deploy
Xdbadmin
Xdb_set_invoker
Olap_xs_admin
Olap_dba
21 rows have been selected.
Sql> SELECT * from Session_privs
2 where privilege like '%database link% ';
Privilege
This article URL address: http://www.bianceng.cn/database/Oracle/201410/45386.htm
----------------------------------------
CREATE DATABASE LINK
CREATE Public DATABASE LINK
DROP Public DATABASE LINK
sql> grant ALTER DATABASE link to YANGTK;
The authorization was successful.
sql> ALTER DATABASE Link test
2 Connect to test
3 identified by test;
The database link has changed.
Sql> select * from Global_name@test;
Global_name
--------------------------------------------------------------------------------
TEST08
Sql> select * from V$version;
BANNER
--------------------------------------------------------------------------------
Oracle database11genterprise Edition release11.2.0.1.0-64bit Production
Pl/sql Release 11.2.0.1.0-production
CORE 11.2.0.1.0 Production
TNS for Linux:version 11.2.0.1.0-production
Nlsrtl Version 11.2.0.1.0-production
Oddly, the permissions of Alter DATABASE link are not included in DBA authority, which is estimated to have been omitted by Oracle when authorizing the DBA due to new permissions.
Author: 51cto Blog Oracle Little Bastard