728x90

Problem(Abstract)

Client applications using the TCP/IP protocol to connect to Informix experience poor performance during connection. once the connection has been established the performance is improved.

Cause

Diagnosing the problem

To isolate the problem to tcp/ip connections try to connect by way of a shared memory connection. If the connection is now completed quickly then the problem outlined above may be the cause of poor connection performance.

Follow this link if you need instructions for setting up shared memory connections:
A shared-memory connection (UNIX)


Resolving the problem


https://www-304.ibm.com/support/docview.wss?uid=swg21250028

728x90
728x90

Question

How to set an optimal physical log size in IDS11.5 versions.

Cause

Transactions are able to continue working during checkpoints. To avoid blocked transactions,the database server must have enough physical log space to contain all of the transaction activity that occurs during checkpoint processing. Checkpoints can be triggered when the physical log is 75 percent full and checkpoint processing must complete before the remaining 25 percent of the physical log is used. Transaction blocking occurs as soon as the system detects a potential for a physical log overflow, because every active transaction could generate physical log activity.


Answer

The optimal size of the physical log depends on two factors:

1.The rate at which transactions generate physical log activity.

[1]Buffer Pool Space less than 4G.
For systems with less that four gigabytes of buffer pool space, the physical log can
be sized at 110 percent of the combined size of all the buffer pools.

[2]For larger buffer pools (Commonly larger than 4G)
Start with four gigabytes of physical log space and then monitor checkpoint activity. If checkpoints occur too frequently and appear to impact performance, increase the physical log size,and look into the Trigger column of the onstat -g ckp output. If the trigger events occur frequently by PLOG, then increase the size of the physical log.

2.Whether or not you set the RTO_SERVER_RESTART configuration parameter.

If RTO_SERVER_RESTART is enabled, the physical log size must be less than all buffer pools to maintain the RTO_SERVER_RESTART policy.


http://www-01.ibm.com/support/docview.wss?uid=swg21443076

728x90
728x90

Problem(Abstract)

This article presents a method of preventing the startup of the scheduler threads during IDS server initialization

Resolving the problem

INTRODUCTION

The Scheduler is a component of IBM Informix® Dynamic Server™ (IDS) that executes tasks defined in the sysadmin database. These tasks are coordinated by the dbScheduler and dbWorker threads within the server. There may be occasions when it is required to prevent the startup of these threads, for example if an assert failure occurs during initialization of the server. This article describes a method to temporarily prevent the startup of the threads used by the Scheduler.


STEPS

  1. As the root or informix user create the empty file $INFORMIXDIR/etc/sysadmin/stop. one way to do this is to use the Unix command touch.
  2. Stop and restart IDS.
  3. During initialization the following message will appear in the message log:
    SCHAPI: "INFORMIXDIR/etc/sysadmin/stop" file is present.
    Bypassing dbScheduler and dbWorker threads startup.

Important: If the reason for preventing the startup of the Scheduler threads was due to an error such as assert failure then that problem may still exist when the Scheduler is restarted. This document describes a temporary workaround and not a solution to this type of problem and you should search for other documents that refer to this topic for a solution.



http://www-01.ibm.com/support/docview.wss?uid=swg21260058

728x90
728x90

You may have already encountered a strange problem when trying to alter a table. Even though you have explicitly locked a table in exclusive mode, you are not able to alter it. The following example demonstrates this issue:


Listing 8. Non-exclusive access on a table
				
Output from dbaccess -e stores_demo <script.sql>:
--------------------------------------------------
begin;
  Started transaction.
lock table customer in exclusive mode;
  Table locked.
alter table customer add (mycol integer);
  242: Could not open database table (informix.customer).
  106: ISAM error: non-exclusive access.
			

This behavior occurs because a select cursor was opened on table customer by someone else. The cursor is not placing any locks on individual rows; otherwise we would have not been able to lock the table exclusively, but it prevents IDS from changing the partition information.

