SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
A-39
Considerations—ALTER TABLE
The owner of a protection view must have authority to read and write to the
view and the underlying table unless the security string for the view
specifies the super ID (-) for the authority the owner lacks.
SQL issues a warning if it changes the security string of protection views
as the result of an ALTER TABLE.
Changing the SECURE attribute read authority for a table can effectively
change the read authority for a shorthand view defined on the table, because
authority to read a shorthand view depends on the authority to read the
underlying tables. (The read option in the SECURE value for a shorthand view
has no effect.)
Altering the AUDIT attribute of a table automatically changes the AUDIT
attribute value for dependent views and indexes to the same value. In addition,
altering the AUDIT attribute of a table automatically changes the BUFFERED
attribute for the table (but not for dependent views and indexes):
You can override the automatic change to the BUFFERED attribute by
explicitly setting BUFFERED in the ALTER TABLE.
If you change an indexed, unaudited table to an audited table, you can create
performance problems unless you also modify the BUFFERED attribute for the
indexes on the table in separate ALTER INDEX statements. The AUDIT and
BUFFERED attributes on a table and its indexes should be set to the same
value.
An ALTER TABLE that changes the AUDIT attribute to NO AUDIT cannot
execute in a user-defined TMF transaction.
ALTER TABLE changes file attributes for a table by changing information in the
file label for the table and in the catalog tables of the catalog that describes the
table.
Adding columns
ALTER TABLE ADD COLUMN automatically requests an exclusive table lock
on the table. If data in the table is already locked, ALTER TABLE waits until the
request is granted or a timeout occurs.
A new column appears as the last column of the table. In existing rows of the
table, the new column takes on its default value unless it has a date-time data
type with the default set to CURRENT or SYSTEM.
If you add a column with a date-time data type to a table that contains existing
rows and you specify DEFAULT CURRENT or DEFAULT SYSTEM, SQL uses
January 1, 1 A.D. 12:00:00.000000 as the default date and time for the existing
rows.
AUDIT Attribute BUFFERED Attribute
AUDIT BUFFERED
NO AUDIT NO BUFFERED