Subject operating system directive write failed. invalid argument
Author dkeith2
Running a select query when I received the message:
operating system directive write failed. invalid argument

Can anyone provide direction as to what is causing this error? Thanks.

David Keith

Query:
SELECT DISTINCT C.SAB,S.ATV,C.TTY,S.ATN
FROM RXNSAT S, RXNCONSO C
WHERE S.RXCUI = C.RXCUI
and s.sab = c.sab
--AND C.RXCUI = :RXCUI
AND (
((C.SAB = 'RXNORM') AND (C.TTY IN ('SCD','SBD'))) OR
((C.SAB = 'VANDF') AND (S.ATN IN
('DDF','VA_CLASS_NAME','VA_GENERIC_NAME','VA_DISPENSE_UNIT','DCSA','NF_NAME')))
OR
((C.SAB = 'MTHFDA') AND (S.ATN IN ('TRN','DDF','DRT','DCSA','RXO')))
)
AND C.TTY <> 'IN'
rows 1

Database:
ls -la /data/Drugs/DrugData/DRUGDATA.FDB
-rw-rw---- 1 firebird firebird 3033006080 2009-02-12 12:52
/data/Drugs/DrugData/DRUGDATA.FDB

Tables in query:
ROWCOUNT TABLE_NAME
793272 RXNCONSO
4227730 RXNSAT

CREATE TABLE RXNSAT (
RXCUI VARCHAR(8) NOT NULL,
LUI VARCHAR(8),
SUI VARCHAR(8),
RXAUI VARCHAR(8),
STYPE VARCHAR(3),
CODE VARCHAR(50),
ATUI VARCHAR(10),
SATUI VARCHAR(50),
ATN VARCHAR(50) NOT NULL,
SAB VARCHAR(20) NOT NULL,
ATV VARCHAR(255) NOT NULL,
SUPPRESS VARCHAR(1),
CVF VARCHAR(50)
);

/******************************************************************************/
/**** Indices
****/
/******************************************************************************/

CREATE INDEX IDX_RXNSAT_ATN ON RXNSAT (ATN);
CREATE INDEX IDX_RXNSAT_ATN_SAB ON RXNSAT (SAB, ATN);
CREATE INDEX IDX_RXNSAT_ATV ON RXNSAT (ATV);
CREATE INDEX IDX_RXNSAT_ATV_FUNC ON RXNSAT COMPUTED BY
(SUBSTRING(REPLACE(REPLACE(ATV,'*',''),'-','') FROM 1 FOR 9));
CREATE INDEX IDX_RXNSAT_CODE ON RXNSAT (CODE);
CREATE INDEX IDX_RXNSAT_RXCUI ON RXNSAT (RXCUI);
CREATE INDEX IDX_RXNSAT_SAB ON RXNSAT (SAB);
CREATE INDEX X_RXNSAT_ATN ON RXNSAT (ATN);
CREATE INDEX X_RXNSAT_ATV ON RXNSAT (ATV);
CREATE INDEX X_RXNSAT_RXCUI ON RXNSAT (RXCUI);

/******************************************************************************/
/**** Tables
****/
/******************************************************************************/

CREATE TABLE RXNCONSO (
RXCUI VARCHAR(8) NOT NULL,
LAT VARCHAR(3) DEFAULT 'ENG' NOT NULL,
TS VARCHAR(1),
LUI VARCHAR(8),
STT VARCHAR(3),
SUI VARCHAR(8),
ISPREF VARCHAR(1),
RXAUI VARCHAR(8) NOT NULL,
SAUI VARCHAR(50),
SCUI VARCHAR(50),
SDUI VARCHAR(50),
SAB VARCHAR(20) NOT NULL,
TTY VARCHAR(20) NOT NULL,
CODE VARCHAR(50) NOT NULL,
STR VARCHAR(2000) NOT NULL,
SRL VARCHAR(10),
SUPPRESS VARCHAR(1),
CVF VARCHAR(50)
);

/******************************************************************************/
/**** Indices
****/
/******************************************************************************/