To solve the problem, identify the session that opened a cursor on table customer:

  1. Determine the hexadecimal partition number of table customer:
    • Select hex(partnum) from systables where tabname = "customer".
  2. If the partition number of this table is zero, it is a fragmented table. You need to execute the following SQL statement ito find the partition numbers of the individual fragments:

    Select st.tabname, dbinfo("dbspace", sf.partn), hex(sf.partn) from systables st, sysfragments sf, where st.tabid = sf.tabid and sf.fragtype = "T"and st.tabname = "customer".

  3. Take the hexadecimal partition number and search for it in all currently opened tables: 

    onstat -g opn | grep -i <hex_partnum>

  4. Take the rstcb column, which is a shared memory address of the respective user thread, and search for it using theonstat -u command.

    onstat -u | grep <rstcb_without_leading_0x>

After you identify the respective database session, you can terminate it with the onmode -z <sessid> command.

If you're running on IDS version 7.31.xD5, 9.40 or 10, you can also take advantage of the environment variable IFX_DIRTY_WAIT. This environment variable can be set in the engine or in the client environment. IFX_DIRTY_WAIT specifies the number of seconds that a DDL statement will wait for existing dirty readers to finish accessing the table that is about to be altered. If the specified number of seconds has expired, IDS returns the same error to the application that would be sent if the IFX_DIRTY_WAIT variable was not set.


http://www.ibm.com/developerworks/data/library/techarticle/dm-0701herber/index.html

http://www-01.ibm.com/support/docview.wss?uid=swg21174239

728x90
728x90

Problem(Abstract)

This document is a comparison of High Performance Loader's Express and Deluxe Mode Load jobs.

Resolving the problem

High Performance Loader: Mode Comparison for Load Jobs

Express Mode​
Deluxe Mode​
Not logged​Logged​
Constraints, Indexes, Triggers DISABLED until job completes​Constraints set to FILTERING WITHOUT ERROR​
Indexes checked​
Triggers evaluated​
Table is exclusively locked for duration of the load​Table not locked​
Transaction level is a single transaction​Transaction Level defined by commit interval​
Loaded data not immediately available until table is unlocked and constraints enabled​Loaded data immediately available​
Limitations: ​Limitations: ​
Performance Considerations: ​Performance Considerations: ​


http://www-01.ibm.com/support/docview.wss?rs=0&uid=swg21051331

728x90
728x90

Problem(Abstract)

dbexport might find that the database is in use, preventing dbexport from locking the database in exclusive mode. This document provides information on how to disconnect only those sessions that are locking objects within the database.

Symptom

While running a dbexport command to unload a database, dbexport stops and you get the following errors:

-425 - Database is currently opened by another user.
-107 - ISAM error:  record is locked.



Cause

The database cannot be locked using dbexport, because there is at least one session still connected and holding a lock on an object.

Resolving the problem

Find all sessions that are still connected to the database and holding a lock, then disconnect them using onmode -z before running dbexport again.


You can get the sessions and the lock holders still connected to the database by using onstat commands.

You can also run this SQL statement to find out the sessions that hold locks.


Note: In the following query, you have to replace the two occurrences of database_name by the name of the database you want to export.


database sysmaster;

SET ISOLATION TO DIRTY READ;

SELECT "database lock" table_name,
l.type lock_type, l.keynum index_num, HEX(l.rowidlk) rowid,
s.sid session_id, s.username, s.pid, s.hostname, 
q.sqs_statement statement
FROM syslocks l, sysdatabases d, syssessions s, syssqlstat q
WHERE d.name='database_name' AND l.rowidlk = d.rowid
AND l.owner = s.sid
AND dbsname = 'sysmaster' AND tabname = 'sysdatabases'
AND s.sid = q.sqs_sessionid

UNION ALL

