Extends the range of a segment to another database device.
sp_extendsegment segname, dbname, devname
sp_extendsegment indexes, pubs2, dev2
You cannot extend a segment on a device that already has an exclusive segment, and you cannot extend an exclusive segment on a device that has another segment.
A segment with a virtually hashed table exists on device orders.dat.
You cannot extend a segment with a virtually hashed table on device orders.dat, because this device has other segments.
A segment can be extended over several database devices.
You can only execute sp_extendsegment for the logsegment system segment in single-user mode.
If the logsegment segment is extended, any other segments on the device are dropped and the device is used for the log segment exclusively.
When you extend the logsegment segment, the SAP ASE server recalculates its last-chance threshold.
To associate a segment with a database device, create or alter the database with a reference to that device. A database device can have more than one segment associated with it.
After defining a segment, you can use it in the create table and create index commands to place the table or index on the segment. If you create a table or index on a particular segment, subsequent data for the table or index is located on that segment.
See also alter database, create index, create table in Reference Manual: Commands.
The permission checks for sp_extendsegment differ based on your granular permissions settings.
Setting | Description |
---|---|
Enabled | With granular permissions enabled, you must be a user with manage database privilege. |
Disabled | With granular permissions disabled, you must be the database owner or a user with sa_role. |
Values in event and extrainfo columns from the sysaudits table are:
Information | Values |
---|---|
Event | 38 |
Audit option | exec_procedure |
Command or access audited | Execution of a procedure |
Information in extrainfo |
|