Skip to Content
Author's profile photo Former Member

Tech Tip: Mass change of object ownership tadir. System Migration, Project System Landscape Build

If you need to copy a system and in the process create  a new or separate development system with objects owned by a new SID, you will  need mass change of ownership (tadir entries).

sqlplus / as sysdba @rename_tadir

This can be run once or every time you move objects between landscapes.This script was developed for to support the following landscape

BAU 4.7 SAP Landscape

“DEV -> QAS -> PRD” 

( The transports generated from the old BAU system during the course of the project flow into the project system as below, but in the ownership TADIR is changed from DEV to ECD)

Project ECC6 Landscape

” ECD -> ECQ -> ECP”.

The 4.7 system BAU changes needed to be integrated to the project system, but there ownership needed to be changed each time as they would then be modified after regression testing.

Script : rename_tadir.sql, need to edit to change owner sapsr3 as below to the owner of your system objects could be sapr3, sapsr3, or sap<sid>, in the script below the source system object owner is “DEV” and the target system owner is “ECD”.  Naturally you will need to edit the script to match your new landscape.

Script will need be run on each and every system in the future state landscape in this case the Project ECC6 landscape eg ECD,ECQ and ECP.

set echo on

spool rename_tadir.log

— Example uses ECD as the new targe SID and DEV as the old (source) SID
— User expected is sapsr3, but owner could be sapr3 or sap<sid>

— Backup tadir

create table sapsr3.tadir_backup as select * from sapsr3.tadir;

— get counts
select count(*) from sapsr3.tadir where srcsystem=’ECD’;
select count(*) from sapsr3.tadir where srcsystem=’DEV’;

update sapsr3.tadir set srcsystem=’ECD’ where srcsystem=’DEV’ ;

— get new counts
select count(*) from sapsr3.tadir where srcsystem=’ECD’;
select count(*) from sapsr3.tadir where srcsystem=’DEV’;

prompt Now if you are happy type “commit;” otherwise type “rollback;”

spool off

Other aspects to consider:

  1. Object versions from original system as explained in note 130906
  2. Reset of the transport number controlled in the E070L table.
    update dev.E070L set TRKORR=’DEVK906000′;
  3. Out of scope of this blog however is the issues in integrating, reintegrating and regression testing in the project system as new transports/changes flow from the BAU landscape. This is hard work and a disaster can only be avoided with diligent effort by all stakeholders.
  4. An ABAP Zcode report can be developed to perform the above where objects are regularly transported and ownership (TADIR) is required.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jun Liang
      Jun Liang

      Good tips Glenn, you can also do it via SE03.