SELECT l.tabname,
l.type, l.keynum, HEX(l.rowidlk),
s.sid, s.username, s.pid, s.hostname,
q.sqs_statement
FROM syslocks l, syssessions s, syssqlstat q
WHERE l.dbsname='database_name' AND l.owner = s.sid
AND s.sid = q.sqs_sessionid AND dbsname != 'sysmaster'
AND tabname != 'sysdatabases'
ORDER BY 5;

    database_name
      Replace it by the name of the database you want to export.

A sample of this query output, run replacing database_name to stores7, will show all the locks on this specific database:


table_name     database lock
lock_type      X
index_num      0
rowid          0x00000205
session_id     5
username       vgomes
pid            1832
hostname       workstation1
statement      DATABASE stores7 EXCLUSIVE

    table_name
      Is either the name of the table that has an object locked (row, index, table itself) or it will be the phrase 'database lock' if the whole database was locked.
    lock_type
      Is the type of lock, for example: X for Exclusive, S for Shared, U for Update. Seeonstat -k information in IBM® Informix® Dynamic Server™ (IDS) Administrator's Reference or Administrator's Guide for further information on types of lock.
    index_num
      the index key number if it is an index lock.

    rowid
      the rowid (in hexadecimal) for the record locked in case it is a record was locked. If a database was entirely locked, this is the rowid (in hexadecimal) for the record corresponding to this database locked in sysmaster:sysdatabases table.
    session_id
      the session id for the database session that locked the object.

    username
      Is the user id associated to the session that locked the object.

    pid
      the process id associated to the session that locked the object.

    hostname
      the machine name for the workstation or client host that created the session that locked the object.
    statement
      the SQL statement that generated the lock in the object.

You can see the details on the session by using this command at the command line:

    $ onstat -g ses session_id
      session_id
        The id of the session locking the object given as result by the previous query.

Example: 

From the previous query output:
    $ onstat -g ses 5


To disconnect a session use this command at the command line:

    $ onmode -z session_id
    session_id
      The id of the session locking the object.

Example: 

To disconnect the session locking the database object, you can run:
    $ onmode -z 5


http://www-01.ibm.com/support/docview.wss?uid=swg21221129

728x90
728x90

Problem(Abstract)

This article describes a problem which occurs when constraints and their related indexes are created and named by the default system commands, and a way to name them manually.

Resolving the problem

PROBLEM

Depending upon how you create primary/foreign key constraints, IDS will generate names for them and the indexes that are used to enforce them. These names are not intuitive (like customer_pkind, customer_fk1), which causes confusion when viewing or dropping them.

    Example:

    If you create a table like this:

    create table customer
          ( customer_num            serial(101),
            fname                   char(15),
            lname                   char(15),
            company                 char(20),
            address                 char(200),
            phone                   char(18),
           primary key (customer_num)
          );

    Then you will end up with an index called ' 100_1' (note the leading space), and the constraint name is 'u100_1'. These names are generated based on the tabid (customer is tabid 100) and a sequence number. The index can't be dropped directly, because the name has a leading space character.


    Adding a primary key after creating the table (with alter table) hits the same generated name issue:

      alter table customer add constraint primary key (customer_num) ;

    The index name is now ' 100_26' and the constraint name is 'u100_26'.



CAUSE

The program is designed to work this way.



SOLUTION

To remove the index you have to look up the constraint name, either through dbaccess:

Query Language <Select the database > Info  <Select  the table>  
           cOnstraints Primary / Reference


or with SQL like this:

  select t.tabname, i.idxname, i.idxtype, 
         c.constrname, c.constrtype
    from systables t, sysindexes i, sysconstraints c
   where t.tabtype = 'T'
     and t.tabid = i.tabid
     and i.idxname = c.idxname
     -- and t.tabname = 'TABLENAME'
  order by 1, 2  ;


and then drop the constraint:

  alter table customer drop constraint u100_1 ;



HOW TO AVOID THIS PROBLEM

You can set the constraint name of your choice by adding a constraint naming clause to the ALTER TABLE or CREATE TABLE command:

    Example:

    alter table customer add constraint 
    primary key (customer_num) constraint cust_pk ;

    create table customer
          ( customer_num            serial(101),
            fname                   char(15),
            lname                   char(15),
            company                 char(20),
            address                 char(200),
            phone                   char(18),
           primary key (customer_num) constraint cust_pk
          );

