DATABASE LINK DISTRIBUTED DATABASE
Overview database link Some DBMS like Oracle have a way to communicate each other This communication can be built by means database link A database link is a pointer that defines a one- way communication path from an Oracle Database server to another database server The link pointer is actually defined as an entry in a data dictionary table
Overview database link (cont’d) A database link connection allows local users to access data on a remote database Each database in distributed system must have unique global database name in a network domain
Database link
Database link type Private database link Public database link Only Db link creator can have access to database link – only user Public database link All user can have access to database link Global database link Can access data and db object User access a remote database through the following of link Connected user link – connected as them self – same user name and password Fixed user link – connect from different user Current user link – connects as global user
Shared database link Link between local server process and remote database
Global database name Each database in a distributed database is uniquely identified by its global database name The database forms a global database name by prefixing the database network domain Specified by the DB_DOMAIN initialization parameter at database creation
Global database name
Global database link sintax
Oracle Connectivity concepts There are two main objects in database connectivity Database Service Database Instance
Database service Oracle database is represented to clients as a service Database can have one or more services associated with it
Database service (cont’d) A database can have multiple services associated with it
Database service (cont’d) Multiple service can have following functionalities A single database can be identified in a number of different ways by different clients A database administrator can limit or reserve system resources
Database Instances A database has at least one instance An instance is comprised of a memory area called the System Global Area (SGA) and Oracle background processes The memory and processes of an instance efficiently manage the associated database's data and serve the database users
Database instance (cont’d) Single Instance
Database instance (cont’d) Multiple Instance
How client and server communicate To connect to a database service, clients use a connect descriptor that provides the location of the database and the name of the database service Example of configuration
Oracle net service Stack Communication for client/server connection
Oracle net service (cont’d) Stack communication for java application
Oracle net service (cont’d) Stack communication for web client
Listener architecture The database server receives an initial connection from a client application through the listener. The listener is an application positioned on top of the Oracle Net foundation