disk reinit


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 } ]



is the name of the database device. It must conform to the rules for identifiers, and it must be enclosed in single or double quotes. This name is used in the create database and alter database commands.


is the name of the database device. The physical name must be enclosed in single or double quotes.


is the virtual device number. It must be unique among devices used by Adaptive Server. The device number 0 is reserved for the master database device. Legal numbers are between 1 and 255, but cannot be greater than the number of database devices for which your system is configured. The default is 50 devices.


is the amount of space to allocate to the database extension. size can be in the following unit specifiers: ‘k’ or ‘K’ (kilobytes), ‘m’ or ‘M’ (megabytes), and ‘g’ or ‘G’ (gigabytes). Sybase recommends that you always include a unit specifier. Quotes are optional if you do not include a unit specifier. However, you must use quotes if you include a unit specifier.


is the starting virtual address, or the offset, for Adaptive Server to begin using the database device. vstart accepts the following optional unit specifiers: ‘k’ or ‘K’ (kilobytes), ‘m’ or ‘M’ (megabytes), and ‘g’ or ‘G’ (gigabytes). The size of the offset depends on how you enter the value for vstart.

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, the disk reinit command fails.

NoteIf you are running the Logical Volume Manager on an AIX operating system, vstart should be 2.

Specify vstart only if instructed to do so by Sybase Technical Support.


specifies the disk controller. Its default value is 0. Reset it only if instructed to do so by Sybase Technical Support.


UNIX platforms only – specifies whether writes to the database device take place directly to the storage media, or are buffered when using UNIX operating system files. This option is meaningful only when you are initializing a UNIX operating system file; it has no effect when initializing devices on a raw partition. By default, all UNIX operating system files are initialized with dsync set to true.


Example 1

Initializes 10MB of a disk on a UNIX operating system file. Adaptive Server opens the device file with the dsync setting, and writes to the file are guaranteed to take place directly on the storage media:

disk reinit 
name = "user_file", 
physname = "/usr/u/sybase/data/userfile1.dat", 
vdevno = 2, size = 5120, dsync = true


Using dsync

Note Do not set dsync to false for any device that stores critical data. The only exception is tempdb, which can safely be stored on devices for which dsync is set to false.


SQL92 – Compliance level: Transact-SQL extension.


disk reinit permission defaults to System Administrators and is not transferable. You must be in the master database to use disk reinit.

See also

Commands alter database, create database, dbcc, disk init, disk refit

System procedures sp_addumpdevice, sp_helpdevice