Commands for managing disk resources

Table 15-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 15-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 16, “Initializing Database Devices”

sp_deviceattr logicalname, 
  optname, optvalue

Changes the dsync setting of an existing database device file

Chapter 16, “Initializing Database Devices”

sp_diskdefault "dev_name"...

Adds dev_name to the general pool of default database space.

Chapter 16, “Initializing Database Devices”

disk resize
  name = “device_name”,
  size = additional_space

Dynamically increases the size of database devices.

Chapter 16, “Initializing Database Devices”

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

Mirrors a database device on a specific physical device.

Chapter 17, “Mirroring Database Devices”

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

Table 15-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 21, “Creating and Managing User Databases”

create database...

or

alter database...

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

Chapter 21, “Creating and Managing User Databases”

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 24, “Creating and Using Segments”

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 24, “Creating and Using Segments”

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 24, “Creating and Using Segments”