dbTalk Databases Forums  

dropping segments

comp.databases.sybase comp.databases.sybase


Discuss dropping segments in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lalit
 
Posts: n/a

Default dropping segments - 12-20-2003 , 03:34 AM






I have created a segment and exclusively allocated for a database
'test' . After that i created few objects on the segment.
Now if iam trying to drop the segment ,it's saying segment is in use.
I extended 'default' segment to that device so that all the objects
will come on default once i will drop the segment.

How to move all objects from a segment and drop the segment.
(Creating clustered index is one way iam aware of)
is there any other way of moving an objects from segments.

1. sp_addsegment test_seg,test,dev2
go
Now the dev2 is exclusively used for the 'test' database.

2. sp_extendsegment "default",test,dev2
go

3. sp_dropsegment seg1,test
go
Msg 17522, Level 16, State 1:
Server 'FOREXDB125', Procedure 'sp_dropsegment', Line 200:
The segment 'seg1' is being used.

what are the ways of moving objects from segments.A

Regards

Reply With Quote
  #2  
Old   
Stefan Karlsson
 
Posts: n/a

Default Re: dropping segments - 12-23-2003 , 11:33 PM






"Lalit" <issues_sybase (AT) hotmail (DOT) com> wrote

: I have created a segment and exclusively allocated for a database
: 'test' . After that i created few objects on the segment.
: Now if iam trying to drop the segment ,it's saying segment is in use.
: I extended 'default' segment to that device so that all the objects
: will come on default once i will drop the segment.
:
: How to move all objects from a segment and drop the segment.
: (Creating clustered index is one way iam aware of)
: is there any other way of moving an objects from segments.
:
: 1. sp_addsegment test_seg,test,dev2
: go
: Now the dev2 is exclusively used for the 'test' database.
:
: 2. sp_extendsegment "default",test,dev2
: go
:
: 3. sp_dropsegment seg1,test
: go
: Msg 17522, Level 16, State 1:
: Server 'FOREXDB125', Procedure 'sp_dropsegment', Line 200:
: The segment 'seg1' is being used.
:
: what are the ways of moving objects from segments.A
:
: Regards

See
http://sybooks.sybase.com/onlinebook...125;pt=65125#X
and
http://sybooks.sybase.com/onlinebook...506;pt=65125#X

Hint: sp_placeobject '<name>', 'default' doesn't physically move the object,
but assures that future allocations are made on specified segment.

HTH,

/Stefan



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.