ceate [Shared][public] Database LinkDblink_name
[Connect to {current_user| User identified by Password [authenticated by the User identified by password}| Authenticated by the User identified by Password][using ' connect_string '];
Specific parameters, need db_domain. And you need to have a user account on the remote database.
Step one, in the SAM database Tnsnames.ora exist tnsname, such as
sam=
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = ZX) (PORT = 1521))
)
(Connect_data =
(SERVER = dedicated)
(service_name = Sam)
) )
Step two, the system to log the book database, create a TO_SAM_MX link
Conn System@book
Create Public Database Link TO_SAM_M1
Connect to Currnet_user using ' Sam ';
Create publink Database Link to_sam_m2
Connect to tuner identified by tuner using ' Sam ';
Create Public Database link to_sam_m3 using ' Sam ';
Step three, verify the connection in step two
Show Parmeter Db_domain
Select ' Global_name from GLOBAL_NAME@TO_SAM_M1
Select ' Global_name from global_name@to_sam_m2
Select ' Global_name from GLOBAL_NAME@TO_SAM_M3
Step four, select * from dba_db_links observation connection
Application Testing
1.) Connect Demo@book
2,) select * from cc@to_sam_m2;
SELECT * from location;
Insert into location values (999, ' Ottawa ')
INSERT into cc@to_sam_m2 values (");
SELECT * from cc@to_sam_m2;
Commit
3.) Connect Tuner@sam
Verifying data changes
You can use v$DblinkDynamic performance graphs for performance viewing