To create a segment in a database:
Initialize the physical device with disk init.
Make the database device available to the database by using the on clause to create database or alter database. This automatically adds the new device to the database’s default and system segments.
Once the database device exists and is available to the database, define the segment in the database with sp_addsegment. The syntax is:
sp_addsegment segname, dbname, devname
where:
segname is any valid identifier. Give segments names that identify what they are used for, and use extensions like “_seg.”
dbname is the name of the database where the segment will be created.
devname is the name of the database device—the name used in disk init and the create and alter database statements.
This statement creates the segment seg_mydisk1 on the database device mydisk1:
sp_addsegment seg_mydisk1, mydata, mydisk1