You are on page 1of 116

IBM Software An IBM Proof of Technology

Information Management

Introduction to Informix v2
Presentation
An IBM Proof of Technology
PoT.IM.09.1.078.01

© Copyright IBM Corporation, 2013


US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
An IBM Proof of Technology

Introduction to Informix

V. 2 © 2013 IBM Corporation

IBM Software

Welcome to the Technical Exploration Center


• Introductions
• Access restrictions
• Restrooms
• Emergency Exits
• Smoking Policy
• Breakfast/Lunch/Snacks – location and time
• Special meal requirements?

© 2013 IBM Corporation


2 Introduction to Informix – V2

Page 3
IBM Software

Introductions
• Please introduce yourself

• Name and organization

• Current integration
technologies/tools in use

What do you want out of this Exploration session?

© 2013 IBM Corporation


3 Introduction to Informix – V2

IBM Software

Agenda
• Getting to know the data server
– Overview
– Architecture, including extensibility
– Key components

• Installing and initializing


– The OpenAdmin Tool (OAT)

• Interacting with the instance


• Basic administrative tasks
• Backup and recovery
• Overview of the lab exercises
• Supplemental material

© 2013 IBM Corporation


4 Introduction to Informix – V2

Page 4
IBM Software

Getting to know the data server

© 2013 IBM Corporation

IBM Software

Getting to know the data server


• It is impossible to explain or cover everything about IBM®
Informix® here. There are many resources:
– IBM documentation at the Informix Information Center
– IBM Redbooks/papers - http://www.redbooks.ibm.com/cgi-
bin/searchsite.cgi?query=informix
– Third party books – check your favorite book seller

ISBN-13: 978-1-58347-076-3
6 Introduction to Informix – V2 ISBN-10: 158347076X
© 2013 IBM Corporation

Page 5
IBM Software

Getting to know the data server


• Another invaluable resource is the International Informix Users
Group – iiug.org
– Free to join
– Sponsors an annual conference
– Supports local Informix user groups worldwide
– Multiple discussion groups for getting technical help
• Doesn’t replace IBM’s technical support however
– World’s largest repository of Informix code / utilities

© 2013 IBM Corporation


7 Introduction to Informix – V2

IBM Software

Getting to know the data server


• Informix was purchased by IBM in 2000 / 2001
– A number of reasons
• One of the largest and most loyal customer bases
• Unique technology

• IBM continues to invest in Informix, its technology, and its sales

• Informix enables IBM to offer products and services no other


company can

• It is important to understand that the database does matter


– Most application developers will say it doesn’t because they will do all the work
in the app. However, the right database can
• Do a lot of the work for them
• Make the environment more stable and easier to manage

© 2013 IBM Corporation


8 Introduction to Informix – V2

Page 6
IBM Software

Getting to know the data server


• Informix is a critical part of the IBM database family

Optimized for very high Optimized for large


performance transactions requiring scale DW solutions
very low latency response

Optimized for maximum


flexibility and performance
in diverse workload and
operating system environments

Optimized for solutions requiring


the highest levels of transaction & data
volume and performance
Top performance transaction-intensive
solutions, near hands free administration, and
clustering for high-availability and data
replication. Now with the fastest DW
technology on the planet!
© 2013 IBM Corporation
9 Introduction to Informix – V2

IBM Software

Getting to know the data server


• Informix 12 continues the “Simply Powerful” technology offered by
Informix since the first release of version 7.x in the early 1990s

• Informix was the first vendor to offer


– A true multi-threaded engine
– True parallelism within the engine
– Intelligent logical disk fragmentation or partitioning
– True scalability across hardware, specifically CPU, RAM, disk

• Informix 12 is the beginning of the next decade of feature,


functionality and performance enhancements
– Data warehousing / analytics
– Sensor and spatial data
– Data replication
– Autonomics

© 2013 IBM Corporation


10 Introduction to Informix – V2

Page 7
IBM Software

Getting to know the data server


• IBM makes it easy to start using Informix – Informix Developer
Edition
– A FREE edition of Informix 12 for developers to promote application
development and drive market share
– Available from the IBM Informix downloads page or the IIUG repository

• Full functionality - with scalability limits


– 1 CPU VP (i.e. 1 processor core)
– 1 GB memory
– 8 GB database size
– 20 connections limit

• Enterprise Edition Features


– H/A, replication and Grid Clustering
– Sensor / spatial support
– Many advanced analytic features
© 2013 IBM Corporation
11 Introduction to Informix – V2

IBM Software

Getting to know the data server


• Informix supports a broad range of programming languages and
connectivity drivers
– For more in-depth discussion of these
topics, see Informix Dynamic Server
Application Development: Getting Started
by Jacques Roy
An IBM flash book

© 2013 IBM Corporation


12 Introduction to Informix – V2

Page 8
IBM Software

Getting to know the data server


• Informix supports a broad range of programming languages and
connectivity drivers (cont.)
– Java
• Integrated type 4 JDBC driver
– PHP
• PDO_IBM – common IBM driver for all databases
• PDO_INFORMIX – Informix specific driver for SQLI protocol

– Zend framework
• Supported through Informix’s DRDA protocol
– Ruby / Rails
• Several gem and adaptors available
– Perl / Python
• DBD::Informix and DBD::ODBC support for Perl
• InformixDB driver for Python

– .Net
• Informix .Net provider – Informix specific provider
• IBM Data Server .Net provider – Uses the DRDA protocol © 2013 IBM Corporation
13 Introduction to Informix – V2

IBM Software

© 2013 IBM Corporation

Page 9
IBM Software

Getting to know the data server


Architecture and extensibility

© 2013 IBM Corporation

IBM Software

Architecture and extensibility


• Informix’s three component architecture is called Dynamic Scalable
Architecture (DSA)
– Informix has proprietary and highly optimized implementations of several of
these components

© 2013 IBM Corporation


16 Introduction to Informix – V2

Page 10
IBM Software

Architecture and extensibility


• An “instance” is a tunable instantiation of disk, memory, CPU
– Can host multiple databases
• Databases share the same resources within their instance
As users connect, session
pools built within pre-
allocated memory – no
additional memory necessary

VP’s – can work on behalf


of 1 user or all users. The
threading architecture
allows fast and efficient
distribution of the work

Disk space pre-allocated as


chunks in dbspaces. user
structures will be allocated
from this available space
© 2013 IBM Corporation
17 Introduction to Informix – V2

IBM Software

Architecture and extensibility


• A physical (or virtual) server can host more than one active
instance
– Each tuned for the requirements of that environment
• Maybe OLTP vs OLAP
• Or just for data separation

© 2013 IBM Corporation


18 Introduction to Informix – V2

Page 11
IBM Software

The CPU component of the DSA

© 2013 IBM Corporation

IBM Software

Architecture and extensibility


• This is one of the two key areas of differentiation between Informix
and other data servers on the market today

• Almost all other data servers are single-threaded, process-based


servers
– The data server forks additional separate processes for users as they connect
and execute operations

– A ps –ef will show hundreds to thousands of processes in the O/S

• Two big problems with this approach


– Isolation of repetitive operations
• Commonly reoccurring tasks (e.g. I/O) must constantly be reloaded into the CPU
registers
– Severe limitations on performance scalability
• Have to wait for one task to complete (scan) before starting another (join)
• O/S becomes burdened with an increasingly heavy workload to manage
• Takes too long for a process to return to the top of the stack for CPU timeslice
• Context switches can interfere with task completion © 2013 IBM Corporation
20 Introduction to Informix – V2

Page 12
IBM Software

Architecture and extensibility


• With process-based engines, instructions and data must be loaded
and unloaded from the CPU/core stack for each user and operation
– Called a “context switch”
– Context switches take time to execute which reduces the amount of actual
processing time an operation receives

– As the number of processes increases, each process waits longer and longer
for its turn on the CPU/core

Processes Context switches

p5
p4 p4 p4
p6
p3 p3 p3 p7
p2 p2 p2 p8
p1 p1 p1 p1

CPU usage over time

© 2013 IBM Corporation


21 Introduction to Informix – V2

IBM Software

Architecture and extensibility


• With single-threaded data servers, each process gets the same
amount of processing time whether it actually needs more or less
time
– Including process idle time and time lost with context switches -- these engines
squander CPU resources and have limited scalability

100

CPU
utilization

CPU being used

CPU idle, not


0 working on
process
Can waste 50% or more of CPU resources!!
© 2013 IBM Corporation
22 Introduction to Informix – V2

Page 13
IBM Software

Architecture and extensibility


• In 1993 Informix transitioned from a single-threaded architecture to
a fully multi-threaded environment to support the then-nascent
multi-processor platforms from Sequent and others
• Created custom, database-
specific thread libraries to
execute operations
– Not Posix threads, they didn’t exist at CPU AIO UD-VP Encrypt

the time!! Virtual Processors


Shared Memory
– The libraries are not O/S dependent SQL
Session Cache Message
Easily portable between O/Ss’ Info Buffers

– Integrated parallelism
CPU 1 CPU 2 CPU 3 CPU 4
Can control the O/S to a degree
Scalable

© 2013 IBM Corporation


23 Introduction to Informix – V2

IBM Software

Architecture and extensibility


• Each data server process is called a “virtual processor” (VP)
because it schedules and executes end-user task threads

• VPs are divided into different “classes” based on functionality


– SQL processing
– Network communication
– I/O and so on

• User operations are broken into discrete operational threads that


run on VPs supporting each thread type

© 2013 IBM Corporation


24 Introduction to Informix – V2

Page 14
IBM Software

Architecture and extensibility


• From an O/S perspective, when the VP / Informix process is loaded
into the CPU registers, only one instruction set is loaded and is
constantly re-executed
– SQL processing, I/O, network, etc.

– The VP manages internal context switches by changing pointers to different


end-user data buffers
• So an SQL VP can work on one user’s task then switch to another user’s task
without requiring a change at the CPU or O/S level
• No waiting for process-oriented time slices to work on a task

• VPs have limited powers to over-ride the O/S on physical context


switches
– If a task needs X more time to complete, the VP can block the context switch
of its process until the task completes
• Increases performance

© 2013 IBM Corporation


25 Introduction to Informix – V2

IBM Software

Architecture and extensibility


• Another advantage of the DSA processor algorithms is fan-in and
fan-out parallelism
– Fan-in – a single VP can process tasks for multiple users within a timeslice
– Fan-out – a large, complicated task can be be broken into parts that are
executed simultaneously by multiple VPs to produce a consolidated result
• Divide and conquer approach
Fan-in Fan-out
CPU / core

CPU / core 1 CPU / core 2 CPU / core 3

VP

VP-3 VP-2 VP-1

End-user tasks
© 2013 IBM Corporation
26 Introduction to Informix – V2

Page 15
IBM Software

Architecture and extensibility


• With fan-in / fan-out parallelism and internal context switching,
Informix fully and efficiently utilizes all CPU resources allocated to
the instance
– Better scalability
– Better ROI and longer length of service for H/W servers

