cancel
Showing results for 
Search instead for 
Did you mean: 

Schedule jobs - for online reorganization

Former Member
0 Kudos

Hello,

We reorganized online some tables from tablespace PSAPSR3.

I would like to make this a regular task, and schedule it on SAP as a job.

Is it possible to do this in SAP ?

Thanks in advance,

Daniel

Accepted Solutions (1)

Accepted Solutions (1)

former_member204080
Active Contributor
0 Kudos

Hi,

It would be better to do with crontab.If not check this

Former Member
0 Kudos

First of all, take the advice from Stefan regarding silver bullet. In my opinion it is very seldom necessary to reorg a table periodically. All you do is adding work to the database.

Second again, i would prefer a simple cronjob or scheduled task, we do our stuff that way.

Third i think it is possible to schedule tasks with BRStudio, but i don't know anybody who ever did this. Does the BRStudio even still exist?

But i did not post to repeat stuff already said. Now i am going to tell you how to schedule the reorgs in DB13. One warning though, this is not official and quite dirty. You will have to check/redo the work after an upgrade/kernel patch. Use at your own risk!

My idea was to change the options of one of the unused commands (Initialize Tape) in DB13 to do a brspace tbreorg. In my example i did a reorg on tables T000 and T001. This is how you do it:

- SE16 -> SDBAC -> SHORTCUT: SDBAC / DBSYS: ORACLE

- change these values:

SHORTNAM: TableReorg

LONGNAME: Online Reorg of tables T000 and T001

CNAME: ZBRSPACE

PSTRING: -u / -c force -f tbreorg -a reorg -t T000,T001

- SM49 -> create a new OS command ZBRSPACE simply with brspace as command

- finally you will need to change the owner of the brspace binary from sidadm to orasid and set the setuid bit

chown ora<sid> brspace

chmod 4775 brspace

Now you can schedule the Reorg easily in DB13, have fun!

Cheers Michael

Answers (1)

Answers (1)

stefan_koehler
Active Contributor
0 Kudos

Hello Daniel,

that sounds like some "silver-bullet" strategy.

However yes you can schedule it by running the command line tool brspace with force option via DB13, crontab or any other scheduler. You can copy and paste the brspace call from your reorg log file and extend it with the force option.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

Any idea if I can do this on SAP level ? via some job or some program ?

Thanks in advance,

Former Member
0 Kudos

Hi Stefan,

Any idea if I can do this on SAP level ? via some job or some program ?

Thanks in advance,

Former Member
0 Kudos

) Hi Daniel,

Quite funny, I am searching for the same thing.

let me know if u find any answer.

Thank you,