Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Chapter 2: The Interfaces File [Table of Contents] Chapter 4: Operating System Setup

System Administration Guide Supplement for SunOS Release 4.x (BSD)

[-] Chapter 3: Choosing Database Devices

Chapter 3

Choosing Database Devices

Database devices are files or portions of a disk that are used to store databases and database objects. You can initialize devices using regular operating system files or raw partitions.

The sybinit utility initializes the master and auditing devices for a SQL Server during the installation session. See the SQL Server Installation Guide for instructions on using sybinit to initialize the master device, named sybsystemprocs , and the auditing devices.

You can use the disk init command to initialize additional devices after your SQL Server installation is complete. See the System Administration Guide for detailed information on disk init . This chapter focuses on choosing database devices to initialize with disk init and discusses:

Raw Partition or Operating System File?

Raw partition installations are recommended for production databases because of their recovery capabilities and increased processing performance.

Regular operating system file devices are recommended only for testing and fine-tuning databases, as these devices pose a risk of database corruption in the event of a media failure, power failure, or system panic. Under these circumstances, SQL Server cannot guarantee recovery, since information in the I/O buffer is frequently lost.

If you install your master database device on an operating system file, you can still initialize raw partitions to be used as additional database devices. If you install your master device on a raw partition, you can initialize operating system files to be used as additional database devices.

Using Raw Partitions for Database Devices

Warning! When you initialize a raw partition for use as a SQL Server database or log device, you destroy any existing files on that partition. Do not initialize a database device on the partition that contains your SYBASE software.

Once sybinit or disk init has initialized a portion of a partition as a database device, that partition cannot be used for any other purpose, including other SYBASE uses. Any space left on the partition beyond the size of the device you specified during disk init becomes inaccessible. For example, if you initialize a 10MB database device on a 50MB partition, you cannot use the remaining 40MB, unless you drop and recreate the device.

Guidelines for Choosing a Raw Partition

When you choose a raw partition, consider the following guidelines:

Character and Block Devices

A partition can be accessed through two different types of devices, a character device or a block device. All I/O to the partition is done through one of these devices.

SQL Server uses the character device (sometimes called the "raw" device) because the SQL Server recovery system needs unbuffered system I/O. Use the character device name for any raw partition that you use for a database device.

Preparing Raw Partition Devices

Log in as a System Administrator user to select and prepare a partition to be a database device:

Using Operating System Files for Database Devices

If you want to use an operating system file for a database device to be initialized by disk init , consider the following:

Preparing Operating System File Devices

  1. Use the df command to ensure there is enough space available on the file system for the device.

  2. Create the device directory if it does not exist.

  3. Make sure that a user with the System Administrator role owns the directory and has read, write, and execute permissions on it. Consult your operating system documentation for information on commands you can use to change ownership and permissions.

Using Network-Mounted Files As Database Devices

What's Next?

Chapter 4 describes operating system issues that you must consider in order to run SQL Server.


Chapter 2: The Interfaces File [Table of Contents] Chapter 4: Operating System Setup