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 whose size you are increasing.
Is the 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.
Use the following are example unit specifiers, using uppercase, lowecase, 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
Only a user with the sa_role can execute the disk resize command.
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