Rebuilds the master database’s sysdevices system table. Use disk reinit as part of the procedure to restore the master database.
disk reinit name = "device_name", physname = "physicalname" , [vdevno = virtual_device_number ,] size = number_of_blocks [, vstart = virtual_address , cntrltype = controller_number] [, dsync = {true | false}] [, directio = {true | false}] [, instance = "instance_name"]
To determine the virtual device number, look at the device_number column of the sp_helpdevice report, and use the next unused integer.
If you do not specify a unit size, vstart uses 2K pages for its starting address. For example, if you specify vstart = 13, the SAP ASE server uses 13 * 2K pages as the offset for the starting address.
If you specify a unit value, vstart uses it as the starting address. For example, if you specify vstart = "13M", the SAP ASE server sets the starting address offset at 13MB.
The default value (and usually the preferred value) of vstart is 0. If the specified device does not have the sum of vstart + size blocks available, disk reinit fails.
Specify vstart only if instructed to do so by SAP Product Support.
directio is a static parameter that requires a restart of the SAP ASE server to take effect.
By default, directio is set to false for nonclustered SAP ASE servers, and to true for clustered SAP ASE servers.
The directio parameter is ignored for raw devices.
disk reinit name = "user_file", physname = "/usr/u/sybase/data/userfile1.dat", vdevno = 2, size = 5120, dsync = true
disk reinit name = "user_disk", physname = "/usr/u/sybase/data/userfile1.dat", size = 5120, directio= true
You should use block devices as a database device only on the HP-UX, Windows, and Linux platforms. disk init and disk reinit display a warning message if you attempt to create a block device on a platform we do not recommend.
disk reinit ensures that master..sysdevices is correct if the master database has been damaged or if devices have been added since the last dump of master.
disk reinit is similar to disk init, but does not initialize the database device.
You can specify the size as a float, but the size is rounded down to the nearest multiple of 2K.
If you do not use a unit specifier for size, disk reinit uses the virtual page size of 2K.
By default, the directio option is set to false (off) for all platforms.
For complete information on restoring the master database, see the System Administration Guide.
See also sp_addumpdevice, sp_helpdevice in Reference Manual: Procedures.
ANSI SQL – Compliance level: Transact-SQL extension.
The permission checks for disk reinit differ based on your granular permissions settings. You must be using the master database to use disk reinit.
Setting | Description |
---|---|
Enabled | With granular permissions enabled, you must be a user with manage disk privilege. |
Disabled | With granular permissions disabled, you must be a user with sa_role. disk reinit permission is not transferable. |
Values in event and extrainfo columns of sysaudits are:
Information | Values |
---|---|
Event | 22 |
Audit option | disk |
Command or access audited | disk reinit |
Information in extrainfo |
|