A dbspace and its associated files can have individual read-only (RO) or read-write (RW) status, for example:
Object |
Status |
Effective status |
Table’s dbspace |
Table’s status |
---|---|---|---|---|
dbspace1 |
RW |
RW |
dbspace1 |
RW |
- file1 |
RO |
RO |
||
- file2 |
RW |
RW |
||
dbspace2 |
RO |
RO |
dbspace2 |
RO |
- file1 |
RO |
RO |
||
- file2 |
RW |
RO |
||
dbspace3 |
RW |
RO |
dbspace3 |
RO |
- file1 |
RO |
RO |
||
- file2 |
RO |
RO |
A table or join index is read-only when it is assigned to a read-only dbspace. A table partition is read-only when the partition is assigned to a read-only dbspace. No data modifications such as insert, delete, update, load, truncate table, and insert/delete/update through an updatable cursor are allowed to a read-only table or read-only table partition. No DDL operations such as ALTER TABLE add/drop column, create/drop index are allowed on a read-only table or read-only table partition.
Attempts to write to a read-only dbspace are detected when the modified pages are flushed to disk. Pages modified during an INSERT...VALUES statement are not written to the database until the next command that is not an INSERT...VALUES statement. (INSERT...VALUES is the only command that behaves this way.) Sybase IQ returns an error for DML operations on a read-only table or read-only table partition.
Operations to join indexes, including creating, dropping and synchronizing join indexes, fail if any of the join tables are read-only.