Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Move index-segment

18 views
Skip to first unread message

Heinz Müller

unread,
Oct 20, 2008, 1:00:12 PM10/20/08
to
Hi,

SYBASE 12.5.4, Solaris 10.

Can anyone give me a hint how to move an index segment from one device to another?
Is it similiar like to move a log segment?

Regards,
Heinz


Bret_Halford

unread,
Oct 20, 2008, 5:30:39 PM10/20/08
to


Yes, you would use sp_extendsegment to move the segment onto the new
device, and
sp_dropsegment to remove it from the original device.

You may then want to rebuild any indexes assigned to that segment to
get their actual
space allocation to move onto the new device.

Heinz Müller

unread,
Oct 21, 2008, 11:07:38 AM10/21/08
to

"Bret_Halford" <br...@sybase.com> schrieb im Newsbeitrag
news:097cf71e-4a70-49c9...@u40g2000pru.googlegroups.com...

Bret,

thank you.

My colleage has solved it with sp_placeobject. But I'm wondering how he did that,
because the description of sp_placeobject tells that it is only for future space
allocation.

I'll ask him tommorrow.

Heinz


Bret_Halford

unread,
Oct 22, 2008, 11:35:54 AM10/22/08
to
On Oct 21, 9:07 am, "Heinz Müller" <onkelhe...@mscologne.de> wrote:
> "Bret_Halford" <b...@sybase.com> schrieb im Newsbeitragnews:097cf71e-4a70-49c9...@u40g2000pru.googlegroups.com...

Segments only are for future space allocations. A segment is nothing
more than
a label associated with disk fragments (rows in sysusages). Moving
the label
from one fragment to another is just a matter of changing the segmap
field
in master..sysusages. Each row in sysindexes/syspartitions (i.e. an
objid/indid pair)
has a "segment" field that, that object/indid can only make new
allocations to
device fragments labled with that fragment.

If you change the segment value for an object/indid, it has no affect
on current
allocations.

Are you wanting to move the index's allocation from one device to
another,
as opposed to just moving the segment?

-bret

Heinz Müller

unread,
Oct 22, 2008, 11:51:19 AM10/22/08
to

"Bret_Halford" <br...@sybase.com> schrieb im Newsbeitrag
news:84469fed-2f7d-4824...@j22g2000hsf.googlegroups.com...

On Oct 21, 9:07 am, "Heinz Müller" <onkelhe...@mscologne.de> wrote:
> "Bret_Halford" <b...@sybase.com> schrieb im
> Newsbeitragnews:097cf71e-4a70-49c9...@u40g2000pru.googlegroups.com...
> On Oct 20, 11:00 am, "Heinz Müller" <onkelhe...@mscologne.de> wrote:
>
> >Yes, you would use sp_extendsegment to move the segment onto the new
> >device, and
> >sp_dropsegment to remove it from the original device.
> >You may then want to rebuild any indexes assigned to that segment to
> >get their actual
> >space allocation to move onto the new device.
>>
> >Bret,
>>
> >thank you.
>
> <My colleage has solved it with sp_placeobject. But I'm wondering how he did that,
> >because the description of sp_placeobject tells that it is only for future space
> >allocation.
>
>> I'll ask him tommorrow.
>>
>> Heinz

>Are you wanting to move the index's allocation from one device to
>another,
>as opposed to just moving the segment?

>-bret

Yes, the index's allocation should move to a new device,
because as my colleage said, there is a part on a data device named data_dev
and it should move on ind_dev. In the past the ind_dev was full and so he took
a part of data_dev also for index's. Now the ind_dev is big enough and he
wants to move it from data_dev to ind_dev. Very confusing for me..

But I'm not in the office today, so I'll ask him on thursday.

Heinz


Bret_Halford

unread,
Oct 23, 2008, 2:21:47 PM10/23/08
to
On Oct 22, 9:51 am, "Heinz Müller" <onkelhe...@mscologne.de> wrote:
> "Bret_Halford" <b...@sybase.com> schrieb im Newsbeitragnews:84469fed-2f7d-4824...@j22g2000hsf.googlegroups.com...

In that case he will want to rebuild the index once the segment has
been
moved to the desired device and removed from the undesired device.

-bret

0 new messages