100

CPU
utilization

CPU being used

CPU idle, not


0 working on
process
© 2013 IBM Corporation
27 Introduction to Informix – V2

IBM Software

© 2013 IBM Corporation

Page 16
IBM Software

The memory component of the DSA

© 2013 IBM Corporation

IBM Software

Architecture and extensibility


• The second key area of differentiation -- memory allocated to
Informix is divided into different “pools” within each instance
– Some of these pools can dynamically expand and shrink as needed to
support instance operations
• Do not have to tune for worst-case situations and over-allocate / waste resources
during light-to-normal conditions
• As workload increases, the instance can automatically allocate resources to perform
the work
• When the workload decrease, the resources are released back to the O/S for other
processes to use

– Administrators can set limits on dynamic allocation


• Whether or not it occurs
• How much can be allocated

© 2013 IBM Corporation


30 Introduction to Informix – V2

Page 17
IBM Software

Architecture and extensibility


• Resident portion
– Contains data buffers
of end-user data and
other critical structures
• Size is tunable

• Virtual portion
– User thread stacks for
operations, in-memory
sort space and other
objects
• Tunable but dynamic

• Message and Virtual-


extension portions
– System use
• Not tunable
© 2013 IBM Corporation
31 Introduction to Informix – V2

IBM Software

Architecture and extensibility


• When initializing an instance, administrators set an initial allocation
for two pools
– Resident – the number of buffers
• Buffer size is determined by page size in chunks/dbspaces (discussed later)
• Can have X buffers for 2kb pages and Y buffers for 6kb pages and so on

• Portion size = sum(num_buffers * buffer_size)

– Virtual – a numeric value in kb


• This portion can dynamically expand beyond the initial allocation
• Controlled by two parameters – how much to add each time and the total amount
that can be allocated

© 2013 IBM Corporation


32 Introduction to Informix – V2

Page 18
IBM Software

© 2013 IBM Corporation

IBM Software

The disk component of the DSA

© 2013 IBM Corporation

Page 19
IBM Software

Architecture and extensibility


• While Informix was the leader in developing and deploying data
fragmentation functionality, today almost all data servers provide
similar functionality

• With Informix’ intelligent fragmentation, the query optimizer uses


fragmentation rules to access data as efficiently as possible
– No need to scan a fragment if the fragmentation rule precludes target data
from being stored there

• Fragmentation rules also provide administrative benefits


– Fragments can be detached or dropped to quickly prune table data
• For example, only want a rolling 6 months

© 2013 IBM Corporation


35 Introduction to Informix – V2

IBM Software

Architecture and extensibility


• Informix provides several fragmentation options
– Round robin – even data distribution across dbspaces

– By expression – data is distributed into dbspaces based on rules created


through SQL
• For example, Division 1 in dbspace_12, Division 2 in dbspace_13

– Range / interval – Some fragmentation values are known, but need to


dynamically adapt as new ranges are received

– List – potential data values for fragmentation are known and relatively limited
• Some support of out-of-bounds data values

• Informix can apply fragmentation rules to tables and indexes for


administrative and query processing efficiency
© 2013 IBM Corporation
36 Introduction to Informix – V2

Page 20
IBM Software

Architecture and extensibility


• Combining the attributes of DSA results in a faster data processing
system using a fraction of the H/W resources required by others

(Two table join) Fragmentation + threading = Performance!!

Write

Sort
Time to DSA processes
process tasks concurrently
DSA breaks tasks
Join into subtasks

Scan

Serial aka Parallel Parallelized


Single threaded © 2013 IBM Corporation
37 Introduction to Informix – V2

IBM Software

© 2013 IBM Corporation

Page 21
IBM Software

Informix extensibility

© 2013 IBM Corporation

IBM Software

Architecture and extensibility


• Informix has been an “extensible” database since 1995
– Acquired Illustra, an object-oriented database company and technology
– The Illustra technology was integrated into Informix starting in version 9

• Informix today is an ORDBMS – Object / Relational Database


Management System

• Informix offers a broad range of integrated, as well as for-fee


functionality that can be used in databases to solve complex
business problems with simple SQL statements
– Other databases claim to offer extensibility but looking under the covers (or
reading their manuals) reveals all they have done is create views on standard
relational tables to make them look object-oriented

© 2013 IBM Corporation


40 Introduction to Informix – V2

Page 22
IBM Software

Architecture and extensibility


• Example #1 – hierarchical data
– Extremely difficult to model with
relational objects Corporation

• Must be flattened into master-detail


relationships

• The relationships are nested, not


Region Region Region
regular 1:N model format

• Requires multiple passes through the


data to find all the recursive
relationships Branch Branch Branch

• Can only be solved with procedural or


set processing and as the levels
increase, the programming becomes Account
Account
more complex, losing the ability to Account

dynamically create SQL operations

© 2013 IBM Corporation


41 Introduction to Informix – V2

IBM Software

Architecture and extensibility


• A typical business question: who works for whom?

– The typical (and only) relational database oriented approach is to create a self-
referencing table

create table employee


( emp_id serial primary key,
mgr_id int,
address varchar(50) . . .);

create foreign key on employee (emp_id)


references employee (mgr_id);

© 2013 IBM Corporation


42 Introduction to Informix – V2

Page 23
IBM Software

Architecture and extensibility


• To answer the question of “who works
for whom?”, there are two relational
approaches:

– Procedural
• Select all employees for the specified manager
Select * from
• Recursively select all employees under each employee e1,
person employee e2,
employee e3,
• Performance impact: execution time increases
employee e4,
exponentially with each level employee e5

where e5.mgr_id = some_val
and e4.mgr_id = e5.emp_id

– Set processing and e3.mgr_id = e4.emp_id
 and
• For each level, select the employees e2.mgr_id = e3.emp_id
 and
• Performance impact: join complexity increases e1.mgr_id = e2.emp_id;
with each level

© 2013 IBM Corporation


43 Introduction to Informix – V2

IBM Software

Architecture and extensibility


• With Informix’ extensibility, a “hierarchical” data type can be
created that supports / understands peer ship, ancestry, descent
– Called the node type
• Can be indexed 1.0

–Includes functions like lessthan(),


greaterthan(), isancestor(), 1.1 1.2 1.3
isdescendant(), isparent(),
ischild() to query the hierarchical tree
1.2.1 1.2.2 1.2.3
select a.mgr_name,
b.emp_name,
isdescendant (a.col1, b.col1)
1.2.3.2 1.2.3.3 1.2.3.4
from employee a, employee b
where a.mgr_name = some_val
1.2.3.4.5

© 2013 IBM Corporation


44 Introduction to Informix – V2

Page 24
IBM Software

Architecture and extensibility


• Another business issue – spatial analysis
– For example: “Find all auto repair locations within 30 miles of where I am that
specialize in Porsche brakes and can help me in the next 5 days?”

• Can a standard, relational database engine solve this?


– No, SQL doesn’t understand points in space or how to join them to textual
descriptions

© 2013 IBM Corporation


45 Introduction to Informix – V2

IBM Software

Architecture and extensibility


• Informix has built-in data types and routines that can be used to
execute spatial queries easily
– Supports flat-earth mapping / geocoding
create table e_yellow_pages (
name varchar(128) not null,
business business_type not null,
description document not null,
location geopoint not null,
occupied set( period not null )
);

select y.name
from e_yellow_pages y
where contains ( y.location,
circle( :gps_loc, ‘30 miles’ ) )
and y.business match “automotive service”
and doccontains( y.description,
“porsche and brakes” )
and not booked ( y.occupied, period
(today,today+5));

© 2013 IBM Corporation


46 Introduction to Informix – V2

Page 25
IBM Software

Architecture and extensibility


• Another emerging business need is effectively storing and
retrieving data created repeatedly, for example:
– Electrical meter readings
– Manufacturing sensors for temperature, speed, alkalinity etc.
– Medical device output
– Financial transactions

• Key characteristic of this data is that it is time-based


– Can occur at regular intervals (every second, 5 minutes, hour etc.)
– Can occur at random times
– Can have “on” and “off” periods where events do not occur or are not recorded

• When storing the data, the time value is significant


– The data is accessed based on the time value
– Is usually read in ascending or descending order

© 2013 IBM Corporation


47 Introduction to Informix – V2

IBM Software

Architecture and extensibility


• Conceptually, people think of time-based data as an array
– “A” happens first, followed by “B”, then “C” etc.

• This type of time-based data can’t be effectively stored or retrieved


in a relational database

– To store financial trade


information, a relational table Stock Timestamp Price Volume
would look like this with multiple
LMN 2013-01-01 09:30:00.00000 12.34 100
indexes
XYZ 2013-01-01 09:30:00.00000 9.34 1000

– Each event has to have its own LMN 2013-01-01 09:30:00.00000 12.44 10
row storing the event data plus KCD 2013-01-01 09:30:00.00000 194.00 10000
redundant data that doesn’t
LMN 2013-01-01 09:30:00.00000 12.54 250
change from one event to the
next
As events occur, row count
explodes
© 2013 IBM Corporation
48 Introduction to Informix – V2

Page 26
IBM Software

Architecture and extensibility


• Problems with a relational approach
– Slow Performance
• Extremely slow data access, especially for ordered set of rows, due to the data
layout and disk I/O
• DML operations are hard or impossible to do in standard SQL

– High Storage Requirements


• Relational models must build "tall – thin" tables with a very large number of rows
• May need one index to enforce uniqueness and another for index only read
• More space used for index than data
• Huge space requirements in standard relational layout, due to the volume (number of
rows) and data(length of each row with its redundant data)

– Complex Querying
• Can be difficult to write SQL to work with the data

© 2013 IBM Corporation


49 Introduction to Informix – V2

IBM Software

Architecture and extensibility


• Informix has a native data type and routines that store and
manipulate time-based data efficiently

– The data is stored as an ordered set


• Redundant data is eliminated
• Uses less space because the "key" is factored out and the time field takes either 0
(for regular) or 11 ( for irregular) bytes
• Access is faster than index-only-read
• SQL can be made much simpler

Stock Transactions
XYZ 2006-01-01, daily, {(12.34,1234567), (12.56,950000), (12.34,5555567),..}
LMN 2006-05-05, daily, {(199.08,678900), (198.55,345000), (198.12,850250),..}
NOP 2003-09-01, daily, {(9.34,890567), (9.56,989000), (9.40,1000780),..}

© 2013 IBM Corporation


50 Introduction to Informix – V2

Page 27
IBM Software

Architecture and extensibility


• The advantage of Informix’ technology
– Performance
• Extremely fast data access: Physically ordered by time stamp
• Provides very high degree of parallelism on reads and writes
• Continuous loading of data with minimal impact on concurrent queries

– Space Savings
• Provides high degree of space saving
• Can be over 80% more efficient over standard relational layout

– Usability
• Bundled routines provide most commonly used functionality
• Can write custom functions if needed
• Handles operations hard or impossible to do in standard SQL

