Dynamically increases the size of the device used by Adaptive Server.
disk resize name = “device_name”, size = additional_space
Is the name of the device for which you are increasing the size.
Is the amount of additional space you are adding to the device.
To increase the size of testdev by 4MB, enter:
disk resize name = "test_dev", size = "4M"
The disk resize command allows you to dynamically increase the size of your disks.
After you resize a device, dump the master device, which maintains the size of the device in the sysdevices table. If you attempt a recovery from an old dump of the master device, the information stored in sysdevices will not be current.
Any properties that are set on the device continue to be set after you increase its size.
During the physical initialization of the disk, if any error occurs due to insufficient disk space, disk resize extends the database device to the point before the error occurs.
For example, on a server that uses 4K logical pages, if you try to increase the size of the device by 40MB, but only 39.5MB is available, then the device is extended only by 39.5MB. From the extended size (39.5MB), only 39MB is used by Adaptive Server. The last 0.5MB is allocated but not used, as 4K servers configure devices in one MB minimums.
To utilize the last 0.5MB, make sure that there is at least another 1.5MB available for the device, then re-run disk resize, specifying 1.5MB as the incremental size.
You cannot use disk resize to decrease the size of the device.
device_name must have a valid identifier. The device is initialized using the disk init command and, it must refer to a valid Adaptive Server device, not a dump or load device.
The following are example unit specifiers, using uppercase, lowercase, and single and double quotes interchangeably: ‘k’ or “K” (kilobytes), “m” or ‘M’ (megabytes), “g” or “G” (gigabytes), and ‘t’ or ‘T’ (terabytes). Sybase recommends that you always include a unit specifier. Although it is optional, Sybase recommends that you always include the unit specifier with the disk resize command to avoid confusion in the actual number of pages allocated.
You must enclose the unit specifier in single or double quotes. If you do not use a unit specifier, the size defaults to the number of disk pages.
Permanently disable mirroring while the resize operation is in progress. You can reestablish mirroring when the resize operation is completed.
ANSI SQL – compliance level: Transact-SQL extension.
The permission checks for disk resize differ based on your granular permissions settings.
Granular permissions enabled |
With granular permissions enabled, you must be a user with manage disk privilege. |
Granular permissions disabled |
With granular permissions disabled, you must be a user with sa_role. |
Values in event and extrainfo columns of sysaudits are:
Event |
Audit option |
Command or access audited |
Information in extrainfo |
---|---|---|---|
100 |
disk |
disk resize |
|
Commands create database, disk init, drop database, load database
System procedures sp_addsegment, sp_dropsegment, sp_helpdb, sp_helpsegment, sp_logdevice, sp_renamedb, sp_spaceused