Quantcast
Channel: SCN: Message List - SAP Replication Server
Viewing all articles
Browse latest Browse all 876

Re: Is it possible to clean up a partition / rs_segments ?

$
0
0

Mikael,

 

You may have already worked out the details for getting rid of the orphans, so for anyone watching this thread (or who stumbles across this thread when searching google.com in 2057) ...

 

- partitions are broken up into 1MB chunks called segments

 

- each segment has a record in the rs_segments table

 

- as a segment is allocated to a queue its record in rs_segments is updated to reflect its use by said queue

 

- when a segment is deallocated from a queue its rs_segments record is zero'd out [NOTE: The rs_segment record is *NOT* deleted.]

 

For these orphan records in rs_segments we want to zero them out just like repserver would do when deallocating the segment from a queue.

 

A zero'd out (ie, not allocated to any queue) rs_segment record has the following columns set to zero/0: q_number, q_type, logical_seg, used_flag, flags

 

While updating the rs_segments records for the orphaned queues can probably be done while the repserver is up and running, I would prefer to play it safe and a) shutdown repserver, b) update rs_segments then c) restart repserver.


So, once the repserver is shutdown:

 

====================== in the RSSD

begin tran

go

update rs_segments

set    q_number = 0,

       q_type = 0,

       logical_seg = 0,

       used_flag = 0,

       flags = 0

where q_number in (318,520)

go

 

-- confirm only the 248 records of interest were updated

-- if any problems then 'rollback tran' else 'commit tran'

 

======================

 

Start up the repserver and 'admin disk_space' (and rs_helppartition) should show the orphans are gone.


Viewing all articles
Browse latest Browse all 876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>