+ All Categories
Home > Documents > Informix Administrator Guide

Informix Administrator Guide

Date post: 06-Apr-2018
Category:
Upload: oracledbanet
View: 227 times
Download: 1 times
Share this document with a friend

of 138

Transcript
  • 8/3/2019 Informix Administrator Guide

    1/138

    INFORMIX-SEDatabase Server

    Administrators Guide

    Version 7.2April 1996Part No. 000-7895A

  • 8/3/2019 Informix Administrator Guide

    2/138

    ii INFORMIX-SE Administrators Guide

    Published by INFORMIX Press Informix Software, Inc.4100 Bohan non Drive

    Menlo Pa rk, CA 94025

    The following are worldwide trademarks of Informix Software, Inc., or its subsidiaries, registered in theUnited States of America as indicated by , and in n umerou s other countries worldwide:

    INFORMIX; C-ISAM; INFORMIX-OnLine Dynamic Server

    The following are worldw ide trad emarks of the ind icated ow ners or their su bsidiaries, registered in theUnited States of America as indicated by , and in n um erous other countries worldwide:

    Adobe Systems Incorporated: PostScript

    Nov ell, Inc.: NetWare

    X/ OpenComp any Ltd.: UNIX; X/ Open

    Some of the prod ucts or services mentioned in this docum ent are provided by companies other than Informix.These products or services are identified by the tra demar k or servicemark of the app ropriate company. If youhave a question about one of those products or services, please call the company in question directly.

    Docum entation Team: Brian Deutscher, Geeta Karmarker, Mary Kraemer, Patrice ONeill, Eileen Wollam

    Copyr ight 1981-1996 by Informix Software, Inc. All righ ts reserved .

    No p art of this work covered by the copyright hereon may be reprodu ced or used in any form or by any

    meansgrap hic, electronic, or mechan ical, including p hotocopying , recording , taping, or informa tion storageand retrieval systemswithout perm ission of the p ublisher.

    To the extent that this software allows the u ser to store, display, and otherwise manipu late various forms ofdata, including, without limitation, multimedia content such as p hotographs, movies, music and other binarylarge objects (blobs), use of any single blob may potentially infringe upon numerous different third-partyintellectual and/ or prop rietary rights. It is the u ser's responsibility to avoid infringements of any such third-party rights.

    RESTRICTED RIGHTS LEGEND

    Software and accompa nying materials acquired w ith United States Federal Government funds or intended foruse w ithin or for any United States federal agency are p rovided w ith Restricted Rights as d efined in DFARS252.227-7013(c)(1)(ii) or FAR 52.227-19.

  • 8/3/2019 Informix Administrator Guide

    3/138

    Table of Contents

    Table ofContents

    Introduction

    About This Manual . . . . . . . . . . . . . . . . . . 3Organization of This Manual . . . . . . . . . . . . . 3

    Types of Users . . . . . . . . . . . . . . . . . . 4

    Software Dependencies . . . . . . . . . . . . . . . 4

    Demonstration Database . . . . . . . . . . . . . . 5

    New Features of This Product . . . . . . . . . . . . . . 8Conventions . . . . . . . . . . . . . . . . . . . . 8

    Typographical Conventions . . . . . . . . . . . . . 9

    Icon Conventions . . . . . . . . . . . . . . . . . 10

    Command-Line Conventions . . . . . . . . . . . . . 11

    Sample-Code Conventions . . . . . . . . . . . . . . 14

    Additional Documentation . . . . . . . . . . . . . . . 14Printed Documentation . . . . . . . . . . . . . . . 15

    On-Line Documentation . . . . . . . . . . . . . . 16Related Reading . . . . . . . . . . . . . . . . . 17

    Compliance with Industry Standards . . . . . . . . . . . 18

    Informix Welcomes Your Comments . . . . . . . . . . . . t19

    Chapter 1 Instal la tion and Ini tial Conf iguration

    Defining a Database Management System . . . . . . . . . . 1-3

    Planning for SE . . . . . . . . . . . . . . . . . . . 1-4

    Configuring Hardware . . . . . . . . . . . . . . . 1-4Placing Active Tables and Files on the Disk . . . . . . . . 1-4

    Considering SE Limits . . . . . . . . . . . . . . . 1-5

    Installing SE . . . . . . . . . . . . . . . . . . . . 1-6

    Preparing SE Connections . . . . . . . . . . . . . . . 1-6Understanding Version 7.2 SE Configurations . . . . . . . 1-7

    Setting Environment Variables . . . . . . . . . . . . 1-8

    Understanding the Communication Files . . . . . . . . . 1-9

    Build ing the sqlhosts File . . . . . . . . . . . . . . 1-12Examples of Client/ Server Connections . . . . . . . . . 1-18

  • 8/3/2019 Informix Administrator Guide

    4/138

    iv INFORMIX-SE Administrators Guide

    Connecting with Different Versions . . . . . . . . . . 1-26

    Starting the sqlexecd Daemon . . . . . . . . . . . . 1-35

    Using an NFS-Mounted Directory . . . . . . . . . . . 1-37

    How Does a Clien t Application Connect to a Database Server? . . 1-38

    Chapter 2 INFORMIX-SE System Architecture

    SE Program Files . . . . . . . . . . . . . . . . . . 2-3

    SE System Files . . . . . . . . . . . . . . . . . . . 2-4

    The .dat File . . . . . . . . . . . . . . . . . . 2-5The .idx File . . . . . . . . . . . . . . . . . . 2-6

    Allocating Space for .dat and .idx Files . . . . . . . . . 2-6

    Transaction-Log Files . . . . . . . . . . . . . . . . . 2-6Allocating Space for the Transaction-Log File . . . . . . . 2-8

    Audit-Trail Files . . . . . . . . . . . . . . . . . . 2-8

    Permissions of Database Files and Directories . . . . . . . . 2-10

    Determining If a Database Is ANSI Compliant . . . . . . . . 2-12

    Chapter 3 Basic Administ ra tion and Maintenance

    Monitoring Disk-Space Use . . . . . . . . . . . . . . 3-3

    Maintaining Data Integrity . . . . . . . . . . . . . . . 3-4Transaction-Log Files . . . . . . . . . . . . . . . 3-4

    Audit-Trail Files . . . . . . . . . . . . . . . . . 3-6

    Creating Backups . . . . . . . . . . . . . . . . . . 3-6

    Chapter 4 INFORM IX-SE IndexingB+ Tree Organization . . . . . . . . . . . . . . . . . 4-3

    Searching for a Row . . . . . . . . . . . . . . . . 4-5

    Adding Keys . . . . . . . . . . . . . . . . . . 4-6

    Removing Keys . . . . . . . . . . . . . . . . . 4-11

    Index-Table Structure . . . . . . . . . . . . . . . . . 4-12Multiple Indexes . . . . . . . . . . . . . . . . . 4-13

    Index-Table Formats . . . . . . . . . . . . . . . . . 4-15

    Chapt er 5 Symptoms and Solutions

    Permission Problems . . . . . . . . . . . . . . . . . 5-3

    Corruption Problems . . . . . . . . . . . . . . . . . 5-4Operating-System Failures . . . . . . . . . . . . . 5-4

    Premature Termination of an sqlexec Process . . . . . . . 5-5

    Physical Disk Corruption . . . . . . . . . . . . . . 5-5

    Lost and Damaged Index and Data Files . . . . . . . . . 5-6

    Transaction-Log Corruption . . . . . . . . . . . . . 5-7

  • 8/3/2019 Informix Administrator Guide

    5/138

    Table of Contents v

    Disk Fragmentation . . . . . . . . . . . . . . . . . . 5-8

    Practices to Avoid . . . . . . . . . . . . . . . . . . 5-8

    Performance Tuning . . . . . . . . . . . . . . . . . 5-9

    Chapter 6 INFORM IX-SE Utilities

    The secheck Utility . . . . . . . . . . . . . . . . . . 6-3Choosing Not to Specify the -n or -y Option . . . . . . . . 6-5

    Simple Example . . . . . . . . . . . . . . . . . 6-6

    Output . . . . . . . . . . . . . . . . . . . . . 6-6Parenthetical Values . . . . . . . . . . . . . . . . 6-7

    Printing a Long List of Index Key Values . . . . . . . . . 6-8

    An Example Using the -l Option . . . . . . . . . . . . 6-10

    Converting Index-Node Size with the -s Option . . . . . . 6-11

    Causes for secheck Failure . . . . . . . . . . . . . . 6-11

    The selog Utility . . . . . . . . . . . . . . . . . . . 6-12Displaying the Contents of a Transaction Log . . . . . . . 6-12

    Use and Output . . . . . . . . . . . . . . . . . . 6-20

    Index

  • 8/3/2019 Informix Administrator Guide

    6/138

  • 8/3/2019 Informix Administrator Guide

    7/138

    Introduction

    About This Manual . . . . . . . . . . . . . . . . . . . 3Organization of This Manual . . . . . . . . . . . . . . 3

    Types of Users . . . . . . . . . . . . . . . . . . . 4

    Software Dependencies . . . . . . . . . . . . . . . . 4

    Demonstration Database . . . . . . . . . . . . . . . 5

    New Features of This Product . . . . . . . . . . . . . . . 8Conventions . . . . . . . . . . . . . . . . . . . . . 8

    Typographical Conventions . . . . . . . . . . . . . . 9

    Icon Conventions . . . . . . . . . . . . . . . . . . 10

    Comment Icons . . . . . . . . . . . . . . . . . 10Compliance Icons . . . . . . . . . . . . . . . . 10

    Command-Line Conventions . . . . . . . . . . . . . . 11

    Sample-Code Conventions . . . . . . . . . . . . . . . 14

    Additional Documentation . . . . . . . . . . . . . . . . 14Printed Documentation . . . . . . . . . . . . . . . . 15

    On-Line Documentation. . . . . . . . . . . . . . . . 16

    Error Message Files . . . . . . . . . . . . . . . . 16Release N otes, Docum entation N otes, Machine N otes . . . . 17

    Related Reading . . . . . . . . . . . . . . . . . . 17

    Compliance with Industry Standards . . . . . . . . . . . . 18

    Informix Welcomes Your Comments . . . . . . . . . . . . . 19

    Introduction

  • 8/3/2019 Informix Administrator Guide

    8/138

    2 INFORMIX-SE Administrators Guide

  • 8/3/2019 Informix Administrator Guide

    9/138

    Introduction 3

    This chap ter introd uces theINFORMIX-SE A dministrators Guide. Readthis chapter for an overview of the information provided in this manu al and

    for an u nderstanding of the conventions used throughout this manu al.

    The INFORMIX-SE database server is ideally suited for small- to med ium-

    sized database app lications. Informix based the SE database server on the

    indexed sequ ential access method (ISAM), a library ofC language calls that

    work with UNIX to manipulate database files. ISAM uses an index to access

    data instead of performing a scan on the table to access data. SE works

    automatically and transparently and does not require any specialinstructions in your database app lications or p rograms.

    About This Manual

    TheINFORMIX-SE A dministrators Guide is a complete guide to the opera ting

    environment of the SE database server. This manual explains how to

    configure and use SE. It also explains how to use the SE utilities.

    Organization of This Manual

    This man ual includes the following chap ters:

    s This Introdu ction p rovides an overview of the manu al, describes the

    documentation conventions u sed, introduces the demonstration

    database from wh ich the prod uct examp les are dr awn , describes the

    ASCII and PostScript error message files, and lists the new features in

    SE, Version 7.2.

    s Chap ter 1, Installation and Initial Configuration,provides

    background information on planning and configuring an SE system.

  • 8/3/2019 Informix Administrator Guide

    10/138

    4 INFORMIX-SE Administrators Guide

    Types of Users

    s Chapter 2, INFORMIX-SE System Architecture, describes the SE

    program files and system files and the perm issions on d atabase filesand d irectories.

    s Chap ter 3, Basic Administration and Maintenance, describes disk

    usage and the maintenan ce of data integrity.

    s Chap ter 4, INFORMIX-SE Indexing, describes the organization,

    structure, and format u sed to index ISAM files.

    s Chapter 5, Symp toms and Solutions,provides tips on

    troubleshooting.

    s Chapter 6, INFORMIX-SE Utilities, describes the comm and -line

    utilities available for performing administrative tasks.

    Types of Users

    This manu al is written for SE system administrators who are responsible forthe following tasks:

    s Initial installation and configura tion ofSE

    s General system adm inistration an d maintenance

    s Troubleshooting of system problems

    Software Dependencies

    This manu al assumes that you are using SE, Version 7.2, as your d atabase

    server. Informix software can reside on a single compu ter or on mu ltiple

    compu ters across a network. The following Informix software must reside on

    your compu ter system:

    s An SE database server, which you install on your compu ter or onanother comp uter over a network

    s Either an Informix app lication development tool, such as

    INFORMIX-New Era; an SQL application programming interface

    (API), such as INFORMIX-ESQL/C; or the DB-Access utility, which

    Informix ships as part of your database server

  • 8/3/2019 Informix Administrator Guide

    11/138

    Introduction 5

    Demonstration Database

    The application developmen t tool, SQL API, or DB-Access enables you to

    compose qu eries, send queries to the database server, and view the resultsthat the database server returns. You can u se DB-Access to try ou t the SQL

    statement d escribed in this gu ide.

    Demonstration Database

    The DB-Access utility, which is provid ed w ith your Informix database server

    prod ucts, includ es a dem onstration database called stores7 that containsinformation abou t a fictitious wholesale sporting-goods distributor. The

    sample command files that make up a d emonstration application are also

    included.

    Most examp les in this manu al are based on the stores7 demonstrationdatabase. The stores7 database is described in detail and its contents are

    listed in App endix A of theInformix Guide to SQL: Reference.The script that you use to install the dem onstration d atabase is called

    dbaccessdemo7 and is located in the $INFORMIXDIR/bin directory. Thedatabase name that you supp ly is the name given to the demonstration

    database. If you do n ot supp ly a database name, the name d efaults to stores7.Use the following ru les for naming you r database:

    s Nam es can have a maximum of 18 characters for INFORMIX-OnLine

    Dynamic Server databases and a maximu m of 10 characters for SE

    databases.

    s The first character of a name mu st be a letter or an und erscore (_).

    s You can u se letters, characters, and un derscores (_) for the rest of the

    name.

    s DB-Access makes no d istinction between upp ercase and lowercase

    letters.

    s The database name must be unique.

    http://./7881a.pdfhttp://./7881a.pdfhttp://./7881a.pdf
  • 8/3/2019 Informix Administrator Guide

    12/138

    6 INFORMIX-SE Administrators Guide

    Demonstration Database

    When you run dbaccessdemo7, you are, as the creator of the database, the

    owner and Database Administrator (DBA) of that d atabase.

    If you install your Informix database server according to the installation

    instructions, the files that constitute the dem onstration d atabase are

    protected so that you cannot m ake any changes to the original database.

    You can run the dbaccessdemo7 script again w henever you want to workwith a fresh d emonstration d atabase. The script prompts you w hen the

    creation of the database is comp lete and asks if you w ould like to copy thesamp le comm and files to the cur rent d irectory. Enter N if you have m ade

    changes to the sample files and do not want them replaced w ith the original

    versions. Enter Y if you w ant to copy over the samp le command files.

    To create and populate the stores7 demonstrat ion database

    1. Set the INFORMIXDIR environment variable so that it contains the

    name of the directory in w hich you r Informix produ cts are installed.2. Set INFORMIXSERVER to the nam e of the defau lt database server.

    The name of the default database server mu st exist in the

    $INFORMIXDIR/etc/sqlhosts file. (For a full description ofenvironment variables, see Chapter 4 of theInformix Guide to SQL:

    Reference.) For information about th e sqlhosts file, refer to Thesqlhosts File on page 1-12 of this man ual.

    3. Create a new d irectory for the SQL command files. Create the

    d irectory by entering the following comm and :

    mkdir dirname

    4. Make the new d irectory the current d irectory by entering the

    following comm and :

    cd dirname

    http://./7881a.pdfhttp://./7881a.pdfhttp://./7881a.pdfhttp://./7881a.pdf
  • 8/3/2019 Informix Administrator Guide

    13/138

    Introduction 7

    Demonstration Database

    5. Create the dem onstration d atabase and copy over the samp le

    comm and files by entering the dbaccessdemo7 command.To create the da tabase without logging, enter the following

    command:

    dbaccessdemo7 dbname

    To create the dem onstration d atabase with logging, enter the

    following comm and :

    dbaccessdemo7 -log dbnamedbaccessdemo7 -log dbname -dbspace dbspacename

    If you a re using SE, a subdirectory called dbname.dbs is created inyour cur rent directory and the database files associated with stores7are placed there. You will see both data (.dat) and index (.idx) files inthe dbname.dbs directory. (If you specify a dbspace nam e, it isignored.)

    To use the database and the command files that have been copied to

    your d irectory, you mu st have UNIX read an d execute p ermissions

    for each directory in the p athname of the directory from w hich you

    ran the dbaccessdemo7 script. Check with your system ad minis-trator for more information about operating-system file and

    directory permissions. UNIX perm issions are discussed in Chapter 2

    of this manu al.

    6. To give someone else the permissions to access the comm and files in

    your d irectory, use the UNIX chmod command.

    7. To give someone else access to the d atabase that you have created,

    grant them the app ropriate privileges using the GRANT statement.

    To revoke p rivileges, use the REVOKE statement. The GRANT an d

    REVOKE statements are described in Chap ter 1 of theInformix Guide

    to SQL: Syntax.

    http://./7882a.pdfhttp://./7882a.pdfhttp://./7882a.pdfhttp://./7882a.pdf
  • 8/3/2019 Informix Administrator Guide

    14/138

    8 INFORMIX-SE Administrators Guide

    New Features of This Product

    New Features of This ProductThe Introd uction to each Version 7.2 prod uct manual contains a list of new

    features for that produ ct. The Introduction to each manu al in the Version 7.2

    Informix Guide to SQL series contains a list of new SQL features.

    A comp rehensive list of all of the new features for Version 7.2 Informix

    prod ucts is in the Release Notes file called SERVERS_7.2.

    This section highlights the major new features imp lemented in Version 7.2 of

    INFORMIX-SE:

    s Global Language Sup port (GLS)

    The GLS feature lets Informix Version 7.2 produ cts hand le different

    languages, cultu ral conventions, and code sets. GLS functionality

    sup ersedes the functionality of Native Langu age Sup por t (NLS) and

    Asian Language Support (ALS). GLS eliminates the need to d istin-

    guish between internationalized versions of Informix software.

    s Multibyte filenames

    SE can generate m ultibyte filenames for the following types of files:

    u Database nam es for SE (.dbs)

    u Table names for SE (.dat, .idx)

    s Multibyte-character sup por t for SE utilities

    The secheck and selog utilities provide mu ltibyte-character suppor tfor table names and log filenames.

    ConventionsThis section d escribes the conventions tha t are u sed in this man ual. By

    becoming familiar with these conventions, you w ill find it easier to gather

    information from this and other volumes in the documentation set.

    The following conven tions are covered:

    s Typograph ical conventionss Icon conventions

    GLS

  • 8/3/2019 Informix Administrator Guide

    15/138

    Introduction 9

    Typographical Conventions

    s Command-line conventions

    s Sample-code conventions

    Typographical Conventions

    This manual u ses a standard set of conventions to introdu ce new terms,

    illustrate screen d isplays, describe comm and syntax, and so forth. The

    following typ ographical conventions are used throughou t this manual.

    Tip: When you are instructed to enter characters or to execute a command,immediately press RETURN after the entry. When you are instructed to type the

    text or to press other keys, no RETURN is required.

    Convention Meaning

    italics Within text, new terms and emphasized w ords are printed initalics. Within syn tax diagram s, values that you are to specifyare prin ted in italics.

    boldface Identifiers (nam es of classes, objects, constants, events,functions, program variables, forms, labels, and reports),environm ent variables, da tabase names, table names, colum nnames, menu items, comman d n ames, and other similar termsare printed in boldface.

    monospace Information that the p roduct d isplays and information that youenter are printed in a m onospace typeface.

    KEYWORDAll keyword s appear in upp ercase letters.

    This symbol indicates the end of produ ct- or p latform-specificinformation.

  • 8/3/2019 Informix Administrator Guide

    16/138

    10 INFORMIX-SE Administrators Guide

    Icon Conventions

    Icon Conventions

    Throughout the documentation, you w ill find text that is identified by several

    d ifferent typ es of icons. This section describes these icons.

    Comment Icons

    Comm ent icons identify three types of information, as described in the

    following table. This information is always disp layed in italics.

    Compliance Icons

    Comp liance icons ind icate paragraph s that provide guidelines for comp lying

    with a standard.

    These icons can ap ply to a row in a table, one or more paragraphs, or an entiresection. A symbol ind icates the end of the comp liance information.

    Icon Description

    Identifies paragrap hs that contain vital instructions,cautions, or critical information.

    Identifies paragrap hs that contain significant informationabout th e feature or operation that is being described.

    Identifies paragrap hs that offer add itional details orshortcuts for the fun ctionality that is being d escribed.

    Icon Description

    Identifies information that is specific to a GLS-compliantda tabase or application.

    GLS

  • 8/3/2019 Informix Administrator Guide

    17/138

    Introduction 11

    Command-Line Conventions

    Command-Line Conventions

    SE sup por ts a variety of command -line options. You enter these command s

    at the operating-system promp t to perform certain fun ctions in SE.

    This section defines and illustrates the format of the comm and s that are

    available in SE and other Informix products. These commands have their

    own conventions, wh ich might include alternative forms of a comm and ,

    required and optional parts of the comm and , and so forth.

    Each d iagram d isplays the sequences of required and op tional elements tha t

    are valid in a comm and . A diagram begins at the up per left with a command .

    It ends at the up per r ight w ith a vertical line. Between these points, you can

    trace any path that d oes not stop or back up . Each path d escribes a valid form

    of the comm and . You m ust supp ly a value for words that are in italics.

    You m ight encounter one or more of the following elements on a command -

    line p ath.

    Element Description

    command This required element is usually the product name orother short w ord that invokes the produ ct or calls thecompiler or preprocessor script for a comp iled Informixprod uct. It might app ear alone or precede one or more

    options. You m ust sp ell a comman d exactly as show nand mu st use lowercase letters.

    variable A word in italics represents a value that you mu stsup ply, such as a database, file, or program nam e. A tablefollowing the diagram explains the value.

    -flag A flag is usually an abbreviation for a function, menu, oroption name or for a compiler or preprocessor argum ent.

    You m ust enter a flag exactly as shown , includ ing thepreceding hyph en.

    .ext A filename extension, such as .sql or .dbs, might followa variable that represents a filename. Type th is extensionexactly as show n, immed iately after the nam e of the fileand a period . The extension might be optional in certainproducts.

    (1 of 2)

  • 8/3/2019 Informix Administrator Guide

    18/138

    12 INFORMIX-SE Administrators Guide

    Command-Line Conventions

    (.,;+*-/ ) Punctuation and mathematical notations are literalsymbols that you m ust enter exactly as show n.

    ' ' Single quotes are literal symbols that you mu st enter asshown.

    A reference in a box represents a subd iagram on thesame page (if no page is sup plied) or another page.

    Imagine that the subdiagram is spliced into the maindiagram at this point.

    A shaded op tion is the default. If you d o not explicitlytype th e option, the d efault w ill be in effect unlessyou choose another option.

    Syntax enclosed in a pair of arrows ind icates that th is isa subdiagram.

    The vertical line is a terminator and indicates that thestatement is complete.

    A branch below the ma in line ind icates an optional path .(Any term on the m ain path is required, un less a branchcan circum vent it.)

    A loop indicates a path th at you can repeat. Punctuationalong the top of the loop ind icates the separator sym bolfor list items, as in this examp le.

    A gate ( ) on a path indicates that you can only use

    that p ath the indicated nu mber of times, even if it is partof a larger loop. Here you can specify size no more thanthree times within this statement segment.

    Element Description

    (2 of 2)

    Privilegesp. 5-17

    Privileges

    ALL

    NOT

    IN

    variable

    ,

    3 size

    , 3

  • 8/3/2019 Informix Administrator Guide

    19/138

    Introduction 13

    Command-Line Conventions

    Figure 1 shows the flow of the secheck utility command .

    To construct a correct command , start at the top left with the command

    secheck. Then follow the diagram to the right, includ ing the options tha t you

    want. The elements in the d iagram are case sensitive.

    To read the example command-line diagram

    1. Type the w ord secheck.

    2. Choose either the lower path or the up per path.

    3. When you choose the lower p ath, you mu st type -V. That br ings you

    to the terminator and comp letes the secheck comm and . Press

    RETURN to execute the command .4. When you choose the u pp er path , take the following steps:

    a. You can choose -n or -y, but not both.

    b. You can choose -q.

    c. You can choose -l.

    d. You can choose -s.

    e. Sup ply a filename.

    After you choosefilename, you come to th e terminator. Your

    comm and is complete.

    5. Press ENTER to execute the comm and .

    Figure 1An Example Command-Line Diagram

    secheck filename

    -y

    -n -q

    -V

    -l -s

  • 8/3/2019 Informix Administrator Guide

    20/138

    14 INFORMIX-SE Administrators Guide

    Sample-Code Conventions

    Sample-Code Conventions

    Examples ofSQL code occur throughou t this man ual. Except where noted ,

    the code is not specific to any single Informix app lication developmen t tool.

    If only SQL statements are listed in the examp le, they are not d elimited by

    semicolons. To use this SQL code for a specific product, you must apply the

    syntax ru les for that prod uct. For example, if you a re using the Qu ery-

    language option ofDB-Access, you m ust d elimit multiple statements w ith

    semicolons. If you are u sing an SQL API, you must use EXEC SQL and a

    semicolon (or other approp riate delimiters) at the start and end of each

    statement, respectively.

    For instance, you m ight see the code in the following example:

    CONNECT TO stores7...DELETE FROM customer

    WHERE customer_num = 121...COMMIT WORKDISCONNECT CURRENT

    Dots in the example ind icate that more code wou ld be ad ded in a full appli-

    cation, but it is not necessary to show it to describe the concept beingdiscussed.

    For detailed d irections on using SQL statements for a par ticular ap plication

    development tool or SQL API, see the manu al for your p roduct.

    Addit ional Documentat ionThe SE documentation set includ es printed manuals, on-line m anuals, and

    on-line help.

    This section describes the following pieces of the d ocumen tation set:

    s Printed documentation

    s On-line documentation

    s Related read ing

  • 8/3/2019 Informix Administrator Guide

    21/138

    Introduction 15

    Printed Documentation

    Printed Documentation

    The following printed manuals are included in the SE documentation set:

    s The UN IX Products Installation Guide contains instructions for

    installing Informix products on comp uters that run the UNIX

    operating system. Keep th is guide w ith your UNIX software

    docum entation for easy reference.

    s The Guide to GLS Functionalitycontains information on the langu age-

    related topics of Global Language Sup por t (GLS).

    s TheInformix Migration Guide describes the procedu res to use wh en

    you migrate existing Informix databases to and from SE, Version 7.2.

    This manu al includes information on preparing you r host system to

    supp ort the new features provided by SE 7.2.

    s If you have never used Structured Qu ery Language (SQL) or an

    Informix app lication developmen t tool, read theInformix Guide toSQL: Tutorial. The manu al provides a tutorial on SQL as it is imp le-

    mented by Informix produ cts. It describes the fund amental ideas

    and terminology that are used w hen planning, using, and imple-

    menting a relational database.

    s A compan ion volume to the Tutor ial, the Informix Guide to SQL:

    Reference, provides reference information on the types of Informix

    databases that you can create, the data types that are sup ported inInformix produ cts, system catalog tables that are associated with the

    database, environment variables, and the SQL utilities. The m anu al

    also provides a detailed d escription of the stores7 demonstrationda tabase and contains a glossary.

    s An additional comp anion volum e to the Tutor ial, theInformix Guide

    to SQL: Syntax, provides a d etailed d escription of all the SQL state-

    ments supported by Informix products. The manual also provides a

    detailed d escription of Stored Procedu re Langu age (SPL) statements.

    s TheDB-A ccess User M anual describes how to invoke the DB-Access

    utility to access, modify, and retrieve information from SE relational

    databases.

    s When errors occur, you can look them u p by number and learn their

    causes and solutions in theInformix Error M essages man ual. If you

    prefer, you can look up the error m essages in the on-line message filethat is described later in this introdu ction and in the Introdu ction to

    theInformix Error M essages manual.

    GLS

    http://./7896b.pdfhttp://./7876a.pdfhttp://./7876a.pdfhttp://./7887b.pdfhttp://./7883a.pdfhttp://./7883a.pdfhttp://./7881a.pdfhttp://./7881a.pdfhttp://./7882a.pdfhttp://./7882a.pdfhttp://./7894a.pdfhttp://./7898d.pdfhttp://./7898d.pdfhttp://./7898d.pdfhttp://./7898d.pdfhttp://./7894a.pdfhttp://./7882a.pdfhttp://./7882a.pdfhttp://./7881a.pdfhttp://./7881a.pdfhttp://./7883a.pdfhttp://./7883a.pdfhttp://./7887b.pdfhttp://./7876a.pdfhttp://./7896b.pdf
  • 8/3/2019 Informix Administrator Guide

    22/138

    16 INFORMIX-SE Administrators Guide

    On-Line Documentation

    On-Line Documentation

    Several d ifferent types of on-line d ocumen tation are available:

    s On-line documentation and help

    s On-line error m essages

    s Release notes, documentation notes, and machine notes

    Error Message Files

    Informix software products provide ASCII files that contain all of the

    Informix error messages and their corrective actions. To read the error

    messages in the ASCII file, Informix prov ides scripts that let you d isplay error

    messages on th e screen (finderr) or pr int formatted error m essages (rofferr).For a detailed d escription of these scripts, see the Introduction to theInformix

    Error Messages manual.The optional Informix Messages and Corrections produ ct provides

    PostScript files that contain the error messages and their corrective actions. If

    you h ave installed th is produ ct, you can p rint the PostScript files on a

    PostScript pr inter. The PostScript error messages are d istributed in a nu mber

    of files of the format errmsg1.ps , errmsg2.ps , and so on. These files arelocated in the $INFORMIXDIR/msg directory.

    http://./7898d.pdfhttp://./7898d.pdfhttp://./7898d.pdfhttp://./7898d.pdf
  • 8/3/2019 Informix Administrator Guide

    23/138

    Introduction 17

    Related Reading

    Release Notes, Documentat ion Notes, Machine Notes

    In addition to th e Informix set of manu als, the following on-line files, located

    in the $INFORMIXDIR/release/en_us/0333 directory, might supp lement theinformation in th is manu al:

    Please examine these files because they contain v ital information aboutapplication and performance issues.

    Related Reading

    For ad ditional technical information on database man agement, consult the

    following books. The first book is an introd uctory text for readers who arenew to database management, while the second book is a more complex

    technical work for SQL programm ers and database administrators:

    s An Introduction to Database Systems by C. J. Date (Ad dison-Wesley

    Publishing, 1994)

    s Database: A Primerby C. J. Date (Ad dison-Wesley Publishing, 1983)

    On-line File Purpose

    Documentation

    notes

    Describes features that are not covered in th e manu als or that

    have been m odified since pu blication. The file that contains thedocum entation notes for this prod uct is called SEDOC_7.2.

    Release notes Describes feature differences from earlier versions of Informixprod ucts and how these differences might affect currentprod ucts. This file also contains information abou t any know nproblems and their workarou nd s. The file that contains therelease notes for Version 7.2 of Informix database serverprod ucts is called SERVERS_7.2. The release notes also contain asection on limits that describes the maximum values for SE.

    Machine notes Describes any special actions that are required to configure anduse Informix products on you r compu ter. Machine notes arenam ed for the prod uct that is described. The machine notes filefor SE is SE_7.2.

  • 8/3/2019 Informix Administrator Guide

    24/138

    18 INFORMIX-SE Administrators Guide

    Compliance with Industry Standards

    To learn more about th e SQL language, consider th e following books:

    s A Guide to the SQL Standardby C. J. Date with H. Darw en (Add ison-

    Wesley Publishing, 1993)

    s Understanding the New SQL: A Complete Guide by J. Melton and

    A. Simon (Morgan Kaufmann Pu blishers, 1993)

    s Using SQL by J. Groff and P. Weinberg (Osborne McGraw -Hill, 1990)

    TheINFORMIX-SE A dministrators Guide assum es that you are familiar with

    your compu ter operating-system. If you have limited UNIX system

    experience, consult your operat ing system manu al or a good introductory

    text before you read this man ual. The following texts provide a good intro-

    du ction to UNIX systems:

    s Introducing the UNIXSystem by H . McGilton and R. Morgan

    (McGraw-Hill Book Company, 1983)

    s Learning the UNIXOperating System by G. Todino, J. Stran g, andJ. Peek (OReilly & Associates, 1993)

    s A Practical Guide to the UNIXSystem by M. Sobell

    (Benjamin/ Cum mings Publishing, 1989)

    s UNIX for People by P. Birns, P. Brown, and J. Muster (Prentice-Hall,

    1985)

    s UNIXSystem V: A Practical Guideby M. Sobell (Benjamin/ Cum mingsPublishing, 1995)

    Compliance with Industry Standards

    The American National Stand ards Institute (ANSI) has established a set of

    indu stry standards for SQL. Informix SQL-based p rodu cts are fully comp liant

    with SQL-92 Entry Level (published as ANSI X3.135-1992), wh ich is id entical

    to ISO 9075:1992 on INFORMIX-OnLine Dynam ic Server. In addition, many

    features of OnLine comp ly with the SQL-92 Interm ediate and Full Level and

    X/Open CAE (comm on app lications environment) standards.

  • 8/3/2019 Informix Administrator Guide

    25/138

    Introduction 19

    Informix Welcomes Your Comments

    Informix SQL-based products are compliant with ANSI SQL-92 Entry Level

    (published as ANSI X3.135-1992) on INFORMIX-SE with th e followingexceptions:

    s Effective checking of constra ints

    s Serializable transactions

    Informix Welcomes Your Comments

    Please let us know wh at you like or dislike about ou r manu als. To help us

    with future versions of our manu als, please tell us about an y corrections or

    clarifications that you wou ld find useful. Write to us at the following add ress:

    Informix Software, Inc.

    SCT Technical Pu blications Depar tmen t4100 Bohannon Drive

    Menlo Park, CA 94025

    If you prefer to send electronic mail, our ad dress is:

    [email protected]

    Or, send a facsimile to the Informix Technical Publications Depar tmen t at:

    415-926-6571

    Please include the following information:

    s The nam e and version of the manual that you are using

    s Any comm ents that you have about the manual

    s

    Your name, add ress, and phone num berWe appreciate your feedback.

  • 8/3/2019 Informix Administrator Guide

    26/138

  • 8/3/2019 Informix Administrator Guide

    27/138

    1Chapter

    Installation and InitialConfiguration

    Defining a Database Management System . . . . . . . . . . . 1-3

    Planning for SE . . . . . . . . . . . . . . . . . . . . 1-4Configuring Hardware . . . . . . . . . . . . . . . . 1-4

    Placing Active Tables and Files on the Disk . . . . . . . . . 1-4

    Considering SE Limits . . . . . . . . . . . . . . . . 1-5

    Installing SE . . . . . . . . . . . . . . . . . . . . . 1-6

    Preparing SE Connections . . . . . . . . . . . . . . . . 1-6Understanding Version 7.2 SE Configurations . . . . . . . . 1-7

    Setting Environment Variables . . . . . . . . . . . . . 1-8

    Understanding the Communication Files . . . . . . . . . . 1-9

    Network Communication Files . . . . . . . . . . . . 1-10Network Security Files . . . . . . . . . . . . . . . 1-10

    The sqlhosts File . . . . . . . . . . . . . . . . . 1-12Build ing the sqlhosts File . . . . . . . . . . . . . . . 1-12

    The dbservername Field . . . . . . . . . . . . . . 1-13The nettype Field . . . . . . . . . . . . . . . . . 1-13The hostname Field . . . . . . . . . . . . . . . . 1-15The servicename Field . . . . . . . . . . . . . . . 1-16Relationships Am ong N etwork-Connection Files for

    TCP/ IP . . . . . . . . . . . . . . . . . 1-17

    Examples of Client/ Server Connections . . . . . . . . . . 1-18Local Connections with Pipes . . . . . . . . . . . . 1-19Netw ork Connections with Version 7.2 Products . . . . . . 1-20Local-Loopback Connections with Version 7.2 Products . . . 1-22

    Connecting with Different Versions . . . . . . . . . . . . 1-26

    Local Conn ections with Version 4.11 or 5.x ClientApplications . . . . . . . . . . . . . . . . 1-26

    Network Connections with INFORMIX-NET . . . . . . . 1-28

  • 8/3/2019 Informix Administrator Guide

    28/138

    1-2 INFORMIX-SE Administrators Guide

    Network Connections with 5.x INFORMIX-NET Relay

    Module . . . . . . . . . . . . . . . . . 1-29Network Connections with the Version 7.2 Relay Modu le . . . 1-32

    Starting the sqlexecd Daemon . . . . . . . . . . . . . . 1-35

    Using an NFS-Mounted Directory . . . . . . . . . . . . 1-37

    How Does a Clien t App lication Connect to a Da tabase Server? . . . . 1-38

  • 8/3/2019 Informix Administrator Guide

    29/138

    Installation and Initial Configuration 1-3

    Imp lementing a database management system (DBMS) requ ires makingmany d ecisions, such as where to store the data, how to access the data, and

    how to p rotect the data. How you implement the DBMS can great ly affect theperformance of database operations. For examp le, the p hysical organization

    of data and optimization performed by the DBMS directly affect the speed of

    retrievals from and up dates to tables.

    This chap ter explains the issues that are involved in setting up INFORMIX-SE.

    You can u se this chap ter as background to help you understand the effects of

    the choices that you m ake as anSE

    administrator.This chap ter also d iscusses SE connectivity and commu nication as well as the

    contents of the sqlhosts file.

    Defining a Database M anagement System

    You can d ivide a DBMS into the following parts:

    s A data language, which serves as the user interface to the DBMS

    s A database server, which takes the data definition an d data manipulation

    language requests and p erforms the requested op erations

    Database users instruct the DBMS to perform queries and other operations on

    a database using language that the DBMS understands. Informix applicationdevelopment tools and SQL APIs use a database definition and man ipulation

    language that is an extension of the ANSI standard SQL to send instructions

    to the d atabase server.

  • 8/3/2019 Informix Administrator Guide

    30/138

    1-4 INFORMIX-SE Administrators Guide

    Planning for SE

    Planning for SEPlanning can help you avoid costly and time-consuming m istakes. For

    example, before you install the software, consider wh ere to locate it so that

    everybody who need s to access it can do so.

    After you decide where to locate the prod uct, think about the p lacement of

    the database and its associated tab les. Do you want to p lace your tables on

    different devices? Do you w ant to put your transaction log or aud it trails onseparate d isks? Also consider the comp uter itself. Can it suppor t the mem ory

    requiremen ts ofSE? Can it support the number of open files, locks, and u sers

    that the app lication requires? In ad dition, you mu st think abou t m aintenance

    plans. Prepare a backup schedule. Decide w here to keep the tapes.

    Configuring HardwareIf you p artitioned your disks before you began p lanning your SE system,

    examine the physical layout of your d isk and verify that the partition in

    wh ich you wan t to load your Informix produ cts is large enough to contain

    the prod uct software. (Informix does not require you to place the prod uct

    software in the same d irectory as the data.)

    Placing Active Tables and Files on the Disk

    A database server that uses the UNIX file system cannot transfer data d irectly

    from memory to disk. The intermed iate transfer to and from the operating-

    system bu ffer increases the time for the tran sfer. Although intermed iate

    transfer does not always create a performance bottleneck on a database with

    mod erate activity, your m ost imp ortant d esign goal must be to minimize thetime required for disk inpu t/ output (I/ O).

    Keep you r most active tables on separate d isk devices to redu ce contention.

    Using separate d isk devices reduces competition for disk access wh en joins

    form am ong high-demand tables.

    Because transaction logs and aud it trails have h igh rates of activity, you m ust

    give them pr iority in d isk placement. Ideally, designate the fastest d evices orthe most central areas of the d isk to hold the transaction logs and aud it trails.

  • 8/3/2019 Informix Administrator Guide

    31/138

    Installation and Initial Configuration 1-5

    Considering SE Limits

    Remem ber the following points as you p lan the layout for your SE data:

    s How you p osition d ata on d isk d evices can minimize head

    movement.

    s The innermost d isk partitions generally have the fastest access

    timesuse th em for frequen tly accessed tables or logs.

    s SE tables cannot span p artitions. Think carefully about wh ere you

    decide to pu t tables. When a table fills a partition, you must d o one

    of the following p rocedu res:u Move the table to a larger par tition.

    u Back up the d ata, increase the size of the partition, and restore

    the data.

    s SE indexes (.idx files) autom atically reside on the same partition asyour .dat files.

    s

    Transaction logs and aud it trails grow as you p rocess transactionsagainst the database.

    Considering SE Limits

    Consider th e following limits ofSE wh en you install the product:

    s

    The maximum row size (32,511 bytes)s The maximum number of open SE tables (255)

    s The maximum nu mber of locks per table (opera ting-system-

    dependent)

    Because SE takes advantage of some of the operating-system facilities that

    UNIX provides, it also incurs some of the limits that UNIX imposes. The

    nu mber of open files that you r operating system allows represents one suchlimit. You can increase the value of the following UNIX kernel parameters to

    improve SE performance (although these mod ifications do not alter the SE

    limitations just listed):

    s The num ber of locks

    s The num ber of open files

    s The nu mber of inodes (an operating system entity u sed to u niquely

    identify a file)

  • 8/3/2019 Informix Administrator Guide

    32/138

    1-6 INFORMIX-SE Administrators Guide

    Installing SE

    Installing SEInstallation refers to the p rocess of load ing the p rodu ct files onto you r UNIX

    system and running the installation script to correctly set up the produ ct files.

    Some of the specific steps that you should follow as par t of your installation

    depend on your environment. See the UN IX Products Installation Guide,

    Version 7.2, for instru ctions about installing the Version 7.2 SE database

    server.

    Preparing SE Connections

    Before you can u se SE with a client app lication, you m ust first un derstand the

    following topics:

    s Configuring INFORMIX-SE, Version 7.2, for local and remote

    connections

    s Setting your environment variables

    s Establishing commu nication

    s Building the sqlhosts file

    s Connecting Informix Version 7.2 client app lications to Version 7.2 SEdatabase servers

    s Connecting Informix Version 4.1 or Version 5.x client ap plications to

    Version 7.2 SE database servers

    s Starting the sqlexecd daemon

    s Using NFS-mounted directories

    The UN IX Products Installation Guide suggests that you create the d irectory/usr/informix for your Informix prod ucts. For the examp les in the followingsections, it is assumed th at you have installed the Informix Version 4.1 or 5.x

    products in the /usr/informix directory, and th at you have installed theInformix Version 7.2 produ cts in the /usr/version7/informix directory.However, when you establish local connections using unnamed p ipes, you

    mu st install client and server prod ucts in the same d irectory.

    http://./7896b.pdfhttp://./7896b.pdfhttp://./7896b.pdfhttp://./7896b.pdf
  • 8/3/2019 Informix Administrator Guide

    33/138

    Installation and Initial Configuration 1-7

    Understanding Version 7.2 SE Configurations

    Understanding Version 7. 2 SE Configurat ions

    You m ust u nd erstand local and network configu rations before you establish

    communication.

    A local client/ server configu ration exists when a client prod uct connects to a

    database server on the same compu ter. A remote client/ server configuration

    exists when a client prod uct that resides on one comp uter establishes a

    connection across a network to a d atabase server that resides on anoth er

    computer.

    Figure 1-1 illustrates the compatibility between client tools and a local

    Version 7.2 SE database server.

    Figure 1-1Client/Server Configurations for Client Products Connecting

    to a Local Version 7.2 SE Database Server

    Client Local SE Database Server, Version 7.2

    Version 4.1 ESQL/ C,ESQL/ COBOL

    Sup ported, but mu st use the Version 7.2 RelayModu le and Version 4.1 syntax

    Version 5.x ESQL/ C,ESQL/ COBOL,

    ESQL/ FORTRAN

    Sup ported, but mu st use the Version 7.2 RelayModu le and Version 5.x syntax

    Version 6.x ESQL/ C,ESQL/ COBOL

    Sup ported , but cannot use syntax specific toVersion 7.2 products

    Version 7.2 ESQL/ C,

    ESQL/ COBOL

    Supported

  • 8/3/2019 Informix Administrator Guide

    34/138

    1-8 INFORMIX-SE Administrators Guide

    Setting Environment Variables

    Figure 1-2 illustrates the compatibility between client prod ucts and a remote

    Version 7.2 SE database server.Figure 1-2

    Client/Server Configurations for Client Products Connectingto a Remote Version 7.2 SE Database Server

    Setting Environment Variables

    You must set certain UNIX and Informix environment variables correctly for

    your Informix prod ucts to work. These environmen t variables are

    documented in theInformix Guide to SQL: Reference and the Guide to GLS

    Functionality. Pay par ticular attention to the following environm ent variables:

    Client Remote SE Database Server, Version 7.2

    Version 4.11

    INFORMIX-SQL,INFORMIX-4GL

    Sup ported , but must establish connection using

    Version 4.1 or 5.x INFORMIX-NET or the Version 7.2Relay Modu le. The Version 7.2 Relay Modu le is anintegral part of every Informix Version 7.2 databaseserver. Must also use Informix Version 4.1 syntax.

    Version 5.x ESQL/ C,ESQL/ COBOL,ESQL/ FORTRAN

    Sup ported , but must establish connection usingVersion 5.x INFORMIX-NET or the Version 7.2 RelayModule. The Version 7.2 Relay Modu le is an integralpart of every Informix Version 7.2 database server.Must also use Informix Version 5.x syntax.

    Version 6.x ESQL/ C,ESQL/ COBOL

    Sup ported , but cannot use syntax specific toVersion 7.2 produ cts

    Version 7.2 ESQL/ C,ESQL/ COBOL

    Supported

    DBPATH identifies directories and d atabase servers that

    contain databases.

    INFORMIXDIR specifies the directory where you install your prod uct

    files.

    INFORMIXSERVER specifies the nam e of the default database server.

    INFORMIXSQLHOSTS specifies the full pathn ame and filenam e of a file that

    contains connectivity information (optional).

    http://./7881a.pdfhttp://./7876a.pdfhttp://./7876a.pdfhttp://./7876a.pdfhttp://./7876a.pdfhttp://./7876a.pdfhttp://./7881a.pdf
  • 8/3/2019 Informix Administrator Guide

    35/138

    Installation and Initial Configuration 1-9

    Understanding the Communication Files

    The Global Langu age Sup port (GLS) feature ofSE lets you u se non-English

    characters, monetary conventions, and collating sequences. If you are u sing

    the GLS features ofSE, you need to set the GLS-related env ironment variables,

    wh ich are d ocum ented in Chap ter 5 of the Guide to GLS Functionality.

    Understanding the Communication Files

    The communication files contain information necessary for client applications

    and da tabase servers to communicate with one anoth er. The files that are

    associated w ith network communication fall into the following group s:

    s Network communication files: /etc/hosts an d /etc/services (usedonly for the TCP/ IP network protocol)

    s Netw ork secur ity files

    s $INFORMIXDIR/etc/sqlhosts

    Of these files, you maintain only the $INFORMIXDIR/etc/sqlhosts file. The

    UNIX system (or network) administrator, or the end u ser (in the case of somenetwork security files), manages the other files.

    Important: For the remainder of this chapter, $INFORMIXDIR/etc/sqlhosts isreferred to as thesqlhosts file.

    INFORMIXTERM specifies whether to use the termcap file or terminfo

    directory (optional).PATH find s executable files.

    SQLEXEC is required for some network configurations.

    SQLRM is required for some network configurations.

    SQLRMDIR is required for some network configurations.

    TERM enables your client p rodu ct to recognize and

    comm unicate with the terminal you are u sing .

    Sometimes you mu st also set TERMCAP an dTERMINFO. See you r UNIX system administrator for

    details.

    GLS

    http://./7876a.pdfhttp://./7876a.pdfhttp://./7876a.pdf
  • 8/3/2019 Informix Administrator Guide

    36/138

    1-10 INFORMIX-SE Administrators Guide

    Understanding the Communication Files

    Network Communication Files

    The network ad ministrator maintains the network commu nication files. You

    use information from /etc/hosts and /etc/services for the sqlhosts file wh enyou prepare the TCP/ IP network connections. For IPX/ SPX network connec-

    tions, you need the name of the N ovell NetWare configurat ion file. Also, you

    need to w ork closely w ith the network ad ministrator to make sure you are

    using accurate information.

    For information about these files, refer to the systems m anu als for you rinstallation and to the UNIX man pages for hosts an d services.

    Network Security Files

    A client app lication cannot connect to a remote da tabase server un less the

    user has the proper access permission. Therefore, you m ust know abou t the

    imp lications of the network security files (/etc/passwd, ~/.netrc,/etc/shadow, /etc/host.equiv, ~/.rhosts) on interhost commu nication(communication between host computers).

    Informix prod ucts follow stand ard UNIX security procedures, governed by

    information contained in the network secur ity files. For information about

    these procedu res, refer to the systems manu als for your installation and to

    th e UNIX man p ages hosts.equiv and netrc.

  • 8/3/2019 Informix Administrator Guide

    37/138

    Installation and Initial Configuration 1-11

    Understanding the Communication Files

    The following methods allow you to gain access to the network:

    s The trusted host method , described in the UNIX man pages forhosts.equiv an d rhosts, establishes connections betw een tru sted

    host comp uters over a network. This method does not require you to

    supply a p assword.

    When you set up the hosts.equiv and .rhosts files on the databaseserver host, you usu ally want to make a client host a trusted host. You

    need to sp ecify the client host name in the /etc/hosts.equiv or .rhosts

    file on the database server host. How ever, on some networks, thehost name that the network u ses to refer to that comp uter might not

    be exactly the same as the host name that the computer u ses to refer

    to itself. For example, the network host name m ight contain the full

    dom ain name, as shown in the following examp le:

    viking.informix.com

    But the computer m ight refer to itself using the local host nam e

    shown in the following example:

    viking

    If this occurs, make su re that you specify both host nam es in your

    /etc/host.equiv an d .rhosts files.

    s INFORMIX-NET PC, INFORMIX-NETforWindows, INFORMIX-NETfor

    Macintosh, and INFORMIX-NETforOS/2 promp t you to enter a

    password wh en you attempt to establish a network connection.s The SQL CONNECT statement in an Informix SQL API, such as

    INFORMIX-ESQL/C or INFORMIX-ESQL/COBOL, allows you to

    specify a password for establishing a netw ork connection. How ever,

    you cannot use an SQL CON NECT statement to specify a passw ord in

    DB-Access.

    s The .netrc file holds password information u sed to establish

    connections to remote hosts. Refer to th e UNIX man pages forinformation on how to use netrc.

  • 8/3/2019 Informix Administrator Guide

    38/138

    1-12 INFORMIX-SE Administrators Guide

    Building the sqlhosts File

    The sqlhosts File

    The $INFORMIXDIR/etc/sqlhosts file is the connectivity file. It contains infor-

    mation that enables an Informix client app lication to connect to any Informix

    database server on the network. It specifies the database server name, the

    type of connection, the nam e of the host computer, and the service nam e.

    You m ust p repare the sqlhosts file even if the client ap plication and the SE

    database server reside on the same comp uter. The sqlhosts file is described

    in Building th e sqlhosts File below.

    The sqlhosts file has one entry (one line) for each type of p otential connection

    from a client app lication to a d atabase server. When you use a remote

    connection, an sqlhosts file must reside on the client compu ter and thedatabase server computer.

    The client app lication expects to find the sqlhosts file in the

    $INFORMIXDIR/etc directory; however, you can change this location or thename of the file with the INFORMIXSQLHOSTS environment var iable. Formore information on this environment variable, refer to Chap ter 4 of the

    Informix Guide to SQL: Reference.

    Building the sqlhosts File

    Figure 1-3 shows an example ofsqlhosts fields. The next four sectionsprovide detailed information about the following fields:

    s Database servername field

    s Netw ork protocol field

    s Hostname field

    s Servicename field

    You can ed it the sqlhosts file with any convenient text ed itor. The en tries inthe first three fields can include any p rintable character but not an up percase

    character, a field d elimiter, a new -line character, or a commen t character. The

    entries in the fourth field can also include up percase characters. You delimit

    the fields show n in Figure 1-3 with spaces or tabs.

    http://./7881a.pdfhttp://./7881a.pdfhttp://./7881a.pdf
  • 8/3/2019 Informix Administrator Guide

    39/138

    Installation and Initial Configuration 1-13

    Building the sqlhosts File

    Figure 1-3Example of Fields in an sqlhosts File

    The dbservername Field

    The dbservername field contains the database server nam e that theINFORMIXSERVER environm ent var iable specifies. Each database server on

    the netw ork mu st possess a un ique nam e that cannot exceed 18 characters.

    The nettype Field

    The nettype field, a string of eight letters comp osed of three subgrou ps,

    describes the type of connection that a client can u se to connect to the

    database server. Figure 1-4 illustrates the nettype field.

    dbservername nettype hostname servicename

    valley_se setlitcp valley valley_service

    river_se seipcpip river sqlexec

    Figure 1-4

    Format of thenettype Fieldd d i i i p p p

    Databaseserver product

    Interface type Network protocol

  • 8/3/2019 Informix Administrator Guide

    40/138

    1-14 INFORMIX-SE Administrators Guide

    Building the sqlhosts File

    The following list describes the subfields ofnettype and the valid values

    allowed for SE, as show n in Figure 1-5:s The first two letters represent the database server p rodu ct:

    u The se represents INFORMIX-SE.

    u The on represents the INFORMIX-OnLine Dynamic Server (not

    used in this situation).

    u The gw represents INFORMIX-Gateway withDRDA (not used in

    this situation).s The midd le three letters represent the internal program ming

    interface connection typ e that enab les comm un ication:

    u The ipc represents a UNIX-based interprocess communication (IPC)

    connection th at is used on ly for local loopback connections.

    u The tli represents a transport-level interface (TLI) netw ork interface

    that is u sed for local-loopback and remote-host connections.

    u The soc represents a socket type ofnetwork interface that is used

    for local-loopback and remote-host connections.

    The installation package for this product contains the Machine Notes

    file, SE_7.1, that discusses the network interface that your p latform

    supports.

    s The final three letters represent the sp ecific IPC mechanism or the

    network protocol:

    u The pip represents unnamed pipes. Usepip only for local

    connections.

    u The tcp represents the TCP/ IP protocol. Use tcp for netw ork

    connections.

    u The spx represents the IPX/ SPX protocol. Use spx for netw ork

    connections.The network interface describes the behavior between the compu ter

    and the netw ork. The netw ork protocol describes the behavior of the

    network itself.

  • 8/3/2019 Informix Administrator Guide

    41/138

    Installation and Initial Configuration 1-15

    Building the sqlhosts File

    Figure 1-5 shows the valid va lues for nettype used w ith SE.

    Figure 1-5Valid nettype Values for SE

    The hostname Field

    The hostname field specifies the compu ter where the da tabase serverproduct resides. When you use the TCP/ IP connection protocol, the

    hostname field mu st correspond to the host-name entry in the /etc/hosts file,wh ich p rovides the network ad dress of the host comp uter. As a ru le, the

    hostname entry in the /etc/hosts file is the same as the name of your

    comp uter. See your network adm inistrator to determine what name is

    assigned to a specific host, and m ake sure that you both agree on the

    hostname field.

    Figure 1-6 shows an example of the /etc/hosts fields. The host-alias field isoptional.

    Figure 1-6Example of hostname Fields in an /etc/hosts File

    nettype Description

    seipcpip SE using unnamed pipes for local mode

    setlitcp SE using TLI with TCP/IP protocol

    sesoctcp SE using sockets with TCP/IP protocol

    setlispx SE using TLI with IPX/SPX protocol

    net address hostname host-alias

    29.9.925.6 valley accounts

    B ildi h lh Fil

  • 8/3/2019 Informix Administrator Guide

    42/138

    1-16 INFORMIX-SE Administrators Guide

    Building the sqlhosts File

    Informix bases its imp lementation ofIPX/ SPX on the NetWare implemen-

    tation ofIPX/ SPX

    . When you u se theIPX/ SPX

    protocol, the hostname fieldmu st contain the nam e of the NetWare file server rather than the actual nameof the host comp uter. The imp lementation ofIPX/ SPX varies among vendors,

    so refer to the vendor d ocumen tation for more details about the required

    files.

    The servicename Field

    The interpretation of the servicename field d epends on the type of networkconnection that is specified in th e nettype field.

    When you use unnam ed pipes, the servicename field m ust contain the nam eof the SE executable file, distributed as sqlexec.

    When you specify a nettype field whose last three letters are tcp, theconnection is a TCP/ IP network connection. When you use the TCP/ IP

    connection p rotocol, the service name mu st correspon d to a service-nam e

    entry in the /etc/services file, as illustr ated in Figure 1-7. The /etc/services filetells the network software how to find the database server on the specified

    host computer. It does not matter wh at service name you choose as long as

    you and your network ad ministrator agree on a name.

    Figure 1-7Example of servicename Field in an /etc/services File

    Tip: When you are usingNIS, type ypcat services and press RETURN to verify

    the services available in your domain.

    When you sp ecify a nettype field w hose last three letters are spx, you sup port

    an IPX/ SPX network connection. When you use the IPX/ SPX connection

    protocol, the service nam e mu st match dbservername .

    servicename port #/protocol service-alias

    valley_service 1536/ tcp

    B ildi th lh t Fil

  • 8/3/2019 Informix Administrator Guide

    43/138

    Installation and Initial Configuration 1-17

    Building the sqlhosts File

    Relat ionships Among Network-Connect ion Files for TCP/IP

    Comm on information stored in specific fields relates the sqlhosts, /etc/hosts ,

    an d /etc/services files to each other for TCP/ IP connections. Figure 1-8 illus-trates the relationships among the $INFORMIXDIR/etc/sqlhosts file, the/etc/services file, and the /etc/hosts file. The servicename fields in thesqlhosts and /etc/services files match. The hostname fields in the sqlhostsan d /etc/hosts files also match.

    Figure 1-8Relationships Among Network-Connection Files

    /etc/hosts

    net address host name host-alias29.9.925.6 hill accounts

    66.9.30.62 canyon inventory

    $INFORMIXDIR/etc/sqlhosts

    dbservername

    menlo

    newyork

    pittsburg

    nettype

    seipcpip

    setlitcp

    sesoctcp

    hostname

    valley

    hill

    canyon

    servicename

    sqlexec

    se2

    se3

    sesoctcp

    Server type Protocol

    Interface

    /etc/services

    servicename port # /protocol service-al ias

    se2 1536/ tcp

    se3 1425/ tcp

    Service names matchHost names match

    E l f Cli t/S C ti

  • 8/3/2019 Informix Administrator Guide

    44/138

    1-18 INFORMIX-SE Administrators Guide

    Examples of Client/Server Connections

    Examples of Client/Server Connections

    This section discusses client/ server configura tions for making connections

    between an Informix Version 7.2 client and a Version 7.2 SE database server.

    The following configu rations are p ossible:

    s A local connection with u nnam ed pipes

    s A remote (netw ork) connection

    s A local loopback connection

    The connection information that th is section d escribes is true for all

    Version 6.0 and later clients and da tabase servers.

    For information about connecting Version 7.2 SE database servers with an

    Informix Version 5.x or 4.1 client, see Connecting with Different Versions

    on page 1-26.

    In all the configura tions in the next sections, you m ust correctly set thefollowing environm ent variables for the user:

    s PATH

    s TERM

    s DBPATH (optional)

    PATH mu st always includ e $INFORMIXDIR/bin so that the comp uter can findthe Informix prod ucts. TERM provides information to the UNIX operatingsystem so that the key set and d isplay fun ction properly. DBPATH shows the

    location of databases and da tabase servers.

    In the following examp les, it is assum ed that you h ave installed the Informix

    Version 7.2 prod ucts in the /usr/version7/informixdirectory. In oth er words,when you perform the installation, set the INFORMIXDIR environment

    variable to /usr/version7/informix.

    Examples of Client/Server Connections

  • 8/3/2019 Informix Administrator Guide

    45/138

    Installation and Initial Configuration 1-19

    Examples of Client/Server Connections

    Local Connections with Pipes

    When the client application and the SE database server reside on the same

    host comp uter, the client application accesses the local da tabase server u sing

    unnamed pipes, as shown in Figure 1-9.

    Important: The preceding diagram is also accurate for a connection between aVersion 7.x client and a Version 6.x SEdatabase server or a Version 6.x client and a

    Version 7.x SEdatabase server.

    The user must set the INFORMIXDIR an d INFORMIXSERVER environment

    variables to the values that are shown in Figure 1-10.

    Figure 1-10Environment Variables and

    Required Settings

    Tip:Remember,/usr/version7/informix represents the installation directory for allInformix Version 7.2 products.

    The $INFORMIXDIR/etc/sqlhosts file must include the following entry:

    local_se seipcpip river sqlexec

    Figure 1-9A Local

    Configuration UsingUnnamed Pipes

    Version 7.2

    Client SE

    Version 7.2Unnamed pipes

    river

    Environment Variable Value

    INFORMIXDIR / usr/ version7/ informix

    INFORMIXSERVER local_se

    Examples of Client/Server Connections

  • 8/3/2019 Informix Administrator Guide

    46/138

    1-20 INFORMIX-SE Administrators Guide

    Examples of Client/Server Connections

    The four th item in the sqlhosts entry (sqlexec) represents the name of theexecutable file for SE, as installed by the Informix installation p rocedu re.

    When you do not m odify the installation, sqlexec is the executable file.

    The SE database server process starts when the client executes one of the

    following statements:

    s CONNECT TO database_name@local_se

    s CONNECT TO @local_se

    Because these statemen ts represent a purely local connection, the /etc/hostsan d /etc/services files are unaffected.

    Network Connections with Version 7. 2 Products

    When the client app lication resides on one comp uter and the database server

    resides on another comp uter, the connection is called a remote or network

    configuration, as shown in Figure 1-11.

    Important: The preceding diagram is also accurate for a connection between aVersion 7.x client and a Version 6.x SEdatabase server or a Version 6.x client and a

    Version 7.x SEdatabase server.

    Figure 1-11Network

    Configuration withan Informix

    Version 7.2 ClientApplication and an

    INFORMIX-SE,Version 7.2,Database Server

    Version 7.2Client SE

    Version 7.2

    sqlexecd

    Version 7.2

    canyon valley

    Examples of Client/Server Connections

  • 8/3/2019 Informix Administrator Guide

    47/138

    Installation and Initial Configuration 1-21

    Examples of Client/Server Connections

    Setting Up the canyon and valley Host Computers

    For the canyon compu ter, set the INFORMIXDIR an d INFORMIXSERVERenvironment variables to the values show n in Figure 1-12.

    Figure 1-12Environment Variables and

    Required Settings

    The sqlexecd daemon m ust be run ning. To start the daemon , you mu st log inas root and enter the following comm and :

    /usr/version7/informix/lib/sqlexecd valley_se

    For information about the sqlexecd daemon , refer to Starting the sqlexecdDaemon on page 1-35.

    Setting Up the Communication Files

    Each host computer (hilltop an d valley) must contain an sqlhosts file thatinclud es connection information associated w ith the netw ork interface and

    network p rotocol that you are u sing. Figure 1-13 shows the sqlhosts fileentries for d ifferent netw ork interfaces.

    Figure 1-13Network Interfaces and Associated

    sqlhosts File Entries

    Environment Variable Value

    INFORMIXDIR / usr/ version7/ informix

    INFORMIXSERVER valley_se

    Network Interface sqlhosts File Entry

    Sockets on TCP/IP valley_se sesoctcp valley valley_service

    TLI interface on TCP/IP valley_se setlitcp valley valley_service

    Examples of Client/Server Connections

  • 8/3/2019 Informix Administrator Guide

    48/138

    1-22 INFORMIX-SE Administrators Guide

    Examples of Client/Server Connections

    When you u se a TCP/ IP network, the /etc/hosts file must contain an entry forth e valley compu ter and the /etc/services file must contain an en try forvalley_service.

    When the host computer uses the TLI network interface on an IPX/ SPX

    network, the hostname field contains the n ame of the N etWare file serverinstead of the compu ter host nam e. On the display screens that are associated

    with the p repara tion of the NetWare connections, the screen d isplays the

    NetWare file server name in upp ercase letters; for example, NW_SVR.

    However, in the sqlhosts file, you m ust enter th e name in lowercase letters;for example, nw_svr.

    For an IPX/ SPX connection, the value in the servicename field can contain an

    arbitrary string, but that string mu st represent a un ique name am ong the

    nam es of services available on the IPX/ SPX network. In other words, you

    cannot u se the string as a service nam e on any other file server on the

    netw ork when that file server does not use an Informix product. You can use

    th e dbservername value in the servicename field, as show n in Figure 1-14,providing that the dbservername value exists as a unique service name.

    Figure 1-14Using the dbservername Value in the servicename Field

    Local-Loopback Connections with Version 7. 2 Products

    A network connection between a client app lication and a da tabase server on

    the same comp uter is called a local-loopbackconnection. A local-loopback

    connection uses network connections even thou gh the client and thedatabase server reside on the same compu ter. You can make a local-loopback

    connection if your compu ter is equipped to process netw ork transactions.

    Affected Field sqlhosts File Entry

    servicename valley_se setlispx nw_svr valley_se

    Examples of Client/Server Connections

  • 8/3/2019 Informix Administrator Guide

    49/138

    Installation and Initial Configuration 1-23

    Examples of Client/Server Connections

    Figure 1-15 shows a local-loopback connection between an Informix

    Version 7.2 client application and a Version 7.2 SE database server. You can

    think of this configu ration in the following w ays:

    s The connections go outside the comp uter valley and come backinside again, as show n in Examp le A ofFigure 1-15.

    s The connections remain w ithin the valley host comp uter, as shownin Examp le B ofFigure 1-15.

    Tip: You can use a local-loopback connection to test network operations without aremote computer.

    Important: This diagram is also accurate for a connection between a Version 7.2client and a Version 6.x SEdatabase server or a Version 6.x client and a Version 7.2

    SEdatabase server.

    Figure 1-15A Local-Loopback Configuration with a Version 7.2 Client

    Application and Version 7.2 SE Database Server

    Version 7.2

    Client SE

    Version 7.2

    sqlexecd

    Version 7.2

    Client SE

    Version 7.2sqlexecd

    Example A

    Example B

    valley valley_se

    valley_se

    Version 7.2

    Version 7.2

    valley

    Examples of Client/Server Connections

  • 8/3/2019 Informix Administrator Guide

    50/138

    1-24 INFORMIX-SE Administrators Guide

    Examples of Client/Server Connections

    Setting Up the valley Host Computer

    The user must set the INFORMIXDIR an d INFORMIXSERVER environmentvariables to the values shown in Figure 1-16.

    Figure 1-16Environment Variables and

    Required Settings

    The sqlexecd daemon m ust be running. To start the daemon, log in as rootand enter the following command :

    /usr/version7/informix/lib/sqlexecd valley_se

    For information about the sqlexecd daemon, refer to Starting the sqlexecdDaemon on page 1-35.

    Setting Up the Communication Files

    Each host computer (hilltop and valley) mu st contain an sqlhosts file thatinclud es connection information associated w ith the network interface and

    network p rotocol that you are u sing. Figure 1-17 shows the sqlhosts fileentries for d ifferent network interfaces.

    Figure 1-17Network Interfaces and Associated

    sqlhosts File Entries

    Environment Variable Value

    INFORMIXDIR / usr/ version7/ informix

    INFORMIXSERVER valley_se

    Network Interface sqlhosts File Entry

    Sockets on TCP/IP valley_se sesoctcp valley va lley_service

    TLI interface on TCP/IP valley_se setlitcp valley valley_service

    Examples of Client/Server Connections

  • 8/3/2019 Informix Administrator Guide

    51/138

    Installation and Initial Configuration 1-25

    Examples of Client/Server Connections

    When you u se a TCP/ IP network, the /etc/hosts file mu st contain an en try forthe valley compu ter and the /etc/services file must contain an en try forvalley_service.

    When the host comp uter uses the TLI network interface on an IPX/ SPX

    network, the hostname field contains the n ame of the NetWare file serverinstead of the compu ter host nam e. On the disp lay screens that are associated

    with the p reparat ion of the NetWare connections, the screen d isplays the

    NetWare file server in upp ercase letters; for example, NW_SVR. How ever, in

    the sqlhosts file, the name app ears in lowercase letters; for example, nw_svr.

    For an IPX/ SPX connection, the value in the servicename field can contain anarbitrary string, but that string mu st represent a un ique name am ong the

    nam es of services available on the IPX/ SPX network. In other words, you

    cannot use the string as a service name on any other file server on the

    network, even if that file server does not use an Informix produ ct. You can

    use the dbservername value in the servicename field, as shown in Figure 1-18,

    providing that the dbservername value exists as a un ique service nam e.

    Figure 1-18Using the dbservername Value

    in the servicename Field

    Affected Field sqlhosts File Entry

    servicename valley_se setlispx nw_svr valley_se

    Connecting with Different Versions

  • 8/3/2019 Informix Administrator Guide

    52/138

    1-26 INFORMIX-SE Administrators Guide

    Connecting with Different Versions

    Connecting with Different Versions

    This section shows h ow to connect an Informix Version 4.1 or Version 5.x

    client app lication to an Version 7.2 SE database server. You can connect the

    client and server comp onents in the following ways:

    s An Inform ix Version 4.1 or 5.x client ap plication conn ects directly to

    a local Version 7.2 SE database server.

    s An Inform ix Version 4.11 client ap plication connects to an Inform ix

    Version 7.2 database server u sing Version 4.11 INFORMIX-NET, withINFORMIX-SE or the Relay Module compon ent of an Informix

    Version 7.2 da tabase server.

    s An Informix Version 5.x client application connects to an Informix

    Version 7.2 database server using Version 5.x INFORMIX-NET withINFORMIX-SE, a Version 5.x Relay Modu le, or the Relay Modu le

    compon ent of an Informix Version 7.2 database server. For more

    information about using INFORMIX-NET with INFORMIX-SE or theINFORMIX-NET Relay Mod ule, refer to theINFORMIX-NET/

    INFORMIX-STARInstallation and Configuration Guide. For more infor-

    mation about u sing the Relay Modu le component of a Version 7.2 SE

    database server, refer to Local Connections with Version 4.11 or 5.x

    Client Applications below.

    Local Connect ions with Version 4. 11 or 5.x Client Applications

    Figure 1-19 shows a configu ration w ith an Informix Version 4.11 or 5.x client

    app lication connecting to a Version 7.2 SE database server:

    Figure 1-19Local Connection

    from a Version 4.11

    or 5.x ClientApplication to a

    Version 7.2Database Server

    Version 4.11 or 5.x

    ClientRelayModule

    Unnamed pipes

    local_se

    SE

    Version 7.2

    hilltop

    Version 7.2

    Connecting with Different Versions

  • 8/3/2019 Informix Administrator Guide

    53/138

    Installation and Initial Configuration 1-27

    Co ect g t e e t e s o s

    The Version 7.2 Relay Module, a component of Informix Version 7.2 database

    servers, is specifically designed to allow Inform ix Version 4.11 and 5.x client

    app lications to connect to an Informix Version 7.2 database server.

    For the configu ration in Figure 1-19, the user must set the INFORMIXDIR an d

    INFORMIXSERVER environm ent variables to the values show n in

    Figure 1-20.

    Figure 1-20Environment Variables and

    Required Settings

    You mu st set the SQLEXEC environment variable to the complete pathname

    of the executable file for the Version 7.2 Relay Modu le.

    Important: When you use unnamed pipes, the Informix Version 4.1 and 5.x clientapplication must reside in the same directory as the Informix Version 7.2 database

    server.

    The sqlhosts file must include the following entry:

    local_se seipcpip hilltop sqlexec

    The sqlhosts file belongs in th e $INFORMIXDIR/etc directory. For local

    connections, the /etc/hosts an d /etc/services files remain u naffected.

    Environment Variable Value

    INFORMIXDIR / usr/ informix

    INFORMIXSERVER local_se

    SQLEXEC / usr/ informix/ lib/ sqlrm

    Connecting with Different Versions

  • 8/3/2019 Informix Administrator Guide

    54/138

    1-28 INFORMIX-SE Administrators Guide

    g

    Network Connections with INFORMIX-NET

    You can connect from an Informix Version 5.x client to a remote Version 7.2SE database server using Version 5.x INFORMIX-NET. That configu ration also

    applies to an Informix Version 4.1 client connecting to an Informix

    Version 7.2 database server using Version 4.1 INFORMIX-NET, or an Informix

    Version 4.1 client connecting to an Informix Version 7.2 database server using

    Version 5.x INFORMIX-NET. Figure 1-21 shows the configuration using

    Version 5.x INFORMIX-NET.

    Setting Up the hilltop and valley Host Computers

    For the hilltop compu ter, set the INFORMIXDIR an d SQLEXEC environmentvariables to the values show n in Figure 1-22. For the valley compu ter, set theINFORMIXDIR environment variable to the value shown in Figure 1-22.

    Figure 1-22Environment Variables and

    Required Settings

    Figure 1-21A Remote Connection Using Version 5.x INFORMIX-NET

    Version 5.x

    Client

    SE

    Version 7.2

    sqlexecd

    hilltop

    valley_se

    Version 5.xINFORMIX-

    NET

    valley

    Version 7.2

    Host Computer Environment Variable Value

    hilltop INFORMIXDIR / usr/ informix

    hilltop SQLEXEC sqlexec

    valley INFORMIXDIR / usr/ version7/ informix

    Connecting with Different Versions

  • 8/3/2019 Informix Administrator Guide

    55/138

    Installation and Initial Configuration 1-29

    g

    The sqlexecd daemon m ust be running. To start the daemon, log in as rootand enter the following comm and :

    /usr/version7/informix/lib/sqlexecd valley_se

    For information about the sqlexecd daemon , refer to Starting the sqlexecdDaemon on page 1-35.

    Setting Up the Communication Files

    Each host computer (hilltop an d valley) must contain an sqlhosts file thatinclud es connection information associated w ith the netw ork interface and

    network p rotocol that you are u sing. Figure 1-23 shows the sqlhosts fileentries for d ifferent netw ork interfaces.

    Figure 1-23Network Interfaces and Associated

    sqlhosts File Entries

    For TCP/ IP connections, th e /etc/hosts file must contain an entry for thevalley host computer, and the /etc/services file must contain an en try forvalley_service.

    Do not confuse the servicename entry for a remote connection (as illustratedin Figure 1-21) with the servicename entry for a local connection (as illus-trated in Figure 1-19). For a local conn ection, the service name indicates the

    SE process as a pathn ame or a program n ame. For remote connections, the

    service name in the sqlhosts file points to an entry in the /etc/services file.

    Network Connections with 5.x INFORMIX-NET Relay Module

    Figure 1-24 shows an Informix Version 5.x client ap plication connecting to a

    remote Version 7.2 SE database server using the Version 5.x INFORMIX-NET

    Relay Modu le.

    Network Interface sqlhosts File Entry

    Sockets on TCP/IP valley_se sesoctcp valley valley_service

    TLI interface on TCP/IP valley_se setlitcp valley valley_service

    Connecting with Different Versions

  • 8/3/2019 Informix Administrator Guide

    56/138

    1-30 INFORMIX-SE Administrators Guide

    g

    Important: Informix does not provide a Relay M odule with Informix Version 4.1products.

    Setting Up the hilltop and valley Host Computers

    For the hilltop compu ter, set the INFORMIXDIR, SQLEXEC, and SQLRMDIR

    environm ent variables to the values shown in Figure 1-25. For the valleycompu ter, set the INFORMIXDIR environment variable to the value show n in

    Figure 1-25.

    Figure 1-25Environment Variables and Required Settings

    Figure 1-24A Remote Connection Using the Version 5.x

    INFORMIX-NET Relay Module

    Version 5.x

    Client

    SE

    Version 7.2

    sqlexecd

    valley_se

    Version 5.xINFORMIX-NET RelayModule

    Version 7.2

    hilltop valley

    Host Computer Environment Variable Value

    hilltop INFORMIXDIR / usr/ informix

    hilltop SQLEXEC sqlexec

    hilltop SQLRMDIR $INFORMIXDIR/ lib

    valley INFORMIXDIR / usr/ version7/ informix

    Connecting with Different Versions

  • 8/3/2019 Informix Administrator Guide

    57/138

    Installation and Initial Configuration 1-31

    The configu rations shown in Figure 1-21 an d Figure 1-24 do not u se the

    INFORMIXSERVER environm ent variable. Only Informix Version 6.0 and

    later p roducts use the INFORMIXSERVER environment variable. Because only

    Informix Version 5.x products reside on the client host compu ter (hilltop),

    you do not use INFORMIXSERVER.

    You mu st set the SQLRM environm ent variable for the hilltop computer.Figure 1-26 shows the SQLRM environm ent variable entry for d ifferent

    network interfaces.

    Figure 1-26SQLRM Environment Variable Entries

    The sqlexecd daemon m ust be running. To start the daemon, log in as rootand enter the following comm and :

    /usr/version7/informix/lib/sqlexecd valley_se

    For information about the sqlexecd daemon , refer to Starting the sqlexecd

    Daemon on page 1-35.

    Setting Up the Communication Files

    Each host computer (hilltop an d valley) must contain an sqlhosts file that

    includ es connection information tha t is associated w ith the netw ork interface

    and network p rotocol that you are using. Figure 1-27 shows the sqlhosts file

    entries for d ifferent netw ork interfaces.

    Network Interface SQLRM Envi ronment Variable Ent ry

    Sockets on TCP/IP sqlrmsoctcp

    TLI interface on TCP/IP sqlrmtlitcp

    Connecting with Different Versions

  • 8/3/2019 Informix Administrator Guide

    58/138

    1-32 INFORMIX-SE Administrators Guide

    Figure 1-27Network Interfaces and Associated

    sqlhosts File Entries

    The /etc/hosts file mu st contain an entry for the valley host comp uter, and the/etc/services file must contain an en try for valley_service.

    Network Connections with the Version 7. 2 Relay Module

    Figure 1-28 shows a configuration that connects an Informix Version 4.1 or

    5.x client application to a remote Informix Version 7.2 database server using

    the Version 7.2 Relay Modu le. When an Informix Version 4.11 client appli-

    cation connects to an Informix Version 7.2 database server, you use the

    configuration shown in Figure 1-28.

    Network Interface sqlhosts File Entry

    Sockets on TCP/IP valley_se sesoctcp valley valley_service

    TLI interface on TCP/IP valley_se setlitcp valley va lley_service

    TLI interface on IPX/SPX valley_se setlispx valley valley_service

    Figure 1-28

    A Remote Connection Using theVersion 7.2 Relay Module

    Version 4.11 or 5.x

    Client

    SE

    Version 7.2

    sqlexecd

    hilltop

    valley_se

    valley

    RelayModule

    SE orOnLine

    Version 7.2

    Version 7.2

    Version 7.2

    Connecting with Differen


Recommended