• Conceptually closer to how users think of time series data


• No other RDBMS has native time series support
© 2013 IBM Corporation
51 Introduction to Informix – V2

IBM Software

Architecture and extensibility


• Real world proof point – industry benchmark against “another
leading data base”

5 times the performance 1/5 of the resources


Daily Readings
Total cores for the solution
(meters * registers * intervals)

Informix 4,900,000,000 Informix 16

Competition 970,000,000
Competition 228

– Informix used 1 node


– Competition required 8 nodes

– Difference in memory required for each solution is similar to the difference in


cores

© 2013 IBM Corporation


52 Introduction to Informix – V2

Page 28
IBM Software

Architecture and extensibility


• Informix’ portfolio of advanced functionality can be combined
together to create even more powerful applications

• For example spatial and time-based together for a delivery service

– Where is the truck now?

© 2013 IBM Corporation


53 Introduction to Informix – V2

IBM Software

Architecture and extensibility


• Where has the truck been over time?
– Did it detour outside of its assigned route?

This application
was written in
PHP and Perl

© 2013 IBM Corporation


54 Introduction to Informix – V2

Page 29
IBM Software

Architecture and extensibility


• In addition to location, other information from the vehicle can be
recorded over time
– For example, fuel consumption

© 2013 IBM Corporation


55 Introduction to Informix – V2

IBM Software

© 2013 IBM Corporation

Page 30
IBM Software

Getting to know the data server


Key components

© 2013 IBM Corporation

IBM Software

Key components

• The lowest level of


Informix storage is a
page page
“page”
page page – 2 – 16 kb in size, O/S
dependent
• Default is either 2
or 4 kb
• All I/O is page
based
• Can not administer
pages directly
• An instance can
have dbspaces with
different page sizes

© 2013 IBM Corporation


58 Introduction to Informix – V2

Page 31
IBM Software

Key components
• While pages aren’t administered directly, their size is important
– Set when a dbspace is created

• Page size determines how efficiently data is stored on disk


– For example, a table’s row is 3 kb long
• Using 2 KB pages, 2 pages (4KB) is required to store the row
• 1 KB is not used / wasted on the “remainder page”

• Using 6 KB pages, 2 rows can be stored without any wasted space

• Minimizing wasted space becomes critical as row count increases

• For each page size used in the instance, a separate buffer pool (of
that page size) is created
– So a page’s data can be stored in a single buffer
– The size of each buffer pool is configurable
– All spaces of a given page size use a single buffer pool of that size © 2013 IBM Corporation
59 Introduction to Informix – V2

IBM Software

Key components
• Part of the instance / database design process (discussed later)
should include determining the most efficient page size for the
most important and / or largest tables and indexes
– Dbspaces using those different page sizes would be created

– When deploying / creating the database, tables would be created in the “right
sized” dbspace

© 2013 IBM Corporation


60 Introduction to Informix – V2

Page 32
IBM Software

Key components • Multiple pages


create another
physical entity - the
“chunk”
page page
• Can be either a
page page “cooked” or “raw”
Chunk device
– Cooked - regular file
system flat files
– Raw - unformatted
disk partition

• Chunks aren’t really


administered
directly
– It is possible to add
to a chunk to
dbspace to increase
the size or storage
locations of the
dbspace © 2013 IBM Corporation
61 Introduction to Informix – V2

IBM Software

Key components
• In earlier versions of Informix, a chunk’s size was fixed and
unchangeable once created

• Now, a chunk can dynamically increase in size if it is about to fill up


– Is configurable on a per-chunk basis
• Can set some chunks to dynamically expand while others do not

– This works best when cooked files are used for chunks
• The file’s size is increased

• If dynamic chunk expansion is not enabled, there are other options


to dynamically respond to out-of-disk-space conditions within the
instance
– Not discussed in this class

© 2013 IBM Corporation


62 Introduction to Informix – V2

Page 33
IBM Software

Key components • A “dbspace” is


composed of one or
more chunks
– logical construct
page page – most administration
occurs at a dbspace
page page level

Chunk • Databases, tables,


indexes are created
in dbspaces
• Several types of
dbspaces
– Regular
Chunk – Temporary
– simple BLOBspace
dbspace – smart BLOBspace
• Every instance has
at least one
dbspace -- the
63 Introduction to Informix – V2
rootdbs © 2013 IBM Corporation

IBM Software

Key components
• In earlier versions of Informix, a dbspace’s size was static
– Its size was determined by the number and size of its chunks
– If a dbspace was running out of space, the only solution was to add another
chunk

• With dynamically expandable chunk sizes, a dbspace’s size can


also be dynamic
– Depends on whether or not the underlying chunks can dynamically expand

• As a result, there are two options when planning for potential out-
of-space conditions in a dbspace
– Allow the underlying chunks to dynamically expand

– Add an additional chunk to the dbspace


• This can occur dynamically as well, not discussed in this class

© 2013 IBM Corporation


64 Introduction to Informix – V2

Page 34
IBM Software

Key components • One or more


dbspaces are used
to store data in an
“instance”
page page
– Logical construct
page page • Tunable database
Chunk operating
environment
• Multiple instances
can operate
simultaneously on a
single server
Chunk – Each instance can
contain multiple
dbspace dbspace
databases with their
associated tables,
instance indexes and other
objects

© 2013 IBM Corporation


65 Introduction to Informix – V2

IBM Software

Key components
• Critical files, locations or objects
– $INFORMIXDIR
• The directory where the Informix binary is installed
• Usually /opt/IBM/informix/version_number
• $INFORMIXDIR/bin needs to be in the $PATH on the server hosting Informix
instances

– onconfig.some_name
• The instance’s configuration file
• Where instance processor, memory and other parameters are set
• Is located in $INFORMIXDIR/etc

– sqlhosts
• Contains connection information for Informix data services
• It’s like a phone book – what server(s) are hosting Informix services and what port
numbers are being used?
• Is located in $INFORMIXDIR/etc

© 2013 IBM Corporation


66 Introduction to Informix – V2

Page 35
IBM Software

Key components
• Critical files, locations or objects (cont.)
– /etc/services (or equivalent, O/S dependent)
• Edited to reflect which port numbers are being used for Informix service
communication
• Port number entries from this file are used in conjunction with the sqlhosts file

– For cross-server authentication


• Informix authenticates user connections at the O/S level, not from within the
database itself as some other products do
• To facilitate O/S-based authentication, entries may be made in these files
• /etc/hosts.equiv
• $HOME/.rhosts
• $HOME/.netrc (on client)
• See the Informix Administrators Guide or third-party books for a discussion of this
functionality

© 2013 IBM Corporation


67 Introduction to Informix – V2

IBM Software

Key components
• Critical instance components
– rootdbs
• The core dbspace in the instance, is typically named rootdbs
• Contains instance-level databases and other objects
• Location and size defined in $ONCONFIG

– Physical log
• Contains “before” images of changed data
• Used to ensure transactional consistency during normal operations (rolling back
aborted transactions) and when restarting the instance after an abnormal shutdown
• The instance can not function without it
• Initial location and size defined in $ONCONFIG
• Created in the rootdbs when an instance is initialized, it is usually moved to a
dedicated log space
• Can be moved or resized dynamically while the instance is operational

© 2013 IBM Corporation


68 Introduction to Informix – V2

Page 36
IBM Software

Key components
• Critical instance components (cont.)
– Logical Logs
• Contains transaction records of changed data in logged databases
An instance must
have at least 3
logical logs
• Location and
size defined in
$ONCONFIG

© 2013 IBM Corporation


69 Introduction to Informix – V2

IBM Software

Key components
• Critical instance components (cont.)
– Logical Logs (cont.)
• Created in the rootdbs when an instance is initialized, these logs are usually
moved to a dedicated log space

• Logical logs can be dynamically created or dropped while the instance is operational
• When creating a logical log, its size and the dbspace it’s stored in can be specified

• Logical logs are cyclical objects, will be over written with new transaction information
• Filled logical logs MUST be backed up / archived regularly to enable re-use
• Logical log backups are critical components when attempting to restore an
instance or parts thereof

• When planning an instance’s final configuration, how many logical logs should there
be and what size?
• It depends on perceived business risk and backup / recovery strategy
• Best practice – logs should fill every 15 - 20 minutes under normal workloads,
should have enough logical logs to hold 1 - 2 days of transactions
© 2013 IBM Corporation
70 Introduction to Informix – V2

Page 37
IBM Software

Key components
• Best practice for installing Informix
11_7

12_1

scripts koetari (sym links)


/opt/IBM/informix
devices odra (sym links)

logs (current) old_logs

shared_libs

© 2013 IBM Corporation


71 Introduction to Informix – V2

IBM Software

Key components
• A peek at $ONCONFIG

Comments and parameter


recommendations

Parameters

© 2013 IBM Corporation


72 Introduction to Informix – V2

Page 38
IBM Software

Key components
• A peek at $ONCONFIG

© 2013 IBM Corporation


73 Introduction to Informix – V2

IBM Software

Key components
• A peek at $SQLHOSTS

Five fields to this file:


•Instance name / alias
•Connection protocol
• Network or shared
memory
•Physical server name / IP
address
•Port alias / number
•Additional connection
parameters

© 2013 IBM Corporation


74 Introduction to Informix – V2

Page 39
IBM Software

© 2013 IBM Corporation

IBM Software

Installing and initializing

© 2013 IBM Corporation

Page 40
IBM Software

Installing and initializing


• Preparing for the installation of Informix, along with the databases
the instances will support, involves a number of steps
• Though computing has advanced, the basics are still the same

– Logical and physical design of instance(s) and the databases


• Goal is to maximize I/O throughput with a minimum of contention
– Prepare the physical server
• Read the release notes for any kernel requirements
• Tune kernel as required
• Optional -- can create the informx user ID and group

– Prepare disk space to support chunks / dbspaces


• Create raw partitions OR
• Create files
– Install the Informix binary
• Modify critical instance files
– Initialize instance(s)
© 2013 IBM Corporation
77 Introduction to Informix – V2

IBM Software

Installing and initializing


• Logical and physical design of instance(s) and the databases
– Though large storage arrays are very common today, the basic rules of
database I/O have not changed

• More, separately allocated disk allocations on different disks are better than multiple
subsets from a single RAIDSET
• Otherwise I/O becomes serialized

• Must, when possible, design to the physical devices to ensure throughput while
minimizing I/O contention

• Plan for growth!


• Environments will live longer, and be larger, than planned
• Make sure there is forward planning for both

• Ensure tables are created in dbspaces using the most efficient row size for the data
• Increases buffer efficiency
• Minimizes wasted space

© 2013 IBM Corporation


78 Introduction to Informix – V2

Page 41
IBM Software

Installing and initializing


• Logical and physical design of instance(s) and the databases (cont.)
– Use indexes and constraints correctly, both logically and physically
• They are different
• Have different functions
• Operate differently in a database

– Indexes are used to improve query speed only

– Constraints (primary / foreign keys or column) enforce business rules


