- --The second method: direct configuration
- --If you create a global dblink, you must use the SYSTM or SYS user to add public before database .
- Create/ * public */Database link DBLINK1
- Connect to Dbusername identified by Dbpassword
- Using ' (DESCRIPTION = (Address_list = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.1) (PORT = 1521))) (Connect_data = (SERV Ice_name = ORCL)) ';
- --Database parameter Global_name=True requires that the database link name is the same as the remote database name. The database global name can be isolated with the following command
- --select * from Global_name;
- Query data:
- Querying, deleting, and inserting data is the same as manipulating the local database, except that the table name needs to be written as a "table name @dblink Server".
- Select xxx from table name @ database link name;
- Example:::::
Oracle creates a database connection Dblink