cancel
Showing results for 
Search instead for 
Did you mean: 

move objects back to the 'default' segment

Former Member
0 Kudos

Hi There,

have found the code below on the net, but when i use sp_placeobject 'default', object, the index is automatically moved to the default segment.

I can drop the other (old) segment without any problems.

Is this correct? Is the code and comments below, obsolete?

<code>

/* move a table, in its entirety, to the new segment */

drop index 'employee.idx_employee'

go

create clustered index on employee (emp_id) on new_seg

go

/* leave table where it is, but future allocations go to the new segment */

sp_placeobject new_seg , 'employee'

go

/* leave table where it is, but future allocations for the

text column (employee_notes) go to the new segment */

sp_placeobject new_seg , 'employee.temployee'

go

/* leave table where it is, but future allocations for the

text column (resume) go to the new segment */

sp_placeobject new_seg , 'student.tstudent'

go

</code>



Regards,


Harry

Former Member
0 Kudos

Hi Mark,

thanks for having a look into my question. My ASE version is: Adaptive Server Enterprise/15.7/EBF 24641 SMP SP134 /P/X64/Windows Server/ase157sp133x/3925/64-bit/OPT/Sat May 02 00:22:51 2015. The table is APL with clustered index. I will have some further experiments with DOL because almost all tables within this environment are DOL. It is b.t.w. good news that it moves with the clustered index. That will make removing all my user defined segments easier! The documentation had put me off.

Regards

Harry

Accepted Solutions (0)

Answers (0)