SAP Sybase IQ: The catalog DBSpaceID is incorrect. DBSpaceID found: 16384 DBSpaceID expected: 16387. This segment cannot be used.

If you ever get the IQ error message The catalog DBSpaceID is incorrect. DBSpaceID found: 16384 DBSpaceID expected: 16387. This segment cannot be used. then you may have overlapping RAW partitions.

I. 10/01 09:18:12. 0000000179 Exception Thrown from s_db.cxx:5631, Err# 4, tid 197 origtid 197 
I. 10/01 09:18:12. 0000000179 O/S Err#: 0, ErrID: 2071 (s_dbextexception); SQLCode: -1009085, SQLState: 'QSA85', Severity: 14 
I. 10/01 09:18:12. 0000000179 [20106]: DBFILE '/IQ/myiq/devices/IQ_USER_MAIN/myiqusermain001.iq' is not valid. The catalog DBSpaceID is incorrect. DBSpaceID found: 16384 DBSpaceID expected: 16387. This segment cannot be used.

John Ting of SAP pointed me to the iqheader utility shipped with IQ to verify the symbolic links and RAW devices. Use iqheader to verify the “Full Path” and “File ID” fields. “Full Path” should point to the raw device and “File ID” should be unique for each device.

iqheader /IQ/myiq/devices/IQ_MAIN/myiqmain001.iq
File Name: /IQ/myiq/devices/IQ_MAIN/myiqmain001.iq
Full Path: /dev/rmyiqmain001

DBFile Header Info
  Version: 2
  File ID: 16384
  Create Time: 2013-10-01 12:56:00
  RW Mode: RW
  Last RW Mode: RR
  Size (MB): 524287
  Reserve (MB): 0
  Block Size: 8192
  Page Size: 131072
  First Block: 1
  Block Count: 67108856
  Reserve Blocks: 0
  Last Real Block: 67108856
  Last Mapped Block: 67953599
  OFlags: 1
  Create ID: 0
  Alter ID: 0
  DBID1: 13421826
  DBID2: 13421842
  DBSpace ID: 16384
  Dropped: NO
  _NextFLAllocLowerBank: 3122
  _NextFLAllocUpperBank: 6714002
  Pre-alter commit ID: 0
  _ReqNumFreeListBlocks: 6710880
iqheader /IQ/myiq/devices/IQ_TEMP/myiqtemp001.iqtmp
…
iqheader /IQ/myiq/devices/IQ_USER_MAIN/myiqusermain001.iq
…

If either of the two fields are the same for your symbolic links to the RAW devices, then you need to contact your Unix or storage admin to determine where the overlap is.

Share Button

Leave a Reply

Your email address will not be published. Required fields are marked *