Reorganisation of tables

Hi, in Oracle segment advisor you will find suggestions like "shrink space" or "Reorganise" to reorganise a table. I understand the different commands behind these options, but can you explain the criteria Oracle uses to choose between these two options ?
Kind Regards
Alexander

The docs are at http://tahiti.oracle.com.
Read the relevant information under concepts and if you have specific questions ask them along with the link to the doc that is confusing.

Similar Messages

  • TIPS(18) : CREATING SCRIPTS TO RECREATE A TABLE STRUCTURE

    제품 : SQL*PLUS
    작성날짜 : 1996-11-12
    TIPS(18) : Creating Scripts to Recreate a Table Structure
    =========================================================
    The script creates scripts that can be used to recreate a table structure.
    For example, this script can be used when a table has become fragmented or to
    get a defintion that can be run on another database.
    CREATES SCRIPT TO RECREATE A TABLE-STRUCTURE
    INCL. STORAGE, CONSTRAINTS, TRIGGERS ETC.
    This script creates scripts to recreate a table structure.
    Use the script to reorganise a table that has become fragmented,
    to get a definition that can be run on another database/schema or
    as a basis for altering the table structure (eg. drop a column!).
    IMPORTANT: Running the script is safe as it only creates two new scripts and
    does not do anything to your database! To get anything done you have to run the
    scripts created.
    The created scripts does the following:
    1. save the content of the table
    2. drop any foreign key constraints referencing the table
    3. drop the table
    4. creates the table with an Initial storage parameter that
    will accomodate the entire content of the table. The Next
    parameter is 25% of the initial.
    The storage parameters are picked from the following list:
    64K, 128K, 256K, 512K, multiples of 1M.
    5. create table and column comments
    6. fill the table with the original content
    7. create all the indexes incl storage parameters as above.
    8. add primary, unique key and check constraints.
    9. add foreign key constraints for the table and for referencing
    tables.
    10.Create the table's triggers.
    11.Compile any depending objects (cascading).
    12.Grant table and column privileges.
    13.Create synonyms.
    This script must be run as the owner of the table.
    If your table contains a LONG-column, use the COPY
    command in SQL*Plus to store/restore the data.
    USAGE
    from SQL*Plus:
    start reorgtb
    This will create the scripts REORGS1.SQL and REORGS2.SQL
    REORGS1.SQL contains code to save the current content of the table.
    REORGS2.SQL contains code to rebuild the table structure.
    undef tab;
    set echo off
    column a1 new_val stor
    column b1 new_val nxt
    select
    decode(sign(1024-sum(bytes)/1024),-1,to_char((round(sum(bytes)/(1024*1
    024))+1))||'M', /* > 1M new rounded up to nearest Megabyte */
    decode(sign(512-sum(bytes)/1024), -1,'1M',
    decode(sign(256-sum(bytes)/1024), -1,'512K',
    decode(sign(128-sum(bytes)/1024), -1,'256K',
    decode(sign(64-sum(bytes)/1024) , -1,'128K',
    '64K'
    a1,
    decode(sign(1024-sum(bytes)/4096),-1,to_char((round(sum(bytes)/(4096*1
    024))+1))||'M', /* > 1M new rounded up to nearest Megabyte */
    decode(sign(512-sum(bytes)/4096), -1,'1M',
    decode(sign(256-sum(bytes)/4096), -1,'512K',
    decode(sign(128-sum(bytes)/4096), -1,'256K',
    decode(sign(64-sum(bytes)/4096) , -1,'128K',
    '64K'
    b1
    from user_extents
    where segment_name=upper('&1');
    set pages 0 feed off verify off lines 150
    col c1 format a80
    spool reorgs1.sql
    PROMPT drop table bk_&1
    prompt /
    PROMPT create table bk_&1 storage (initial &stor) as select * from &1
    prompt /
    spool off
    spool reorgs2.sql
    PROMPT spool reorgs2
    select 'alter table '||table_name||' drop constraint
    '||constraint_name||';'
    from user_constraints where r_constraint_name
    in (select constraint_name from user_constraints where
    table_name=upper('&1')
    and constraint_type in ('P','U'));
    PROMPT drop table &1
    prompt /
    prompt create table &1
    select decode(column_id,1,'(',',')
    ||rpad(column_name,40)
    ||decode(data_type,'DATE' ,'DATE '
    ,'LONG' ,'LONG '
    ,'LONG RAW','LONG RAW '
    ,'RAW' ,'RAW '
    ,'CHAR' ,'CHAR '
    ,'VARCHAR' ,'VARCHAR '
    ,'VARCHAR2','VARCHAR2 '
    ,'NUMBER' ,'NUMBER '
    ,'unknown')
    ||rpad(
    decode(data_type,'DATE' ,null
    ,'LONG' ,null
    ,'LONG RAW',null
    ,'RAW' ,decode(data_length,null,null
    ,'('||data_length||')')
    ,'CHAR' ,decode(data_length,null,null
    ,'('||data_length||')')
    ,'VARCHAR' ,decode(data_length,null,null
    ,'('||data_length||')')
    ,'VARCHAR2',decode(data_length,null,null
    ,'('||data_length||')')
    ,'NUMBER' ,decode(data_precision,null,' '
    ,'('||data_precision||
    decode(data_scale,null,null
    ,','||data_scale)||')')
    ,'unknown'),8,' ')
    ||decode(nullable,'Y','NULL','NOT NULL') c1
    from user_tab_columns
    where table_name = upper('&1')
    order by column_id
    prompt )
    select 'pctfree '||t.pct_free c1
    ,'pctused '||t.pct_used c1
    ,'initrans '||t.ini_trans c1
    ,'maxtrans '||t.max_trans c1
    ,'tablespace '||s.tablespace_name c1
    ,'storage (initial '||'&stor' c1
    ,' next '||'&stor' c1
    ,' minextents '||t.min_extents c1
    ,' maxextents '||t.max_extents c1
    ,' pctincrease '||t.pct_increase||')' c1
    from user_Segments s, user_tables t
    where s.segment_name = upper('&1') and
    t.table_name = upper('&1')
    and s.segment_type = 'TABLE'
    prompt /
    select 'comment on table &1 is '''||comments||''';' c1 from
    user_tab_comments
    where table_name=upper('&1');
    select 'comment on column &1..'||column_name||
    ' is '''||comments||''';' c1 from user_col_comments
    where table_name=upper('&1');
    prompt insert into &1 select * from bk_&1
    prompt /
    set serveroutput on
    declare
    cursor c1 is select index_name,decode(uniqueness,'UNIQUE','UNIQUE')
    unq
    from user_indexes where
    table_name = upper('&1');
    indname varchar2(50);
    cursor c2 is select
    decode(column_position,1,'(',',')||rpad(column_name,40) cl
    from user_ind_columns where table_name = upper('&1') and
    index_name = indname
    order by column_position;
    l1 varchar2(100);
    l2 varchar2(100);
    l3 varchar2(100);
    l4 varchar2(100);
    l5 varchar2(100);
    l6 varchar2(100);
    l7 varchar2(100);
    l8 varchar2(100);
    l9 varchar2(100);
    begin
    dbms_output.enable(100000);
    for c in c1 loop
    dbms_output.put_line('create '||c.unq||' index '||c.index_name||' on
    &1');
    indname := c.index_name;
    for q in c2 loop
    dbms_output.put_line(q.cl);
    end loop;
    dbms_output.put_line(')');
    select 'pctfree '||i.pct_free ,
    'initrans '||i.ini_trans ,
    'maxtrans '||i.max_trans ,
    'tablespace '||i.tablespace_name ,
    'storage (initial '||
    decode(sign(1024-sum(e.bytes)/1024),-1,
    to_char((round(sum(e.bytes)/(1024*1024))+1))||'M',
    decode(sign(512-sum(e.bytes)/1024), -1,'1M',
    decode(sign(256-sum(e.bytes)/1024), -1,'512K',
    decode(sign(128-sum(e.bytes)/1024), -1,'256K',
    decode(sign(64-sum(e.bytes)/1024) , -1,'128K',
    '64K'))))) ,
    ' next '||
    decode(sign(1024-sum(e.bytes)/4096),-1,
    to_char((round(sum(e.bytes)/(4096*1024))+1))||'M',
    decode(sign(512-sum(e.bytes)/4096), -1,'1M',
    decode(sign(256-sum(e.bytes)/4096), -1,'512K',
    decode(sign(128-sum(e.bytes)/4096), -1,'256K',
    decode(sign(64-sum(e.bytes)/4096) , -1,'128K',
    '64K'))))) ,
    ' minextents '||s.min_extents ,
    ' maxextents '||s.max_extents ,
    ' pctincrease '||s.pct_increase||')'
    into l1,l2,l3,l4,l5,l6,l7,l8,l9
    from user_extents e,user_segments s, user_indexes i
    where s.segment_name = c.index_name
    and s.segment_type = 'INDEX'
    and i.index_name = c.index_name
    and e.segment_name=s.segment_name
    group by s.min_extents,s.max_extents,s.pct_increase,
    i.pct_free,i.ini_trans,i.max_trans,i.tablespace_name ;
    dbms_output.put_line(l1);
    dbms_output.put_line(l2);
    dbms_output.put_line(l3);
    dbms_output.put_line(l4);
    dbms_output.put_line(l5);
    dbms_output.put_line(l6);
    dbms_output.put_line(l7);
    dbms_output.put_line(l8);
    dbms_output.put_line(l9);
    dbms_output.put_line('/');
    end loop;
    end;
    declare
    cursor c1 is
    select constraint_name, decode(constraint_type,'U',' UNIQUE',' PRIMARY
    KEY') typ,
    decode(status,'DISABLED','DISABLE',' ') status from user_constraints
    where table_name = upper('&1')
    and constraint_type in ('U','P');
    cname varchar2(100);
    cursor c2 is
    select decode(position,1,'(',',')||rpad(column_name,40) coln
    from user_cons_columns
    where table_name = upper('&1')
    and constraint_name = cname
    order by position;
    begin
    for q1 in c1 loop
    cname := q1.constraint_name;
    dbms_output.put_line('alter table &1');
    dbms_output.put_line('add constraint '||cname||q1.typ);
    for q2 in c2 loop
    dbms_output.put_line(q2.coln);
    end loop;
    dbms_output.put_line(')' ||q1.status);
    dbms_output.put_line('/');
    end loop;
    end;
    declare
    cursor c1 is
    select c.constraint_name,c.r_constraint_name cname2,
    c.table_name table1, r.table_name table2,
    decode(c.status,'DISABLED','DISABLE',' ') status,
    decode(c.delete_rule,'CASCADE',' on delete cascade ',' ')
    delete_rule
    from user_constraints c,
    user_constraints r
    where c.constraint_type='R' and
    c.r_constraint_name = r.constraint_name and
    c.table_name = upper('&1')
    union
    select c.constraint_name,c.r_constraint_name cname2,
    c.table_name table1, r.table_name table2,
    decode(c.status,'DISABLED','DISABLE',' ') status,
    decode(c.delete_rule,'CASCADE',' on delete cascade ',' ')
    delete_rule
    from user_constraints c,
    user_constraints r
    where c.constraint_type='R' and
    c.r_constraint_name = r.constraint_name and
    r.table_name = upper('&1');
    cname varchar2(50);
    cname2 varchar2(50);
    cursor c2 is
    select decode(position,1,'(',',')||rpad(column_name,40) colname
    from user_cons_columns
    where constraint_name = cname
    order by position;
    cursor c3 is
    select decode(position,1,'(',',')||rpad(column_name,40) refcol
    from user_cons_columns
    where constraint_name = cname2
    order by position;
    begin
    dbms_output.enable(100000);
    for q1 in c1 loop
    cname := q1.constraint_name;
    cname2 := q1.cname2;
    dbms_output.put_line('alter table '||q1.table1||' add constraint ');
    dbms_output.put_line(cname||' foreign key');
    for q2 in c2 loop
    dbms_output.put_line(q2.colname);
    end loop;
    dbms_output.put_line(') references '||q1.table2);
    for q3 in c3 loop
    dbms_output.put_line(q3.refcol);
    end loop;
    dbms_output.put_line(') '||q1.delete_rule||q1.status);
    dbms_output.put_line('/');
    end loop;
    end;
    col c1 format a79 word_wrap
    set long 32000
    set arraysize 1
    select 'create or replace trigger ' c1,
    description c1,
    'WHEN ('||when_clause||')' c1,
    trigger_body ,
    '/' c1
    from user_triggers
    where table_name = upper('&1') and when_clause is not null
    select 'create or replace trigger ' c1,
    description c1,
    trigger_body ,
    '/' c1
    from user_triggers
    where table_name = upper('&1') and when_clause is null
    select 'alter trigger '||trigger_name||decode(status,'DISABLED','
    DISABLE',' ENABLE')
    from user_Triggers where table_name='&1';
    set serveroutput on
    declare
    cursor c1 is
    select 'alter table
    '||'&1'||decode(substr(constraint_name,1,4),'SYS_',' ',
    ' add constraint ') a1,
    decode(substr(constraint_name,1,4),'SYS_','
    ',constraint_name)||' check (' a2,
    search_condition a3,
    ') '||decode(status,'DISABLED','DISABLE','') a4,
    '/' a5
    from user_constraints
    where table_name = upper('&1') and
    constraint_type='C';
    b1 varchar2(100);
    b2 varchar2(100);
    b3 varchar2(32000);
    b4 varchar2(100);
    b5 varchar2(100);
    fl number;
    begin
    open c1;
    loop
    fetch c1 into b1,b2,b3,b4,b5;
    exit when c1%NOTFOUND;
    select count(*) into fl from user_tab_columns where table_name =
    upper('&1') and
    upper(column_name)||' IS NOT NULL' = upper(b3);
    if fl = 0 then
    dbms_output.put_line(b1);
    dbms_output.put_line(b2);
    dbms_output.put_line(b3);
    dbms_output.put_line(b4);
    dbms_output.put_line(b5);
    end if;
    end loop;
    end;
    create or replace procedure dumzxcvreorg_dep(nam varchar2,typ
    varchar2) as
    cursor cur is
    select type,decode(type,'PACKAGE BODY','PACKAGE',type) type1,
    name from user_dependencies
    where referenced_name=upper(nam) and referenced_type=upper(typ);
    begin
    dbms_output.enable(500000);
    for c in cur loop
    dbms_output.put_line('alter '||c.type1||' '||c.name||' compile;');
    dumzxcvreorg_dep(c.name,c.type);
    end loop;
    end;
    exec dumzxcvreorg_dep('&1','TABLE');
    drop procedure dumzxcvreorg_Dep;
    select 'grant '||privilege||' on '||table_name||' to '||grantee||
    decode(grantable,'YES',' with grant option;',';') from
    user_tab_privs where table_name = upper('&1');
    select 'grant '||privilege||' ('||column_name||') on &1 to
    '||grantee||
    decode(grantable,'YES',' with grant option;',';')
    from user_col_privs where grantor=user and
    table_name=upper('&1')
    order by grantee, privilege;
    select 'create synonym '||synonym_name||' for
    '||table_owner||'.'||table_name||';'
    from user_synonyms where table_name=upper('&1');
    PROMPT REM
    PROMPT REM YOU MAY HAVE TO LOG ON AS SYSTEM TO BE
    PROMPT REM ABLE TO CREATE ANY OF THE PUBLIC SYNONYMS!
    PROMPT REM
    select 'create public synonym '||synonym_name||' for
    '||table_owner||'.'||table_name||';'
    from all_synonyms where owner='PUBLIC' and table_name=upper('&1') and
    table_owner=user;
    prompt spool off
    spool off
    set echo on feed on verify on
    The scripts REORGS1.SQL and REORGS2.SQL have been
    created. Alter these script as necesarry.
    To recreate the table-structure, first run REORGS1.SQL.
    This script saves the content of your table in a table
    called bk_.
    If this script runs successfully run REORGS2.SQL.
    The result is spooled to REORGTB.LST.
    Check this file before dropping the bk_ table.
    */

    Please do NOT cross-postings: create a deep structure for dynamic internal table
    Regards
      Uwe

  • Reorganisation

    Hello all,
    Since all the information regarding the tables is stored in the table MARA. So in order to reorganise, is it sufficient to just reorganise this table ..... I don't know? please provide just a brief intro on this topic..And also please provide a link for SQL Cache topic ..
    Plz. help

    HI,
    Since all the information regarding the tables is stored in the table MARA
    who told you? !!!!!!!!!!!!!!!!
    MARA : General Material Data table
    search sap note for you relavant database reorganisation
    regards,
    kaushal

  • Long time to load data from PSA to DSO / CUBE. Sequential read RSBKDATA_V

    Hi Gurus
    The process stays for several hours on sequential read from RSBKDATA_V - temporary storage for DTPs.
    After several hours, the processing finally starts, but even when I assign several BGDs to the DTP it takes hours to load the data.
    We have BI7.0 with SP22, so all relevant notes are already implemented.
    Does any one had similar problem, please?
    Thanks in advance
    Martin

    Hi Martin,
    this issue has cropped up a few times. Please check and implement the following notes:
    1338465    P22:DTP:LOG: Performance problem when messages are added +
    1331544    P22:HINT:Slow performance when accessing RSMONFACT +
    1312701    70SP21: Performance on view RSBKDATA_V selects
    1304234    70SP21: Performance on the hashed table p_th_rsbkdata_v **
    1168098    70SP19: Performance during DataStore object extraction
    1080027    70SP16: Performance during parallel processing
    These notes should improve the performance of the DTPs in your system.
    After you've added the notes, please check in tables RSBKDATA and RSBKDATAINFO whether they contain any data. If the tables are empty, please reorganise the tables, and restart the dtp.
    Hope this helps you.
    Rgds,
    Colum

  • Purging Old Data

    pls help in solving one issue related to purging the data.
    There are some 40 tables in the database am working in. And I need to check these tables for data which is 5 years old and have to delete those data but these tables are interlinked with other tables (parent -child relation). So how to proceed with this.
    I thought of "with cascade" option but what if the record in the table with the relation is below 5 yrs time period (within 5 yrs data, should not be deleted) ?

    Aparna16 wrote:
    pls help in solving one issue related to purging the data.Interesting problem.. and one that I, wearing my DBA hat, will throw back at the developers.
    They know the data model. This request for purging old data is very likely to occur again in a year's time. What then? Go through a painful exercise again (this time taking data model changes since the last time into consideration)?
    I do not see the logic in that. So instead I will throw this back at the developer and tell them that a PL/SQL package needs to be designed and written to purge old data. DBA input into this will be ito design. Can a purge be done as a single massive delete transaction? Or make it more sense to design the purge for a specific date range? Or a specific product/invoice/customer/whatever business entity that can be aged? And then run multiple such purges in parallel?
    And why the purge? Is it to free up space? That may not be the case depending on the pctfree/pctused settings on a data block. So do some tables perhaps need to be rebuild after a purge in order to reorganise the table and free space?
    That's the DBA side of the problem. Figuring out what data can be deleted from which tables and writing code to do that - that's a developer problem.
    So either side, you need to make sure you use the other side to assist you in doing this task.

  • F110 - performance problem

    Hello friends,
    I'm a techical person , i have one issue in F110 transaction.
    when i run paymeny for Venezulla country , it takes more time  , but when i do the same for other countries (eg. equador , columbia) it takes less time . For same number of open line items.
    So any idea what could be the cause ?
    I was checking for country specific condition in F110 program and found one table T059P - which is for withholding tax types.
    Here in Venezula has 37 entries while others have 7-8.
    So wanted to know does this thing impact on the performance.
    Moderator: Don't ask/offer score for the posts
    Regards,
    Mithun

    Hi,
    Check the number of entries in REGUPW table, it might possible that there is number of entries of proposal and payment data is huge.  In that case you need to reorganise the table entries.
    You can check and revert back..
    Regards,
    Amanullah

  • Workload analysis (ST03) - weekly report is missing

    Hi All,
    We have a issue in ST03N transaction. I noticed the daily report for performnce analysis(responce time) is available but it is not available for weekly report. This is happening from last 3 weeks, previously I was getting the response time report for daily, weekly and monthly in tcode st03n. I am quite surprised that now it is only available for daily and monthly but not for weekly. I also checked the job SAP_COLLECTOR_FOR_PERFORMANCE_MONITOR which is running fine. I also trid to check the log from performance monitor collector, where it is only showing error occered Since <date> . There is not much information why the weeklly report is not available.
    Is there anything where we can see why this different behaviour in statistics ? Please advice...
    Thanks in Advance

    Hai,
    I guess somebody had reorganised MONI table, means deleted Contents of the Monitoring Database.
    If this is the case the system will take sometime to build the values to show in terms of weeks and months.
    Please check the below link.....
    http://help.sap.com/saphelp_nw70/helpdata/EN/27/930e422dfcdc2ce10000000a1550b0/frameset.htm
    Also the check the settings for collecting data for the workload monitor.
    Regards,
    Yoganand.V

  • Shipment  and Delveiry Delete frm SCM

    Dear Experts,
    Could you please advice on which tables will be re-organized if we would like to delete the shipments and deliveries and sales documents?
    /SAPAPO/VS54 - Deleting Shipments
    /SAPAPO/VS531 - Delete Deliveries
    /SAPAPO/SDORDER_DEL
    Thanks,
    Ramesh.

    Hi Ramesh,
    Without reorganising any tables, can u try deleting those elements
    using transaction /sapapo/rlcdel by selecting the suitable order
    categories.
    You can try out for one location product and check how it works
    and proceed accordingly for all items
    Regards
    R. Senthil Mareeswaran.

  • TesSe Admin

    Hi,
    Recently we had changed <b>rspo/store_location</b> to <b>G</b> from <b>db</b>.
    Now, Spool , Background , Job logs is being created in global OS file system.
    But there are still some objects which are still created in database (SP12->Memory Allocation). The objects are KONS and DTA.
    Why this two object was not shifted to Global file system ?
    We would like to reorganise TST03 table. Before that we would like to truncate the table.
    Have anyone of you encountered this ? How did u solve it ?
    Thanks & Regards.
    Naba J NEog

    Hi,
    I seem to have missed this one on the day it was posted (not sure if it was even in iChat at the time).
    However I also can't identify any question.
    9:03 pm      Thursday; November 13, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Table reorganisation

    Hi,
    I wanted to know how is it possible to do  a table reorganisation.
    I ask this question because i have read a lot of subject where the brtools is use for this operation but like my DB is MS SQL 2005 SP3 ....i haven't this tool...
    Does the reorg have to be done by an MS SQL tool with the MS SQL manager? or in the Tx DB02 maybe?
    Other question :
    When is it possible to say " this table has to be reorganise" (What is the main paramèter : zise grow ?)
    Thanks in advance.
    Regards.

    Hi  BABY Fabrice,
    We do 2005 MSSQL reorgs  fairly frequently for one of our clients, here is how we go about it during our weekly maintenance window.
    1.  Before the window we take an online backup of the DB and Transaction logs.
    2.  We are on a cluster so we make sure that all resources are on the primary, then pause (or outright shutdown) the second node.
    3. SAP is stopped.
    4. Go into Enterprise Manager
    5. Select the database, right-click, choose Properties
    6.  We switch to simple mode so we don't overwhelm the t-log during the reorg
    7.  Restart the DB for the change to take effect
    8.  On the Enterprise Manger expand the DB, then Management and click on Jobs
    9.  Create a job and under the Steps tab change the type to Transact-SQL Script (TSQL), and the Database field to your database.  In the command field the query we use is as follows:
    EXEC sp_help TABLE_NAME  <---your table
    dbcc dbreindex ('TABLE_NAME', ") with no_infomsgs
    GO
    dbcc updateusage ('SID','TABLE_NAME')  <----SID is your instance SID
    GO
    10.  The job will be added to your list in the jobs section mentioned in step 8
    11.  Right-click on the job and choose Properties, and then edit Step 1, under "On success action" Quit the job reporting success and change the "Output file" to somewhere where the log can write the log to.
    12.  Right-click on your job and choose Start Job
    13.  We've experienced various run times, but it's highly dependent on your hardware.  On the production system which is relatively new and powerful I've seen 20GB to 60GB an hour.  Typically on our hardware if it was a 200GB table, I'd estimate then entire downtime (6 hours) and ask for a two or three more hours.
    14.  Be aware that if you are tight on space, you have to be mindful of the size of the table you are reorging...you need equivilent disk space while it rebuilds, meaning that if your table is 20GB, you need another 20GB free while performing the reorg.  You can reclaim it from the SAN (if applicable) afterwards.
    15.  Once done and reporting success, after watching Enterprise Manager and the log (the log doesn't update very frequently at all), be sure that before you bring everything back online that you change the Recovery Model back to Full.
    I hope this helps you out and good luck.
    Regards

  • Steps for table level reorganisation

    Dear Friends.
    We are going for Archiving on big tables like EDI40 table.
    So I have decided to regain space after archiving by using table level reorg is it ok??
    can you please suggest necessary steps and prerequisites.
    Thanks in advance.
    Regards
    JIggi

    Dear All,
    I have done following steps:--
    Microsoft Windows [Version 5.2.3790]
    (C) Copyright 1985-2003 Microsoft Corp.
    C:\Documents and Settings\wiqadm.WSECCQA>brtools
    BR0651I BRTOOLS 7.00 (24)
    BR0280I BRTOOLS time stamp: 2009-04-01 15.14.21
    BR0656I Choice menu 1 - please make a selection
    BR*Tools main menu
    1 = Instance management
    2 - Space management
    3 - Segment management
    4 - Backup and database copy
    5 - Restore and recovery
    6 - Check and verification
    7 - Database statistics
    8 - Additional functions
    9 - Exit program
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR0662I Enter your choice:
    3
    BR0280I BRTOOLS time stamp: 2009-04-01 15.14.25
    BR0663I Your choice: '3'
    BR0280I BRTOOLS time stamp: 2009-04-01 15.14.25
    BR0656I Choice menu 7 - please make a selection
    Database segment management
    1 = Reorganize tables
    2 - Rebuild indexes
    3 - Export tables
    4 - Import tables
    5 - Alter tables
    6 - Alter indexes
    7 - Additional segment functions
    8 - Reset program status
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR0662I Enter your choice:
    1
    BR0280I BRTOOLS time stamp: 2009-04-01 15.14.28
    BR0663I Your choice: '1'
    BR0280I BRTOOLS time stamp: 2009-04-01 15.14.28
    BR0657I Input menu 91 - please check/enter input values
    BRSPACE options for reorganization of tables
    1 - BRSPACE profile (profile) ...... [initWIQ.sap]
    2 - Database user/password (user) .. [/]
    3 ~ Reorganization action (action) . []
    4 ~ Tablespace names (tablespace) .. []
    5 ~ Table owner (owner) ............ []
    6 ~ Table names (table) ............ []
    7 - Confirmation mode (confirm) .... [yes]
    8 - Extended output (output) ....... [no]
    9 - Scrolling line count (scroll) .. [20]
    10 - Message language (language) .... [E]
    11 - BRSPACE command line (command) . [-p initWIQ.sap -s 20 -l E -f tbreorg]
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR0662I Enter your choice:
    6
    BR0280I BRTOOLS time stamp: 2009-04-01 15.14.38
    BR0663I Your choice: '6'
    BR0280I BRTOOLS time stamp: 2009-04-01 15.14.38
    BR0681I Enter string value for "table" []:
    BDCP
    BR0280I BRTOOLS time stamp: 2009-04-01 15.14.41
    BR0683I New value for "table": 'BDCP'
    BR0280I BRTOOLS time stamp: 2009-04-01 15.14.41
    BR0657I Input menu 91 - please check/enter input values
    BRSPACE options for reorganization of tables
    1 - BRSPACE profile (profile) ...... [initWIQ.sap]
    2 - Database user/password (user) .. [/]
    3 ~ Reorganization action (action) . []
    4 ~ Tablespace names (tablespace) .. []
    5 ~ Table owner (owner) ............ []
    6 ~ Table names (table) ............ [BDCP]
    7 - Confirmation mode (confirm) .... [yes]
    8 - Extended output (output) ....... [no]
    9 - Scrolling line count (scroll) .. [20]
    10 - Message language (language) .... [E]
    11 - BRSPACE command line (command) . [-p initWIQ.sap -s 20 -l E -f tbreorg -t "
    BDCP"]
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR0662I Enter your choice:
    c
    BR0280I BRTOOLS time stamp: 2009-04-01 15.14.45
    BR0663I Your choice: 'c'
    BR0259I Program execution will be continued...
    BR0291I BRSPACE will be started with options '-p initWIQ.sap -s 20 -l E -f tbreo
    rg -t "BDCP"'
    BR0280I BRTOOLS time stamp: 2009-04-01 15.14.45
    BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort:
    c
    BR0280I BRTOOLS time stamp: 2009-04-01 15.14.46
    BR0257I Your reply: 'c'
    BR0259I Program execution will be continued...
    BR1001I BRSPACE 7.00 (24)
    BR1002I Start of BRSPACE processing: seagjxpe.tbr 2009-04-01 15.14.46
    BR0484I BRSPACE log file: F:\oracle\WIQ\sapreorg\seagjxpe.tbr
    BR0280I BRSPACE time stamp: 2009-04-01 15.14.48
    BR1009I Name of database instance: WIQ
    BR1010I BRSPACE action ID: seagjxpe
    BR1011I BRSPACE function ID: tbr
    BR1012I BRSPACE function: tbreorg
    BR0280I BRSPACE time stamp: 2009-04-01 15.14.52
    BR0657I Input menu 353 - please check/enter input values
    Options for reorganization of tables: SAPSR3.BDCP (degree 1)
    1 ~ New destination tablespace (newts) ..... []
    2 ~ Separate index tablespace (indts) ...... []
    3 - Parallel threads (parallel) ............ [1]
    4 ~ Table/index parallel degree (degree) ... []
    5 - Create DDL statements (ddl) ............ [yes]
    6 ~ Initial extent size category (initial) . []
    7 ~ Sort by fields of index (sortind) ...... []
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR0662I Enter your choice:
    c
    BR0280I BRSPACE time stamp: 2009-04-01 15.14.55
    BR0663I Your choice: 'c'
    BR0259I Program execution will be continued...
    BR0280I BRSPACE time stamp: 2009-04-01 15.14.55
    BR1108I Checking tables for reorganization...
    BR0280I BRSPACE time stamp: 2009-04-01 15.14.56
    BR1112I Number of tables selected/skipped for reorganization: 1/0
    BR0280I BRSPACE time stamp: 2009-04-01 15.14.56
    BR0370I Directory F:\oracle\WIQ\sapreorg\seagjxpe created
    BR0280I BRSPACE time stamp: 2009-04-01 15.14.56
    BR1101I Starting online table reorganization...
    BR0280I BRSPACE time stamp: 2009-04-01 15.14.56
    BR1124I Starting reorganization of table SAPSR3.BDCP ...
    BR0280I BRSPACE time stamp: 2009-04-01 15.17.24
    BR1105I Table SAPSR3.BDCP reorganized successfully
    BR0280I BRSPACE time stamp: 2009-04-01 15.17.24
    BR1141I 1 of 1 table reorganized - 2152767 of 2152767 rows processed
    BR0204I Percentage done: 100.00%, estimated end time: 15:17
    BR0001I **************************************************
    BR0280I BRSPACE time stamp: 2009-04-01 15.17.24
    BR1102I Number of tables reorganized successfully: 1
    BR0280I BRSPACE time stamp: 2009-04-01 15.17.24
    BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort:
    c
    BR0280I BRSPACE time stamp: 2009-04-01 15.18.05
    BR0257I Your reply: 'c'
    BR0259I Program execution will be continued...
    BR0280I BRSPACE time stamp: 2009-04-01 15.18.05
    BR1022I Number of tables processed: 1
    BR1003I BRSPACE function 'tbreorg' completed
    BR1008I End of BRSPACE processing: seagjxpe.tbr 2009-04-01 15.18.05
    BR0280I BRSPACE time stamp: 2009-04-01 15.18.05
    BR1005I BRSPACE completed successfully
    BR0292I Execution of BRSPACE finished with return code 0
    BR0280I BRTOOLS time stamp: 2009-04-01 15.18.05
    BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRTOOLS:
    c
    BR0280I BRTOOLS time stamp: 2009-04-01 15.18.10
    BR0257I Your reply: 'c'
    BR0259I Program execution will be continued...
    BR0280I BRTOOLS time stamp: 2009-04-01 15.18.10
    BR0656I Choice menu 7 - please make a selection
    Database segment management
    1 + Reorganize tables
    2 - Rebuild indexes
    3 - Export tables
    4 - Import tables
    5 - Alter tables
    6 - Alter indexes
    7 - Additional segment functions
    8 - Reset program status
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR0662I Enter your choice:
    b
    BR0280I BRTOOLS time stamp: 2009-04-01 15.18.13
    BR0663I Your choice: 'b'
    BR0673I Going back to the previous menu...
    BR0280I BRTOOLS time stamp: 2009-04-01 15.18.13
    BR0656I Choice menu 1 - please make a selection
    BR*Tools main menu
    1 = Instance management
    2 - Space management
    3 + Segment management
    4 - Backup and database copy
    5 - Restore and recovery
    6 - Check and verification
    7 - Database statistics
    8 - Additional functions
    9 - Exit program
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR0662I Enter your choice:
    9
    BR0280I BRTOOLS time stamp: 2009-04-01 15.18.15
    BR0663I Your choice: '9'
    BR0280I BRTOOLS time stamp: 2009-04-01 15.18.15
    BR0680I Do you really want to exit BRTOOLS? Enter y[es]/n[o]:
    y
    BR0280I BRTOOLS time stamp: 2009-04-01 15.18.17
    BR0257I Your reply: 'y'
    BR0280I BRTOOLS time stamp: 2009-04-01 15.18.17
    BR0652I BRTOOLS completed successfully
    And I compared space before reorg and after reorg.
    I got 5 Gb space back .
    I hv done the whole procedure on BDCP table on WIQ.
    Shall i do the same procedure on production server.
    Thanks in advance.
    JIggi

  • SAP DB Reorganisation in SAP 4.6C Kernel 46D Patch 2500 and Oracle 9.2.0.8

    Hi Gurus,
    I have to delete the clients and then perform DB-Reorg.
    Through SCC5, I am deleting the clients.
    1) Is it possible to select all the clients and delte altogether, as there are 12 clients to be deleted.
    For Reorg, I went through the below notes :
    620803
    646681
    541538
    647697
    706625
    214995
    As I am deleting all clients except 3 (000, 001 and development client), do I need to re-organize the entire database ? How to reorganise the entire database at one go ?
    Some of the tables are around 90-98 GB.
    Is there any way to check from SAP level (other than SQL query) if the Tablespace is DMTS or LMTS and if it is ASSM ?
    Incase of DMTS, do you have any document how to convert to LMTS as I am a bit confused.
    Does there any dependency on SAP Kernel Level, is it ok to reorg on Kernel 46D.
    Thanks and Regards,
    Amit

    You can't delete all clients in one go... you need to logon into each and schedule the deletion via SCC5.
    A reorg of this scale will be very time consuming.. I think it will be much quicker to do a Homogeneous system copy via Export/Import.
    Also, if this is your development system make sure you check the client independent requests that might have been release from those clients and also the version management of developments.
    Thats my 2cents.
    Regards
    Juan

  • Linking multiple tables in numbers, how can I sort one table and this follow through on subsequent tables in the document?

    I am a teacher setting up a tracking system using Numbers for the first time. I have set up a summary sheet with puil information, some of which is "looked up" from other tables within the document. It is working brilliantly until we regrouped the pupils.
    When i reorganise the students on the summary page I want the same order to follow on all subsequent tables.
    However the pupil lists on all subsequent pages stay in the original order!
    Hope this makes some kind of sense as I am about to throw macbook out of the window!
    DAve

    davidmilce wrote:
    I want all of the tick boxes in each row to move with the pupil name when they are reorganised (ie the unique data in each row stays with the pupi no matter where they go when sorted.
    Thanks again
    Dave
    Dave,
    I might use Match, Offset and Column in my expressions. There are many approaches to this
    Match will tell you which row your person's data is in, and OFFSET will then take you to the row indicated by Match and the column indicated by COLUMN().
    Let's say you want to access the data for Pupil A. Further assume that the string "Pupil A" is the content of Column A, essentially the title of the record.
    MATCH(A, AF1 :: Table 1 :: A) will return the number of the Row in the source table where Pupil A is found.
    INDEX(Main, MATCH($A, Main :: $A), COLUMN())  will get the content, in your case the checkbox status.
    You are done if you are happy with displaying "TRUE" or "FALSE"
    But if you want, you can substitute graphics, like this:
    =IF(INDEX(Main, MATCH($A, Main :: $A), COLUMN()), "☑", "☐")
    Regards,
    Jerry

  • Finding known Field name in R3 tables

    Hi,
    How can one find the R3 table which holds a field name of which the name is known? In casu, I'm looking for the table which holds 'REMES' value (reorganisation value).
    Many thanks

    hi,
    what's the datasource name ?
    get the datasource name that hold it,
    then try help.sap.com, click 'search documentation',
    option 'netweaver' and type in the datasource, and go, after the result come out, click 'datasource' in right side, and click the datasource name in left side,
    if no luck, follow the steps in Roberto's excellent weblog
    /people/sap.user72/blog/2005/09/05/sap-bw-and-business-content-datasources-in-pursuit-of-the-origins
    hope this helps.

  • How can I know the size of DB Table

    Hi, Guys,
    1. How can I know the size of the DB Table in terms of kb
    2. If I delete some records from the Table, does the actual size of the Table remains  same or will it be reduced.
    3. If size remains same after deletion, how to reduce the size ( i.e. occupied space).
    thanks
    Mahesh

    Hi
    1. How can I know the size of the DB Table in terms of kb
    There is no precise method/tcode/program to know the Table size of a tables.
    Just based on the record size of a table(say for example 2kb), and if 200 records are there then, we roughly assume that it occupied 400 kb.
    All the tables are stored in Table spaces.
    2. If I delete some records from the Table, does the actual size of the Table remains same or will it be reduced.
    Time being it remains same. it won't get reduced immediately
    during some next DB reorganisation it gets reorganised by reducing it.
    3. If size remains same after deletion, how to reduce the size ( i.e. occupied space).
    during next DB reorganisation it gets reorganised by reducing it.
    Reward points if useful
    Regards
    Anji

Maybe you are looking for