Getting Started IDS
Getting Started IDS
Toddler Pregnancy Acne Aerobics & Cardio Alternative Medicine Beauty Tips Depression Diabetes Exercise & Fitness Hair Loss Medicine Meditation Muscle Building & Bodybuilding Nutrition Nutritional Supplements Weight Loss Yoga Martial Arts Finding Happiness Inspirational Breast Cancer Mesothelioma & Cancer Fitness Equipment Nutritional Supplements Weight Loss
Affiliate Revenue Blogging, RSS & Feeds Domain Name E-Book E-commerce Email Marketing Ezine Marketing Ezine Publishing Forums & Boards Internet Marketing Online Auction Search Engine Optimization Spam Blocking Streaming Audio & Online Music Traffic Building Video Streaming Web Design Web Development Web Hosting Web Site Promotion Broadband Internet VOIP Computer Hardware Data Recovery & Backup Internet Security Software
Advertising Branding Business Management Business Ethics Careers, Jobs & Employment Customer Service Marketing Networking Network Marketing Pay-Per-Click Advertising Presentation Public Relations Sales Sales Management Sales Telemarketing Sales Training Small Business Strategic Planning Entrepreneur Negotiation Tips Team Building Top Quick Tips Book Marketing Leadership Positive Attitude Tips Goal Setting Innovation Success Time Management Public Speaking Get Organized - Organization
Credit Currency Trading Debt Consolidation Debt Relief Loan Insurance Investing Mortgage Refinance Personal Finance Real Estate Taxes Stocks & Mutual Fund Structured Settlements Leases & Leasing Wealth Building Home Security
Mobile & Cell Phone Video Conferencing Satellite TV Dating Relationships Game Casino & Gambling Humor & Entertainment Music & MP3 Photography Golf Attraction Motorcycle Fashion & Style Crafts & Hobbies Home Improvement Interior Design & Decorating Landscaping & Gardening Pets Marriage & Wedding Holiday Fishing Aviation & Flying Cruising & Sailing Outdoors Vacation Rental
Book Reviews College & University Psychology Science Articles Religion Personal Technology Humanities Language Philosophy Poetry Book Reviews Medicine Coaching Creativity Dealing with Grief & Loss Motivation Spirituality Stress Management Article Writing Writing Political Copywriting Parenting Divorce
Getting Started
1999 Informix Corporation. All rights reserved. The following are trademarks of Informix Corporation or its afliates, one or more of which may be registered in the United States or other jurisdictions: Answers OnLineTM; C-ISAM; Client SDKTM; DataBlade; Data DirectorTM; Decision FrontierTM; Dynamic Scalable ArchitectureTM; Dynamic ServerTM; Dynamic ServerTM, Developer EditionTM; Dynamic ServerTM with Advanced Decision Support OptionTM; Dynamic ServerTM with Extended Parallel OptionTM; Dynamic ServerTM with MetaCube; Dynamic ServerTM with Universal Data OptionTM; Dynamic ServerTM with Web Integration OptionTM; Dynamic ServerTM, Workgroup EditionTM; Dynamic Virtual MachineTM; Enterprise Decision ServerTM; FormationTM; Formation ArchitectTM; Formation Flow EngineTM; Gold Mine Data Access; IIF.2000TM; i.ReachTM; i.SellTM; Illustra; Informix; Informix 4GL; Informix InquireSM; Informix Internet Foundation.2000TM; InformixLink; Informix Red Brick Decision ServerTM; Informix Session ProxyTM; Informix VistaTM; InfoShelfTM; InterforumTM; I-SpyTM; MediazationTM; MetaCube; NewEraTM; ON-BarTM; OnLine Dynamic ServerTM; OnLine/Secure Dynamic ServerTM; OpenCase; OrcaTM; PaVERTM; Red Brick and Design; Red Brick Data MineTM; Red Brick Mine BuilderTM; Red Brick DecisionscapeTM; Red Brick ReadyTM; Red Brick Systems; Regency Support; Rely on Red BrickSM; RISQL; Solution DesignSM; STARindexTM; STARjoinTM; SuperView; TARGETindexTM; TARGETjoinTM; The Data Warehouse Company; The one with the smartest data wins.TM; The world is being digitized. Were indexing it.SM; Universal Data Warehouse BlueprintTM; Universal Database ComponentsTM; Universal Web ConnectTM; ViewPoint; VisionaryTM; Web Integration SuiteTM. The Informix logo is registered with the United States Patent and Trademark Ofce. The DataBlade logo is registered with the United States Patent and Trademark Ofce. Documentation Team: Linda Briscoe, Erin Cizina, Evelyn Eldridge, Signe Haugen, Judith Sherwood GOVERNMENT LICENSE RIGHTS Software and documentation acquired by or for the US Government are provided with rights as follows: (1) if for civilian agency use, with rights as restricted by vendors standard license, as prescribed in FAR 12.212; (2) if for Dept. of Defense use, with rights as restricted by vendors standard license, unless superseded by a negotiated vendor license, as prescribed in DFARS 227.7202. Any whole or partial reproduction of software or documentation marked with this legend must reproduce this legend.
Table of Contents
Table of Contents
Introduction
In This Introduction . . . . . . . . . . . . . About This Manual . . . . . . . . . . . . . . Types of Users . . . . . . . . . . . . . . Software Dependencies . . . . . . . . . . . Assumptions About Your Locale. . . . . . . . Demonstration Databases . . . . . . . . . . New Features . . . . . . . . . . . . . . . . Documentation Conventions . . . . . . . . . . Typographical Conventions . . . . . . . . . Icon Conventions . . . . . . . . . . . . . Additional Documentation . . . . . . . . . . . On-Line Manuals . . . . . . . . . . . . . Printed Manuals . . . . . . . . . . . . . On-Line Help . . . . . . . . . . . . . . Error Message Documentation . . . . . . . . Documentation Notes, Release Notes, Machine Notes Related Reading . . . . . . . . . . . . . Compliance with Industry Standards . . . . . . . Informix Welcomes Your Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 3 4 4 5 5 5 6 7 8 9 9 9 9 10 11 13 13
Chapter 1
Dynamic Scalable Architecture . . . . . The Shared-Memory Component . . . The Disk Component . . . . . . . The Virtual Processor Component . . . Architectural Elements of Dynamic Server . Client/Server Architecture . . . . . Scalability . . . . . . . . . . . High Performance . . . . . . . . Fault Tolerance and High Availability . Multimedia Support. . . . . . . . Dynamic System Administration . . . Distributed Databases and Transactions . Database Server Security . . . . . . Graphical Administration Tools. . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
1-6 1-7 1-8 1-9 1-10 1-10 1-13 1-14 1-17 1-21 1-22 1-22 1-24 1-25
Chapter 2
iv
Access Methods . . . . . . . . . . . . . Primary Access Methods . . . . . . . . Secondary Access Methods . . . . . . . . Writing Access Methods . . . . . . . . . Application Types . . . . . . . . . . . . OLTP Applications . . . . . . . . . . DSS Applications . . . . . . . . . . . Global Language Support . . . . . . . . . Other Database Server Features . . . . . . . Support for Long Identiers and User Names . Shared-Statement Caching . . . . . . . . Locking . . . . . . . . . . . . . . Isolation Level . . . . . . . . . . . . Transaction Logging . . . . . . . . . . Rolling Back Statements in a Transaction . . . Role Separation . . . . . . . . . . . . The Information Schema. . . . . . . . . Extending Dynamic Server . . . . . . . . . Extended Data Types . . . . . . . . . . Simple and Smart Large Objects . . . . . . User-Dened Routines and DataBlade Modules User-Dened Virtual Processors . . . . . . User-Dened Access Methods. . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
2-21 2-21 2-21 2-22 2-24 2-24 2-25 2-25 2-26 2-26 2-26 2-27 2-28 2-28 2-28 2-29 2-29 2-30 2-30 2-32 2-33 2-36 2-36
Chapter 3
Table of Contents
Conguring the SQL API Environment . . . . Creating a Database . . . . . . . . . . . Making the Initial Connection to a Database Server Creating a Demonstration Database . . . . . . Obtaining Error Message Information . . . . . Migrating to Dynamic Server . . . . . . . . Performing Standard Administrative Tasks . . . Monitoring Performance . . . . . . . . . Using Operating-System Tools . . . . . . Using Dynamic Server Utilities . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
3-19 3-19 3-20 3-20 3-21 3-21 3-21 3-22 3-23 3-24
Chapter 4
Index
vi
Introduction
Introduction
In This Introduction
. . . . . . .
. . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
3 3 3 4 4 5 5 5 6 7 7 7 8 8 9 9 9 9 10 11 12 12 13 13
About This Manual . . . . . . . Types of Users . . . . . . . Software Dependencies . . . . Assumptions About Your Locale . Demonstration Databases . . . New Features . . . . . . . . .
Documentation Conventions . . . . . Typographical Conventions . . . . Icon Conventions . . . . . . . . Comment Icons . . . . . . . Cross-Reference Icons . . . . . Feature, Product, and Platform Icons
Additional Documentation . . . . . . . . . . . On-Line Manuals . . . . . . . . . . . . . Printed Manuals . . . . . . . . . . . . . On-Line Help . . . . . . . . . . . . . . Error Message Documentation . . . . . . . . Documentation Notes, Release Notes, Machine Notes Related Reading . . . . . . . . . . . . . UNIX Manuals . . . . . . . . . . . . Windows NT Manuals . . . . . . . . . . Compliance with Industry Standards Informix Welcomes Your Comments . . . . . . . . . . . . . . .
In This Introduction
This introduction provides an overview of the information in this manual and describes the conventions it uses.
Types of Users
This manual is written for the following users:
I I I I
Database server administrators Database server operators Database administrators Programmers in the following categories
Database users
Introduction 3
Software Dependencies
A working knowledge of your computer, your operating system, and the utilities that your operating system provides Some experience working with relational databases or exposure to database concepts Some experience with computer programming Some experience with database server administration, operatingsystem administration, or network administration
I I
If you are unfamiliar with relational database concepts or SQL, review the Informix Guide to SQL: Tutorial and the Informix Guide to Database Design and Implementation. For additional titles, see Chapter 4, Using the Documentation.
Software Dependencies
This manual assumes that you are using Informix Dynamic Server 2000, Version 9.2, as your database server.
Demonstration Databases
Demonstration Databases
The DB-Access utility, which is provided with your Informix database server products, includes one or more of the following demonstration databases:
I
The stores_demo database illustrates a relational schema with information about a ctitious wholesale sporting-goods distributor. Many examples in Informix manuals are based on the stores_demo database. The superstores_demo database illustrates an object-relational schema. The superstores_demo database contains examples of extended data types, type and table inheritance, and user-dened routines.
For information about how to create and populate the demonstration databases, see the DB-Access Users Manual. For descriptions of the databases and their contents, see the Informix Guide to SQL: Reference. The scripts that you use to install the demonstration databases reside in the $INFORMIXDIR/bin directory on UNIX platforms and in the %INFORMIXDIR%\bin directory in Windows environments.
New Features
For a comprehensive list of new database server features, see the release notes.
Documentation Conventions
This section describes the conventions that this manual uses. These conventions make it easier to gather information from this and other volumes in the documentation set. The following conventions are discussed:
I I
Typographical Conventions
Typographical Conventions
This manual uses the following conventions to introduce new terms, illustrate screen displays, describe command syntax, and so forth.
Convention KEYWORD italics italics
italics
Meaning All primary elements in a programming language statement (keywords) appear in uppercase letters in a serif font. Within text, new terms and emphasized words appear in italics. Within syntax and code examples, variable values that you are to specify appear in italics. Names of program entities (such as classes, events, and tables), environment variables, le and pathnames, and interface elements (such as icons, menu items, and buttons) appear in boldface. Information that the product displays and information that you enter appear in a monospace typeface. Keys that you are to press appear in uppercase letters in a sans serif font. This symbol indicates the end of one or more product- or platform-specic paragraphs. This symbol indicates a menu item. For example, Choose ToolsOptions means choose the Options item from the Tools menu.
boldface boldface
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.
Icon Conventions
Icon Conventions
Throughout the documentation, you will nd text that is identied by several different types of icons. This section describes these icons.
Comment Icons
Comment icons identify three types of information, as the following table describes. This information always appears in italics.
Icon Label Description Identies paragraphs that contain vital instructions, cautions, or critical information
Warning:
Important:
Identies paragraphs that contain signicant information about the feature or operation that is being described Identies paragraphs that offer additional details or shortcuts for the functionality that is being described
Tip:
Cross-Reference Icons
Cross-reference icons indicate paragraphs that show where you can nd more information about a topic.
Icon Description Identies paragraphs that contain cross-references to other Informix manuals that provide additional information on a topic
Introduction 7
Additional Documentation
Description Identies information that relates to the Informix Global Language Support (GLS) feature Identies information that is specic to UNIX platforms Identies information that is specic to the Windows NT environment
UNIX
WIN NT
These icons can apply to an entire section or to one or more paragraphs within a section. If an icon appears next to a section heading, the information that applies to the indicated feature, product, or platform ends at the next heading at the same or higher level. A symbol indicates the end of feature-, product-, or platform-specic information that appears within one or more paragraphs within a section.
Additional Documentation
For additional information, you might want to refer to the following types of documentation:
I I I I I I
On-line manuals Printed manuals On-line help Error message documentation Documentation notes, release notes, and machine notes Related reading
For an overview of the manuals in the Dynamic Server documentation set, see Chapter 4, Using the Documentation.
On-Line Manuals
On-Line Manuals
An Answers OnLine CD that contains Informix manuals in electronic format
is provided with your Informix products. You can install the documentation or access it directly from the CD. For information about how to install, read, and print on-line manuals, see the installation insert that accompanies Answers OnLine. Informix on-line manuals are also available on the following Web site:
www.informix.com/answers
Printed Manuals
To order printed manuals, call 1-800-331-1763 or send email to [email protected]. Please provide the following information when you place your order:
I I I
The documentation that you need The quantity that you need Your name, address, and telephone number
WIN NT
On-Line Help
Informix provides on-line help with each graphical user interface (GUI) that displays information about those interfaces and the functions that they perform. Use the help facilities that each GUI provides to display the on-line help.
Introduction 9
UNIX
To read error messages and corrective actions on UNIX, use one of the following utilities.
Utility nderr rofferr Description Displays error messages on line Formats error messages for printing
WIN NT
To read error messages and corrective actions in Windows environments, use the Informix Find Error utility. To display this utility, choose StartProgramsInformix from the Task Bar. Instructions for using the preceding utilities are available in Answers OnLine. Answers OnLine also provides a listing of error messages and corrective actions in HTML format.
On UNIX platforms, the following on-line les appear in the $INFORMIXDIR/release/en_us/0333 directory.
On-Line File STARTDOC_9.2 Purpose The documentation notes le for your version of this manual describes topics that are not covered in the manual or that were modied since publication. The release notes le describes feature differences from earlier versions of Informix products and how these differences might affect current products. This le also contains information about any known problems and their workarounds. The machine notes le describes any special actions that you must take to congure and use Informix products on your computer. Machine notes are named for the product described.
SERVERS_9.2
IDS_9.2
Related Reading
WIN NT
The following items appear in the Informix folder. To display this folder, choose StartProgramsInformix from the Task Bar.
Program Group Item Documentation Notes Description This item includes additions or corrections to manuals, along with information about features that might not be covered in the manuals or that have been modied since publication. This item describes feature differences from earlier versions of Informix products and how these differences might affect current products. This le also contains information about any known problems and their workarounds.
Release Notes
Related Reading
The following publications provide additional information about the topics that this manual discusses. To learn more about Structured Query Language, consider the following books:
I
A Guide to the SQL Standard by C. J. Date with H. Darwen (AddisonWesley Publishing, 1997) Understanding the New SQL: A Complete Guide by J. Melton and A. Simon (Morgan Kaufmann Publishers, 1993)
For additional technical information on database management, consult the following books:
I
Object-Relational DBMSs: The Next Great Wave by Michael Stonebraker with Dorothy Moore (Morgan Kaufmann Publishers, Inc., 1996) An Introduction to Database Systems by C. J. Date (Addison-Wesley Publishing, 1995) Transaction Processing: Concepts and Techniques by Jim Gray and Andreas Reuter (Morgan Kaufmann Publishers, Inc., 1993)
Introduction 11
Related Reading
To learn more about fundamental concepts and approaches to database design, consult the following books:
I
Database Modeling and Design, The Entity-Relationship Approach by Toby J. Teorey (Morgan Kauffman Publishers, Inc., 1998) Handbook of Relational Database Design by Candace C. Fleming and Barbara von Halle (Addison-Wesley Publishing Company, 1989)
To learn more about database design for data warehousing, consider the following books:
I
The Data Warehouse Toolkit by Ralph Kimball (John Wiley & Sons, Inc., 1998) Building the Data Warehouse by W.H. Inmon (John Wiley & Sons, Inc., 1996)
UNIX
UNIX Manuals
This manual assumes that you are familiar with your computer operating system. If you have limited UNIX system experience, consult your operatingsystem manual or a good introductory text before you read this manual. The following texts provide a good introduction to UNIX systems:
I
Learning the UNIX Operating System by G. Todino, J. Strang, and J. Peek (OReilly & Associates, 1997) A Practical Guide to the UNIX System by M. Sobell (Benjamin/Cummings Publishing, 1994)
UNIX System V: A Practical Guide by M. Sobell (Benjamin/Cummings
Publishing, 1995)
WIN NT
Windows NT Manuals
This manual assumes that you are familiar with your computer operating system. If you have limited Windows NT experience, consult your operatingsystem manual or a good introductory text before you read this manual.
12
Hall, 1995)
I
(Prentice-Hall, 1994)
I
1996)
The name and version of the manual that you are using Any comments that you have about the manual Your name, address, and phone number
Send electronic mail to us at the following address: [email protected] The doc alias is reserved exclusively for reporting errors and omissions in our documentation. We appreciate your suggestions.
Introduction 13
Chapter
Overview of Database Management Systems . . . . Relational Database Management Systems . . . Object-Relational Database Management Systems . What Is Informix Dynamic Server? . Dynamic Scalable Architecture . . . The Shared-Memory Component The Disk Component. . . . . The Virtual Processor Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Architectural Elements of Dynamic Server. . . Client/Server Architecture . . . . . . . Supported Connection Types. . . . . Supported Network Connections . . . Supported Client/Server Congurations Scalability. . . . . . . . . . . . . High Performance . . . . . . . . . . Raw (Unbuffered) Disk Management . . Memory Management . . . . . . . Dynamic Thread Allocation . . . . . Fragmentation . . . . . . . . . . Parallelization . . . . . . . . . .
Fault Tolerance and High Availability . Storage Space Backups . . . . . Logical-Log Backups. . . . . . Fast Recovery . . . . . . . . Mirroring . . . . . . . . . High-Availability Data Replication . Point-in-Time Recovery. . . . . Multimedia Support . . . . . . . Dynamic System Administration . . . Distributed Databases and Transactions Two-Phase Commit . . . . . . Heterogeneous Commit . . . . Database Server Security . . . . . Graphical Administration Tools . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-17 1-18 1-18 1-18 1-19 1-20 1-21 1-21 1-22 1-22 1-23 1-23 1-24 1-25
1-2
In This Chapter
This chapter introduces relational database management systems and Informix Dynamic Server 2000 architecture. For information about specic features, see Chapter 2, Informix Dynamic Server Features. For information about supported Informix products and client applications, see Tools and Client Products on page 3-4. For complete details of Dynamic Server architecture, see the Administrators Guide and Administrators Reference.
File systems Relational database management systems (RDBMS) Object-oriented database management system (OODBMS) Object-relational database management systems (ORDBMS)
Each system has its own strengths that make it appropriate for particular classes of data-management problems.
Queries
Object-relational database management system (ORDBMS) Object-oriented database management system (OODBMS)
No queries
Simple data
Complex data
Although le systems, video servers, and object-oriented database management systems provide solutions to business applications that do not require query capabilities, this manual concentrates on relational database management systems and object-relational database management systems. An RDBMS or ORDBMS includes all the software you need to create and maintain a relational database, which consists of tables that are made up of rows and columns. An Informix RDBMS includes the following components:
I I I
For information about relational and object-relational database design and management, see the Informix Guide to Database Design and Implementation and the Informix Guide to SQL: Tutorial. For information about supported data types, see the Informix Guide to SQL: Reference. To work with the sample relational and object-relational demonstration databases, see the DB-Access Users Manual.
1-4
Integer Floating-point number Character string, xed or variable length Date and time, time interval Numeric and decimal
Some relational database management systems provide limited support for complex data, which is stored in simple large objects (TEXT and BYTE data types). However, simple large objects cannot be indexed, searched, or manipulated within the database server.
A small number of database server processes can service a large number of client application processes, with the following benets:
Reduced operating-system overhead (fewer processes to run) Reduced overall memory requirements Reduced contention for resources within the DBMS
1-6
For more information on the terms and concepts discussed in this section, see the Administrators Guide and the Administrators Reference.
To reduce memory use and disk I/O To perform high-speed communication between processes To enable virtual processors and utilities to share data To provide a fast communications channel for local client applications that use IPC communication
Shared memory lets the database server reduce overall memory uses because the participating processesin this case, virtual processorsdo not need to maintain individual copies of the data that is in shared memory. Shared memory reduces disk I/O because buffers, which are managed as a common pool, are ushed on a database server-wide basis instead of on a per-process basis. Furthermore, a virtual processor can often avoid reading data from disk because the data is already in shared memory as a result of an earlier read operation. The reduction in disk I/O reduces execution time. Shared memory provides the fastest method of interprocess communication because processes read and write messages at the speed of memory transfers.
Resident Caches data from the disk for faster access Virtual Maintains and controls the resources required by the virtual processors
Buffered Unbuffered
The database server uses the following physical units to manage disk space:
I I I I
Overlying the physical units of storage space, the database server supports the following logical units that are associated with database management:
I I I I I I
1-8
The database server maintains the following additional disk-space storage structures to ensure physical and logical data consistency:
I I I
UNIX
The UNIX operating system provides two distinct types of disk space: raw and cooked. The database server allows you to use either type of disk space or a combination of both types.
I
Raw disk space is unformatted space where the database server manages the physical organization of the data. Raw les are more reliable than cooked les because the database server guarantees that committed data is stored on disk. Cooked disk space refers to regular operating-system les. It is space that has already been organized and that the UNIX operating system manages. Cooked les are easier to allocate than raw disk space.
Client/server architecture (page 1-10) Scalability (page 1-12) High performance (page 1-13) Fault tolerance and high availability (page 1-17) Multimedia support (page 1-21) Dynamic system administration (page 1-22) Distributed databases and transactions (page 1-22) Database server security (page 1-24) Graphical administration tools (page 1-24)
Client/Server Architecture
Informix client applications and database servers conform to a model of software design called client/server. Client/server functionality handles all the connections between the client application and the database server. You can put a client on one computer and the database server on another or the same computer. A network protocol governs how data is transferred between database servers and between a client and a database server. A client is an application program that a user runs to request or modify information from a database by issuing Structured Query Language (SQL) statements. For example, the following Informix tools are client programs:
I I I
DB-Access
1-10
Client/Server Architecture
Informix clients are briey described in Tools and Client Products on page 3-4. You can also write your own client programs with Informix ESQL/C, C++, Java, and so on, using an application-programming interface (API) that is included with products such as INFORMIX-4GL and the Informix Client Software Developers Kit. For details, see your API documentation. Dynamic Server accepts requests for data from client applications, accesses the requested information from its databases, and returns the results to the client. Database-access activities include coordination of concurrent requests from multiple clients, read and write operations, and enforcement of physical and logical data consistency. When a client connects to the database server, the client transparently accesses sqlhosts connectivity information that is contained in a le on UNIX or in the Windows NT registry. (See Connectivity Information on UNIX on page 3-14.) The communications tools that are part of all Informix products handle the tasks of locating and attaching to the database servers. To a client application, a database on a networked computer appears no different than a database on the computer where the application resides. For information about how to dene sqlhosts connectivity information, see the Administrators Guide. For information on the SQL statements that the database server supports, see the Informix Guide to SQL: Syntax. For detailed instruction in how to use an SQL API, see the appropriate programmers manual, as listed in Chapter 4, Using the Documentation.
Client/Server Architecture
Dynamic Server supports the following types of connections to communicate between client applications and database servers.
UNIX Connection Type Sockets
TLI (transport layer interface)
NT Local Network
Local
Network
For more information about supported connectivity protocols for your operating system, read the machine notes le on UNIX. For information on how to set up local and network connections for Informix database servers and client applications, see the Administrators Guide.
For more information about the network connections that the database server supports, see the Administrators Guide.
1-12
Scalability
Scalability
Dynamic Server lets you scale resources in relation to the demands that applications place on the database server. Dynamic scalable architecture provides the following performance advantages for both single-processor and multiprocessor platforms:
I
Reduced operating-system overhead (fewer processes to run) Reduced overall memory requirements Reduced contention for resources within the RDBMS
database tasks than the operating system does. Dynamic Server employs single-processor or symmetric multiprocessor computer systems. In an SMP computer system, multiple CPUs or processors all run a single copy of the operating system, sharing memory and communicating with each other as necessary. For detailed information on dynamic scalable architecture, see the Administrators Guide. For information on performance tuning, see your Performance Guide.
High Performance
High Performance
Dynamic Server achieves high performance through the following mechanisms:
I I I I I
Raw (unbuffered) disk management Memory management Dynamic thread allocation Fragmentation Parallelization
No restrictions because of operating-system limits on the number of tables that can be accessed concurrently Optimization of table access by guaranteeing that rows are stored contiguously Elimination of operating-system I/O overhead by performing direct data transfer between disk and shared memory
If these issues are not a primary concern, you can congure the database server to use regular operating-system les to store data. In this case, Dynamic Server manages the le contents, but the operating system manages the I/O. For information on disk management, see the Administrators Guide.
1-14
High Performance
Memory Management
Dynamic Server provides two main options to help you manage memory to optimize performance.
Buffering Transactions
You can determine how the database server logs transactions. Your logs can be buffered or unbuffered. Buffered logging holds transactions in memory until the buffer is full, regardless of when the transaction is committed. For information on managing the various aspects of memory to increase performance, see your Performance Guide.
High Performance
Fragmentation
Dynamic Server supports table and index fragmentation over multiple disks. Fragmentation lets you group rows within a table according to a distribution scheme. Fragmentation improves performance on large databases. The database server stores the rows in separate database spaces (dbspaces) that you specify in a fragmentation strategy. A dbspace is a logical collection of one or more database server chunks. Chunks represent specic regions of disk space. Dynamic Server supports the following distribution schemes:
I
Round-robin fragmentation places rows one after another in fragments, rotating through the series of fragments to distribute the rows evenly. Expression-based fragmentation puts rows that contain specied values in the same fragment. You specify a fragmentation expression that denes criteria for assigning a set of rows to each fragment, either as a range rule or some arbitrary rule.
For information on the different fragmentation strategies Dynamic Server supports, see the Informix Guide to Database Design and Implementation. For information about how to formulate a fragmentation strategy to enhance database performance, see your Performance Guide. For information about the CREATE TABLE and CREATE INDEX statements, see the Informix Guide to SQL: Syntax.
1-16
Parallelization
Dynamic Server can allocate multiple threads to work in parallel on a single query. This feature is known as parallel database query (PDQ).
PDQ can improve performance dramatically when the database server processes queries that are initiated by decision-support applications. PDQ
lets the database server distribute the work for one aspect of a query among several processors. For information on how to implement PDQ and how parallelization can enhance performance, see your Performance Guide. For information on the SET PDQPRIORITY environment variable, see the Informix Guide to SQL: Reference.
Storage space backups Logical-log backups Fast recovery Mirroring High-availability data replication Point-in-time recovery
For information on fault tolerance and high availability, see the Administrators Guide. Dynamic Server also includes Enterprise Replication, which allows you to replicate information from one database table to a database table on another database server. However, Enterprise Replication is explicitly designed to allow sporadic connections between database servers, which makes it unsuitable for protecting data integrity.
Logical-Log Backups
The database server also lets you store changes to the database server and data since the backup was performed. The changes are stored in logical-log les. You can create backup tapes and logical-log backup tapes while users are accessing the database server. You can also use on-line archiving to create incremental backups. Incremental backups let you back up only data that has changed since the last backup, which reduces the amount of time that a backup would otherwise require. For information about logical and physical logs, see the Administrators Guide. Logical-log record formats are discussed in the Administrators Reference.
Fast Recovery
When the database server starts up, it checks the physical log, which contains pages that have not yet been written to disk. If the physical log is empty, that implies that the database server was shut down in a controlled fashion. If the physical log is not empty, Dynamic Server automatically performs an operation called fast recovery.
1-18
Fast recovery automatically restores Dynamic Server databases to a state of physical and logical consistency after a system failure that might have left one or more transactions uncommitted. During fast recovery, the database server uses its logical log and physical log to perform the following operations:
I I I
Restore the databases to their state at the last checkpoint Roll forward all committed transactions since the last checkpoint Roll back any uncommitted transactions
Mirroring
When you use disk mirroring, the database server writes each piece of data to two locations. Mirroring eliminates data losses that result from media failures. If mirrored data becomes unavailable for any reason, the mirror of the data is made available immediately and transparently to users. Mirroring is a strategy that pairs a primary chunk of one dened dbspace with an equal-sized mirrored chunk. Every write to the primary chunk is automatically accompanied by an identical write to the mirrored chunk. If a failure occurs on the primary chunk, mirroring lets you read from and write to the mirrored chunk until you can recover the primary chunk, all without interrupting user access to data. Ideally, you should mirror all of your data. However, if cost is a problem, you should select certain critical chunks to mirror. For example:
I
The root chunk contains critical information and should always be mirrored. Logical-log les contain critical information and should always be mirrored. Frequently queried data should be mirrored, if possible, because mirroring improves performance.
The operating system or hardware that you use might provide an alternative form of mirroring. If you consider a mirroring option provided by your operating system instead of by the database server, compare the implementation of both options before you decide which to use. Operating-system mirroring options that do not use parallel mirror writes and split reads (reads from both the primary disk and the mirror disk) might provide inferior performance to mirroring by the database server. Database server mirroring and operating-system mirroring run independently and can run at the same time. For example, you might have both database server data and nondatabase server data on a single disk drive. You could use operating-system mirroring to mirror the nondatabase server data and database server mirroring to mirror the database server data. Logical-volume managers and hardware mirroring are other alternative mirroring solutions. Saving data to more than two disks with logical-volume managers gives you added protection from media failure, but the additional writes have a performance cost. Hardware mirroring such as RAID (redundant array of independent disks) has the advantage of requiring less disk space to store the same amount of data than does Informix database server mirroring, but it is slower for write operations. For information about mirroring, see the Administrators Guide.
1-20
Multimedia Support
Point-in-Time Recovery
Use point-in-time recovery after a catastrophic event to restore the data in a database to a specic time, perhaps immediately preceding the catastrophic event. A point-in-time recovery can undo mistakes, such as dropping a table, that might not be xable otherwise. When you restore the database server to a specic time, some transactions might be lost even though they are included in an existing logical-log backup. Because you can only restore the database server to the last known global point of consistency across all database servers, you cannot retrieve transactions that were committed after the specied recovery point. For information about point-in-time recovery and data restoration, see the Archive and Backup Guide if you use ON-Archive, or the Backup and Restore Guide if you use ON-Bar.
Multimedia Support
Dynamic Server supports simple large objects (TEXT and BYTE data types) and smart large objects (BLOB and CLOB data types) that place no practical limit on the size of the stored data item or object. This type of data is stored either with other database data or in specially designated portions of the disk called blobspaces (for TEXT and BYTE) and sbspaces (for BLOB and CLOB). For information about supported data types and how to use them, see the Informix Guide to SQL: Reference and the Informix Guide to Database Design and Implementation. For information about storing TEXT and BYTE data on writeonce-read-many (WORM) optical devices with Dynamic Server, see the Guide to the Optical Subsystem. For information about additional multimedia data types such as image, audio, video, and user dened, see the related DataBlade module documentation.
Asynchronous I/O Decision support Available disk space Efcient partitioning schemes
The database server provides various administration tools to help you perform these tasks. Tools include the system-monitoring interface (SMI), memory grant manager, and onperf utility. For information on SMI, see the Administrators Reference. For information on the memory grant manager and the onperf utility, see your Performance Guide.
Local data can be kept where it is more easily maintained and is more frequently used. Data from remote sites is available to all users.
Dynamic Server lets you perform transactions on data from databases that reside on different database servers connected across a network. The database server supports two multiphase protocols, two-phase commit and heterogeneous commit, to process transactions that span multiple database servers.
1-22
Two-Phase Commit
A two-phase commit protocol ensures that transactions are uniformly committed or rolled back across the multiple database servers. This protocol governs the order in which a two-phase commit transaction is performed and provides an automatic recovery mechanism in case a system or media failure occurs during execution of the transaction. A database server automatically uses the two-phase commit protocol for any transaction that performs modications to data on more than one database server. The database server uses logical-log records to implement the twophase commit protocol. You can use these logical-log records to detect heuristic decisions and, if necessary, to help you perform a manual recovery.
Heterogeneous Commit
In the context of Informix database servers, the term heterogeneous environment refers to a group of database servers in which at least one is not an Informix database server. Heterogeneous commit is a database server feature that ensures the all-or-nothing basis of distributed transactions in a heterogeneous environment. Unlike the two-phase commit protocol, the heterogeneous commit protocol supports the participation of a non-Informix participant. The non-Informix participant, called a gateway participant, must communicate with the coordinator through an Informix Enterprise Gateway product. For information about two-phase commit and heterogeneous commit protocols and concepts and the use of logical-log records in distributed databases and transactions, see the Administrators Guide. For information about a specic Informix Enterprise Gateway product, see the appropriate Enterprise Gateway User Manual.
The databases and tables that the database server manages enforce access based on a set of database and table privileges. You can use the following SQL statements to manage these privileges:
I
Use the GRANT and REVOKE statements to give or deny access to a database or specic tables and to control the kinds of database uses. Use the CREATE PROCEDURE statement to write and compile a stored procedure that controls and monitors access to tables. Use the CREATE VIEW statement to prepare a restricted or modied view of the data. Combine the GRANT and CREATE VIEW statements to precisely control the parts of a table that a user can modify. Use the CREATE ROLE statement to set up classications with privileges on database objects granted to a specic role.
Dynamic Server also lets you audit database events on a database serverwide basis. Auditing allows you to track which users performed specic actions to particular objects at distinct times. You can use this information to monitor database activity for suspicious use, deter unscrupulous users, or even act as evidence of database server abuse.
UNIX
Informix database servers follow UNIX security requirements for making connections. Thus, the UNIX system administrator might need to make modications to the /etc/passwd, /etc/hosts, ~/.rhosts, and other related les. For information about database and table privileges, and controlling access to databases, see the Informix Guide to Database Design and Implementation. For the syntax and description of SQL statements, see the Informix Guide to SQL: Syntax. For information on auditing, see the Trusted Facility Manual.
1-24
onperf performance utility The onperf utility displays database server activity. The onperf utility allows you to monitor most of the same metrics that onstat reports.
WIN NT
I I
For information about onperf, see your Performance Guide. For information about Windows NT interfaces and Web-based interfaces that you can use to administer Dynamic Server on both UNIX and Windows NT platforms, see the documentation notes that are described in Documentation Notes, Release Notes, Machine Notes on page -10 of the introduction.
Chapter
RDBMS Features . . . . . . . Structured Query Language (SQL) Stored Procedure Language (SPL) System Catalog . . . . . . . Data Types . . . . . . . .
Data-Management Features . . . . . . Data Replication . . . . . . . . High-Availability Data Replication. Enterprise Replication . . . . . Cost-Based Optimizer . . . . . . High-Performance Loader . . . . . Database Server Utilities . . . . .
Data-Recovery and Data-Restore Features . . . . The ontape Utility . . . . . . . . . . . On-Line Archive Recovery System (ON-Archive) On-Line Backup and Restore (ON-Bar) . . . Informix Storage Manager . . . . . . . . Tools That You Cannot Use for Recovery . . .
Database Support . . . . . . . . . . . . . . ANSI-Compliant Databases . . . . . . . . . Distributed Databases . . . . . . . . . . . Databases Distributed Across Multiple Vendor Servers Dimensional Databases . . . . . . . . . . . Object-Relational Databases . . . . . . . . . Extensibility . . . . . . . . . . . . . Inheritance . . . . . . . . . . . . . .
Access Methods . . . . . . . . . . . . Primary Access Methods . . . . . . . Secondary Access Methods . . . . . . . Generic B-Tree Indexes . . . . . . . R-Tree Indexes . . . . . . . . . . Writing Access Methods . . . . . . . . R-Tree Access Methods . . . . . . . User-Dened Primary Access Methods . User-Dened Secondary Access Methods
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
2-21 2-21 2-21 2-22 2-22 2-22 2-23 2-23 2-24 2-24 2-24 2-25 2-25 2-26 2-26 2-26 2-27 2-28 2-28 2-28 2-29 2-29 2-30 2-30 2-30 2-31 2-32 2-32 2-33 2-33 2-34 2-35 2-36 2-36 2-36
Other Database Server Features . . . . . . Support for Long Identiers and User Names Shared-Statement Caching . . . . . . . Locking . . . . . . . . . . . . . Isolation Level . . . . . . . . . . . Transaction Logging . . . . . . . . . Rolling Back Statements in a Transaction . . Role Separation . . . . . . . . . . . The Information Schema. . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Extending Dynamic Server . . . . . . . . . Extended Data Types . . . . . . . . . . User-Dened Data Types . . . . . . . Complex Data Types. . . . . . . . . Simple and Smart Large Objects . . . . . . Simple Large Objects . . . . . . . . Smart Large Objects and Sbspaces . . . . User-Dened Routines and DataBlade Modules User-Dened Routines . . . . . . . . DataBlade Modules . . . . . . . . . User-Dened Aggregates . . . . . . . User-Dened Virtual Processors . . . . . . User-Dened Access Methods . . . . . . .
2-2
In This Chapter
This chapter provides an overview of relational database management features and touches on the signicant features of Dynamic Server. For more information about the database server features discussed in this chapter, see the Administrators Guide and Administrators Reference. For a glossary of terms that are used in this and other Informix manuals, see the Informix Guide to SQL: Reference.
RDBMS Features
As outlined in Chapter 1, Informix Dynamic Server Architecture, an Informix ORDBMS consists of a database server, a database, and one or more client applications. This chapter discusses the database and database server components. For information on client applications, see Tools and Client Products on page 3-4.
ESQL/C is an SQL API that lets you embed SQL statements directly into a C program. DB-Access lets you execute SQL statements interactively.
The client application interacts with you, prepares and formats data, and sends data requests to the database server. The database server interprets the requests, manages the database, and returns data to the client application. You can write programs that exchange data with the database server. You can also write programs that take data from any source in any format, prepare it, and insert it into the database. For information about database management, see the Informix Guide to Database Design and Implementation. For information about how to create and use SQL, see the Informix Guide to SQL: Tutorial and the Informix Guide to SQL: Syntax. For information about embedded SQL, see the Informix ESQL/C Programmers Manual. For information about using SQL interactively and practicing SQL statements with the demonstration databases, see the DB-Access Users Manual and the
Informix ESQL/C Programmers Manual.
2-4
System Catalog
For information on how to create and use SPL routines, see the Informix Guide to SQL: Tutorial. For the syntax diagrams of SPL statements, see the Informix Guide to SQL: Syntax. For the performance aspects, see your Performance Guide.
System Catalog
The system catalog consists of tables that describe the structure of the database. The database server automatically generates the system catalog tables when you create a database. Each system catalog table contains specic information about an element in the database. You can query the system catalog tables as you would query any other table in the database. System catalog tables track the following objects:
I I I I I I I I I I
Tables and constraints Views Triggers Authorized users and privileges User-dened routines Data types Casts Access methods and operator classes User-dened routines Inheritance relationships
For information about the structure, contents, and use of the system catalog, see the Informix Guide to SQL: Reference.
Data Types
Data Types
Every column in a table in an object-relational database is assigned a data type, which precisely denes the kinds of values that you can store in that column. Dynamic Server supports the built-in and extended data types that Figure 2-1 shows.
Figure 2-1 Overview of Supported Data Types
Data types
Numeric Character
Collection
Row
Distinct
Opaque
The database server uses casts to perform data conversion between values of two different data types. For more information on extensibility, see Extending Dynamic Server on page 2-29. For a description of the data types and data type conversions that Informix database servers support, see the Informix Guide to SQL: Reference. For information about choosing data types for your relational or object-relational database, see the Informix Guide to Database Design and Implementation. For information on how to extend existing data types, create new casts, and dene new data types for an Dynamic Server database, see Extending Informix Dynamic Server 2000 and Informix Guide to Database Design and Implementation.
2-6
Data-Management Features
Data-Management Features
Dynamic Server includes the following data management tools and utilities:
I I I I
Data Replication
Data replication is the process of representing database objects at more than one distinct site. For example, one way to replicate data is to copy a database to a database server installed on a different computer. This copy allows reports to access the data without disturbing client applications that use the original database. Dynamic Server supports two kinds of data replication:
I I
Clients at the site to which the data is replicated experience improved performance because those clients can access data locally rather than connecting to a remote database server over a network. Clients at all sites experience improved availability of replicated data. If the local copy of the replicated data is unavailable, clients can still access the remote copy of the data.
These advantages do not come without a cost. Data replication obviously requires more storage, and updating replicated data can take more processing time than updating a single object.
Data Replication
Enterprise Replication
Enterprise Replication provides a cost-effective, efcient means to replicate data at the table level throughout an open-systems enterprise. Use Enterprise Replication to replicate a table or subset of a table (such as a set of rows or columns) to other databases in your enterprise. Enterprise Replication is a client/server application that lets you replicate data asynchronously between an unlimited number of database servers and between heterogeneous hardware platforms throughout your enterprise, including UNIX and Windows NT. A graphical user interface (GUI) helps you dene, monitor, and control your replication system. The key advantages of Enterprise Replication are as follows:
I
High performance Log-based transaction capture and a parallel distribution mechanism ensure that the replication system does not burden the database server and that it uses networks efciently.
Consistent information delivery Enterprise Replication stores transactions and implements conict resolution to maintain consistency and ordering of the data.
Flexible architecture Enterprise Replication supports a full range of ownership models to meet a wide spectrum of business and application requirements.
Centralized administration A single integrated point of administration lets the DBA graphically congure and monitor the replicated system.
2-8
Cost-Based Optimizer
Heterogeneous data-source support Enterprise Replication provides replication between Dynamic Servers on heterogeneous platforms.
Asynchronous data delivery Enterprise Replication saves the data that should be replicated in a queue. This allows Enterprise Replication to replicate data between servers that might not be continuously connected. When a connection is made, Enterprise Replication sends the data in the queue to the receiving database server.
For more information about Enterprise Replication, see the Guide to Informix Enterprise Replication.
Cost-Based Optimizer
Before a query is executed, the query optimizer formulates an execution plan based on the lowest resource-use cost to fetch the data rows that are required to process a query. The optimizer evaluates the different ways in which a query might be performed. For example, the optimizer determines whether one or multiple indexes should be used. If the query involves multiple tables (or multiple database servers), the optimizer determines how each table should be queried and the order in which the tables should be evaluated. The optimizer assesses each query plan on a cost basis and selects the plan with the lowest execution cost. For more information on the cost-based optimizer, see your Performance Guide.
High-Performance Loader
The High-Performance Loader (HPL) lets you efciently load and unload large quantities of data to or from an Informix database. Use the HPL to exchange data with tapes, data les, and programs and to convert data from these sources into a format compatible with an Informix database. The HPL also lets you manipulate and lter the data as you perform load and unload operations.
The ipload utility (a Motif GUI) The onpload utility The onpload database
The HPL supports ASCII, multibyte, COBOL, and binary input data. You can add custom drivers to support other data types. The HPL can load and unload data that has a different GLS locale than that of the database server. The client/server architecture of the HPL lets you use a graphical user interface on any computer on your network. You can load data from or unload data to les, tapes, or application pipes, or to any combination of these three device types. The HPL provides context-sensitive on-line help. Any database server on your network can access the onpload database, which allows centralized management of your load and unload controls.
I I
For complete details of how to access and use the HPL, including tutorial examples that take you through the process of loading and unloading data, see the Guide to the High-Performance Loader.
2-10
Utility dbschema
Use Create a le that contains the SQL statements needed to replicate a specied table, view, or database, or view the Information Schema
onaudit oncheck
Manage audit masks and auditing cong- Trusted Facility Manual urations Check specied disk structures for inconsistencies, repair inconsistent index structures, and display information about disk structures Change the logging mode Bring the database server on-line Load data that was created with onunload into the database server Display the contents of logical-log les Change the database server operating mode and perform various other operations on shared memory, sessions, transactions, parameters, and segments Modify the conguration of logical logs or physical logs Monitor database server performance Administrators Reference
Administrators Reference Administrators Reference Informix Migration Guide Administrators Reference Administrators Reference
onparams onperf
Administrators Reference Performance Guide Trusted Facility Manual Administrators Reference Administrators Reference Administrators Reference Archive and Backup Guide Informix Migration Guide (2 of 2)
onshowaudit Extract information from an audit trail onspaces onstat ontape Modify blobspaces or dbspaces Monitor the operation of the database server Log, archive, and restore data as outlined in The ontape Utility on page 2-12 Unload data from the database server
onunload
Tip: All Informix command-line utilities support the -V option that displays the software version and serial numbers.
UNIX
I I I
An archive is a copy of one or more database server dbspaces (database spaces) and any supporting data that you might need to restore them. A logical-log backup is a copy to tape or disk of logical-log les that have become full and eligible for backup. The logical-log les store a record of database server activity that occurs between archives. A restore re-creates data, particularly dbspaces, from an archive and backed-up logical-log les. You must restore the data in two operations:
A physical restore of dbspace or blobspace data from an archive A logical restore that accesses a logical-log backup to re-create in the restored dbspaces any transactions that were generated after the archive
For more information about these and other terms, see the Administrators Guide and the Glossary in the Informix Guide to SQL: Reference. For a list of differences between ontape and ON-Archive, see the Archive and Backup Guide.
2-12
Archive data that the database server manages Change database-logging status Back up logical-log les Start continuous logical-log le backups Restore data from an archive tape Use data replication
The ontape utility is interactive and, when necessary, prompts you to mount new tapes or to provide input. On UNIX platforms, you must be logged in as user root or user informix to execute ontape. On Windows NT platforms, you must be a member of the Informix-Admin group. Important: Do not start ontape in background mode (that is, using the UNIX ampersand (&) operator on the command line), because you might miss prompts and delay an operation. For information about the ontape utility, see the Administrators Reference.
UNIX
Scheduling and tracking of archives and backups Tape reliability and storage options Multiple ways of securing data and access to ON-Archive Use of multiple tape drives simultaneously for archives and restores Unattended operations Disaster provision
Devices to write to and read from Media to store the archive or backup data
Important: The archive tapes and logical-log backups produced by ontape and ON-Archive are not compatible. You cannot create an archive or logical-log backup with ontape and restore it with ON-Archive or vice versa. For information about ON-Archive, see the Archive and Backup Guide. For a detailed example of how to use ON-Archive, see the ON-Archive Quick Start Guide.
logs. To prevent performance problems caused by overfull logical-log space, you can have logical logs backed up automatically as soon as they ll. You can schedule backups of dbspaces appropriately as insurance against system failure.
ON-Bar uses the X/Open Backup Services Application Programmers Interface (XBSA). It connects to either the Informix Storage Manager or another XBSA-compliant storage manager that provides device and storage
management functionality. To recover data, you rst restore the backup copy of the data and then restore the logical logs to bring data as close as possible to the most recent state. You can activate the archecker utility from ON-Bar to check the validity and completeness of the objects that ON-Bar backs up before you use the objects to restore dbspaces. For complete information about ON-Bar, see the Backup and Restore Guide.
2-14
The ISM server, which backup and recovery information between storage devices and ON-Bar The ISM administrator program, which congures and manages the ISM server, storage media, and storage devices The ISM catalog, which maintains up-to-date records of the backup operations that have been performed and the media on which the backed-up data is stored
Provide complete media management for all ON-Bar backups and restores Track the location of all backup data and move backup data through a managed life cycle Provide complete disaster-recovery protection for a database server
For information about how to congure and use ISM, see the Informix Storage Manager Administrators Guide.
Database Support
For information about data-migration utilities, see the Informix Migration Guide.
Database Support
Dynamic Server supports the following types of databases:
I I I I I
ANSI compliant
ANSI-Compliant Databases
Dynamic Server supports ANSI-compliant databases. An ANSI-compliant database enforces ANSI requirements, such as implicit transactions and required ownership, that are not enforced in databases that are not ANSI compliant. You must decide whether you want any of the databases to be ANSI compliant before you connect to a database server. ANSI-compliant databases and databases that are not ANSI-compliant differ in the following areas:
I I I I I I I I I
Transaction processing Transaction logging Owner naming Privileges on and access to objects Default isolation level Character and decimal data types Escape characters Cursor behavior
SQLCODE of the SQL Communications Area (SQLCA)
2-16
Distributed Databases
I I I I
For information about ANSI-compliant databases, see the Informix Guide to Database Design and Implementation and the Informix Guide to SQL set of manuals.
Distributed Databases
Dynamic Server provides distributed database processing capabilities that let you query and update more than one database across multiple database servers within a single transaction. A transaction is a collection of SQL statements that is treated as a single unit of work. A distributed database has information in several databases. The data can be maintained by a variety of database servers and located on computers that use different operating systems and communication networks. Figure 2-2 shows the conguration of a distributed database, which includes databases maintained by multiple Informix database servers.
Distributed database Colombia Dynamic1 User Peru Client Dynamic2
custno custname 2234 GRAHAM 2235 BSAVID custno custname 1234 FJOHNS 1235 SPORTIA
Database A
Figure 2-2 Conguration of a Distributed Database with Multiple Instances of Database Servers
Database C
Distributed databases are useful because operations that use databases are often distributed into separate pieces, either organizationally, geographically, or both. A distributed database provides the following advantages:
I
Local data can be kept where it is most easily maintained and most frequently used. Data from remote sites is available to all users. Duplicate copies can be maintained in case one database server fails.
I I
Management of the distributed database server is more involved than management of a single-host system. Network access is often slower than local access.
For information on transaction concepts, see the Informix Guide to SQL: Tutorial.
UNIX
communication between a third-party transaction manager and Informix Dynamic Server. You can use Informix database servers with the TP/XA library to create global transactions that span multiple computers and even multiple XA-compliant database servers from different vendors. TP/XA lets you use databasemanagement systems from multiple vendors to store and access your data. You might want to use the TP/XA feature when your database environment has the following characteristics:
I I
Data is distributed across multivendor databases. Transactions include Informix and non-Informix data.
The TP/XA library and DTP environment adhere to the XA interface specication developed by the X/Open Company to support large-scale, highperformance, on-line transaction-processing applications. For more information, see the TP/XA Programmers Manual.
2-18 Getting Started with Informix Dynamic Server 2000
Dimensional Databases
Dimensional Databases
Dynamic Server supports the concept of data warehousing. This typically involves a dimensional database that contains large stores of historical data. A dimensional database is optimized for data retrieval and analysis. The data is stored as a series of snapshots, in which each record represents data at a specic point in time. A data warehouse integrates and transforms the data that it retrieves before it is loaded into the warehouse. A primary advantage of a data warehouse is that it provides easy access to, and analysis of, vast stores of information. A data-warehousing environment can store data in one of the following forms:
I
Data warehouse A data warehouse is a database that is optimized for data retrieval. Data is not stored at the transaction level; some level of data is summarized. A data warehouse provides a decision-support environment in which you can evaluate the performance of an entire enterprise over time.
Data mart A data mart is a subset of a data warehouse that is stored in a smaller database. It is oriented toward a specic purpose or subject rather than enterprise-wide strategic planning. It can contain operational data, summarized data, spatial data, or metadata.
Operational data store An operational data store is a subject-oriented system for decision making that is optimized for looking up one or two records at a time. It is a hybrid form of data warehouse that contains timely, current, integrated information that typically is of a higher level granularity than the transaction. This data can serve as the common source of data for data warehouses.
Repository A repository is a system that combines multiple data sources into one normalized database. The records in a repository are updated frequently. Data stored in a repository is operational rather than historical and might be used for specic decision-support queries.
Object-Relational Databases
For details of how to plan a database, build and implement a traditional relational database or dimensional database, and work with data types and fragmentation, see the Informix Guide to Database Design and Implementation. See also the DB-Access Users Manual.
Object-Relational Databases
Dynamic Server is an object-relational database server that combines objectoriented and relational capabilities yet still represents all data in the form of tables with rows and columns. In addition to providing support for alphanumeric data such as character strings, integers, decimals, and dates, the database server provides the object-oriented capabilities of extensibility and inheritance.
Extensibility
You can extend the capability of the database server by dening new data types and user-dened routines (UDRs) that let you store, access, and manage images, audio, video, large text documents, and so on. You can create UDRs in SPL, Java, and the C programming language. For more information about the extensible features that Dynamic Server supports, see Extending Dynamic Server on page 2-29. Informix and other vendors package some data types and their access methods into DataBlade modules (shared class libraries) that you can add to the database server to store and access nontraditional data types such as twodimensional spatial objects (lines, polygons, ellipses, and circles). A DataBlade might also provide new types of access to large text documents, including phrase matching, fuzzy searches, and synonym matching.
Inheritance
Inheritance lets you dene objects (types and tables) that acquire the properties of other objects and add new properties that are specic to the object that you dene.
2-20
Access Methods
For an overview of object-relational database concepts such as extended data types and inheritance, see the Informix Guide to Database Design and Implementation. For information on how to extend existing data types and create new ones as well as create UDRs, see Extending Informix Dynamic Server 2000. For information about the superstores_demo object-relational demonstration database, see the Informix Guide to SQL: Reference.
Access Methods
An access method is a set of database server functions that a database server uses to access and manipulate a table or an index. Dynamic Server supports primary and secondary access methods.
Columns that contain built-in data types (known as a traditional B-tree index) Built-in data types include CHARACTER, DATETIME, INTEGER, FLOAT, and so forth.
One-dimensional user-dened data types (known as a generic B-tree index) Values that a user-dened function returns (known as a functional index). You can create a functional index on the resulting values of a function on one or more columns. The function must be a user-dened function. When you create a functional index, the database server computes the index-key values by executing the function on each column value.
For more information on B-trees and functional indexes, see your Performance Guide.
R-Tree Indexes
The R-tree indexing structure supports spatial data. Dynamic Server provides the framework for R-trees, but does not provide the routines required to support R-trees.
2-22
Database tables from other vendors Data stored in sequential les Remote data stored across a network
Because you can implement primary access methods as client applications, they typically do not require any direct interaction with low-level database server modules. Thus, they are relatively simpler to develop and support than new storage or indexing strategies. Primary access methods can unify all of the heterogeneous data that is distributed throughout an organization under a single object-relational system. For information on extspaces and user-dened access methods, see the Administrators Guide and Administrators Reference. For information on how to create primary access methods, contact your Informix sales representative for the Virtual-Table Interface Programmers Manual.
Application Types
Application Types
Two main classes of applications operate on data in a relational database:
I I
OLTP Applications
OLTP applications are often used to capture new data or update existing data.
These operations typically involve quick, indexed access to a small number of rows. An order-entry system is a typical example of an OLTP application. OLTP applications are often multiuser applications with acceptable response times measured in fractions of seconds.
OLTP applications have the following characteristics:
I I I I I
Simple transactions that involve small amounts of data Indexed access to data Many users Frequent requests Fast response times
2-24
DSS Applications
DSS Applications
DSS applications often report on or consolidate data that OLTP operations
have captured over time. These applications provide information that is often used for accounting, strategic planning, and decision making. Data in the database is typically queried but not updated during DSS operations. Typical DSS applications include payroll, inventory, and nancial reports. For more information on managing decision-support systems, see your Performance Guide.
GLS
Collation order of characters Denition of uppercase and lowercase conventions Non-ASCII characters, including multibyte characters Culture-specic formatting for numeric, monetary, date, and time values
With GLS support, the database server does not need to specify how to process culture-specic information directly because this information resides in a GLS locale. When the database server needs culture-specic information, it makes a call to the GLS library. The GLS library, in turn, accesses the GLS locale and returns the information to the Informix product. For complete information about the GLS feature, see the Informix Guide to GLS Functionality. For information on how to program Informix ESQL/C and DataBlade client applications with Informix GLS, see the Informix GLS
Programmers Manual.
An identier is a sequence of letters, digits, and underscores (_) that represents the name of a database, table, column, cursor, function, index, synonym, alias, view, prepared object, constraint, or procedure name. An identier can include the dollar sign ($) as any but the rst character of the identier. The supported identier length is extended from 18 bytes to 128 bytes (VARCHAR(128)).
A user name is the Informix, login, or client user ID that identies a user account on a database server or network. The supported user name length is extended from 8 bytes to 32 bytes (CHAR(32)).
Tip: In languages such as English, one character is 1 byte. However, in some languages, such as Chinese, one character can be several bytes. Set the IFX_LONGID environment variable to indicate whether a particular client is capable of handling long identiers. For information on long identiers, see the Informix Guide to SQL: Syntax, Informix Guide to SQL: Tutorial, and Informix Guide to SQL: Reference.
Shared-Statement Caching
The shared-statement cache feature reduces database server memory consumption by increasing the sharing among different user sessions of data structures that represent identical SQL statements. Query plans for SQL statements are cached for subsequent use by other user sessions.
2-26
Locking
Dramatically reduce memory consumption by the database server because sharable data structures associated with an SQL statement do not require per-session memory allocation. Speed up query processing because subsequent uses of SQL statements that are cached bypass the optimization stage.
The STMT_CACHE environment variable lets you control the use of the statement cache on a session. The SQL statement SET STATEMENT CACHE lets you control the use of cache within an application. For information about performance considerations and how to monitor shared-statement caches, see your Performance Guide. For information on environment variables, see the Informix Guide to SQL: Reference.
Locking
Locking is the process of temporarily limiting access to an object (database, table, page, or row) to prevent conicting interactions among concurrent processes. When you write applications, be aware of how the database server handles the following locking issues:
I I I I I I I
Database locking Table locking Page and row locking Lock mode Shared locks Waiting for locks Byte range locking (for smart large objects)
For information on the SQL statements that you use for locking, see the Informix Guide to SQL: Syntax. For general locking information, see the Informix Guide to SQL: Tutorial. For performance considerations, see your Performance Guide.
Isolation Level
Isolation Level
Isolation level refers to the level of independence among multiple users when they attempt to read the same data from the database. The isolation level lets you specify whether or not you are willing to read data that might be changed while you (that is, the SQL query) are reading it. For information about isolation levels, see the Informix Guide to SQL: Syntax and the Informix Guide to SQL: Tutorial. For performance considerations for the different isolation levels, see your Performance Guide.
Transaction Logging
The database server supports buffered logging and lets you switch between buffered and unbuffered logging with the SET LOG statement. Buffered logging holds transactions in memory until the buffer is full, regardless of when the transaction is committed or rolled back. You can also choose to log or not to log data. For information on the SET LOG statement, see the Informix Guide to SQL: Syntax. For information about buffered and unbuffered logging, see the Administrators Guide.
2-28
Role Separation
Role Separation
Role separation is an option that lets users perform different administrative tasks. Role separation is based on the principle of separation of duties, which can reduce security risks by providing a checks-and-balances mechanism in the system. For example, the person who determines what to audit should be different from the person who monitors the audit trail, and both of these users should be different from the person who is responsible for the operations of the database server. For information on role separation, see the Trusted Facility Manual and the Informix Guide to SQL: Syntax.
the SQL statements (schema) that would be needed to rebuild the database. the distribution information that is stored for one or more tables in the database. information on user-dened and complex data types and row types the schema for the Information Schema views.
I I
For information about DB-Access, see the DB-Access Users Manual. For information on the dbschema utility, see the Informix Migration Guide. For information about the Information Schema views, see the Informix Guide to SQL: Reference.
Built-in data types User-dened data types (opaque and distinct data types) Complex data types (row types and collection types Type and table inheritance User-dened casts Storage of and access to simple and smart large objects User-dened routines (in SPL, C, and Java) DataBlade modules (pre-packaged data types and supporting routines) User-dened access methods User-dened virtual processors
I I
A distinct type has the same storage representation as an existing opaque type but is distinguished by its name and cannot be substituted for the source data type. For example, you can create a new distinct type decnum with the same representation as real. All routines that operate on real values have database server-simulated counterparts for decnum values. However, decnum values and real values cannot be added, subtracted, or compared with one another without explicitly casting one value to the type of the other. A cast function converts one data type to another data type.
A named row type is a group of elds that are dened under a single name. A eld refers to a component of a row type. Once you create a named row type, the name that you assign to the row type represents a unique data type within the database. An unnamed row type is a group of elds that are dened by their structure. Unlike a named row type, which you can use to dene a table, you cannot use an unnamed row type to dene a table. Use an unnamed row type to dene a column, eld, or variable.
Dynamic Server supports inheritance for named row types and typed tables, which allows a type or a table to acquire the properties of another type or table. Inheritance allows for incremental modication, so that a type or table can inherit a general set of properties and add properties that are specic to itself:
I
Type inheritance applies to named row types only. You can use inheritance to group named row types into a type hierarchy. Tables that are dened on named row types support table inheritance. Table inheritance is the property that allows a table to inherit the behavior (constraints, storage options, triggers, and so on) in the table hierarchy.
2-32
Develop your own user-dened routines using Stored Procedure Language (SPL). Use features that let you add data types, supporting routines, and access methods. Add an Informix or third-party DataBlade module, which is a prepackaged custom data type and all the required supporting routines. Create your own DataBlade module with the DataBlade Developers Kit.
User-Dened Routines
A user-dened routine (UDR) is a routine that you can invoke within an SQL statement or another UDR. You create the UDR in a language that the database server supports and then register it in the system catalog tables so that the database server can access it.
UDRs provide benets in the areas of performance, optimization, and cong-
uration management. You can write user-dened routines to accomplish the following tasks:
I I I I I I I
Encapsulate multiple SQL statements Extend functions on built-in data types Support new data types Create triggered actions for multiple applications Restrict who can read data, change data, or create objects Manipulate large objects Facilitate interactive multimedia publication
When you write a UDR in a language other than SPL, the UDR is called an external routine. The database server supports the following types of UDRs:
I
server
I
An external routine that is written in the C language is called a C UDR. The C UDR uses the server-side implementation of the DataBlade API to communicate with the database server. SPL routines can execute routines written in C or other external languages, and external routines can execute SPL routines. For information on implementing user-dened routines, see Extending Informix Dynamic Server 2000.
2-34
DataBlade Modules
A DataBlade module is a collection of database objects and routines that extends the database server by adding new functionality. DataBlade modules are standard software modules that plug into the database. You can obtain DataBlade modules from Informix and from third-party vendors. You can create your own DataBlade modules with the DataBlade Developers Kit, which is a separate Informix product that is not included with Dynamic Server. For more information, refer to your DataBlade Developers Kit Users Guide. A DataBlade module lets the database server provide the same level of support for extended data types that it provides for built-in data types. Think of a DataBlade module as an object-oriented package (similar to a C++ class) that encapsulates specialized data types such as video, audio, photographs, documents, two-dimensional spatial objects, and so on. Figure 2-3 shows the major components of a DataBlade module.
Figure 2-3 DataBlade Module Components
Data types
Routines
Access methods
SQL interface
Index schemes
For information on how to work with and create your own DataBlade modules, see the DataBlade API Programmers Manual and the DataBlade Developers Kit Users Guide.
User-Dened Aggregates
A user-dened aggregate (UDA) extends the database by performing aggregation over user-dened types (UDTs) and user-dened routines (UDRs). The UDA feature lets you perform the following tasks:
I
Overload existing built-in aggregate functions (AVG, COUNT, MAX, MIN, RANGE, STDEV, SUM, and VARIANCE) to support UDTs. Write UDRs in C, SPL, and Java that implement user-dened aggregate functions.
The UDA feature lets you re-use existing client applications. For the SQL syntax to create and drop UDAs, see the Informix Guide to SQL: Syntax. For detailed information on UDAs, UDRs and UDTs, see Extending Informix Dynamic Server 2000.
2-36
Chapter
Tools and Client Products . . . . . . . . Tools . . . . . . . . . . . . . . DB-Access . . . . . . . . . . . DB/Cockpit . . . . . . . . . . Informix SNMP Subagent . . . . . . Optical Subsystem . . . . . . . . Client SDK Products . . . . . . . . . DataBlade API. . . . . . . . . . Informix OBDC Driver . . . . . . . Informix ESQL/C . . . . . . . . Informix GLS . . . . . . . . . . Informix JDBC Driver . . . . . . . TP/XA . . . . . . . . . . . . Compatibility of Client and Server Programs Installing Informix Products. . . . . . . .
Conguring the Database Server Environment . . Required Environment Variables . . . . . . Other Useful Environment Variables . . . Setting UNIX Environment Variables . . . Setting Windows NT Environment Variables Connectivity Information . . . . . . . . Connectivity Information on UNIX . . . Connectivity Information on Windows NT .
Preparing the ONCONFIG Conguration File . . . . . . . . Creating an ONCONFIG File on UNIX . . . . . . . . . Creating an ONCONFIG File on Windows NT . . . . . . . Allocating Disk Space. . . . . . . . . . . . . . . . . Initializing Disk Space . . . . . . . . . . . . . . . . Conguring the SQL API Environment . Creating a Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-16 3-16 3-17 3-17 3-18 3-19 3-19 3-20 3-20 3-21 3-21 3-21 3-22 3-23 3-24
Performing Standard Administrative Tasks Monitoring Performance . . . . . Using Operating-System Tools . Using Dynamic Server Utilities . . . . . . .
3-2
In This Chapter
This chapter provides information to help you get the database server up and running.
Review available tools (page 3-4) Install Informix products (page 3-9) Congure the environment
Set required environment variables (page 3-11) Prepare connectivity les (page 3-13) Prepare the conguration le (page 3-14) Allocate and initialize disk space (page 3-15)
I I I I I I
Congure a client (SQL API) environment (page 3-17) Choose a database type (page 3-17) Connect to the database server (page 3-17) Create the demonstration database (page 3-18) Obtain error message information (page 3-18) Migrate data from an earlier version of the database server (if needed) (page 3-19) Perform administrative tasks (page 3-19)
3-3
Tools
DB-Access DB/Cockpit
Informix SNMP subagent Optical Subsystem DataBlade API DataBlade Developers Kit
INFORMIX-CLI
Other Informix features such as the High-Performance Loader (HPL), Informix Storage Manager (ISM), and database server utilities, are discussed in Chapter 2. Dynamic Server also might support additional development tools that are not described in this manual. For information about specic versions of (or platforms for) products that Dynamic Server supports, see the release notes described in Documentation Notes, Release Notes, Machine Notes on page 10 of the Introduction. See also the manual for the client product or SQL API that you want to use, or the Informix Client Software Developers Kit or DataBlade Developers Kit for the specic group of products.
3-4
Tools
Tools
Dynamic Server supports the tools that are discussed in this section.
DB-Access
DB-Access is a client that is included with Informix database servers. It lets
you connect to the database server and access, modify, and retrieve information. Use DB-Access to access and manipulate the data in a database and to perform a variety of data-management tasks such as organizing, storing, retrieving, and viewing data. For more information, see the DB-Access Users Manual.
UNIX
DB/Cockpit
The DB/Cockpit utility is a graphical tool that lets Dynamic Server administrators manage the database server, maintain its integrity, and improve Dynamic Server performance. DB/Cockpit implements a client/server architecture that lets administrators monitor many Dynamic Server system parameters that other utilities report. It combines an onprobe server that collects data and an oncockpit client program that provides a viewer for user interaction. For more information, see the DB/Cockpit Users Manual.
3-5
Optical Subsystem
The optical storage subsystem supports the storage of simple large objects (TEXT and BYTE data) on optical platters known as WORM optical media. The optical media are the removable optical platters that contain data. The optical storage subsystem includes a specic set of SQL statements that support the storage and retrieval of data to and from the optical storage subsystem. The Optical Subsystem does not store character large object (CLOB) and binary large object (BLOB) data types, also known as smart large objects. Optical media offer the following advantages over conventional magnetic disks for storing data:
I I I I I
Mass storage capacity (on the order of terabytes) Mountable and/or unmountable storage units Low cost per bit of storage Long media life High data stability
3-6
DataBlade API
The DataBlade API is a C-language application programming interface that is provided with Dynamic Server. Experienced C programmers can use DataBlade API functions in DataBlade modules to develop client and database server applications that access data stored in a Dynamic Server database. With the DataBlade API, you can:
I I I I
manage client and database server connections. send SQL command strings. process query results. build a saveset (a mechanism to fetch multiple rows from the database introductory program memory for processing). manage events and errors. insert plain and internationalized traces. create database server functions.
I I I
The DataBlade API contains public data structures, public functions, and header les for DataBlade module, ESQL/C, GLS, and so on. Most DataBlade API functions behave identically in client and database server programs. For more information, see the DataBlade API Programmers Manual.
3-7
Informix ODBC libraries, which provide the functions and values for the API A driver manager, which provides an interface between an Informix ODBC application and the Informix ODBC Driver and checks parameters and transitions The Informix ODBC Driver, which provides an interface between a data source and a driver manager or an application
For more information, see the Informix ODBC Driver Programmers Manual.
Informix ESQL/C
ESQL/C is an SQL application programming interface (API) that lets programmers embed SQL statements directly into a C program to interact with the database server, access databases, manipulate the data in a program, and check for errors.
server
I
ESQL/C header les, which provide denitions for the data structures, constants, and macros useful to the ESQL/C program
esql, a command that manages the source-code processing to convert a C le that contains SQL statements into an object le
ESQL client-interface dynamic link libraries (DLLs), which let an ESQL/C application run in a Windows environment
WIN NT/95
3-8
Informix GLS
The Informix GLS library contains APIs that let programmers develop internationalized Informix ESQL/C and DataBlade module client applications. Informix GLS accesses GLS locales to handle different languages, cultural conventions, and code sets. For information on the GLS feature, see Global Language Support on page 2-25. Informix GLS provides procedures, macros, and functions to:
I
String-processing operations include string traversal, concatenation, copying, and character searching. Character-processing operations include character classication, case conversion, code-set conversion, and character comparison.
convert date, time, monetary, and number values from and to localespecic data formats. The Informix GLS library supports conversion of a locale-specic string to its internal database representation and formatting of an internal database representation to a locale-specic string.
For more information, see the Informix GLS Programmers Manual. In addition, Informix GLS provides on-line reference pages as HTML documentation that you can access with a web browser. The URL must include the full pathname of the directory that your INFORMIXDIR environment variable designates: $INFORMIXDIR/doc/gls_api/en_us/0333/index.htm on UNIX, or INFORMIXDIR\doc\gls_api\en_us\04e4\index.htm on Windows.
applications or applets. Programmers can create client applications that use standard JDBC to connect to Dynamic Server, query and retrieve metadata from a database or column, and handle errors. The Informix JDBC Driver is compatible with the JavaSoft JDBC specications. It maps standard Java data types and Informix database server data types. For more information, see the Informix JDBC Driver Programmers Guide.
3-9
TP/XA
The TP/XA library is a part of Informix ESQL/C that facilitates communication between a third-party transaction manager and an Informix database server for the purpose of distributed transaction processing (DTP) in a multivendor database setting. The TP/XA library lets the database server operate as a database management system within a Resource Manager of an X/Open distributed transaction processing environment that conforms to XA specications. For more information, see the TP/XA Programmers Manual.
3-10
If you install more than one Informix product on the same computer, you do not have to install them in a specic order. You can install clients rst or the database server rst. However, if you install more than one Informix product, you must complete all installation procedures for one product before you start to install the next product. Do not load the les from another Informix product onto your computer until you complete the current installation. If you want to preserve product les of earlier versions, you must create separate directories for each version of your Informix products. Set the INFORMIXDIR environment variable to the appropriate directory name for the version that you want to access. For information about the INFORMIXDIR environment variable, see the Administrators Guide and the Informix Guide to SQL: Reference. For information on memory and disk space requirements for installation as well as the product installation steps, see your Installation Guide.
Set environment variables Prepare the sqlhosts information in the le or registry Prepare the ONCONFIG le Allocate disk space
Before you can start conguring the database server, you must congure the operating system appropriately. You might need the assistance of the system administrator for this task. For information about operating-system conguration dependencies, refer to the machine notes described in Documentation Notes, Release Notes, Machine Notes on page 10 of the Introduction. For a discussion of conguration requirements, see the Administrators Guide. For information about conguration parameters and les that Informix Dynamic Server uses, see the Administrators Reference.
Getting Up and Running with the Database Server 3-11
INFORMIXSERVER
PATH
ONCONFIG
TERM
For detailed information about how these and other environment variables affect the database server, see the Informix Guide to SQL: Reference and the Administrators Guide.
3-12
UNIX
The following environment variables let you work with the client:
I I
INFORMIXTERM TERMINFO
For detailed information about GLS environment variables, see the Informix Guide to GLS Functionality. For information on how setting certain environment variables can affect performance, see your Performance Guide.
UNIX
You can check the validity of environment variable settings with the chkenv utility. To override environment variables that have been set automatically, use a private environment-variable le (~/.informix) or assign new values to environment variables individually. Tip: Informix recommends that you set the environment variables in the appropriate start-up le for your shell.
3-13
Connectivity Information
WIN NT
At the system prompt In the Windows NT registry In an environment-conguration le (%INFORMIXDIR%\etc\informix.rc) In a batch le With a system applet
I I
The installation procedure prepares a %INFORMIXSERVER%.cmd le that sets the environment variables to their correct values. This le is stored in the %INFORMIXDIR% directory. You must execute INFORMIXSERVER%.cmd before you can use any of the command-line utilities. Tip: Informix recommends that you set the environment variables in the appropriate start-up le for your windowing environment.
Connectivity Information
The UNIX connectivity les and the Windows NT registry contain information that allows client/server communication. The database server administrator manages connectivity information. The system (or network) administrator manages the network-conguration and network-security les.
UNIX
3-14
Connectivity Information
sqlhosts le
An sqlhosts le must exist on each computer that has either an Informix client application or database server. The sqlhosts le species the location of each database server in your environment and the interface and/or protocol combinations for a connection to that database server. A client application uses information in the sqlhosts le to establish a connection to a database server. The sqlhosts le must contain an entry for each type of connection to each database server on the network. For information about the INFORMIXSQLHOSTS environment variable, see the Informix Guide to SQL: Reference. For detailed information about how to prepare the sqlhosts le, refer to the Administrators Guide.
Network-Conguration Files
In addition to the sqlhosts les, TCP/IP connections require entries in the /etc/hosts and /etc/services les. IPX/SPX connections also require auxiliary les. For IPX/SPX, the names of the auxiliary les depend on the hardware vendor. The network-conguration les are described in the Administrators Reference and in operating-system manuals.
Network-Security Files
Informix database servers follow UNIX security requirements for making connections. Thus, the UNIX system administrator might need to make modications to the /etc/passwd, etc/hosts, ~/.rhosts, and other related les. The network-security les are described in the Administrators Reference and in operating-system manuals.
3-15
WIN NT
UNIX
Make a copy of $INFORMIXDIR/etc/oncong.std (the template le) and store the new le in $INFORMIXDIR/etc. You can name the le according to the requirements of your operating system. Edit your new ONCONFIG conguration le and modify the conguration parameters that you decide to change. Set your ONCONFIG environment variable to the name of your new ONCONFIG conguration le.
2. 3.
3-16
WIN NT
Make a copy of the %INFORMIXDIR%\etc\oncong.std le. Choose an appropriate name for the new le. Edit the new le and change the conguration parameters. Set your ONCONFIG environment variable to the name of your new ONCONFIG le. Update the %INFORMIXSERVER%.cmd le to reect the new ONCONFIG value.
Congure a raw device or create an unbuffered le for each disk. To achieve better performance, UNIX platforms use raw disk devices and Windows NT platforms use unbuffered NTFS les to bypass the buffering of disk I/O that the operating system normally performs.
2.
Create standard device names or lenames. Informix recommends that you use symbolic links to assign abbreviated standard device names for each raw disk device.
3-17
3.
Set permissions, ownership, and group for each raw device or unbuffered le. On Windows NT, a member of the Informix-Admin group must own the les. On UNIX, the owner and group must be informix, and the permissions must be set to read and write for both user and group (but not for others).
For more information, see The Disk Component on page 1-8 and Raw (Unbuffered) Disk Management on page 1-14. For information about how to allocate disk space, see the Administrators Guide.
To bring the database server on-line, enter oninit . On Windows NT, the database server runs as a service. Use the Service control application to bring the database server on-line. Warning: When you initialize disk space, all of the existing data in the database server is destroyed. Initialize disk space only when you are starting a new database server. For information about how to initialize disk space, see the Administrators Guide.
3-18
GLS
If your client application uses a nondefault client locale or accesses a database that has a nondefault database locale, you must set the CLIENT_LOCALE and DB_LOCALE environment variables. For information about environment variables that affect SQL API programs, see the Informix Guide to SQL: Reference. For information about GLS environment variables and locales, see the Informix Guide to GLS Functionality.
Creating a Database
When the database server is on-line, you can connect client applications and SQL APIs to it and begin to create databases. Before you create any database, you must decide whether you want the database to be ANSI compliant. For information, see ANSI-Compliant Databases on page 2-16. For information about ANSI-compliant databases, see the Informix Guide to Database Design and Implementation. For information about ANSI syntax in SQL statements, see the Informix Guide to SQL: Syntax.
3-19
The stores_demo database is a relational database that works with all Informix database servers. Create it with the dbaccessdemo script. The superstores_demo database is an object-relational database that is available only with Dynamic Server. Create it with the dbaccessdemo_ud script.
Informix ESQL/C includes an esqldemo script that copies ESQL/C demonstration programs into your current directory. For an explanation of how to create and populate the demonstration databases, refer to the DB-Access Users Manual. For a description of the structure and contents of the stores_demo database, see the Informix Guide to SQL: Reference. For information on how to work with the superstores_demo database, see the Informix Guide to Database Design and Implementation. For information on the permissions required to use the command les, see the Administrators Guide.
3-20
Informix software products provide text les that contain all the Informix error messages and their corrective actions. To read the error messages in the text le, Informix provides scripts that let you display error messages on the screen (nderr) or print formatted error messages (rofferr). To read error messages and corrective actions under Windows NT, use the Informix Find Error utility. To display this utility, choose StartProgramsInformix from the Task Bar. For information on the error message les and a detailed description of the nderr and rofferr scripts, see the Introduction to Informix Error Messages in Answers OnLine.
WIN NT
Prepare the operating system to automatically start and stop the database server when the system is shut down or rebooted. Make arrangements for backup management. When you plan your data dbspace and logical-log backup schedule, consider the availability of backup devices to manage the data and the availability of operators to perform backups.
I I I
Check that users have set the correct environment variables. Review the database server conguration parameters. Transfer data that was created on other Informix database servers.
Getting Up and Running with the Database Server 3-21
Monitoring Performance
For information about these and other administrative tasks, see the Administrators Guide and Administrators Reference. For information about backup management and schedules, see your Backup and Restore Guide. For information about managing backup devices and media, see the Informix Storage Manager Administrators Guide. For information about the High-Performance Loader, see the Guide to the High-Performance Loader.
Monitoring Performance
Once Dynamic Server is up and running, you might, as database server administrator, be responsible for maintaining the optimum performance of the database server and database applications. To accomplish this goal, you must:
I I I
establish performance goals. identify symptoms of performance problems. measure the following attributes:
I I
For information on performance-tuning issues and methods that are relevant to daily database server administration and query execution, see your Performance Guide.
3-22
To capture the status of system resources at regular intervals, use scheduling tools that are available with your host operating system (for example, cron) as part of your performance monitoring system.
WIN NT
The Windows NT operating-system supplies a Performance Monitor (perfmon.exe) that can monitor resources such as processor, memory, cache, threads, and processes. The Performance Monitor also provides charts, alerts, report capabilities, and the ability to save information to log les for later analysis.
3-23
DB-Access DB/Cockpit
For information about SQL scripts and DB-Access, see the DB-Access Users Manual. For information about DB/Cockpit, see the DB/Cockpit Users Manual. For information about oncheck, onlog, onstat and the SMI tables, see the Administrators Reference. For information about onperf, see your Performance Guide.
3-24
Chapter
4
. . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 4-3 4-4 4-4 4-4 4-5 4-5 4-16 4-21
In This Chapter .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
Dynamic Server Users . . . . . . . . . . . Dynamic Server Administrators and Operators. Database Administrators . . . . . . . . Programmers and Application Developers . . Database Users . . . . . . . . . . . . Task-Documentation Matrix . . . . . . . .
The Informix Dynamic Server Documentation Set . Client Manuals for This Release . . . . . . .
4-2
In This Chapter
This chapter provides an overview of Dynamic Server users and the tasks that each type of user is likely to perform. It includes a matrix of those tasks and where to nd information throughout the documentation set. This chapter also contains an alphabetical list of the manuals that are provided with the database server software and a list of the documentation for some related Informix client products. Tip: For current information about the products that the database server supports, see the notes described inDocumentation Notes, Release Notes, Machine Notes on page 10 of the Introduction.
Database users
4-3
Database Administrators
A database administrator (DBA) is primarily responsible for creating and managing access control for databases. You use SQL statements to grant and revoke privileges to ensure that the correct individuals are able to perform the actions they need to and that untrained or unscrupulous users are kept from performing potentially damaging or inappropriate resource-intensive activities. In Figure 4-1 on page 4-6, look for the term DBA in the Role column to identify database administrator tasks and the manuals that will help you complete your tasks.
4-4
Database Users
Database Users
Database users access, insert, update, and manage information in databases with SQL, which is often embedded in a client application. In Figure 4-1 on page 4-6, look for the term USER in the Role column to identify database user tasks and the manuals that will help you complete your tasks.
Task-Documentation Matrix
The Dynamic Server task-documentation matrix in Figure 4-1 on page 4-6 provides a quick reference to the documentation that is available with Dynamic Server. The matrix includes the following three columns:
I I
If You Want To. A task you might want to perform. Manual. The primary book that contains information to help you perform the task. Role. The person most likely to perform the task. (ALL indicates that all types of users can benet from the documentation listed.)
Use the matrix to associate specic tasks with the manuals that will help you perform the tasks. For a list of the Dynamic Server documentation, see The Informix Dynamic Server Documentation Set on page 4-16 and Client Manuals for This Release on page 4-21.
4-5
Task-Documentation Matrix
Figure 4-1 Dynamic Server Task-Documentation Matrix If You Want To: Install Dynamic Server in different environments Manual Installation Guide for Informix Dynamic Server 2000 on UNIX Role ADMIN
4-6
Task-Documentation Matrix
If You Want To: Use the SMI tables of the sysmaster database to monitor the database server Use ON-Monitor to monitor the database server Use utilities such as oncheck, ondblog, onlog, and onstat to perform administrative tasks Use the onmode -I option to collect diagnostic information Locate information on the conguration parameters Work with the oninit, onparams, onspaces, and ontape utilities Interpret logical-log records and message-log messages Understand database server disk structures and storage See a list of the les that the database server uses Back up the logical log Congure, use, and administer ON-Archive Congure and use the ontape utility Create an archive Restore data Refer to examples to set up, back up, and restore data for ON-Archive Congure and use the ON-Bar backup and restore system Copy your data and logical logs as insurance against lost or corrupted data Use the archecker utility to verify backed-up objects before you use them to restore data Restore data Connect your Informix database server to storage devices for backup and restore operations Manage backup media and storage devices for all ON-Bar backups and restores Track the location of all backup data Move backup data through a managed life cycle Provide disaster recovery for a database server instance
Role ADMIN
ADMIN
ADMIN ADMIN
ADMIN
Task-Documentation Matrix
If You Want To: Migrate to Dynamic Server from an earlier version of an Informix database server Move data between different physical equipment (computer and storage devices) and different operating systems Move data between database servers that have different language support Work with these utilities: dbexport, dbimport, dbload, dbschema, onload, onunload, onmode -b Revert from Dynamic Server to an earlier version of an Informix database server Monitor system resources (CPU, memory, disk) that are critical to performance Identify the database activities that affect critical resources Identify and monitor queries that are critical to performance Improve the performance of a query Use utilities such as onperf for performance monitoring and tuning Eliminate database server performance bottlenecks Balance the load on system resources Adjust the database server conguration Adjust the arrangement of data Allocate resources for DSS queries Create and manage indexes to speed up retrieval of data Use secondary access methods such as B-trees Control the placement and size of tables and table extents Control the placement and size of fragments (not in Workgroup and Developer Editions) Manage resources for parallel database queries (PDQ) (not in Workgroup and Developer Editions) Monitor and track locking Learn when and how to use optimizer directives
Role ADMIN
Performance Guide
ADMIN
(3 of 10)
4-8
Task-Documentation Matrix
If You Want To: Use the ipload and onpload utilities to load or unload large quantities of data to or from an Informix database Use the graphical user interface that prepares the onpload database Move data to a different computer or conguration Alter the schema of a table Detect unusual user actions and unwanted activities and identify the perpetrators Detect unauthorized access attempts Assess potential security compromises Use the secure-auditing utilities (onaudit, onshowaudit) to set up, administer, and interpret audit trails Use the Optical Subsystem interface for an optical storage subsystem to store TEXT and BYTE data (simple large objects) on optical platters (WORM optical media) Use the set of SQL statements that support the storage and retrieval of data to and from the optical storage subsystem Use the Informix SNMP subagent to extract information from an Informix database server and pass that information to a network manager Work with the R-tree secondary access method
Role ADMIN
ADMIN
ADMIN
ADMIN
Design, dene, monitor, and control your Enterprise Repli- Guide to Informix Enterprise cation system Replication Gather information about database server status and activity with the DB/Cockpit utility Use a graphical interface to monitor database servers Work with the tables in the sysmaster database Understand the impact of database design and use on performance Administrators Reference Performance Guide DB/Cockpit Users Manual
4-9
Task-Documentation Matrix
If You Want To: Design data models and implement relational, objectrelational, and dimensional databases for Informix database servers Understand data-warehousing concepts Identify and dene data and data objects for Informix databases Use supported data types and SQL to implement a database Extend a database with complex data types Extend a database with user-dened casts Understand type and table inheritance Grant and limit access to a database Dene a fragmentation strategy or distribution schema Perform data-denition tasks such as specifying the data types for table columns Perform data-management tasks such as storing, viewing, and changing table data Connect to one or more database servers and transfer data Verify database server status Create databases and run ad hoc queries Execute SQL statements and SPL routines Display system catalog tables and the Information Schema Use the Optical Subsystem interface for an optical storage subsystem to store TEXT and BYTE data (simple large objects) on optical platters (WORM optical media) Use the set of SQL statements that support the storage and retrieval of data to and from the optical storage subsystem Generate Information Schema views Use the system catalog tables to track objects Assign data types to columns Create databases and manage access Compose correct SQL statements Write procedures with SPL and store them in a database
Role DBA
DBA
DBA
DBA
DBA
Task-Documentation Matrix
If You Want To: Query and modify data in a relational database Work with user-dened and system-dened casts on extended data types Create and use SQL statements and SPL routines Execute and debug SQL statements and SPL routines Create databases, run ad hoc queries, test database applications that you intend to store for use in a production environment Access, modify, and retrieve information form Informix database servers Verify database server status Connect to one or more databases Display system catalog tables and the Information Schema Assign data types to columns
Role DBA
DEV
Informix Guide to Database Design and Implementation Informix Guide to SQL: Reference Informix Guide to SQL: Syntax Informix Guide to SQL: Tutorial
DEV
Set environment variables Use supported data types in programs Use the system catalog tables to track objects Find a description of the tables in the stores_demo or superstores_demo database Compose correct SQL statements Write procedures with SPL and store them in a database Perform a parallel database query (PDQ) Use a primary access method
DEV
DEV
(6 of 10)
4-11
Task-Documentation Matrix
If You Want To: Compose SELECT statements Query and modify data in a relational database Use embedded SQL in programs Program in a multiuser environment Create and use routines with SPL Create and use triggers Work with user-dened and system-dened casts on extended data types Use Informix ODBC Driver to access Informix relational databases with SQL and interact with an Informix database server Create custom applications with the Informix ODBC API Embed SQL statements directly into C programs Create new data types and user-dened routines Create new data types and user-dened routines using Java Use the GLS features that let Informix SQL APIs and database servers handle different languages, cultural conventions, and code sets Internationalize DataBlade modules and ESQL/C programs with Informix GLS Work with the TP/XA library in an X/Open distributed transaction-processing (DTP) environment Develop applications for a third-party transaction manager and an Informix database server Learn how GLS affects database server migration
Role DEV
DEV
Informix ESQL/C Programmers Manual Extending Informix Dynamic Server 2000 Creating UDRs in Java Informix Guide to GLS Functionality Informix GLS Programmers Manual TP/XA Programmers Manual
DEV DEV
DEV (7 of 10)
4-12
Task-Documentation Matrix
If You Want To: Dene new data types or extend the functionality of existing data types for a Dynamic Server database Extend operations on data types, create new casts, extend operator classes for secondary access methods, and write opaque data types for your database or DataBlade programs Create application-specic SPL or external routines for application end-users Create and register a user-dened routine (UDR) to invoke within an SQL statement or another routine Use DataBlade API functions in DataBlade modules to develop server and client applications that access data stored in a Dynamic Server database Write server routines and client LIBMI applications that use smart large objects and complex and extended data types Use Java to create client applications or applets that run against Dynamic Server Install and load the Informix JDBC Driver Use standard JDBC to connect to a database or database server Use standard JDBC to send queries, retrieve results, get database and column metadata, and handle errors Learn how standard Java data types map to Informix database server data types Use the object-oriented C++ programming language to create database client applications for Informix database servers Use Object Interface for C++ to create value objects that let C++ client applications support DataBlade module data types
Role DEV
DEV
DEV
DEV
(8 of 10)
4-13
Task-Documentation Matrix
If You Want To: Work with the Object Interface for Java, a library of Java classes and interfaces Create enterprise client/server applications that connect directly to an Informix database server Create applets that run in remote HTML browsers that connect back to an Informix database server Create Object Interface for Java objects to handle new data types in DataBlade modules that work with Dynamic Server Work with the R-tree secondary access method Develop a primary or secondary access method to obtain data that is external to the database server
Role DEV
Informix R-tree Index Users Guide DEV Virtual-Index Interface Programmers Manual Virtual-Table Interface Programmers Manual DEV
Set environment variables Use supported data types Understand the Information Schema Learn the structure and contents of the tables in the stores_demo database Learn the structure of the superstores_demo database Compose correct SQL statements Learn the categories of SQL statements Write procedures with SPL and store them in a database Compose basic and advanced SELECT statements Query and modify data in a relational database Use embedded SQL in programs
USER
USER
USER
(9 of 10)
4-14
Task-Documentation Matrix
If You Want To: Invoke the DB-Access utility Use menus, screens, SQL statements, and SPL routines to view, access, retrieve, store, and modify data in a database Connect to or create one or more databases and transfer data between a database and external text les Display information about a database and verify database server status Perform ad hoc queries that you execute once or infrequently Practice the statements and examples provided with the demonstration databases Install client products that the database server supports, such as Informix Connect and products in the Informix Client Software Developers Kit
Role USER
Informix Client Products Installation Guide for UNIX Informix Client Products Installation Guide for Microsoft Windows Environments Informix Guide to SQL: Reference
ALL
Set the appropriate environment variables for your Informix product Acquaint yourself with terms used in Informix database server manuals Work with relational (stores_demo) and object-relational (superstores_demo) demonstration databases that Informix products provide Find corrective actions to error messages
ALL
ALL
4-15
4-16
Book Title
Description This guide describes how to use the DB-Access utility to access, modify, and retrieve information from Informix database servers. It provides information on how to use the interface for SQL statements and SPL routines to perform data-denition and data-management tasks. The guide includes the SQL command les and UDRs for the demonstration databases that are shipped with Informix database servers. This manual discusses the features that make up the DB/Cockpit utility, a graphical tool designed for monitoring Dynamic Server and maintaining its integrity. It includes information about the onprobe and oncockpit components. This guide explains how to extend existing data types and dene new data types for a database on Dynamic Server. It describes the tasks that you must perform to extend operations on data types, create new casts, extend operator classes for secondary access methods, and write opaque data types. It also explains how to dene your own functions and procedures for use in a Dynamic Server database. It describes common considerations for SPL routines and external routines and tells how to invoke user-dened routines (UDRs). This guide provides an overview of the relational database management system, summarizes important features of Informix products, and provides information to help you use the documentation that is included with Dynamic Server products. This guide contains information to help you understand the concepts of data replication, design your own Enterprise Replication client/server application system, install Enterprise Replication, and administer and manage data replication throughout your open-systems enterprise. This guide describes how to use the High-Performance Loader (HPL) to efciently load an unload large quantities of data to or from an Informix database. (2 of 5)
4-17
Description This guide describes how to use the Optical Subsystem conguration of Dynamic Server to store TEXT and BYTE data (simple large objects) on optical platters. This Answers OnLine product provides a complete list of Informix-specic error messages and describes their corrective actions for current Informix products and earlier Informix products that are still supported. It also describes how to use the nderr and rofferr scripts to read error messages on-line. Use the UNIX nderr and rofferr utilities or the Windows NT Informix Find Error utility to locate the latest information on error messages.
Informix Guide to Database Design and Imple- This guide documents how to design and implement mentation databases for Informix database servers. It describes the fundamental ideas and terminology for planning, implementing, and using a relational, object-relational, or dimensional database management system. The guide discusses tasks usually performed by the DBA and addresses data denition with Informix databases. It describes how to design different data models and use the supported data types and SQL to implement a database. Informix Guide to GLS Functionality This manual describes the Global Language Support (GLS) feature that is available in Informix products. The GLS feature allows Informix client products and Informix database servers to handle different languages, cultural conventions, and code sets. This manual describes only the language-related topics that are unique to GLS. This manual describes the Informix system catalog tables, the data types supported by Informix database servers, and Informix and other common environment variables that you might need to set. It also contains a description of the structure of the stores_demo and superstores_demo databases and a glossary of terms used in Informix manuals. This manual contains the complete syntax descriptions for Structured Query Language (SQL) and Stored Procedure Language (SPL) statements. (3 of 5)
4-18
Description This tutorial provides instructions for using basic and advanced SQL to query and modify data in a relational database. It discusses how to embed SQL in programs, create and used stored-procedure language (SPL) routines, and create and use triggers. The guide also discusses how to use implicit and explicit user-dened casts and system-dened casts for extended data types. This manual describes the tasks that you perform when you move data from one location to another and when you migrate existing Informix databases to various Informix database servers. It discusses such database server utilities as dbexport, dbimport, dbload, dbschema, onload, onunload, and onmode -b. This guide contains detailed information about the R-tree index structure and secondary access method. This manual introduces Simple Network Management Protocol (SNMP) and describes the subagent that provides information about Informix database servers to networkmanagement tools. The guide also documents the Management Information Bases (MIBs) that specify the information that the onSNMP program provides to the network-management tools. It includes a glossary of terms used in the guide. This guide describes how to connect your Informix database server to storage volumes on storage devices for ON-Bar backup and restore operations, and how to manage backup media with the Informix Storage Manager. This guide contains instructions for installing Dynamic Server on computers that run the UNIX operating system. It also describes common installation problems and indicates how to solve them. This guide contains instructions for installing Dynamic Server on computers that run on Windows NT. It also discusses how to start, stop, and remove the database server and lists common installation error messages and warnings. (4 of 5)
4-19
Description This guide presents a complete example of setting up, backing up, and restoring data for a system. It introduces you to the concepts, terminology, and basic tasks involved in using ON-Archive as your recovery system. It includes a section on troubleshooting common problems and a scripted sample session. This manual explains how to congure and operate Dynamic Server to improve overall system performance as well as the performance of SQL queries. This guide describes the secure auditing facility and includes information on how to set up and administer audit trails, extract and interpret audit records, and use utilities and SQL statements for audit analysis. This manual denes a secondary access method and explains how to create one with the Virtual-Index Interface Application Program Interface (VII API). A virtual index accesses data from a source that the database server does not manage or specic data inside of large objects. The manual describes the syntax that the database server uses to invoke your Clanguage library, as well as the supplied API function calls and data structures. For information on how to obtain this document, contact your Informix representative. This manual denes a primary access method and explains how to create one with the Virtual-Table Interface Application Program Interface (VTI API). A virtual table is dynamically created from a source that the database server does not manage or specic data inside of large objects. The manual describes the syntax that the database server uses to invoke your C-language library, as well as the supplied API function calls and data structures. For information on how to obtain this document, contact your Informix representative. (5 of 5) * Important: The Virtual-Table Interface Programmers Manual and the Virtual-Index Interface Programmers Manual are specically for customers and partners developing alternative access methods for Dynamic Server. Informix continues to modify the interfaces described in these manuals. Customers and partners who use this interface should work with an Informix representative to ensure that they continue to receive the latest information and that they are prepared to change their access method.
Performance Guide for Informix Dynamic Server 2000 Trusted Facility Manual for Informix Dynamic Server 2000
4-20
Informix Client Products Installation Guide for Microsoft Windows Environments Informix Client Products Installation Guide for UNIX
Description This manual describes the Informix GLS applicationprogramming interface that is available in Informix products. which gives ESQL/C programmers and DataBlade module developers the ability to write or change programs to work with different locales. This guide provides useful information for programmers who create Java applications or applets that use JDBC to connect to Informix databases with the Informix JDBC Driver, type 4. It describes how to install and load the driver, use standard JDBC, get metadata from a database, and map between standard Java and Informix data types. It includes troubleshooting advice and tips. This guide describes how C++ and DataBlade developers can develop Informix client applications with the object-oriented C++ programming language. It describes how the INFORMIX-Object Interface for C++ encapsulates Informix database server features into a class hierarchy and extensible object library. This guide describes how to use the TP/XA library of Informix ESQL/C to program in an X/Open DTP environment when data is distributed across multivendor or non-Informix databases. (2 of 2)
4-22
B C
N O
V W
Index
Index
A
Access method definition 2-21 primary 2-23 secondary 2-21 Administrative tasks role separation for 2-29 standard, listed 3-21 Aggregate, user-defined 2-36 Allocating disk space 3-17 ANSI compliance Intro-13, 2-16 Architecture 1-5 client/server 1-11 distributed databases 1-22 dynamic thread allocation 1-15 fault tolerance and high availability 1-17 high-performance 1-14 memory management 1-15 parallelization 1-17 raw disk management 1-14 scalability 1-13 Archive, and backups 1-18 Asynchronous data replication 2-7 Auditing 1-24
Bounding box 2-23 B-tree index 2-22 Buffered logging, description of 2-28 BYTE data type 2-32
C
Cache, shared-statement 2-26 chkenv utility 3-13 Client configuring environment for 3-19 description of 1-10 improving performance and availability 2-7 supported products 3-4 Client application description of 2-4 types of 2-24 Client SDK products DataBlade API 3-7 Informix JDBC Driver 3-9 INFORMIX-CLI 3-7 INFORMIX-ESQL/C 3-8 INFORMIX-GLS 3-9 supported 3-6 TP/XA 3-10 Client/server architecture, description of 1-10 configurations 1-13 definition of 1-10 CLIENT_LOCALE environment variable 3-19 Code set, ISO 8859-1 Intro-4
B
Backup Informix Storage Manager 2-15 ON-Bar 2-14 BLOB data type, mentioned 2-33 Boldface type Intro-6
Collection type 2-31 Column data types for 2-6 information on 2-29 replication of 2-8 retrieving from a database 2-3 storage of large objects 2-32 with built-in data type 2-22 Comment icons Intro-7 Commit heterogeneous 1-23 two-phase 1-23 Communication. See Connectivity. Compatibility of client and server programs 3-10 Complex data types 2-31 Compliance with industry standards Intro-13 Configuration database server environment 3-11 files for network 3-15 ONCONFIG file 3-12 requirements 3-11 SQL API environment 3-19 Connection database vs. network 1-11 defined 1-11 multiplexed 1-11 network 1-12 network, description of 1-12 to database server, initial 3-20 Connectivity client/server 1-10 files, overview of 3-14 information on UNIX 3-14 information on Windows NT 3-16 ODBC standard 3-7 sqlhosts file 3-15 supported protocols 1-11 Contact information Intro-13 Conventions, documentation Intro-5 Cooked disk space, description of 1-9 Cost-based optimizer 2-9
CPU, relationship to virtual processor 1-9 Creating a database 3-19 the demonstration database 3-20 Cross-reference icons Intro-7
D
Data manipulating with DB-Access 3-5 storage in data warehouse environment 2-19 Data mart, described 2-19 Data migration tools, and database server recovery 2-15 Data recovery mechanisms data replication 1-20 mirroring 1-19 Data replication advantages of 2-7 defined 2-7 description of 1-20 enterprise 2-8 high-availability 2-8 two types 2-7 Data storage, for database servers 1-9 Data types 2-31 BLOB, mentioned 2-33 BYTE, mentioned 2-32 CLOB, mentioned 2-33 complex, row type 2-31 distinct 2-31 TEXT, mentioned 2-32 user defined 2-30 Data warehouse, described 2-19 Database ANSI compliant 2-16 creating 3-19 demonstration 3-20 dimensional 2-19 distributed 2-17 distributed across multiple servers 2-18 object-relational 2-20
onpload for high-performance loader 2-10 relational 3-5 stores_demo 3-20 superstores_demo 3-20 supported 2-16 Database management system object-relational 1-5 overview of 1-3 relational 1-5 Database server administrator, description of 4-4 available data types 2-6 client/server architecture 1-10 configuring 3-11 connecting with an SQL API 3-20 data storage 1-9 description of 2-4 distributed database processing 2-17 extending 2-20, 2-30 fault-tolerant features 1-17 high performance of 1-14 initial connection to 3-20 ON-Bar backup and restore 2-14 parallel database query feature 1-17 raw-disk management 1-14 scalability of 1-13 security 1-24 system catalog for 2-5 utilities, listed 2-10 Database server feature isolation level 2-28 locking 2-27 role separation 2-29 rolling back transactions 2-28 transaction logging 2-28 DataBlade modules described 2-35 mentioned 2-20, 2-33 DB-Access utility Intro-5 creating the demonstration database 3-20 described 3-5 documentation 4-15, 4-17 dbexport utility 2-10, 2-15, 4-8 dbimport utility 2-10, 4-8
dbload utility 2-10, 4-8 DBMS. See Database management system. dbschema utility 2-11, 2-29, 4-8 Dbspaces archiving 2-12 restoring 2-12 DB_LOCALE environment variable 3-19 Decision-support query applications 2-25 Default locale Intro-4 Definitions data mart 2-19 data warehouse 2-19 Demonstration database creating 3-20 overview of 3-20 Demonstration databases Intro-5 Dependencies, software Intro-4 Disk access, for data storage 1-8 Disk I/O, role of shared memory in reducing 1-7 Disk space allocating 3-17 cooked 1-9 initializing 3-18 raw 1-9 types of physical units 1-8 Distinct type, description of 2-31 Distributed database advantages of 2-18 and transactions 1-22 description of 2-17 disadvantages of 2-18 multiple vendor servers 2-18 Distributed transaction-processing environment 2-18 Documentation for other Informix products, listed 4-21 for specific tasks 4-5 listed 4-16 Documentation notes Intro-10 Documentation set, listed 4-16
Documentation, types of documentation notes Intro-10 error message files Intro-9 machine notes Intro-10 on-line help Intro-9 on-line manuals Intro-9 printed manuals Intro-9 related reading Intro-11 release notes Intro-10 Driver manager, described 3-8 DSA. See Dynamic scalable architecture. DSS applications 2-25 DTP environment. See Distributed transaction-processing environment. Dynamic scalable architecture advantages 1-6 description of 1-6 extending 1-5 performance advantages 1-13 virtual processor component 1-9
Expression-based fragmentation 1-16 Extending the database server 2-20, 2-30 External routine 2-34 External spaces 2-23 Extspaces 2-23
F
Failure, system, and ON-Bar 2-14 Fast recovery, description of 1-18 Fault tolerance data replication 1-20, 2-8 fast recovery 1-18 mirroring 1-19 Feature icons Intro-8 Features data management 2-7 data recovery 2-12 data restore 2-12 other database server 2-26 RDBMS 2-3 Features of this product, new Intro-5 Field, description of 2-31 File autoexec.bat 3-14 back up with ontape 2-13 configuration 3-13 connectivity 3-14 cooked 1-9 create with dbschema 2-11 database server security 1-24 display contents with onlog 2-11 error message 3-21 for dbexport 2-10 hosts 3-15 HPL data 2-10 index.htm 3-9 logical log 1-18 logical-log 2-12 mirroring 1-19 network configuration 3-15 network security 3-15 ONCONFIG 3-12 ONCONFIG, preparing 3-16 onconfig.std 3-16 operating system 1-9
E
Enterprise Replication, described 2-8 Environment variable CLIENT_LOCALE 3-13, 3-19 DB_LOCALE 3-19 for client 3-13 how to set 3-13, 3-14 INFORMIXDIR 3-11, 3-12, 3-19 INFORMIXSERVER 3-12, 3-19 INFORMIXTERM 3-13 ONCONFIG 3-12 PATH 3-12, 3-19 required 3-12 SERVER_LOCALE 3-13 setting UNIX 3-13 TERM 3-12 TERMINFO 3-13 useful 3-13 Environment variables Intro-6 setting Windows NT 3-14 en_us.8859-1 locale Intro-4 Error message files Intro-9 Error messages, getting information 3-21
Index 3
passwd 3-15 perfmon.exe 3-23 raw 1-9 services 3-15 sqlhosts 1-11, 3-14 UNIX operating system 1-9 %INFORMIXSERVER%.cmd 3-1 Find Error utility Intro-10 finderr script 3-21 utility Intro-10 Fragmentation described 1-16 expression-based 1-16 round-robin 1-16
I
Icons cross-reference Intro-7 feature Intro-8 Important Intro-7 platform Intro-8 product Intro-8 Tip Intro-7 Warning Intro-7 Identifiers, long 2-26 Important paragraphs, icon for Intro-7 Index access methods 2-21 B-tree 2-22 fragmentation 1-16 functional 2-22 OLTP applications 2-24 optimizer-determined 2-9 repair 2-11 R-tree 2-23 Industry standards, compliance with Intro-13 Information Schema 2-29 Informix Dynamic Server.See Database server. Informix Find Error utility 3-21 Informix SNMP subagent, described 3-5 Informix Storage Manager and ON-Bar 2-15 described 2-15 INFORMIX-CLI, described 3-7 INFORMIXDIR environment variable 3-11, 3-12, 3-19 INFORMIXDIR/bin directory Intro-5 INFORMIX-ESQL/C, described 3-8 INFORMIX-GLS described 3-9 library 3-9 INFORMIXSERVER environment variable 3-12, 3-19
G
Generic B-trees 2-22 Getting error message information 3-21 Global Language Support (GLS) Intro-4 described 2-25 GLS library 2-25 locales 2-25 using nondefault locales 3-19 GLS. See Global Language Support. Graphical administration tools 1-25
Inheritance 2-20 Initializing disk space 3-18 Installing Informix products 3-10 Interfaces DB-Access 3-5 DB/Cockpit 3-5 Informix SNMP subagent 3-5 Optical Subsystem 3-6 Interprocess communication 1-7 IPC. See Interprocess communication. ipload utility 4-9 IPX/SPX. See Network. ISM. See Informix Storage Manager. ISO 8859-1 code set Intro-4 Isolation level definition of 2-28
J
Join, methods 2-9
L
Library GLS 2-25 INFORMIX-GLS 3-9 ODBC 3-8 TP/XA 2-18 Locale Intro-4 default Intro-4 en_us.8859-1 Intro-4 GLS 2-25 Locking, definition of 2-27 Logging. See Transaction logging. Logical log, purpose of 1-18 Logical units of storage, list of 1-8 Logical volume manager as mirroring alternative 1-20 Logical-log files, description of 2-12 Long identifiers 2-26
H
Hash joins 2-9 Heterogeneous commit protocol, described 1-23 High-availability data replication, described 2-8 High-Performance Loader described 2-9 utilities for 2-10 HKEY_LOCAL_MACHINE registry 3-16 hosts file 3-15 HPL. See High-Performance Loader.
M
Machine notes Intro-10 Manuals for additional Informix products, listed 4-21 listed 4-16 See also Documentation. Media failure, restoring data 1-18 Memory management buffering transactions 1-15 dynamically sharing memory 1-15 Message file for error messages Intro-9 Method, access 2-21 Migration, information on 3-21 Mirroring description of 1-19 logical volume manager alternative 1-20 RAID alternative 1-20 Module, DataBlade 2-35 Monitoring tools database server utilities 3-24 UNIX 3-23 Windows NT 3-23 Multiplexed connection, description of 1-11 Multithreaded processes, description of 1-9
O
Object-oriented database management system 1-3 Object-relational database 2-20 Object-relational database management system 1-3, 1-5 OLTP applications, description of 2-24 ON-Archive description of 2-13 ontape compatibility 2-14 onaudit utility 2-11, 4-9 ON-Bar, described 2-14 oncheck utility 2-11, 4-7 oncockpit 3-5 ONCONFIG configuration file 3-12 configuration file, description of 3-16 configuration file, for different environments 3-16 environment variable 3-12 ondblog utility 2-11 oninit utility 2-11, 4-7 On-line help Intro-9 On-line manuals Intro-9 on-line mode 3-18 onload utility 2-11 onlog utility 2-11, 4-7 onmode utility 2-11, 4-7, 4-8 onparams utility 2-11, 4-7 onperf utility 2-11, 4-8 described 1-25 onpload utility 2-10, 4-9 onprobe 3-5 onshowaudit utility 2-11, 4-9 onspaces utility 2-11, 4-7 onstat utility 2-11, 4-7 ontape utility 4-7 compatibility with ON-Archive 2-14 described 2-13 listed 2-11 onunload utility 2-11, 2-15
Operating system and scalability 1-13 managing I/O 1-14 raw and cooked disk space 1-9 thread processing 1-9 UNIX files 1-9 using tools 3-23 Operational data store, described 2-19 Optical media advantages of 3-6 platter 3-6 Optical Subsystem described 3-6 Optimizer, cost-based 2-9
P
Parallel database query 1-17 Parallel processing, mentioned 1-15 Parallelization, described 1-17 passwd file 3-15 PATH environment variable 3-12, 3-19 PDQ. See Parallel database query. Performance advantages of raw-disk management 1-14 and DB/Cockpit 3-5 and shared memory 1-7 capturing data 3-23 data replication 2-7 Enterprise Replication 2-8 fragmentation 1-16 High-Performance Loader 2-9 memory management 1-15 monitoring 3-22 onperf 1-25 parallelization 1-17 Performance Monitor 3-23 scalability 1-13 SPL routines 2-4 tuning mechanisms 1-14 UDRs 2-34 Physical units of storage, list of 1-8 Platform icons Intro-8
N
Named pipe connection, mentioned 1-12 Named row type, definition of 2-31 Name, long user 2-26 Network configuration files 3-15 connection information 3-15 management with SNMP 3-5 security files 3-15 Network connection 1-12 New features of this product Intro-5
Index 5
Point-in-time recovery, described 1-21 Preparing, the ONCONFIG file 3-16 Primary access method 2-23 Printed manuals Intro-9, 4-16 Processes, compared to threads 1-9 Product installation 3-10 Product icons Intro-8 Products, supported 3-4 Program group Documentation notes Intro-11 Release notes Intro-11 Protocol. See Network.
Q
Query and cost-based optimizer 2-9 definition of 2-3 distributed 1-22 language, structured 2-3 on system catalog 2-5 parallel database 1-17
R
RAID as mirroring alternative 1-20 Raw disk management 1-14 space 1-9 RDBMS. See Relational database management system. Recovery ON-Bar 2-14 point-in-time 1-21 tools you cannot use 2-15 Registry HKEY_LOCAL_MACHINE 3-16 setting environment variables in 3-14 sqlhosts information 1-11 Related reading Intro-11
Relational database and DB-Access 3-5 and SQL 2-3 application types 2-24 components of 1-4, 2-3 data types 2-6 demonstration 3-20 multithreaded server 1-6 object-oriented 2-20 system catalog 2-5 Relational database management system described 1-5 illustrated 1-4 object, described 1-5 Release notes Intro-10 Repository, described 2-19 Requirements ANSI 2-16 basic configuration 3-11 UNIX security 1-24 Resource manager, in DTP environment 2-18 Restore description of 2-12 ON-Bar 2-14 point-in-time 1-21 .rhosts file 3-15 rofferr script 3-21 rofferr utility Intro-10 Role separation, description of 2-29 Roll back defined 2-28 mentioned 1-19 Roll forward, mentioned 1-19 Round-robin fragmentation 1-16 Routine, external 2-34 Row type named 2-31 unnamed 2-31 R-tree access method 2-23
S
Salvaging logical-log files 2-12 Sbspace, description of 2-33 Schema, Information 2-29 Script dbaccessdemo 3-20 dbaccessdemo_ud 3-20 esqldemo 3-20 finderr 3-21 installation 3-10 rofferr 3-21 SDK products supported 3-6 Security database server 1-24 files for network 3-15 role separation 2-29 with stored procedures 1-24 Server. See Database server. services file 3-15 SET LOG statement 2-28 Setting environment variables 3-13, 3-14 Shared data 1-7 Shared memory dynamic, management of 1-15 for interprocess communication 1-7 performance 1-7 purposes of 1-7 Shared-statement cache 2-26 Simple large object, definition of 2-32 Smart large object 2-33 API, mentioned 2-33 description of 2-33 sbspaces, and 2-33 SMI. See System-monitoring interface. SMP. See Symmetric multiprocessing. SNMP, described 3-5 Software dependencies Intro-4 SQL API, configuring environment for 3-19
SQL statement for database server security 1-24 shared caching 2-26 sqlhosts file description of 3-15 SQL. See Structured Query Language. Stored procedure language, relation to SQL 2-4 Stored procedure, and security 1-24 stores_demo database Intro-5 stores_demo database, overview of 3-20 Structured Query Language and client applications 1-10 and initial connection to database server 3-20 relation to SPL 2-4 superstores Intro-5 superstores_demo database Intro-5 superstores_demo database, overview of 3-20 Support buffered logging 2-28 client/server configurations 1-13 connection types 1-11 data replication 2-7 data types 1-4, 2-6 data warehouse 2-19 database 2-16 global language feature 2-25 high-performance loader 2-10 interface and client product 3-4 logical units 1-8 manuals for products 4-21 multimedia 1-21 network connection 1-12 physical units 1-8 TEXT and BYTE on optical platter 3-6 utilities 2-10 Symmetric multiprocessing and dynamic scalable architecture 1-6 description of 1-13 Synchronous data replication 2-7 System catalog, description of 2-5
System failure, and ON-Bar 2-14 System requirements database Intro-4 software Intro-4 System-monitoring interface and administration 1-22 and performance 3-24
T
Table access methods 2-21 fragmentation 1-16 information on 2-29 inheritance 2-32 locking 2-27 replication 2-8 security level 1-24 system catalog 2-5 Table fragmentation. See Fragmentation. Task-documentation matrix 4-5 Tasks administrative 3-21 basic, listed 3-3 documentation for 4-5 for application developers 4-4 for database administrators 4-4 for database server administrators 4-4 for database server operators 4-4 for database users 4-5 for programmers 4-4 TERM environment variable 3-12 TEXT data type 2-32 Thread description of 1-9 dynamic allocation of 1-15 for client applications 1-9 Tip icons Intro-7 Tool data management 2-7 DB/Cockpit 3-5 dynamic system administration 1-22 graphical administration 1-25 performance monitoring 3-23 SMI 1-22
TP/XA described 2-18 library 2-18 when to use 2-18 Transaction definition of 2-17 distributed 2-17 rolling back 2-28 Transaction logging buffered 2-28 effect on database server type 2-28 using SET LOG statement 2-28 Tree B 2-22 R 2-22
U
UNIX operating system default locale for Intro-4 files 1-9 security requirements 1-24 setting environment variables 3-13 Unnamed row type, definition of 2-31 User name, long 2-26 User-defined access methods 2-36 User-defined aggregate (UDA) 2-36 User-defined data types 2-30 User-defined routine (UDR) and UDA 2-36 benefits 2-34 description of 2-34 developing 3-10 Users, types of Intro-3, 4-3 Utilities command-line, and setenv.cmd 3-14 data management 2-7 for auditing 4-20 for migration 4-19 listed 2-10 not to use for recovery 2-15 UNIX 3-23
Index 7
Utility chkenv 3-13 DB-Access 3-5, 3-20, 4-15, 4-17 dbexport 2-10, 2-15, 4-8 dbimport 2-10, 4-8 dbload 2-10, 4-8 dbschema 2-11, 2-29, 4-8 DB/Cockpit 3-5 Informix Find Error 3-21 iostat 3-23 ipload 2-10, 4-9 onaudit 2-11, 4-9 oncheck 2-11, 4-7 ondblog 2-11 oninit 2-11, 4-7 onload 2-11 onlog 2-11, 4-7 onmode 2-11, 4-7, 4-8 onparams 2-11, 4-7 onperf 2-11, 4-8 onpload 2-10, 4-9 onshowaudit 2-11, 4-9 onspaces 2-11, 4-7 onstat 2-11, 4-7 ontape 2-11, 2-13, 4-7 onunload 2-11, 2-15 ps 3-23 sar 3-23 vmstat 3-23
W
Warning icons Intro-7 Windows NT default locale for Intro-4 Performance Monitor 3-23 setting environment variables 3-14
X
XA interface standard, adherence to 2-18 X/Open compliance level Intro-13
V
View information on 2-29 Information Schema 2-11 Virtual processor description of 1-9 dynamic thread allocation 1-15 shared-memory component 1-7 user-defined 2-36