Automatically extending the scope of a segment  Assigning database objects to segments

Chapter 8: Creating and Using Segments

Reducing the scope of a segment

You may need to reduce the scope of a segment if it includes database devices that you want to reserve exclusively for other segments. For example, if you add a new database device that is to be used exclusively for one table, reduce the scope of the default and system segments so that they no longer point to the new device.

Use sp_dropsegment to drop a single database device from a segment, reducing the segment’s scope:

sp_dropsegment segname, dbname, device

With three arguments, sp_dropsegment drops only the given device from the scope of devices spanned by the segment. You can also use sp_dropsegment to remove an entire segment from the database, as described under “Dropping segments”.

The following example removes the database device pubs_dev2 from the scope of bigseg:

sp_dropsegment bigseg, pubs2, pubs_dev2 




Copyright © 2005. Sybase Inc. All rights reserved. Assigning database objects to segments

View this book as PDF