Database link details
By creating database links between databases, you can easily perform DML operations on the data of a user in a remote database, but cannot perform DDL operations,
Two Methods of database link:
Public link: public database link the database link created by this user. Other users can also use this link)
Private link: database link can only be used by users who create the link, but cannot be used by other users.) experiment environment:
Windows platform oracle 11g 64-bit local database)
Oracle 10g 32 remote database in linux)
To create a database link:
1. Remote database needs to enable listening 650) this. width = 650; "title =" .png "src =" http://www.bkjia.com/uploads/allimg/131228/22341L2I-0.png "/>
2. Configure the connection string on the local database
650) this. width = 650; "title =" .jpg "src =" http://www.bkjia.com/uploads/allimg/131228/22341M246-1.jpg "/>
650) this. width = 650; "title =" tnsping lck.jpg "src =" http://www.bkjia.com/uploads/allimg/131228/22341KI0-2.jpg "/>
3. Create a public database link
Syntax: create public database link connection name connect to remote database user name] identified by password] using 'Connection string'
Create public database link link1 connect to hr identified by hr using 'lck'
650) this. width = 650; "title =" Public link.jpg "src =" http://www.bkjia.com/uploads/allimg/131228/22341M327-3.jpg "/>
4. Create a database link
Syntax: create database link name: connect to the user name of the target database. identified by password: using 'link string'
Create database link link3 connect to hr identified by hr using 'lck ';
650) this. width = 650; "title =" Private link.jpg "src =" http://www.bkjia.com/uploads/allimg/131228/22341G626-4.jpg "/>
OK. database link is created !!
Use database link to manage insert into, update, delete, and select objects in a remote database)
650) this. width = 650; "title =" using database linkto remote data library user table dmloperation .jpg "src =" http://www.bkjia.com/uploads/allimg/131228/22341I527-5.jpg "/>
You cannot use database link to perform DDL operations in a remote database.
650) this. width = 650; "title =" cannot perform ddloperations on Remote Data Warehouse .jpg "src =" http://www.bkjia.com/uploads/allimg/131228/22341M027-6.jpg "/>
OK, the last command of the group: delete database link
Syntax:
Drop public database link connection name]
Drop database link connection name]
Drop public database link link1;
650) this. width = 650; "title =" delete public link.jpg "src =" http://www.bkjia.com/uploads/allimg/131228/22341I0U-7.jpg "/>
Drop database link link3
650) this. width = 650; "title =" delete private link.jpg "src =" http://www.bkjia.com/uploads/allimg/131228/22341Ib2-8.jpg "/>
This article is from the blog "Kick little sister", please be sure to keep this source http://chunke.blog.51cto.com/2753715/1220434