Can't Insert Record Into Informix
Posted in 2000
A new Informix user on Red Hat 6.0 found that INSERTs hung forever in dbaccess (selects worked; dbload reported it couldn't lock the table). The cause was full logical logs — the server was silently waiting for a log backup ("Logical Log Files are Full -- Backup is Needed"). Advice was to run 'ontape -a' (or 'ontape -c') to back up the logs. Lacking a tape drive, he was told to point LTAPEDEV/TAPEDEV at a plain file owned by informix with 660 permissions, or at /dev/null for a non-production box. He used /dev/null and the problem was solved.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: High Availability & Replication, Backup & Restore, Storage & Space Management, SQL Development & Query Writing, Server Administration, Transactions, Locking & Isolation, Logging & Checkpoints, Networking & sqlhosts Configuration
I'm trying to run INFORMIX-SQL Version 7.30.UC10 on RH 6.0 system (P133
24MB RAM).
When I do an insert, the system hangs (dbaccess says Running.... but
never returns).
When I do a select, it works (of course, returning zero rows).
When I try do do a dbload of the same one record, it comes back saying
it cannot get a lock on the table.
I'm new to Informix, so it may not even be configured correctly.
Any help is appreciated.
Patrick
The rest of this post is my onconfig file:
#****************************
# Root Dbspace Configuration
ROOTNAME rootdbs # Root dbspace name
ROOTPATH /dbms/rootdbs # Path for device containing root dbspace
ROOTOFFSET 0 # Offset of root dbspace into device
(Kbytes)
ROOTSIZE 20000 # Size of root dbspace (Kbytes)
# Disk Mirroring Configuration Parameters
MIRROR 0 # Mirroring flag (Yes = 1, No = 0)
MIRRORPATH # Path for device containing mirroredroot
MIRROROFFSET 0 # Offset into mirrored device (Kbytes)
# Physical Log Configuration
PHYSDBS rootdbs # Location (dbspace) of physical log
PHYSFILE 1000 # Physical log file size (Kbytes)
# Logical Log Configuration
LOGFILES 6 # Number of logical log files
LOGSIZE 500 # Logical log size (Kbytes)
# Diagnostics
MSGPATH /usr/informix/online.log # System message log
file path
CONSOLE /dev/console # System consolemessage path
ALARMPROGRAM /usr/informix/etc/log_full.sh # Alarm program path
SYSALARMPROGRAM /usr/informix/etc/evidence.sh # System Alarm program
path
TBLSPACE_STATS 1
# System Archive Tape Device
TAPEDEV /dev/tapedev # Tape device path
TAPEBLK 16 # Tape block size (Kbytes)
TAPESIZE 10240 # Maximum amount of data to put on tape
(Kbytes)
# Log Archive Tape Device
LTAPEDEV /dev/tapedev # Log tape device path
LTAPEBLK 16 # Log tape block size (Kbytes)
LTAPESIZE 10240 # Max amount of data to put on log tape
(Kbytes)
# Optical
STAGEBLOB # Informix Dynamic Server/Optical
staging area
# System Configuration
SERVERNUM 0 # Unique id corresponding to a DynamicServer instance
DBSERVERNAME binc # Name of default database server# DBSERVERALIASES # List of alternate
dbservernames
NETTYPE # Configure poll thread(s) for nettype
DEADLOCK_TIMEOUT 60 # Max time to wait of lock indistributed env.
RESIDENT 0 # Forced residency flag (Yes = 1, No =
0)
MULTIPROCESSOR 0 # 0 for single-processor, 1 for multi-processor
NUMCPUVPS 1 # Number of user (cpu) vps
SINGLE_CPU_VP 0 # If non-zero, limit number of cpu vpsto one
NOAGE 0 # Process aging
AFF_SPROC 0 # Affinity start processor
AFF_NPROCS 0 # Affinity number of processors
# Shared Memory Parameters
LOCKS 2000 # Maximum number of locks
BUFFERS 200 # Maximum number of shared buffers
NUMAIOVPS # Number of IO vps
PHYSBUFF 32 # Physical log buffer size (Kbytes)
LOGBUFF 32 # Logical log buffer size (Kbytes)LOGSMAX 6 # Maximum number of logical log files
CLEANERS 1 # Number of buffer cleaner processes
SHMBASE 0x10000000L # Shared memory base address
SHMVIRTSIZE 8000 # initial virtual shared memory segmentsize
SHMADD 8192 # Size of new shared memory segments
(Kbytes)
SHMTOTAL 0 # Total shared memory (Kbytes).
0=>unlimited
CKPTINTVL 300 # Check point interval (in sec)
LRUS 8 # Number of LRU queues
LRU_MAX_DIRTY 60 # LRU percent dirty begin cleaning limit
LRU_MIN_DIRTY 50 # LRU percent dirty end cleaning limit
LTXHWM 50 # Long transaction high water markpercentage
LTXEHWM 60 # Long transaction high water mark
(exclusive)
TXTIMEOUT 300 # Transaction timeout (in sec)
STACKSIZE 32 # Stack size (Kbytes)
# System Page Size
# BUFFSIZE - Dynamic Server no longer supports this configuration
parameter.
# To determine the page size used by Dynamic Server on your
platform
# see the last line of output from the command, 'onstat -b'.
# Recovery Variables
# OFF_RECVRY_THREADS:
# Number of parallel worker threads during fast recovery or an offline
restore.
# ON_RECVRY_THREADS:
# Number of parallel worker threads during an online restore.
OFF_RECVRY_THREADS 10 # Default number of offline workerthreads
ON_RECVRY_THREADS 1 # Default number of online workerthreads
# Data Replication Variables
# DRAUTO: 0 manual, 1 retain type, 2 reverse type
DRAUTO 0 # DR automatic switchover
DRINTERVAL 30 # DR max time between DR buffer flushes
(in sec)
DRTIMEOUT 30 # DR network timeout (in sec)
DRLOSTFOUND /usr/informix/etc/dr.lostfound # DR lost+found filepath
# CDR Variables
CDR_LOGBUFFERS 2048 # size of log reading buffer pool (Kbytes)
CDR_EVALTHREADS 1,2 # evaluator threads (per-cpu-vp,additional)
CDR_DSLOCKWAIT 5 # DS lockwait timeout (seconds)
CDR_QUEUEMEM 4096 # Maximum amount of memory for any CDR queue
(Kbytes)
# Backup/Restore variables
BAR_ACT_LOG /tmp/bar_act.log
BAR_MAX_BACKUP 0
BAR_RETRY 1
BAR_NB_XPORT_COUNT 10
BAR_XFER_BUF_SIZE 31
# Informix Storage Manager variables
ISM_DATA_POOL ISMData # If the data pool name is changed, be
sure to
# update $INFORMIXDIR/bin/onbar.
Change to
# ism_catalog -create_bootstrap -pool
<new name>
ISM_LOG_POOL ISMLogs
# Read Ahead Variables
RA_PAGES # Number of pages to attempt to readahead
RA_THRESHOLD # Number of pages left before next group
# DBSPACETEMP:
# Dynamic Server equivalent of DBTEMP for SE. This is the list of
dbspaces
# that the Dynamic Server SQL Engine will use to create temp tables etc.
# If specified it must be a colon separated list of dbspaces that exist
# when the Dynamic Server system is brought online. If not specified,
or if
# all dbspaces specified are invalid, various ad hoc queries will create
# temporary files in /tmp instead.
DBSPACETEMP # Default temp dbspaces
# DUMP*:
# The following parameters control the type of diagnostics information
which
# is preserved when an unanticipated error condition (assertion
failure) occurs
# during Dynamic Server operations.
# For DUMPSHMEM, DUMPGCORE and DUMPCORE 1 means Yes, 0 means No.
DUMPDIR /tmp # Preserve diagnostics in this directory
DUMPSHMEM 1 # Dump a copy of shared memory
DUMPGCORE 0 # Dump a core image using 'gcore'
DUMPCORE 0 # Dump a core image (Warning:thisaborts Dynamic Server)
DUMPCNT 1 # Number of shared memory or gcoredumps for
# a single user's session
FILLFACTOR 90 # Fill factor for building indexes
# method for Dynamic Server to use when determining current time
USEOSTIME 0 # 0: use internal time(fast), 1: get time from
OS(slow)
# Parallel Database Queries (pdq)
MAX_PDQPRIORITY 100 # Maximum allowed pdqpriority
DS_MAX_QUERIES # Maximum number of decision support queries
DS_TOTAL_MEMORY # Decision support memory (Kbytes)
DS_MAX_SCANS 1048576 # Maximum number of decision support scans
DATASKIP # List of dbspaces to skip
# OPTCOMPIND
# 0 => Nested loop joins will be preferred (where@@NL@
Have you tried ontape -a? If the logs are full the system will just sit and
wait until the logs are backed up and give you no error. Since you have 6 log
files you should see it display logs xxx-xxx backed up.
DO you want to back up the current log?
Just answer Yes and you should be back in business.
Of course you can also keep a tape in your TAPEDEV (which i see from your
config file is /dev/tapedev) and run ontape -c (continuous).
That makes sense. oninit has been returning "Logical Log Files are
Full -- Backup is Needed."
I don't have a tape device though, so can I "backup" right to the
harddrive? I did a symbolic link from /dev/tapedev to a file on my
harddrive, and ontape -a says:
Please mount tape 1 on /dev/tapedev and press Return to continue ...
Bad READ/WRITE permissions: '(owner/group) /dev/tapedev'.
could not write log tape.
Any ideas on how I can do a backup without actually having a device to
backup to?
Thanks,
Patrick
In article <20000318095748.08663.00000596@ng-fx1.aol.com>,
rexarnold@aol.com (REXARNOLD) wrote:
> Have you tried ontape -a? If the logs are full the system will just
sit and
> wait until the logs are backed up and give you no error. Since you
have 6 log
> files you should see it display logs xxx-xxx backed up.
> DO you want to back up the current log?
> Just answer Yes and you should be back in business.
> Of course you can also keep a tape in your TAPEDEV (which i see from
your
> config file is /dev/tapedev) and run ontape -c (continuous).
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Hi!
If it says "bad" permissions, what are they? Try chmod 0666 /dev/tapedev
I think one of my servers also worked with /dev/null, you might try
a symbolic link to this device too.
HTH
Michael
zzesers@my-deja.com wrote:
> That makes sense. oninit has been returning "Logical Log Files are
> Full -- Backup is Needed."
>
> I don't have a tape device though, so can I "backup" right to the
> harddrive? I did a symbolic link from /dev/tapedev to a file on my
> harddrive, and ontape -a says:
>
> Please mount tape 1 on /dev/tapedev and press Return to continue ...
> Bad READ/WRITE permissions: '(owner/group) /dev/tapedev'.
> could not write log tape.
>
> Any ideas on how I can do a backup without actually having a device to
> backup to?
>
> Thanks,
> Patrick
>
> In article <20000318095748.08663.00000596@ng-fx1.aol.com>,
> rexarnold@aol.com (REXARNOLD) wrote:
> > Have you tried ontape -a? If the logs are full the system will just
> sit and
> > wait until the logs are backed up and give you no error. Since you
> have 6 log
> > files you should see it display logs xxx-xxx backed up.
> > DO you want to back up the current log?
> > Just answer Yes and you should be back in business.
> > Of course you can also keep a tape in your TAPEDEV (which i see from
> your
> > config file is /dev/tapedev) and run ontape -c (continuous).
> >
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
> Any ideas on how I can do a backup without actually having a device to
> backup to?
You can just make file like /tmp/virt_tape and point to this file in
LTAPEDEV param. Don't forget about permissions. Remember, this change takes
effect immediately, you have just to restart ontape -a. If this is not a
production system, just set LTAPEDEV = /dev/null all logs considered backed
up as soon, as they filled. You don't need any backup in this case, but you
loose all your logs.
HTH.
--
-------------------------------------------------
With best regards, Yuri Dovgart
SAP R/3, Informix technical consultant,
Informix Certified Professional,
Senior System Consultant
System Architecture and High Availability Systems,
'Telecominvest' company
Email y_dovgart@tci.ukrtel.net
ICQ 39284285
>
> Thanks,
> Patrick
>
>
> In article <20000318095748.08663.00000596@ng-fx1.aol.com>,
> rexarnold@aol.com (REXARNOLD) wrote:
> > Have you tried ontape -a? If the logs are full the system will just
> sit and
> > wait until the logs are backed up and give you no error. Since you
> have 6 log
> > files you should see it display logs xxx-xxx backed up.
> > DO you want to back up the current log?
> > Just answer Yes and you should be back in business.
> > Of course you can also keep a tape in your TAPEDEV (which i see from
> your
> > config file is /dev/tapedev) and run ontape -c (continuous).
> >
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
In article <8b444e$gnq$1@nnrp1.deja.com>,
zzesers@my-deja.com wrote:
> That makes sense. oninit has been returning "Logical Log Files are
> Full -- Backup is Needed."
>
> I don't have a tape device though, so can I "backup" right to the
> harddrive? I did a symbolic link from /dev/tapedev to a file on my
> harddrive, and ontape -a says:
>
> Please mount tape 1 on /dev/tapedev and press Return to continue ...
> Bad READ/WRITE permissions: '(owner/group) /dev/tapedev'.
> could not write log tape.
>
> Any ideas on how I can do a backup without actually having a device to
> backup to?
>
> Thanks,
> Patrick
>
> In article <20000318095748.08663.00000596@ng-fx1.aol.com>,
> rexarnold@aol.com (REXARNOLD) wrote:
> > Have you tried ontape -a? If the logs are full the system will just
> sit and
> > wait until the logs are backed up and give you no error. Since you
> have 6 log
> > files you should see it display logs xxx-xxx backed up.
> > DO you want to back up the current log?
> > Just answer Yes and you should be back in business.
> > Of course you can also keep a tape in your TAPEDEV (which i see from
> your
> > config file is /dev/tapedev) and run ontape -c (continuous).
> >
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
You need a zero byte file with informix as both the owner and group.
Ther permissions must be 660. This would be on the file that you have
the link to, not the link itself, if I remember right. Use touch to
create the file.
--
# unrm /
ksh: unrm: not found
# man cpio
Sent via Deja.com http://www.deja.com/
Before you buy.
Thanks for all your help. I went the /dev/null route. Works great now!
Thanks,
Patrick
In article <38D5A543.989D3B5A@sqlcanada.com>,
Michael Krzepkowski <michaelk@sqlcanada.com> wrote:
> Hi!
>
> If it says "bad" permissions, what are they? Try chmod
0666 /dev/tapedev
> I think one of my servers also worked with /dev/null, you might try
> a symbolic link to this device too.
>
> HTH
>
> Michael
>
> zzesers@my-deja.com wrote:
>
> > That makes sense. oninit has been returning "Logical Log Files are
> > Full -- Backup is Needed."
> >
> > I don't have a tape device though, so can I "backup" right to the
> > harddrive? I did a symbolic link from /dev/tapedev to a file on my
> > harddrive, and ontape -a says:
> >
> > Please mount tape 1 on /dev/tapedev and press Return to continue ...
> > Bad READ/WRITE permissions: '(owner/group) /dev/tapedev'.
> > could not write log tape.
> >
> > Any ideas on how I can do a backup without actually having a device
to
> > backup to?
> >
> > Thanks,
> > Patrick
> >
> > In article <20000318095748.08663.00000596@ng-fx1.aol.com>,
> > rexarnold@aol.com (REXARNOLD) wrote:
> > > Have you tried ontape -a? If the logs are full the system will
just
> > sit and
> > > wait until the logs are backed up and give you no error. Since you
> > have 6 log
> > > files you should see it display logs xxx-xxx backed up.
> > > DO you want to back up the current log?
> > > Just answer Yes and you should be back in business.
> > > Of course you can also keep a tape in your TAPEDEV (which i see
from
> > your
> > > config file is /dev/tapedev) and run ontape -c (continuous).
> > >
> > >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
set devices to /dev/null and run ontape command again
zzesers@my-deja.com wrote in message <8b444e$gnq$1@nnrp1.deja.com>...
>That makes sense. oninit has been returning "Logical Log Files are
>Full -- Backup is Needed."
>
>I don't have a tape device though, so can I "backup" right to the
>harddrive? I did a symbolic link from /dev/tapedev to a file on my
>harddrive, and ontape -a says:
>
>Please mount tape 1 on /dev/tapedev and press Return to continue ...
>Bad READ/WRITE permissions: '(owner/group) /dev/tapedev'.
>could not write log tape.
>
>Any ideas on how I can do a backup without actually having a device to
>backup to?
>
>Thanks,
>Patrick
>
>
>In article <20000318095748.08663.00000596@ng-fx1.aol.com>,
>rexarnold@aol.com (REXARNOLD) wrote:
>> Have you tried ontape -a? If the logs are full the system will just
>sit and
>> wait until the logs are backed up and give you no error. Since you
>have 6 log
>> files you should see it display logs xxx-xxx backed up.
>> DO you want to back up the current log?
>> Just answer Yes and you should be back in business.
>> Of course you can also keep a tape in your TAPEDEV (which i see from
>your
>> config file is /dev/tapedev) and run ontape -c (continuous).
>>
>>
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Related threads
- onbar -c -F in Windows Informix instance
- Anyone... SQLCODE=-668, ISAM error=-1
- Not using the 100% logical log page size alloacted to informix