Unix Technical Forum

dropping segments

This is a discussion on dropping segments within the Sybase forums, part of the Database Server Software category; --> I have created a segment and exclusively allocated for a database 'test' . After that i created few objects ...


Go Back   Unix Technical Forum > Database Server Software > Sybase

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 03:10 PM
Lalit
 
Posts: n/a
Default dropping segments

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 03:10 PM
Stefan Karlsson
 
Posts: n/a
Default Re: dropping segments

"Lalit" <issues_sybase@hotmail.com> wrote in message
news:7bcd3933.0312200134.4398cfae@posting.google.c om...
: 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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:24 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com