This sets the constraint name to 'cust_pk', but the index name is still generated (to ' 100_27' or similar). 

To control the index name, you must create the index before the constraint.

    Example:
    create unique index cust_pki on customer(customer_num) ;
    alter table customer add constraint
      primary key (customer_num) constraint cust_pkc ;


This way the index name becomes 'cust_pki', and the constraint name is 'cust_pkc' (though it is more common to set them to the same name).

When you create a constraint, it will use an existing index instead of creating one, if one exists with the right columns in the right order and the right uniqueness.

Creating the index explicitly first also means you can specify which dbspace(s) it is stored in, the fill factor, and other things.


http://www-01.ibm.com/support/docview.wss?uid=swg21255132

728x90
728x90

Problem(Abstract)

This article details how to resolve the error "The type of your terminal is unknown to the system" when running dbaccess.

Resolving the problem

Q. How can I resolve various "unknown terminal" errors I receive when running dbaccess?

A. Set the environment variables TERM and TERMCAP to point to $INFORMIXDIR/etc/termcap.

Example:

    For csh:
        setenv TERM vt100
        setenv TERMCAP $INFORMIXDIR/etc/termcap

    For ksh :
        export TERM=vt100
        export TERMCAP=$INFORMIXDIR/etc/termcap


http://www-01.ibm.com/support/docview.wss?uid=swg21225215

728x90
728x90

Error description

In C-ISAM 7.26.xC3 the product was built using a newer GLS library than previously used in 7.26.xC2 and earlier.  As such, there are now several new functions, such as ifmx_dlopen, ifmx_dlclose, ifmx_dlerror and ifmx_dlsym.  These functions, in turn, are dependent upon symbols which are defined in the system library libdl.so / libdl.sl.    (The specific library name may differ, depending on platform.)


Because of this requirement, it is now necessary to include a reference to link -ldl to the C-ISAM compile line in 7.26.xC3. This was not required in previous releases, yet the 7.26.xC3 release notes do not reflect this change.


A re-evaluation of the 7.26.xC3 release notes and related documentation is needed to ensure that all new requisite build options are referenced in the appropriate documents.


Local fix

Add -ldl (or relative platform equivalent library reference) to application compile line.



https://www-304.ibm.com/support/entdocview.wss?uid=swg1IC68384

728x90
728x90

Problem(Abstract)

A quick method is needed to identify all indices in a database that have been marked 'bad' by IBM® Informix Dynamic Server™ (IDS) database server.

Resolving the problem

You may use this SQL query to identify all indices that have been marked as "bad" in your IDS instance:

    (SELECT st.tabname, si.idxname, hex(spt.flags) flags
    FROM  sysindexes si, systables st, sysmaster:sysptnkey spt
    WHERE st.tabid = si.tabid AND
    st.partnum = spt.partnum AND
    sysmaster:bitval(spt.flags, 64) = 1 AND
    st.partnum !=0 AND
    si.idxname NOT IN  (
             SELECT sfs.indexname
             FROM sysfragments sfs
             WHERE sfs.tabid = st.tabid)
    GROUP BY 1,2,3
    )
    UNION ALL
    (SELECT st.tabname, sf.indexname idxname , hex(spt.flags) flags
    FROM  systables st, sysmaster:sysptnkey spt, sysfragments sf
    WHERE st.tabid = sf.tabid
    AND sf.fragtype = 'I'
    AND sf.partn = spt.partnum
    AND sysmaster:bitval(spt.flags, 64) = 1
    GROUP BY 1,2,3
    )
    ORDER BY 1  

Repeat the query in each database in your instance. To repair any bad indices, drop and recreate them.



http://www-01.ibm.com/support/docview.wss?uid=swg21193229

728x90

+ Recent posts