WARNING: This web is not used anymore. Please use PDBService.BasicConceptsReference instead!
 

Basic Concepts to new Oracle user and/or developer

You are a new Oracle databases user and/or developer? First of all welcome to the world of Oracle. The Physics Databases team is always available at phydb.support@cern.ch to help you. Below you will find the two essential entrance points to the Oracle databases: how to connect and reference documentation.

Connect to Oracle DB

There are several ways to connect to a database. The basic way is using SQLPlus, which is an application that comes with Oracle client installation and is also available from lxplus at CERN.

Basic concepts to know:

  • local_name - local name describing how to connect to database. Also referenced as connect descriptor.
  • host - name of node hosting the database
  • service_name - works as database name (some years ago referenced as SID)

Using local naming:

You have a environment variable $TNS_ADMIN pointing to a directory. In that directory you have a file tnsname.ora with several entries in the format:
<local_name> = (DESCRIPTION=
                 (ADDRESS=(PROTOCOL=tcp)(HOST=<host1>) PORT=1521))
                 (ADDRESS=(PROTOCOL=tcp)(HOST=<host2>) PORT=1521))
                 (CONNECT_DATA= (SERVICE_NAME=<service_name>)))

You can connect by using:

   sqlplus user/password@<local_name>

The can be different in any machine, as the name says, is a local name. You have to check in the $TNS_ADMIN/tnsnames.ora file of the local machine you are connecting from.

Using easy connect:

You don't need to have neither $TNS_ADMIN or tnsnames.ora file. However this only works if you use SQLPlus version >= 10.x . Another disavantage is that you cannot specify more than one host name (which can exist in case of Oracle RACs/clusters)

You can connect by using:

   sqlplus user/password@//<host>/<service_name>

Reference Documentation

Oracle software comes together with extensive documentation. In case of RDBMS 10gR2 there are ~50k pages of documentation. Its well structured: there are books for both DBAs and developers. Some books are strictly technical and some give an overview. It is the best source of information for application developers. However the attempt to read it entirely is the best way to fail the project.

Most useful books

  • Application Developer's Guide - Fundamentals
  • SQL Reference
  • PL/SQL User's Guide and Reference
  • Concepts

Oracle documentation

More advices

Edit | Attach | Watch | Print version | History: r5 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2006-03-29 - unknown
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    PSSGroup All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback