1 Version 4.0 -- 1/15/89 sp_extendsegment
______________________________________________________________________
NAME: sp_extendsegment
FUNCTION:
Extend the range of a segment to another database device, or
extend the current segment on the current database device.
SYNTAX:
sp_extendsegment segname, devname
EXAMPLES:
sp_extendsegment indexes, dev2
sp_extendsegment Version 4.0 -- 1/15/89 2
______________________________________________________________________
This command extends the range of the segment named indexes to
the database device named dev2.
PARAMETERS:
segname - is the name of the existing segment. It must have
been previously defined using the sp_addsegment stored pro-
cedure.
devname - is the name of the database device that will be added
to the current database device range already included in seg-
name.
COMMENTS:
o Once a segment has been defined it may be used in the create
table and create index commands to cause the table or index to
be placed on the segment.
3 Version 4.0 -- 1/15/89 sp_extendsegment
______________________________________________________________________
o When a table or index is created on a particular segment, all
the subsequent data for the table or index will be located on
the segment.
o To associate a segment with a database device, the database
must have been created or altered with a reference to that dev-
ice. A database device may have more than one segment associ-
ated with it.
o A segment may be split among several database devices.
MESSAGES:
The procedure was successful. The segment named segname now may
use the database device fragment devname.
The segment you have tried to drop is not a segment. All seg-
ments for a database are listed in the syssegments table.
Run sp_helpsegment to list them.
The named device doesn't exist. t must be in sysdevices.
sp_extendsegment Version 4.0 -- 1/15/89 4
______________________________________________________________________
Although the device named as the devname parameter does exists in
master.dbo.sysdevices, it is not used by the current data-
base. Therefore a segment cannot be defined that is associ-
ated with it. Segments may only be defined on database dev-
ices used by the database. The alter database command will
extend a database on a device listed in the
master.dbo.sysdevices table.
You can't create a segment on a database device that is dedicated
to the database log.
Segment names must follow the rules for identifiers. Identifiers
must begin with a letter or an underscore character (_) or a
pound sign (#). After the first character identifiers may
include letters, underscore (_), #, or $.
PERMISSIONS:
Execute permission to Database Owner and System Administrator.
5 Version 4.0 -- 1/15/89 sp_extendsegment
______________________________________________________________________
TABLES USED:
syssegments, master.dbo.sysusages, master.dbo.devices
SEE ALSO:
sp_addsegment, sp_dropsegment, sp_placeobject, sp_helpdb,
sp_helpdevice, CREATE TABLE, CREATE INDEX, ALTER DATABASE