• If they also improve query results, that’s an added bonus

– As a result
• There should never be a unique index in a database
• If uniqueness is required, it’s a business rule to be enforced with the appropriate
constraint

• Use the correct constraint for the correct rule


• Never use a primary key when a column constraint better represents the rule
© 2013 IBM Corporation
79 Introduction to Informix – V2

IBM Software

Installing and initializing


• Logical and physical design of instance(s) and the databases (cont.)
– Using the correct constraint for the rule makes it easier to “read” and
understand the database and data relationships

– Important to realize that constraints operation differently than indexes


• Indexes enforce transaction scope at the entity level
• Constraints enforce transaction scope at the transaction level

– For example
Data in the table
my_table 1|some_text_1
(col1 integer, 2|some_text_2
col2 varchar(75), 3|some_text_3
. . . . .); 4|some_text_4
5|some_text_5
6|some_text_6
7|some_text_7
etc
© 2013 IBM Corporation
80 Introduction to Informix – V2

Page 42
IBM Software

Installing and initializing


• Logical and physical design of instance(s) and the databases (cont.)
– A decision is made to increase the minimum value of col1 by 4

update my_table set col1 = col1 + 4;

Data in the table


•If there was a unique index on col1 1|some_text_1
– Statement would fail on the first row 2|some_text_2
Value would change to 5 but uniqueness is 3|some_text_3
violated by another row with that value 4|some_text_4
5|some_text_5
•If there was unique constraint on col1 6|some_text_6
7|some_text_7
– Statement would execute successfully
etc
All rows would be updated to their new value then
checked for uniqueness

© 2013 IBM Corporation


81 Introduction to Informix – V2

IBM Software

Installing and initializing


• Logical and physical design of instance(s) and the databases (cont.)

• With Informix, indexes (regular and unique) can be promoted to


being constraints
– Many constraints (PK, FK and unique) are supported by indexes under the
covers
– Constraint will create the index if one doesn’t exist and matches attributes

• Best practice for index supported constraints


– Create the index (regular or unique) first
• Can create in dbspace(s) of choice
• With or without additional fragmentation
• Can size index

– Promote the index to being a constraint


• Execute an alter table add constraint operation
• Constraint will pick up and use index created in earlier step
© 2013 IBM Corporation
82 Introduction to Informix – V2

Page 43
IBM Software

Installing and initializing


• Prepare the physical server
– Read the last minute release and machine notes
• Located in the release subdirectory when the Informix binary is extracted from the
tar-ball
• Pay attention to the kernel tuning recommendations
• Make changes as necessary

– While it is not strictly required, most administrators manually create the


informix user ID and group on the server
• The primary group for the informix ID must be informix

• If not created here, the installation process will create them

• Most administrators use local authentication for this ID rather than using LDAP or
other mechanisms

© 2013 IBM Corporation


83 Introduction to Informix – V2

IBM Software

Installing and initializing


• Prepare disk space to support chunks / dbspaces
– Can create $INFORMIXDIR though the installation process will do it
automatically if it doesn’t exist

– Create the other directories as needed in the Informix hierarchy as shown


earlier
• Ownership: informix:informix

– If using cooked space, create the files and symbolic links


• These files MUST have informix:informix ownership and 660 permissions
• The upstream directory structure also has security requirements (informix owner
& 755) which will be enforced / reset by the Informix security check mechanism

– If using raw space, create the character-based partitions and the symbolic links
to them

© 2013 IBM Corporation


84 Introduction to Informix – V2

Page 44
IBM Software

Installing and initializing


• Prepare disk space to support chunks / dbspaces (cont.)

This example shows


flat files but the target
devices could have
been

/dev/rmt/c3t4d0/snum

Where num is the


actual raw disk slice

© 2013 IBM Corporation


85 Introduction to Informix – V2

IBM Software

Installing and initializing


• Informix has several mechanisms for installing the binary
– Some are end-user oriented
– Some are partner / OEM oriented
• Though can be used by end-user organizations if multiple identical installations are
required

• Regardless of the mechanism used, at some point for a normal,


multi-user Informix environment, root privileges are required
– Can be through su or sudo

– Required to
• Create the informix ID and group if it doesn’t already exist
• Change file ownership and set security permissions

© 2013 IBM Corporation


86 Introduction to Informix – V2

Page 45
IBM Software

Installing and initializing


• As a point of information -- Informix does support a “private”
installation procedure that does not require root level permissions
– Restrict instance functionality to a specific user
– Not all Informix features and functions are available

• This procedure is not covered in this presentation

© 2013 IBM Corporation


87 Introduction to Informix – V2

IBM Software

Installing and initializing


• Informix has a modular installation scheme
– Can install just the required functionality
• Install footprint ~85 MB to ~560 mb

– Can re-execute the installer to add, or delete functionality as needed after first
install

• Each install mechanism provides options to perform a “typical” (all


components) or “custom” install

• Each install mechanism provides an option for the installer to


create and initialize a demonstration instance
– Has basic tuning and space allocation using flat files

© 2013 IBM Corporation


88 Introduction to Informix – V2

Page 46
IBM Software

Installing and initializing


• The Informix binary module organization

Informix
Extensions and Backup Demonstration Enterprise Admin
and database Dataload Utilities GLS Base Server
Tools Restore Replication Utilities
scripts
Performance Western
J/Foundation onunload
ON-Bar Monitoring Europe

Database
dbload Monitoring Eastern Europe
extensions TSM

Conversion Archecker HPL Auditing Chinese


Reversion

XML Database Import


Korean
Publishing Export Utility

CSDK I-Connect
Japanese

OAT Thai

© 2013 IBM Corporation


89 Introduction to Informix – V2

IBM Software

Installing and initializing


• The four installation mechanisms
– Command line
• A series of prompts from character-based displays
• Almost every prompt is followed by “Press 1 to continue”

© 2013 IBM Corporation


90 Introduction to Informix – V2

Page 47
IBM Software

Installing and initializing


• The four installation mechanisms (cont.)
– Graphical
• A bundled JRE is used to control this interface

© 2013 IBM Corporation


91 Introduction to Informix – V2

IBM Software

Installing and initializing


• The command-line and graphical installation mechanisms have a
option to “record” the installation enabling it to be “replayed” on
other servers
– Often called a “silent” install since no administration interaction is required
• The actions taken during an install operation are recorded into a configuration file
• The configuration file is used by another install operation to “replay” the earlier
installation without any additional administrative interaction
• Can be used directly for another stand-alone installation or embedded inside / as a
part of, a larger application installation operation

© 2013 IBM Corporation


92 Introduction to Informix – V2

Page 48
IBM Software

Installing and initializing


• Both the command line and graphical installation mechanisms
have an option where a significant part of the installation can be
executed by a non-privileged user ID
– Useful when the fully privileged administrator wants to delegate the installation
task(s) to someone who shouldn’t have / doesn’t need root-level permissions

– The “junior” administrator performs what is called a “legacy” installation using


the -Dlegacy=true flag
• This extracts the files into the proper directory but no permissions are set

– Afterwards, the privileged administrator with root-level permissions can


complete the installation by executing the RUNasroot script that is created as
part of the non-privileged installation

© 2013 IBM Corporation


93 Introduction to Informix – V2

IBM Software

Installing and initializing


• The four installation mechanisms (cont.)
– Deployment utility
– Oriented to partners and others interested in OEM style installations
• Binary and default set of data

– Extracts some or all of a source installation to create a complete installation


snapshot that can be replayed
• Command line or graphical support, default is graphical

• Can be used to extract


• Partial or whole Informix binary image
» Is binary module aware

• Instance data
» Cooked file support only at this time, not raw

• Both

© 2013 IBM Corporation


94 Introduction to Informix – V2

Page 49
IBM Software

Installing and initializing


• The four installation mechanisms (cont.)
– An associated utility is used to roll-out the snap shots

© 2013 IBM Corporation


95 Introduction to Informix – V2

IBM Software

Installing and initializing


• The four installation mechanisms (cont.)
– In Informix 12, an “easy start” installation mechanism was introduced
– Intended for partner / OEM style installs where it is not possible to pre-
configure environment or instance parameters

– A file is pathed into the install mechanism


• File can contain a broad range of parameters required for Informix to function
properly
• Location of $INFORMIXDIR
• $ONCONFIG parameters
• More

– Same functionality can be used for other Informix utilities so they function
properly in the absence of pre-set environment parameters
• Supported by the oninit, onmode, oncheck, onstat, ontape, onclean,
onload, onlog, onunload, onparams and onspaces binaries

© 2013 IBM Corporation


96 Introduction to Informix – V2

Page 50
IBM Software

Installing and initializing


• Initialize the instance
– Once the binary is installed, configuration of $ONCONFIG and $SQLHOSTS can
occur, if they weren’t already configured during installation

– Important $ONCONFIG parameter to set: FULL_DISK_INIT


• Must be set to 1 (one) for disk initialization to occur
• Used to prevent accidental instance initialization

– When everything is configured (disk, parameters, etc.) initialize the instance

– Best practice
• Monitor initialization through the instance log via tail –f
i – initialize instance
• Execute the initialization command v – verbose command output
w – wait for instance stability
oninit -ivwy before returning command
prompt
y – yes, execute the
initialization © 2013 IBM Corporation
97 Introduction to Informix – V2

IBM Software

Installing and initializing


• Initialize the instance
– Monitoring the instance log

© 2013 IBM Corporation


98 Introduction to Informix – V2

Page 51
IBM Software

© 2013 IBM Corporation

IBM Software

Installing and initializing


OpenAdmin Tool (OAT)

© 2013 IBM Corporation

Page 52
IBM Software

OpenAdmin Tool (OAT)


• One option in the Informix installation process is to install and
configure the OpenAdmin Tool (OAT)
– Graphical administration and monitoring tool for Informix instances
– Installed into $INFORMIXDIR/OAT

• OAT is part of the Informix Client Software Development Kit


(CSDK) and can be installed from a CSDK download itself

• OAT only needs to be installed once within the computing


environment, not on every administrative desktop
– OAT installs and configures
• Apache web server
• Perl components
• PHP components

– End-users use OAT through


• A web browser (full functionality available)
• iOS or Android application (monitoring only)
© 2013 IBM Corporation
101 Introduction to Informix – V2

IBM Software

OpenAdmin Tool (OAT)


• When installing OAT, enter the physical server name and port
number to properly configure the Apache web server

© 2013 IBM Corporation


102 Introduction to Informix – V2

Page 53
IBM Software

OpenAdmin Tool (OAT)


• Additional functionality can be added to the base OAT product
– IBM bundles several modules
– Organizations can add their own
• Register a Perl / PHP module

© 2013 IBM Corporation


103 Introduction to Informix – V2

IBM Software

OpenAdmin Tool (OAT)


• Once installed and instance connections configured, OAT can
provides a broad range of monitoring and administrative
functionality
– See Supplemental Materials for more information

© 2013 IBM Corporation


104 Introduction to Informix – V2

