Dropping the last local dbspace on query server [CR 363338]

When a dbspace is created, IQ needs to save some checkpoint information for the transaction control. If the dbspace is the only one for the type of store (IQ Local Store, in this case), the checkpoint data is saved in the very same dbspace. This makes the dbspace “in use”, even though, from a user’s point of view, nothing has been done yet. The dbspace is therefore protected from being dropped.

To release the checkpoint information saved in the dbspace, a DBA needs to issue a CHECKPOINT SQL statement to force IQ to flush out the checkpoint data. If there are multiple connections to the server, only the CHECKPOINT statement that is executed after the completion of all the transactions that temporally overlap with the transaction of creating the dbspace will flush the checkpoint data. Therefore a DBA may have to issue CHECKPOINT several times before he or she can successfully drop the dbspace.

A stored procedure, sp_iqdbspace, reports the current status of all the IQ dbspaces, including whether or not a dbspace is ready to be dropped. Please see “Dropping a dbspace,” in Chapter 5, “Working with Database Objects” in Sybase IQ System Administration Guide for details on the sp_iqdbspace returned results.

If the IQ Local Store to be dropped is not empty, you must do the following before you can drop it:

  1. Alter the database to relocate mode. For details, see “Altering dbspaces” in Chapter 6, “Managing Dbspaces” in Introduction to Sybase IQ.

  2. Run sp_iqrelocate on the database. For details, see Chapter 9, “System Procedures” in Sybase IQ Reference Manual.