Network Topology   «Prev  Next»

Lesson 11Application connection with SQL
ObjectiveDescribe the Two Ways to connect to Remote Databases.

Describe Two Ways to connect to Remote Databases

Connections to remote databases can be made by specifying either service names or connect strings. Service names are used by SQL*Net version 2 and Net8 and take the following syntax:
emp@my_db

Connect strings originated with SQL*Net version 1 and specify the full connection. In the following example, the t means a TCP/IP connection; host is the name of the remote processor; and database is the name of the databases on that processor.
sqlplus /@t:host:database

These connect strings can be saved in the Oracle database dictionary for use by distributed SQL. They are created with the create database link command and are stored in the DBA_USER-DBLINKS meta-table:
create public database link ny_emp for
  ny_emp@t:myhost:mydatabase

Searching the Oracle Topology

If you have access to an Oracle server, try the following:
  1. Display database links: Go to SQL*Plus and enter
    select * from all_db_links;
    
    to see all links you are allowed to use.
  2. Find your tnsnames.ora file. On UNIX, look in $ORACLE_HOME/network/admin. On a PC, try c:\orant\network\admin.
The results of your search will vary and are particular to the server to which you connected and its topology.

Collection Layer

A collection layer is a topology geometry layer that can contain topological elements of different topology geometry types. For example, using the sample CITY_DATA topology, you could create a collection layer to contain specific land parcel, city street, and traffic sign elements.

Features Built from Topological Elements in Parent Layers

In a topology with a topology geometry layer hierarchy, within each level above level 0, each layer can now contain features built from topological elements (faces, nodes, edges) in addition to (or instead of) features built from features at the next lower level. For example, a tracts layer can contain tracts built from block groups or tracts built from faces, or both.

DBA_DB_LINKS, ALL_DB_LINKS, and USER_DB_LINKS Field Descriptions

Field NameDescription
Owner (DBA_DB_LINKS and ALL_DB_LINKS only)The owner of the database link.
DB_LINK The name of the database link. This is the remote database name and the domain name.
UsernameThe username specified in the CONNECT TO clause. NULL if the CONNECT TO clause is not supplied.
Password (USER_DB_LINKS only)The password specified in the CONNECT TO clause. NULL if the CONNECT TO clause is not supplied.
HostThe SQL*Net connect string to the remote database. This corresponds to the USING clause. NULL if the USING clause is not supplied.
Created Date the database link was created.

The next lesson examines the features of SQL*Net version 1. If you have access to an Oracle server, practice searching your Oracle topology.

Oracle TNS Quiz

Before moving on to the next lesson, click the Quiz link below to check your mastery of the material we have covered in the past few lessons with a short multiple-choice quiz.
Oracle TNS - Quiz

<%@ include file="../../semrush11.jsp" %>