If the database connection is not established in the local Tnsnames.ora, then 1 is used, otherwise 2
1:create Database Link Geelyin96
Connect to Geelyin identified by Geelyinpassword
Using ' (DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 10.86.1.96) (PORT = 1521))
)
(Connect_data =
(service_name = appdb)
)
)‘;
Description: Geelyin96 is the name of database link, Geelyin is the user name of the remote, Geelyinpassword is the password for the remote database
Host is the port number of the remote database Ip,port the remote database, Service_Name is the name of the SSID
2:create Database Link Geelyin96
Connect to Geelyin identified by Geelyinpassword
Using ' 10.86.1.96 ';
Description: Geelyin96 is the name of database link, Geelyin is the user name of the remote, Geelyinpassword is the password for the remote database.
' 10.86.1.96 ' is the link name for the remote connection database in Tnsnames.ora
Query Statement Sql->select * from [email protected]
SELECT * from dba_objects where object_type= ' database link ' queries all database link
Create DATABASE link