This example creates a 12-MB database called testing on DEVICE1.
CREATE DATABASE testing
ON DEVICE1 = 12
B. Create a Single Database on Two Devices ¾ Separate Data and Log
This example creates a single database (sales) with the data portion on DEVICE3 and the log portion on DEVICE4.
CREATE DATABASE sales
ON DEVICE3 = 125
LOG ON DEVICE4 = 60
C. Create a Database FOR LOAD
This example creates a single database (personnel) with the data portion spanning three devices (DEVICE5, DEVICE6, and DEVICE7) and the log portion on DEVICE8. The total database size is 200 MB composed of 150 MB for data and 50 MB for log.
CREATE DATABASE personnel
ON DEVICE5 = 50, DEVICE6 = 50, DEVICE7 = 50
LOG ON DEVICE8 = 50
FOR LOAD
go
Examples
Define Database Devices
This example creates a 12 MB (6144 2K pages) device called DEVICE1. This device is created in the same directory as the default SQL Server 6.0 MASTER device.
DISK INIT
NAME = 'DEVICE1',
PHYSNAME = 'c:\sql60\data\device1.dat',
VDEVNO = 1,
SIZE = 6144
This example creates a 16 MB (8192 2K pages) device called DEVICE2. This device is created on a different logical drive from DEVICE1. The SQLDATA directory must exist prior to the execution of this statement.
DISK INIT
NAME = 'DEVICE2',
PHYSNAME = 'd:\sqldata\device2.dat',
VDEVNO = 2,
SIZE = 8192
This example creates a 125 MB (64,000 2K pages) device called DEVICE3. This device is created on a third logical drive. The SQLDATA directory must exist prior to the execution of this statement.
DISK INIT
NAME = 'DEVICE3',
PHYSNAME = 'e:\sqldata\device3.dat',
VDEVNO = 3,
SIZE = 64000