Page 54
IBM Software

OpenAdmin Tool (OAT)


• Once installed and instance connections configured, OAT provides
a broad range of monitoring and administrative functionality (cont.)
– See Supplemental Materials for more information

© 2013 IBM Corporation


105 Introduction to Informix – V2

IBM Software

OpenAdmin Tool (OAT)


• The web server that powers OAT can be turned on or off by user
root by invoking

$INFORMIXDIR/OAT/StartApache

Or

$INFORMIXDIR/OAT/StopApache

© 2013 IBM Corporation


106 Introduction to Informix – V2

Page 55
IBM Software

© 2013 IBM Corporation

IBM Software

Interacting with the instance

© 2013 IBM Corporation

Page 56
IBM Software

Interacting with the instance


• Before continuing with the rest of configuring an instance and
databases, let’s look at some of the tools available
– Only a brief overview here, see Supplemental Materials for more information

• The primary graphical tool is OAT


– Introduced in the previous section

– Provides administrative as well as read-only privileges


• Privileges are allocated at a user ID level
• User IDs are created in OAT but are only used in the utility
• Some IDs can be given full access, others read-only

– Instances can be organized into different sub-groups to control access as well


• Developers can only see dev instances
• Administrators can see all instances
• “Super users” might have read-only on production instances for monitoring

© 2013 IBM Corporation


109 Introduction to Informix – V2

IBM Software

Interacting with the instance


• OAT provides a number of pre-built reports that can help
administrators create a more efficient and proactive environment
– Slowest SQL statements
– SQL statements with the greatest amount of I/O
– Resource utilization
– More

© 2013 IBM Corporation


110 Introduction to Informix – V2

Page 57
IBM Software

Interacting with the instance


• OAT also provides a mechanism to execute SQL operations
against databases
– Limited to a single operation at a time

© 2013 IBM Corporation


111 Introduction to Informix – V2

IBM Software

Interacting with the instance


• While OAT provides a graphical interface, work executed through
the utility is actually performed by the command line utilities
discussed next

• OAT is a great training tool for new administrators


– With almost each graphical operation, OAT displays the CLI command being
executed
• New administrators can learn how to use the many options available with the
command line utilities

© 2013 IBM Corporation


112 Introduction to Informix – V2

Page 58
IBM Software

Interacting with the instance


• One of the most interesting things about Informix, particularly for
those who are familiar with other database engines, is how much
information is available to administrators and how easily it can be
obtained

• There is nothing hidden, all is exposed

• For-charge tools are not required to access this information

• Can either use CLI utilities or direct SQL against the instance’s
shared memory structures
– SQL queries would be executed against the sysmaster, sysadmin or sysha
databases
• Many of the tables and columns in these tables are pointers into the instance’s
shared memory

© 2013 IBM Corporation


113 Introduction to Informix – V2

IBM Software

Interacting with the instance


• The list of Informix CLI utilities
– oninit – starts the instance; instance can be started into several operating
states including administrative, quiescent (true single user), multi-user

– onmode – changes the instances operating mode (e.g. online to another


including offline) as well as some instance administrative operations (shared
memory, H/A cluster configuration, SQL statement cache)

– onclean – used to force the instance offline and clean up any residual shared
memory; rarely used, usually only if the O/S operating state is affected

– onspaces – create or drop chunks and dbspaces

– onparams – administer the physical and logical logs

– oncheck – check and repair tables, indexes and dbspaces for inconsistencies

© 2013 IBM Corporation


114 Introduction to Informix – V2

Page 59
IBM Software

Interacting with the instance


• The list of Informix CLI utilities (cont.)
– onstat – displays information about the instance and all operations

– onlog – displays information contained in a logical log whether on-disk or


already backed up to media

– finderr – displays information about Informix error messages and codes

– ondblog – used to change the logging mode of a database in conjunction with


an instance backup

– dbschema – creates a schema of a database (or table thereof) as well as the


physical structures of the instance itself (chunks, dbspaces, logs)

– ifxclone – used to clone an instance (including data); can be used to easily


instantiate an ER as well as H/A cluster

© 2013 IBM Corporation


115 Introduction to Informix – V2

IBM Software

Interacting with the instance


• While some of these utilities have a few parameters, others,
particularly onstat, have more
– onstat is the “utility that keeps on giving”
• It has over 100 parameters
• Every new release of Informix includes more command options to monitor new
functionality

• Detailed usage and other information on the majority of these


utilities is not covered in this course
– Will use a few during the hands-on lab

• There are additional CLI utilities that are DBA-oriented, including


dbimport, dbexport, dbload, onunload, onload

© 2013 IBM Corporation


116 Introduction to Informix – V2

Page 60
IBM Software

Interacting with the instance


• Informix provides a CLI utility called dbaccess for administrative
SQL operations
– Only exists in the Informix binary
• Thus only on the physical server hosting the instance(s)

– Is not intended for end-users


• Ad hoc SQL access by end-users can be executed through other tools / programs

• Can be used in several modes


– Menu – operations executed through a general menu structure; the most
commonly used
– Interactive non-menu – operations are executed directly without a menu
interface

– File – starts the utility and executes the contents of file containing SQL
operations
© 2013 IBM Corporation
117 Introduction to Informix – V2

IBM Software

Interacting with the instance


• Typically, dbaccess is invoked with the name of the target
database which enters menu mode
– Target database can be end-user or administrative

© 2013 IBM Corporation


118 Introduction to Informix – V2

Page 61
IBM Software

Interacting with the instance


• In menu mode, cursory keys can be used to scroll through the
options at each menu level
– Use enter / return to select that option

• Alternatively, the capitalized letter of the option is a direct keyboard


shortcut using lower case
– To select the Table option, press t (lower case) and enter / return

© 2013 IBM Corporation


119 Introduction to Informix – V2

IBM Software

Interacting with the instance


• Using the Query-language option, can select a file in the
current directory with SQL operations or type in one or more SQL
operations interactively
– Can use the Use-editor or (u) option to make changes to the commands
via vi

– When finished entering the commands, use the esc key to exit input mode and
be able to Run (or execute) the command(s)
• Results will be displayed in the utility window
• May need to use the Next option to scroll through all the results

© 2013 IBM Corporation


120 Introduction to Informix – V2

Page 62
IBM Software

Interacting with the instance


• For example, to execute a query against the stores database, the
following keystrokes would be used:

dbaccess stores

– To enter SQL
q
then
n

select * from customer

– Exit input mode then execute the command

esc
then
r
© 2013 IBM Corporation
121 Introduction to Informix – V2

IBM Software

Interacting with the instance


• For example, to execute a series of SQL commands in a file
against the my_test_db database, the following keystrokes would
be used:
dbaccess my_test_db
– To select the file

q
then
c

– Use the cursor keys to select the file name, press enter / return to select

– Once selected, dbaccess is ready to execute the command(s)

© 2013 IBM Corporation


122 Introduction to Informix – V2

Page 63
IBM Software

Interacting with the instance


• Select the Exit option or the e key repeatedly to back out of the
menu hierarchy and exit the utility

© 2013 IBM Corporation


123 Introduction to Informix – V2

IBM Software

Interacting with the instance


• With the dbaccess utility, administrators can execute instance
configuration and other operations via SQL commands through the
SQL Admin API

• The SQL Admin API connects to and uses the sysadmin


database
– The informix ID is the only ID that can connect to this database
– As a result, the API is limited to user informix

• Almost any instance operation can be executed through this API


– Includes shutting the instance down

© 2013 IBM Corporation


124 Introduction to Informix – V2

Page 64
IBM Software

Interacting with the instance


• Interaction with the Sysadmin API occurs through two UDRS
– Both perform the same way; difference is the output from the operation

– task() – returns a character string describing the return status

execute function task('create dbspace', 'dbspace2', '/chunks/dbspace2');

(expression) created dbspace number 2 named dbspace2

– admin() – returns an integer indicating success or failure

execute function admin('create dbspace', 'dbspace2', '/chunks/dbspace2');

(expression) 107

• The value of the return code has significance


• Positive # -- serial number of entry in the command_history table
• Negative # -- operation failed
© 2013 IBM Corporation
125 Introduction to Informix – V2

IBM Software

Interacting with the instance


• Commands executed through this API are logged and archived for
forensic purposes

• Stored in the command_history table in the sysadmin database


– Can be queried

execute function admin('create dbspace','dbspace2',


'$informixdir/space/dbspace2', '20mb');

(expression) 108

select * from command_history where cmd_number in (108)


cmd_number 108
cmd_exec_time 2013-11-17 16:26:15
cmd_user informix
cmd_hostname olympia.beaverton.ibm.com
cmd_executed create dbspace
cmd_ret_status 0
cmd_ret_msg created dbspace number 2 named dbspace2

© 2013 IBM Corporation


126 Introduction to Informix – V2

Page 65
IBM Software

© 2013 IBM Corporation

IBM Software

Basic administrative tasks

© 2013 IBM Corporation

Page 66
IBM Software

Basic administrative tasks


• There are a number of tasks that can be executed within an
instance or database
– Some occur more frequently than others

• For the purposes of this presentation, will look at tasks that need to
occur in a newly initialized instance
– Creation of additional spaces for instance and end-user data storage
– Creation of end-user databases and tables

© 2013 IBM Corporation


129 Introduction to Informix – V2

IBM Software

Basic administrative tasks


• When an instance is initialized, only the rootdbs exists

• Will need to create additional dbspaces for tables, indexes,


temporary tables and more

• Can use several utilities to create these spaces


– OAT
– onspaces
– SQL admin API

© 2013 IBM Corporation


130 Introduction to Informix – V2

Page 67
IBM Software

Basic administrative tasks


• To create a standard space with onspaces, several parameters
are required
– Space name
– Size
– Location of the symlink to the actual device
– Offset value (usually 0 [zero], only used with raw devices)
– Page size
– Is a temporary space for creation of temporary tables
• Creation of simple and smart BLOBspaces have additional flags

• Examples:
onspaces –c –d index_1 –p
/opt/IBM/informix/devices/inst_1/inst1_idx_1 –o 0 –s 100000

onspaces –c –d archive_space –p /
opt/IBM/informix/devices/inst_1/inst1_arc_2y –s 1000000 –o 0 –k 12

© 2013 IBM Corporation


131 Introduction to Informix – V2

IBM Software

Basic administrative tasks


• To create a standard space with the SQL Admin API, the same
parameters are required though executed as an SQL operation
through the task() or admin() function

• Examples:

