Commands for managing disk resources

Table 6-3 lists the major commands a system administrator uses to allocate disk resources to Adaptive Server, and provides references to the chapters that discuss those commands.

Table 6-3: Commands for allocating disk resources

Command

Task

See

disk init
  name = "dev_name"
  physname = "phys_name"...

Makes a physical device available to a particular Adaptive Server. Assigns a database device name (dev_name) that is used to identify the device in other Adaptive Server commands.

Chapter 8, “Initializing Database Devices”

sp_deviceattr logicalname, 
  optname, optvalue

Changes the dsync setting of an existing database device file.

Chapter 8, “Initializing Database Devices”

sp_diskdefault "dev_name"...

Adds dev_name to the general pool of default database space.

Chapter 8, “Initializing Database Devices”

disk resize
  name = “device_name”,
  size = additional_space

Dynamically increases the size of database devices.

Chapter 8, “Initializing Database Devices”

disk mirror
  name = "dev_name"
  mirror = "phys_name"...

Mirrors a database device on a specific physical device.

Chapter 2, “Mirroring Database Devices,” in System Administration Guide: Volume 2

Table 6-4 lists the commands used in object placement. For information about how object placement affects performance, see Chapter 1, “Controlling Physical Data Placement,” in the Performance and Tuning Series: Physical Database Tuning.

Table 6-4: Commands for placing objects on disk resources

Command

Task

See

create database...on dev_name

or

alter database...on dev_name

Makes database devices available to a particular Adaptive Server database. The log on clause to create database places the database’s logs on a particular database device.

Chapter 6, “Creating and Managing User Databases,” in System Administration Guide: Volume 2

create database...

or

alter database...

When used without the on dev_name clause, these commands allocate space on the default database devices.

Chapter 6, “Creating and Managing User Databases,” in System Administration Guide: Volume 2

sp_addsegment seg_name, 
  dbname, devname

and

sp_extendsegment seg_name,
  dbname, devname

Creates a segment—a named collection of space—from the devices available to a particular database.

Chapter 8, “Creating and Using Segments in System Administration Guide: Volume 2

create table...on seg_name

or

create index...on seg_name

Creates database objects, placing them on a specific segment of the database’s assigned disk space.

Chapter 8, “Creating and Using Segments in System Administration Guide: Volume 2

create table...

or

create index...

When used without on seg_name, tables and indexes occupy the general pool of space allocated to the database (the default devices).

Chapter 8, “Creating and Using Segments in System Administration Guide: Volume 2