Segments are created after devices and databases. You create a segment and place it on a database device. The database you are creating the segment for must have access to the device where you are placing the segment. In other words, you must have either created or altered the database on the device on which you are creating the segment for the database to use that segment.
To use sp_addsegment, you must be in the database that you are creating the segment for.
sp_addsegment segname, logical_name
where
For example, to create the SEG_MYDISK1 segment on the MYDISK1 database device, type:
sp_addsegment seg_mydisk1, mydisk1
For more information about sp_addsegment, see the Microsoft SQL Server Transact-SQL Reference.