execute function task ('create with_check dbspace', 'demo_space_2',


'/opt/IBM/informix/devices/test/test_space_2’,'50MB', '0');

execute function admin ('create dbspace', 'demo_space',


'/opt/IBM/informix/devices/test/test_space’, '50000KB', '0');

© 2013 IBM Corporation


132 Introduction to Informix – V2

Page 68
IBM Software

Basic administrative tasks


• As discussed earlier, depending on how a chunk or dbspace is
created, its size may be fixed and static or it can dynamically
expand if the instance (or an administrator) determines the space
is about to fill up
– Chunks themselves can be configured to automatically expand in size

– Dbspaces can grow either through chunk expansion or by adding additional,


new chunks to the space

• A “storage pool” of additional storage devices can be defined for


the instance
– Only one storage pool per instance
– Contains definitions of directories, flat files, and/or raw disk partitions that can
be used to create new chunks or dbspaces
– Storage can be “checked in” or “out” of the pool for use in the instance

© 2013 IBM Corporation


133 Introduction to Informix – V2

IBM Software

Basic administrative tasks


• With additional spaces built
– Can move the physical log out of the rootdbs into another space
• Should be on a lightly used disk due to the traffic within this space

– Create new logical logs in one or more dbspaces


• These spaces should only contain logical logs, not end-user data

• Once created, delete the original logical logs from the rootdbs

© 2013 IBM Corporation


134 Introduction to Informix – V2

Page 69
IBM Software

Basic administrative tasks


• With additional
spaces built (cont.)
– Create databases
and tables

– Can and should


take advantage of
Informix’s object
orientation and its
extended data
types

– Overriding rule –
model the data
the way the
business uses it

© 2013 IBM Corporation


135 Introduction to Informix – V2

IBM Software

Basic administrative tasks


• Informix provides more and richer data types than relational
database engines
Data types
Existing built-in
Extended data
types –
types
includes large
types such int8 /
serial8
User-defined
lvarchar Complex

Opaque Distinct Collection

Multiset List
Row
Set

Named Unnamed
© 2013 IBM Corporation
136 Introduction to Informix – V2

Page 70
IBM Software

Basic administrative tasks


• Row
– Analogous to C structure, come in two “kinds”
• named - strongly typed, ID’ed by name, has inheritance, used to build columns and
tables
• unnamed - weakly typed, ID’ed by structure, no inheritance, used to build columns

– Can contain built-in, collection, opaque, distinct, another row type data
types
• Caveat: no serial or serial8

ADVANTAGES DISADVANTAGES
Less coding More complex
Refers to a group of elements by a
Not simple SQL
single name
Intuitive Sys Adm is more complex
No “alter type” statement, must drop
and recreate

© 2013 IBM Corporation


137 Introduction to Informix – V2

IBM Software

Basic administrative tasks


• Row (cont.)
Named: Unnamed:
create row type name_t row (a int, b char (10))
(fname char(20),
lname char(20)); Note: is also equal to
row(x int, y char(10))
create row type address_t
(street_1 char(20), create table part
street_2 char(20), (part_id serial,
city char(20), cost decimal,
state char(2), part_dimensions row
zip char(9)); (length decimal,width
decimal, height
decimal, weight
create table student decimal));
(student_id serial,
name name_t,
address address_t,
company char(30));

© 2013 IBM Corporation


138 Introduction to Informix – V2

Page 71
IBM Software

Basic administrative tasks


• Row (cont.)
– “Casting” is used to transform data values from one type into another

insert statement:

insert into student values (1234,


row (“John”,”Doe”)::name_t, row ("1234 Main Street","",
"Anytown","TX","75022")::address_t, ”Acme Software");

select statement:
select * from student where name.lname matches "Doe”;

student_id 1234
name ROW('John ','Doe ')
address ROW('1234 Main Street ','
,'Anytown ','TX','75022 ')
company Acme Software

© 2013 IBM Corporation


139 Introduction to Informix – V2

IBM Software

Basic administrative tasks


• Informix provides more and richer data types than relational
database engines
Data types
Existing built-in
Extended data
types –
types
includes large
types such int8 /
serial8
User-defined
lvarchar Complex

Opaque Distinct Collection

Multiset List
Row
Set

Named Unnamed
© 2013 IBM Corporation
140 Introduction to Informix – V2

Page 72
IBM Software

Basic administrative tasks


• The collection type is a group of elements of the same data
type
– Easiest way to conceptualize this type – it’s an array of another data type
– Maximum size of this type is 32 kb

• Useful when
– The data is meaningless without the context of the other members in the
collection (e.g., golf scores, to-do list, set of names)

– Individual data elements are not likely to be directly queried by position

• A collection can contain simple or extended types


– For example, a collection of named row types

© 2013 IBM Corporation


141 Introduction to Informix – V2

IBM Software

Basic administrative tasks


• Collection (cont.)
– Three different collection types
• Differentiators – uniqueness and order sensitivity

set – unordered, unique values

set {“apple”, ”orange”, ”grapefruit”,


“plum”}

multiset – unordered, duplicates allowed

multiset {“apple”, “orange”, “grapefruit”, “apple”, “plum”,


“grapefruit”}

list – ordered, duplicates allowed

list {“apple”, “orange”, “grapefruit”, “apple”, “plum”,


“grapefruit”}
© 2013 IBM Corporation
142 Introduction to Informix – V2

Page 73
IBM Software

Basic administrative tasks


• Collection (cont.)
– Example

create table class


(class_id serial,
class_name varchar(60),
description lvarchar,
prereqs set(char(20) not null)
);

insert into class values (300, “Performance and Tuning”,


“Covers advanced information on tuning of Informix”,
(SET{“RDD”,”BSQL”}));

• Usage note – one element of a collection can not be updated


apart from the others, the entire collection must be re-written
update class set prereqs = (set{“RDD”,”ASQL”,”BSQL”}) where
class_id = 300;
© 2013 IBM Corporation
143 Introduction to Informix – V2

IBM Software

Basic administrative tasks


• Informix provides more and richer data types than relational
database engines
Data types
Existing built-in
Extended data
types –
types
includes large
types such int8 /
serial8
User-defined
lvarchar Complex

Opaque Distinct Collection

Multiset List
Row
Set

Named Unnamed
© 2013 IBM Corporation
144 Introduction to Informix – V2

Page 74
IBM Software

Basic administrative tasks


• There are two classes of user-defined data types

– Distinct
• Data type modeled on an existing data type
• Uses inheritance to incorporate the internal structure of the source type
• Has a unique name to distinguish it from other similar “types”
• Might have operations and casts defined over its source types

– Opaque
• Data type that is unknown to the database server
• You must define the internal structure, functions, and operators for the type

© 2013 IBM Corporation


145 Introduction to Informix – V2

IBM Software

Basic administrative tasks


• Distinct:
create distinct type dollar as decimal;
create distinct type aus_dollar as decimal;

create table sales


( sku int,
sales_date date,
us_sales dollar,
aus_sales aus_dollar);

insert into sales values (1234, today, 15.0::dollar,0::aus_dollar);

insert into sales values (5678, today, 0::dollar,


75.0::aus_dollar);

– Will require casts (implicit or explicit) to execute operations using two or more
distinct types
• Not discussed here

© 2013 IBM Corporation


146 Introduction to Informix – V2

Page 75
IBM Software

Basic administrative tasks


• Opaque:
– An opaque data type stores a single “value” that cannot be sub-divided into
components by the engine.

– Implemented as C or Java structures and manipulated by a set of routines


written in C or Java

– An opaque “value” is stored in its entirety by the engine without any


interpretation of the contents or its structure

– All access to an opaque type is through functions written by the user. You
define the storage size of the data type and input and output routines

© 2013 IBM Corporation


147 Introduction to Informix – V2

IBM Software

Basic administrative tasks


• Once a database and tables have been created and loaded with
data, the Informix query optimizer has to populated with statistical
information about each table’s data size and value distribution
– Enables the creation of efficient query plans

• The update statistics operation is used to gather this


information

• Can be executed manually, with various parameters, or the


instance will generate automatically through the instance scheduler

• The various permutations of update statistics are not


covered here
– Is a topic of frequent discussion at Informix user conferences and other
technical events
• In a good way!!
© 2013 IBM Corporation
148 Introduction to Informix – V2

Page 76
IBM Software

© 2013 IBM Corporation

IBM Software

Backup and recovery

© 2013 IBM Corporation

Page 77
IBM Software

Backup and recovery


• Informix supports:

– Two hot backup and recovery utilities

– One storage-array backup / restore mechanism


• Requires an interruption to instance processing

– A utility to verify backups to media as well as perform selective data restores


from backups
• In other words, table (or partial table) level restore

© 2013 IBM Corporation


151 Introduction to Informix – V2

IBM Software

Backup and recovery


• Hot backup / restore utilities
– ontape
• Self contained
• Serialized / single threaded
• Supports a single, direct attached backup device
• Can define one device for instance backups, another for logical log backups
• Can backup to tape or to disk
• Supports intelligent file naming when backing up to disk
• Backs up the entire instance, can restore to a dbspace level

– ON-Bar
• Parallelized, multi-threaded
• Supports multiple simultaneous backup devices, including tape and disk
• Requires an external tape management system
• Informix Primary Storage Manager (PSM) is included in the Informix binary
• Can backup the entire instance or just a subset of dbspaces
• Can restore to an instance, dbspace or to a moment-in-time © 2013 IBM Corporation
152 Introduction to Informix – V2

Page 78
IBM Software

Backup and recovery


• The archecker utility was originally designed to validate backup
images on tape
– Could they be restored or was the media compromised?

• Additional functionality has been added so that the utility can scan
a backup and restore specific data objects from the backup, aka
table-level restore
– Controlled by a command file that is used to determine what data is extracted
from the backup and into which table the data is placed
• Does not have to be the table that originally held the data

© 2013 IBM Corporation


153 Introduction to Informix – V2

IBM Software

Backup and recovery


• Informix also provides “external backup and restores” aka snap
copy within a disk array
– Works in combination with an array and multiple redundant active mirrors of
VGs / LUNs support on which Informix chunks are created

• To create an external backup


– instance processing is paused and a checkpoint executed
– Using array commands, one of the redundant mirror sets is detached
• Creates a stand-alone set of disk devices with Informix chunks
– Optionally, using array commands, a new set of mirror devices is attached to
the original set returning the set to N number of redundant copies within the
arry
– Instance processing is resumed

© 2013 IBM Corporation


154 Introduction to Informix – V2

Page 79
IBM Software

Backup and recovery


• External backups are useful for
– Very large database environments where media cost for normal backups
would be too expensive
– There is a need to quickly instantiate a new, cloned copy of the source
instance using devices from within the storage array
• Informix has the ifxclone utility that can be used to achieve similar results without
interrupting instance processing
• ifxclone can also automatically create H/A and ER clusters as part of its
operation

• In an external restore, the new instance is instantiated using links


to the devices in the now separate allocation of disks within the
array
– Almost no time required to start the instance
• The disk structures are already logically and physically consistent
– Requires a homogenous O/S, and Informix environment

© 2013 IBM Corporation


155 Introduction to Informix – V2

IBM Software

Backup and recovery


• Administrators must decide on a backup and recovery strategy
– General, whole instance oriented
• Can use either ontape or ON-Bar
OR
– Dbspace or table specific
• ON-Bar would be the primary utility
• May require using other tools like unloads to target specific tables or objects
• Should be used in conjunction with, not instead of, occasional full instance
backups through ontape or ON-Bar

– Regardless of the of the overall strategy, it is critical to backup and protect the
instance’s logical logs as they fill
• Either utility can be used to back up the logical logs
• Once backed up, they need to be rotated off-site with the instance backup

– The same utility MUST be used for instance and logical log backups
• Can NOT backup instance with ON-Bar and use ontape for logical log backups

© 2013 IBM Corporation


156 Introduction to Informix – V2

Page 80
IBM Software

Backup and recovery


• Informix provides three levels of backup granularity

Backup level Description


0 (zero) All used instance pages backup up

1 (one) Only pages changes since last level 0 are


backed up
2 Only pages changes since last level 1 are
backed up

L0 L1 L1 L2 L2 L1 L0 L1 L2

© 2013 IBM Corporation


157 Introduction to Informix – V2

IBM Software

Backup and recovery


• Configuration parameters for backup and restore utilities
– ontape
• TAPEDEV – device path for instance backups; to use standard I/O, set to stdio
• TAPEBLK– media block size, in KB, for backups
• TAPESIZE – media capacity for a backup tape. Acceptable values are 0 (wait for
end-of-media message) or any positive integral multiple of TAPEBLK

• LTAPEDEV – device path for logical log backup device


• LTAPEBLK – media block size, in KB, for logical log backups
• LTAPESIZE – media capacity for a logical log backup tape. Acceptable values are 0
(wait for end-of-media message) or any positive integral multiple of LTAPEBLK

– Setting LTAPEDEV to /dev/null will result in filled logical logs being marked
available for re-use immediately
• They are not backed up and will be overwritten
• Making it very hard to restore from
• However, instance operations will not be suspended if the logical logs roll and a
logical log backup has not occurred

© 2013 IBM Corporation


158 Introduction to Informix – V2

Page 81
IBM Software

Backup and recovery


• Configuration parameters for backup and restore utilities (cont.)
– ON-Bar
• BAR_ACT_LOG • BAR_PROGRESS_FREQ
• BAR_DEBUG_LOG • BAR_BSALIB_PATH
• BAR_DEBUG • BACKUP_FILTER
• BAR_MAX_BACKUP • RESTORE_FILTER
• BAR_RETRY
• BAR_PERFORMANCE
• BAR_NB_XPORT_COUNT
• ISM_DATA_POOL
• BAR_XFER_BUF_SIZE
• ISM_LOG_POOL
• RESTARTABLE_RESTORE

See the Informix Backup and Recovery Guide for more information on these
parameters

Will also have to configure storage pools and other structures in the external
storage management system

© 2013 IBM Corporation


159 Introduction to Informix – V2

IBM Software

Backup and recovery


• Informix provides the Informix Primary Storage Manager (PSM) as
a low-functionality external storage management system for
customers who don’t need the features (or cost) of a third-party
solution when using ON-Bar

• ON-Bar backups can be created into the PSM with no configuration


at all
– Backups would be created in $INFORMIXDIR/backups
• Probably not the best location

– Best practice is to define target locations for instance and logical log backups
through the provided utilities
• Not discussed here

© 2013 IBM Corporation


160 Introduction to Informix – V2

Page 82
IBM Software

Backup and recovery


• Creating a backup
– ontape

ontape –s –L backup_level

– ON-Bar
• Space backup (can be all spaces [aka instance] or just a named set)

onbar –b [ -L backup_level ] [ dbspace_name | file_name ]

• Full instance backup

onbar –b –w [ -L backup_level ]

© 2013 IBM Corporation


161 Introduction to Informix – V2

IBM Software

Backup and recovery


• Creating a backup (cont.)
– Both utilities and the SQL Admin API can be used to create a “fake” instance
backup
• Nothing is backed up to media

– Why? Some administrative operations require the rootdbs to be backed up in


order to complete the operation
• For example, creating a smart BLOBspace or changing the logging mode of a
database

• These operations occur infrequently but often in multiples


• Creating multiple smart BLOBspaces

• Rather than forcing a full instance backup, a fake backup sets flags in the instance’s
reserved pages as though the backup occurred and the administrative operation can
complete
• Obviously can’t restore from these!

• Once all the administrative operations are completed, a normal backup should be
created immediately to capture the instance changes
© 2013 IBM Corporation
162 Introduction to Informix – V2

Page 83
IBM Software

Backup and recovery


• Creating a backup (cont.)
– Syntax for “fake” backups
• ontape

ontape –s –L 0 –t STDIO -F

• ON-Bar

onbar –b –F

• SQL Admin API

execute function [task | admin] (‘archive fake’);

© 2013 IBM Corporation


163 Introduction to Informix – V2

IBM Software

Backup and recovery


• When executing restores, the operation will begin with the Level 0
backup
– Following the Level 0, a prompt to restore the Level 1 will occur
– Following the Level 1, if it occurs, a prompt for the latest Level 2 will occur
– Following the Level 2 restore, if it occurs, a prompt to restore the logical logs
will occur

• At any point in this process, the restore operation can be halted


and the instance will come on-line with data from which ever levels
were restored

• When restoring using either utility, data can be returned to the


same location / device or “redirected” to another device location
– For example, a chunk located at /opt/IBM/devices/inst_1/data_1 can
be restored to /opt/IBM/devices/inst_1/new_data_1
• Why? Want to preserve the original location and the data residing there but need
data from the backup
© 2013 IBM Corporation
164 Introduction to Informix – V2

Page 84
IBM Software

Backup and recovery


• Restore syntax
– ontape
• Whole instance
ontape –r

• Dbspace-specific

ontape –r –D dbspace_name

• Additional parameters to “redirect” the restore of one or more spaces to new


location(s)
• Multiple spaces can be redirected with information passed in through a file

-rename [ -f pathed_file_name | -p original_path


-o original_offset -n new_path -o new_offset ]

Note: there other syntax options not shown here, for example physical-only restore
© 2013 IBM Corporation
165 Introduction to Informix – V2

IBM Software

Backup and recovery


• Restore syntax (cont.)
– ON-Bar
• A number of options are available depending on the type of restore being executed
• Full instance, with or without redirection
• Dbspace-level, with or without redirection
• Moment-in-time

• It is important to use the same basic option on the restore as was used for the
backup
• Whole instance vs dbspace (ie. with or without the –w flag)

• One of the nice features of ON-Bar is that an interrupted restore can be restarted
from the point of interruption rather than having to restart from the beginning

© 2013 IBM Corporation


166 Introduction to Informix – V2

Page 85
IBM Software

Backup and recovery


• Restore syntax (cont.)
– ON-Bar (cont.)
• Whole instance
onbar –r [-w]

• To a moment-in-time (requires logical logs to be restored)

onbar –r [-w] –t time_value

• Dbspace-specific
• Notice, only available with dbspace backup syntax (without the –w flag)

onbar –r –p [-space_name | file_name]

• Logical only
• Restores logical logs to previously restored dbspaces
» Only available without the –w flag

onbar –r –l Note: there other syntax options not shown


here, for example physical-only
© 2013 restore
IBM Corporation
167 Introduction to Informix – V2

IBM Software

© 2013 IBM Corporation

Page 86
IBM Software

Overview of the hands-on lab

© 2013 IBM Corporation

IBM Software

ITALIAN HINDI FRENCH JAPANESE BRAZILIAN PORTUGUESE SIMPLIFIED CHINESE

TRADITIONAL CHINESE SPANISH RUSSIAN TAMIL THAI GERMAN ARABIC

We appreciate your feedback.


Please fill out the survey form in order to improve this educational event.

© 2013 IBM Corporation


170 Introduction to Informix – V2

Page 87
IBM Software

Reference materials
For more information about Informix:
● Informix Software
http://www-306.ibm.com/software/data/informix/
● IBM Informix DeveloperWorks
http://www.ibm.com/developerworks/db2/products/informix/index.html
● Customer Success Stories
http://www-
306.ibm.com/software/success/cssdb.nsf/softwareL2VW?OpenView&Count=3
0&RestrictToCategory=dmmain_InformixDynamicServer
● International Informix Users Group
http://www.iiug.org/index.php
● Recent IBM Informix Redbooks™ Publications
http://www.redbooks.ibm.com/abstracts/sg247488.html?Open
http://www.redbooks.ibm.com/abstracts/sg247847.html?Open
http://www.redbooks.ibm.com/abstracts/sg247522.html?Open
http://www.redbooks.ibm.com/abstracts/sg247556.html?Open © 2013 IBM Corporation
171 Introduction to Informix – V2

IBM Software

Supplemental material

© 2013 IBM Corporation

Page 88
IBM Software

Supplemental material
• Screenshots of administrative utilities
– dbschema – to create a schema of the physical instance structures

Output
created with
SQL Admin
API
commands

© 2013 IBM Corporation


173 Introduction to Informix – V2

IBM Software

Supplemental material
• Screenshots of administrative utilities
– dbschema – to create a schema of the physical instance structures

Output
created with
onspaces /
onparams
commands

© 2013 IBM Corporation


174 Introduction to Informix – V2

Page 89
IBM Software

Supplemental material
• Screenshots of administrative utilities (cont.)
– onparams– to administer the physical and logical logs

© 2013 IBM Corporation


175 Introduction to Informix – V2

IBM Software

Supplemental material
• Screenshots of administrative utilities (cont.)
– onstat– instance monitoring
• -p – general instance operating profile

© 2013 IBM Corporation


176 Introduction to Informix – V2

Page 90
IBM Software

Supplemental material
• Screenshots of administrative utilities (cont.)
– onstat– instance monitoring
• -d – dbspace and chunk information

© 2013 IBM Corporation


177 Introduction to Informix – V2

IBM Software

Supplemental material
• Screenshots of administrative utilities (cont.)
– onstat– instance monitoring
• -g glo – VP utilization

© 2013 IBM Corporation


178 Introduction to Informix – V2

Page 91
IBM Software

Supplemental material
• Screenshots of administrative utilities (cont.)
– onstat– instance monitoring
• -g sch – VP and O/S interaction

© 2013 IBM Corporation


179 Introduction to Informix – V2

IBM Software

Supplemental material
• Screenshots of administrative utilities (cont.)
– onstat– instance monitoring
• -g iof – I/O throughput, dbspace level

© 2013 IBM Corporation


180 Introduction to Informix – V2

Page 92
IBM Software

Supplemental material
• Screenshots of administrative utilities (cont.)
– onstat– instance monitoring
• -g wai – threads in wait states

© 2013 IBM Corporation


181 Introduction to Informix – V2

IBM Software

Supplemental material
• OAT
– The first time OAT is invoked after installation, some setup is required

© 2013 IBM Corporation


182 Introduction to Informix – V2

Page 93
IBM Software

Supplemental material
• OAT (cont.)
– An environment and binary compatibility check is made

© 2013 IBM Corporation


183 Introduction to Informix – V2

IBM Software

Supplemental material
• OAT (cont.)
– Web server and OAT parameters are confirmed

© 2013 IBM Corporation


184 Introduction to Informix – V2

Page 94
IBM Software

Supplemental material
• OAT (cont.)
– Infrastructure updates may occur as part of initialization

© 2013 IBM Corporation


185 Introduction to Informix – V2

IBM Software

Supplemental material
• OAT (cont.)
– Can determine which additional bundled modules to install
• Recommend installing all of them

© 2013 IBM Corporation


186 Introduction to Informix – V2

Page 95
IBM Software

Supplemental material
• OAT (cont.)
– Once initialization completes, will go to the primary login screen
• Need to configure instance connectivity first by selecting the Admin tab

© 2013 IBM Corporation


187 Introduction to Informix – V2

IBM Software

Supplemental material
• OAT (cont.)
– In the Admin tab, select Manage Connections : Add Connection
• Enter instance connection information
• Do not have to include the user ID and password

– Unless otherwise specified by the OAT Group dropdown, instances are


created in the default group

– Additional OAT instance groups can be created through the Manage


Connections : Add Group option
• For example a Dev, Test, or Production group of instances
• User connectivity can be managed at a OAT Group level

© 2013 IBM Corporation


188 Introduction to Informix – V2

Page 96
IBM Software

Supplemental material
• OAT (cont.)

© 2013 IBM Corporation


189 Introduction to Informix – V2

IBM Software

Supplemental material
• OAT (cont.)
– Once configuration is complete, return to the Login tab and connect to an
instance by selecting the OAT Group, then the Server dropdown to select the
instance
• Configured parameters, including ID and password (if configured) will populate the
rest of the form

© 2013 IBM Corporation


190 Introduction to Informix – V2

Page 97
IBM Software

Supplemental material
• OAT (cont.)
– Depending on the privileges associated with the login ID, once logged in to
OAT, the administration dashboard will appear
• Notice the menu on the left, there are numerous options available for monitoring and
administration

© 2013 IBM Corporation


191 Introduction to Informix – V2

IBM Software

Supplemental material
• OAT (cont.)
– Snapshot of all instances configured in OAT

© 2013 IBM Corporation


192 Introduction to Informix – V2

Page 98
IBM Software

Supplemental material
• OAT (cont.)
– General overview of a single instance

© 2013 IBM Corporation


193 Introduction to Informix – V2

IBM Software

Supplemental material
• OAT (cont.)
– General overview of a single instance

© 2013 IBM Corporation


194 Introduction to Informix – V2

Page 99
IBM Software

Supplemental material
• OAT (cont.)
– The instance Health Advisor

© 2013 IBM Corporation


195 Introduction to Informix – V2

IBM Software

Supplemental material
• OAT (cont.)
– Overview of instance storage

© 2013 IBM Corporation


196 Introduction to Informix – V2

Page 100
IBM Software

Supplemental material
• OAT (cont.)
– Latest backup operations

© 2013 IBM Corporation


197 Introduction to Informix – V2

IBM Software

Supplemental material
• OAT (cont.)
– Logical log information
• Physical log is available as well

© 2013 IBM Corporation


198 Introduction to Informix – V2

Page 101
IBM Software

Supplemental material
• OAT (cont.)
– Operations controlled by the instance scheduler
• Can click on an entry to deep dive into that operation and make changes to when
and how it operates

© 2013 IBM Corporation


199 Introduction to Informix – V2

IBM Software

Supplemental material
• OAT (cont.)
– Instance memory utilization

© 2013 IBM Corporation


200 Introduction to Informix – V2

Page 102
IBM Software

Supplemental material
• OAT (cont.)
– VP utilization

© 2013 IBM Corporation


201 Introduction to Informix – V2

IBM Software

Supplemental material
• OAT (cont.)
– Editing the $ONCONFIG

© 2013 IBM Corporation


202 Introduction to Informix – V2

Page 103
IBM Software

Supplemental material
• OAT (cont.)
– Changing database permissions

© 2013 IBM Corporation


203 Introduction to Informix – V2

IBM Software

Supplemental material
• OAT (cont.)
– Heat graphs (table extents)

Hovering over any object in the


graphs reveals more
information

© 2013 IBM Corporation


204 Introduction to Informix – V2

Page 104
IBM Software

Supplemental material
• OAT (cont.)
– Heat graphs (buffer pool)

© 2013 IBM Corporation


205 Introduction to Informix – V2

IBM Software

Supplemental material
• OAT – mobile
– The mobile product has basic monitoring functionality only
• Didn’t seem reasonable to try typing critical commands on such a small user
interface
• Device setup is similar to browser setup

© 2013 IBM Corporation


206 Introduction to Informix – V2

Page 105
IBM Software

Supplemental material
• OAT – mobile (cont.)
– Instance log and alerts

© 2013 IBM Corporation


207 Introduction to Informix – V2

IBM Software

Supplemental material
• OAT – mobile (cont.)
– Instance log and alerts
• Some customization of what is displayed is available

© 2013 IBM Corporation


208 Introduction to Informix – V2

Page 106
IBM Software

Supplemental material
• OAT – mobile (cont.)
– Performance tab with options for different subsystems

© 2013 IBM Corporation


209 Introduction to Informix – V2

IBM Software

Supplemental material
• OAT – mobile (cont.)
– Performance tab with options for different subsystems

© 2013 IBM Corporation


210 Introduction to Informix – V2

Page 107
IBM Software

Supplemental material
• OAT – mobile (cont.)
– Performance tab with options for different subsystems
• Can drill down for more information

© 2013 IBM Corporation


211 Introduction to Informix – V2

IBM Software

Supplemental material
• OAT – mobile (cont.)
– General instance and session information

© 2013 IBM Corporation


212 Introduction to Informix – V2

Page 108
IBM Software

Appendix A. Notices, Trademarks and Copyrights


This information was developed for products and services offered in the U.S.A.

IBM may not offer the products, services, or features discussed in this document in other countries.
Consult your local IBM representative for information on the products and services currently available in
your area. Any reference to an IBM product, program, or service is not intended to state or imply that
only that IBM product, program, or service may be used. Any functionally equivalent product, program, or
service that does not infringe any IBM intellectual property right may be used instead. However, it is the
user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matter described in this
document. The furnishing of this document does not grant you any license to these patents. You can
send license inquiries, in writing, to:

IBM Director of Licensing


IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.

For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property
Department in your country or send inquiries, in writing, to:

IBM World Trade Asia Corporation


Licensing
2-31 Roppongi 3-chome, Minato-ku
Tokyo 106-0032, Japan

The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES
CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some
states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this
statement may not apply to you.

This information could include technical inaccuracies or typographical errors. Changes are periodically
made to the information herein; these changes will be incorporated in new editions of the publication.
IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this
publication at any time without notice.

Any references in this information to non-IBM Web sites are provided for convenience only and do not in
any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part
of the materials for this IBM product and use of those Web sites is at your own risk.

IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.

Any performance data contained herein was determined in a controlled environment. Therefore, the
results obtained in other operating environments may vary significantly. Some measurements may have

Appendix Page 109


IBM Software

been made on development-level systems and there is no guarantee that these measurements will be
the same on generally available systems. Furthermore, some measurements may have been estimated
through extrapolation. Actual results may vary. Users of this document should verify the applicable data
for their specific environment.

Information concerning non-IBM products was obtained from the suppliers of those products, their
published announcements or other publicly available sources. IBM has not tested those products and
cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM
products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of
those products.

All statements regarding IBM's future direction and intent are subject to change or withdrawal without
notice, and represent goals and objectives only.

This information contains examples of data and reports used in daily business operations. To illustrate
them as completely as possible, the examples include the names of individuals, companies, brands, and
products. All of these names are fictitious and any similarity to the names and addresses used by an
actual business enterprise is entirely coincidental. All references to fictitious companies or individuals are
used for illustration purposes only.

COPYRIGHT LICENSE:

This information contains sample application programs in source language, which illustrate programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs
in any form without payment to IBM, for the purposes of developing, using, marketing or distributing
application programs conforming to the application programming interface for the operating platform for
which the sample programs are written. These examples have not been thoroughly tested under all
conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these
programs.

The following terms are trademarks of International Business Machines Corporation in the United States,
other countries, or both:

IBM AIX CICS ClearCase ClearQuest Cloudscape

Cube Views DB2 developerWorks DRDA IMS IMS/ESA

Informix Lotus Lotus Workflow MQSeries OmniFind

Rational Redbooks Red Brick RequisitePro System i

System z Tivoli WebSphere Workplace System p

Adobe, Acrobat, Portable Document Format (PDF), and PostScript are either registered trademarks or
trademarks of Adobe Systems Incorporated in the United States, other countries, or both.

Cell Broadband Engine is a trademark of Sony Computer Entertainment, Inc. in the United States, other
countries, or both and is used under license therefrom.

Java and all Java-based trademarks and logos are trademarks of Sun Microsystems, Inc. in the United
States, other countries, or both. See Java Guidelines

Page 110 Introduction to Informix v2


IBM Software

Microsoft, Windows, Windows NT, and the Windows logo are registered trademarks of Microsoft
Corporation in the United States, other countries, or both.

Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel
SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.

UNIX is a registered trademark of The Open Group in the United States and other countries.

Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.

ITIL is a registered trademark and a registered community trademark of the Office of Government
Commerce, and is registered in the U.S. Patent and Trademark Office.

IT Infrastructure Library is a registered trademark of the Central Computer and Telecommunications


Agency that is now part of the Office of Government Commerce.

Other company, product and service names may be trademarks or service marks of others.

Appendix Page 111


NOTES
NOTES
NOTES
NOTES
© Copyright IBM Corporation 2013.

The information contained in these materials is provided for


informational purposes only, and is provided AS IS without warranty
of any kind, express or implied. IBM shall not be responsible for any
damages arising out of the use of, or otherwise related to, these
materials. Nothing contained in these materials is intended to, nor
shall have the effect of, creating any warranties or representations
from IBM or its suppliers or licensors, or altering the terms and
conditions of the applicable license agreement governing the use of
IBM software. References in these materials to IBM products,
programs, or services do not imply that they will be available in all
countries in which IBM operates. This information is based on
current IBM product plans and strategy, which are subject to change
by IBM without notice. Product release dates and/or capabilities
referenced in these materials may change at any time at IBM’s sole
discretion based on market opportunities or other factors, and are not
intended to be a commitment to future product or feature availability
in any way.

IBM, the IBM logo and ibm.com are trademarks or registered


trademarks of International Business Machines Corporation in the
United States, other countries, or both. If these and other IBM
trademarked terms are marked on their first occurrence in this
information with a trademark symbol (® or ™), these symbols
indicate U.S. registered or common law trademarks owned by IBM at
the time this information was published. Such trademarks may also be
registered or common law trademarks in other countries. A current
list of IBM trademarks is available on the Web at “Copyright and
trademark information” at ibm.com/legal/copytrade.shtml

Other company, product and service names may be trademarks or


service marks of others.

You might also like