CREATE INDEX IDX_RXNCONSO_RXCUI_TTY_SAB ON RXNCONSO (RXCUI, TTY, SAB);
CREATE INDEX IDX_RXNCONSO_SAB ON RXNCONSO (SAB);
CREATE INDEX X_RXNCONSO_CODE ON RXNCONSO (CODE);
CREATE INDEX X_RXNCONSO_RXCUI ON RXNCONSO (RXCUI);
CREATE INDEX X_RXNCONSO_STR ON RXNCONSO (STR);
CREATE INDEX X_RXNCONSO_TTY ON RXNCONSO (TTY);

Firebird config:

Firebird Classic 2.1
firebird.conf:
#######################################
#
# Firebird configuration file
#
#RootDirectory =

#DatabaseAccess = Full

#ExternalFileAccess = None
ExternalFileAccess = Full

#UdfAccess = Restrict UDF
UdfAccess = Full

TempDirectories = /mnt/ramdisk;/tmp

#LegacyHash = 1

#Authentication = mixed

#DefaultDbCachePages = 2048
DefaultDbCachePages = 512

#DatabaseGrowthIncrement = 134217728

#MaxFileSystemCache = 65536

TempBlockSize = 2097152

#TempCacheLimit = 67108864
#TempCacheLimit = 134217728

#OldParameterOrdering = 0

#CompleteBooleanEvaluation = 0

#DeadlockTimeout = 10

#MaxUnflushedWrites = 100

#MaxUnflushedWriteTime = 5

#BugcheckAbort = 0

#OldColumnNaming = 0

#RelaxedAliasChecking = 0

#ConnectionTimeout = 180

#DummyPacketInterval = 0

#RemoteServiceName = gds_db

#RemoteServicePort = 3050

#RemoteAuxPort = 0

#TcpRemoteBufferSize = 8192
#TcpRemoteBufferSize = 16384

#TcpNoNagle = 1

#RemoteBindAddress =

#LockMemSize = 1048576

#LockSemCount = 32

#LockGrantOrder = 1

#LockAcquireSpins = 0

#LockHashSlots = 1009

#EventMemSize = 65536

#CpuAffinityMask = 1

#UsePriorityScheduler = 1

#PrioritySwitchDelay = 100

#PriorityBoost = 5

#GCPolicy = combined

#GuardianOption = 1

#ProcessPriorityLevel = 0

#IpcName = FIREBIRD

#RemotePipeName = interbas

#CreateInternalWindow = 1

#LockSignal = 16

#RemoteFileOpenAbility = 0

# ----------------------------
#Redirection = 0
#######################################


Machine:

Dell dual core Xeon:
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.20GHz
stepping : 3
cpu MHz : 3200.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx
lm constant_tsc pebs bts pni monitor ds_cpl cid cx16 xtpr
bogomips : 6384.30
clflush size : 64
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.20GHz
stepping : 3
cpu MHz : 3200.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx
lm constant_tsc pebs bts pni monitor ds_cpl cid cx16 xtpr
bogomips : 6384.23
clflush size : 64
power management:

cat /proc/meminfo
MemTotal: 3635128 kB
MemFree: 938632 kB
Buffers: 125044 kB
Cached: 1951672 kB
SwapCached: 0 kB
Active: 1719064 kB
Inactive: 850080 kB
HighTotal: 2752256 kB
HighFree: 371096 kB
LowTotal: 882872 kB
LowFree: 567536 kB
SwapTotal: 4088500 kB
SwapFree: 4088440 kB
Dirty: 456 kB
Writeback: 0 kB
AnonPages: 492312 kB
Mapped: 68284 kB
Slab: 96688 kB
SReclaimable: 88252 kB
SUnreclaim: 8436 kB
PageTables: 3340 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 5906064 kB
Committed_AS: 1549940 kB
VmallocTotal: 114680 kB
VmallocUsed: 21496 kB
VmallocChunk: 92532 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 4096 kB
DirectMap4k: 4096 kB
DirectMap4M: 913408 kB

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 22G 2.1G 20G 10% /
/dev/sda6 200G 4.5G 196G 3% /data
/dev/sda7 20G 38M 20G 1% /home
/dev/ram0 1.8G 0 1.8G 0% /mnt/ramdisk

OS: Mandriva 2009