Toad Creating Dblinksop
1. Create a service:
Click "Test", the following Test window appears, click Change Login, user name and password data target host user name, password;
When the following window appears, click "Close" and click "Finish".
2. Create Dblink:
Method One: Use the Toad tool to operate in the graphical mode;
Locate Tnsnames.ora under the Oracle installation directory;
E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN
Open the Tnsnames.ora file to add the following information and keep it;
ddm=
(DESCRIPTION =
(Address_list =
(address = (PROTOCOL = TCP) (HOST =192.168.100.89) (port= 1521))---destination database IP address
)
(Connect_data =
(SERVER = dedicated)
(service_name =DDM)-target host Global database name
)
)
Open the Toad tool to connect to the local database user, click on the schema Browser;
After finding the Dblinks, right click on the left info, the following window appears;
Select Create Database Link, the following window appears;
Click Execute after completing the completion;
Click Yes (Y) to test;
Click Yes (Y) to complete the dblink creation;
Method Two: Implement Dblink creation with the statement;
Statement format
Createdatabaselinkdblink_name
Connecttousernameidentifiedbypassword
Using ' (description=
(address_list=
(Address= (PROTOCOL=TCP) (host=192.168.100.89) (port=1521))
)
(Connect_data=
(SERVICE _NAME=DDM)
)
)‘;
Note: The name of the Dblink to be established by dblink_name-;
username-the user name of the target host database;
password-the password of the target host database;
192.168.100.89-target host IP address;
ddm-the global database name of the target host
To this dblink is created successfully, you can use the statement to test to see if you can successfully connect to the target host for the database to view the operation:
Select * FROM [email protected]_name
Note: table_name-the name of the table in the target host database;
The name of the Dblink established by dblink_name-;
Toad Creating Dblinksop