CHAPTER 8 Transactions and Versioning
311
Out of disk space
After you add space, the deletion resumes. When the delete transaction
commits, the space becomes available for other deletions or insertions. If you
do not need normally that much space in your database, you can drop the
dbspace to regain the extra disk space for other purposes. Be sure you do so
before inserting any data, so that you do not lose any data that Adaptive Server
IQ might put in the new dbspace.
Running out of space during a deletion should not affect other query users.
If you run out of space, but do not have enough disk space to add another
dbspace, you must shut down the database engine and then restart it, allowing
the database to roll back. You can then delete the rows in smaller, separate
transactions.
Note DROP TABLE and DROP DATABASE delete the table or database and all
data in it without creating any version pages, so you do not need to add space
to use these commands.
Cursors in transactions
A cursor allows you to return the results of a SELECT in the form of a data type
called a cursor. A cursor is similar to a table, but has the additional property
that one row is identified as the present, or current row. Various commands
allow you to navigate through the rows of a cursor. For example, the
FETCH
command retrieves a row from the cursor and identifies it as the current row.
You can step through all the rows in a cursor by calling this command
repeatedly.
Cursors are of most use when you program procedures, or when you write
applications that access a database using embedded SQL. They are also used
by many front-end query tools. They are not available when using DBISQL
interactively.
All Adaptive Server IQ cursors are read-only. You can write data, but the cursor
does not see the write operation.