Truncate TABLE PSA table-index part

Dear all,
I have a doubt about the truncate action on BW of PSA table.
To speed the activity and empty some tablespace I have truncated for example the PSA /BIC/B0000025000 and all table and index parts have emptied, so, on the contrary of disk space, the table part and index part from 00001 to 00050 for example are no longer used and the next uploads creates partition 00051.
The question is: I must drop all index and table part previously emptied?
If yes a must keep in mind some indications?
I could have some problem to leave this table and index part empty, for example about performance or inconsistence?
There is some contraindication to truncate PSA?
Can i use program 'RSAR_CLEANUP_PSA_DIRECTORY' to delete its?
Thanks for your help.
Best Regards
Daniele

Hi Kaushal,
thanks for your answer.
I have executed program mentioned in oss note 733371.
After the execution of RSAR_PSA_CLEANUP_DIRECTORY
some errors have found:
in the head of log there are this two entries:
Fatal error occured, DO NOT USE correct option
For errors 'wrongly present in partition' refer to NOTE 849857 / 992248
the rest of log this kind of errors:
Request : ODSR_47KKTL3NMVNZPGY17C4POEYAV  missed in partition  0015
The oss note 849857 is for release lower of mine, the note 992248 is for my release, its talks about a program 'SAP_PSA_ZEROCORRECT' imported automatically with SP 11, i have level 13 os SP BI but i didn't find that program,
do you have some idea about that?
After execution of report RSAR_PSA_CLEANUP_DEFINITION (only check)
I have this error:
No DDIC Table Exists for PSA: ZEDS_NOT_T_BA Vrs. 000
There Is No Active DDIC Table: /BIC/B0000852000
Do you think that if i run RSAR_PSA_CLEANUP_DEFINITION  with repair object i can resolve all my problem visualized for report RSAR_PSA_CLEANUP_DIRECTORY either? Or before in must execute RSAR_PSA_CLEANUP_DIRECTORY whit repair option?
Thanks for your help
Ciao

Similar Messages

  • ORA-01502: Index or Partition is in unusable status. while truncating table

    Hi All,
    One of our Devlopers compalined that he is getting ORA-01502 : Index or partition is unusable status while truncating the a table in our Dataware house production database. He is using the following commands.
    Alter index <index_name> unusable;
    Truncate table <table_name> ;
    He is running a scripts to truncate each table and ecah time he is passing the table name as an input parameter to script. He is using same method to truncate four tables each having a BITMAP and a REGULAR index. For two tables every thing is working fine, but for other two tables the he is getting ORA-01502 for BITMAP indexes. It a weekly process and every week he is getting the same issue. I checkd the Index status, they are in valid status only.
    For a work around I have created a table with BITMAP and regular index in our dev database. made the indexes unusable, checked their status. I truncated the table. Importent thing here is the Indexes are becoming vaild when I truncate the table.
    I suspect that my devloper's Indexes were already in unusable status (before he use the command ALTER INDEX), when he truncated the table, oracle trying to validate the index and throwing the error ORA-01502 because the Indexes are in unusabel statsu for a while.
    I tried searching for the mechanism of truncate table command and its effect on Indexes. But I did not find any luck, no one is speaking about index when truncating the table. Can any one please help me????
    Sorry for lengthy post. Any help is greatly appriciated and I thank every one in advance.

    DDL for Indexes getting ORA-01502 error
    CREATE BITMAP INDEX DWHMGR.ACT_TXN_LN_STG_01_XN3 ON DWHMGR.ACCT_TXN_LINE_TERM_BAL_STG_01 (TERM_BAL_CD ASC) TABLESPACE "BALFD_INX_04" NOLOGGING PCTFREE 1 INITRANS 2 MAXTRANS 255 STORAGE
    ( INITIAL 8M NEXT 8M MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 BUFFER_POOL DEFAULT );
    CREATE BITMAP INDEX DWHMGR.ACCT_TERM_BAL_STG_01_XN3 ON DWHMGR.ACCT_TERM_BAL_STG_01 TERM_BAL_CD ASC) TABLESPACE "BALFD_INX_04" NOLOGGING PCTFREE 1 INITRANS 2 MAXTRANS 255 STORAGE
    ( INITIAL 8M NEXT 8M MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 BUFFER_POOL DEFAULT );
    Indexes that have no issues.
    CREATE INDEX DWHMGR.ACCT_TERM_BAL_STG_01_XN2 ON DWHMGR.ACCT_TERM_BAL_STG_01 (ACCT_REF_NB ASC) TABLESPACE "BALFD_INX_04" NOLOGGING PCTFREE 1 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 8M
    NEXT 8M MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 BUFFER_POOL DEFAULT );
    CREATE BITMAP INDEX DWHMGR.ACCT_PRC_STG_01_XN1 ON DWHMGR.ACCT_PRC_STG_01 (ACCT_ORG_CD ASC) TABLESPACE "BALFD_INX_04" NOLOGGING PCTFREE 1 INITRANS 2 MAXTRANS 255 STORAGE ( INITIAL 8M
    NEXT 8M MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 BUFFER_POOL DEFAULT );
    Please look at the DDL of the indexes and let me know if you need any other information.

  • How index affected by truncate table

    HI, all,
    I have a question about indexes in a table. If I truncate the table and reload data, do the indexes in the table still valid?
    From documentation:
    “a table is truncated, all associated indexes are also truncated.”
    What does that mean?
    Do I need to recreate index every time I truncate table?
    Thanks a lot.

    When you truncate a table, you are removing all the data from the table but leaving the structure of the table intact. Logically, the same thing must happen to the index-- all the index data must be removed (since there are no longer any entries in the table), but the structure of the index remains intact.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How truncate table affect index?

    HI, all,
    I have a question about indexes in a table. If I truncate the table and reload data, do the indexes in the table still valid?
    From documentation:
    “a table is truncated, all associated indexes are also truncated.”
    What does that mean?
    Do I need to recreate index every time I truncate table?
    Thanks a lot.

    No, it's just what it says: it truncates the index, just like it truncates the table. You do not have to recreate the table, nor the index.
    Truncating is deleting without the possibility of a rollback.

  • BWA Fact Table Index Size

    Hi
    Can anybody tell me how the BWA decides when a fact table index gets split into multiple parts? We have a number of very large cubes that are indexed and some have a fact table index that consists of one logical index which is made up of multiple physical indexes but other, similar sized cubes, just have one very large physical index for the fact table.
    With the one very large physical index we seem to get an overload problem but when they are split into multiple parts we don't.
    Thanks
    Martin

    Hi Martin,
    this depends on the reorg config and the attribute of the index. You can manually trigger a splitting of an index via command 'ROUNDROBIN x', x stand for the number of parts which the index will be split to. Therefore you have to go into trexadmin standalone tool -> landscape right click on index -> split/merge index...
    If you want an automatically split, you have to setup your reorg settings. Goto trexadmin standalone tool -> tab reorg -> options -> here you can choose the type of algorithm. Have a look into note 1313260 and 1163149.
    Do you have a scheduled reorg job?
    Regards,
    Jens
    PS: Every black box can be understood...

  • Truncate Table before Insert--Performance

    HI All,
    This post is in focus of special requirement where a table is truncated before inserting records in the table.
    Now, when a table is truncated the High Water Mark(HWK) is reset to lowest memory allocated for table in tablespace. After this, would insert with append can boost the performance of the insert query?
    In simple insert query, the oracle engine consults the free list to look for free spaces.
    But in insert with apppend, the engine starts above the HWM. And the argument is when truncate has been executes on table, would the freelist be used in simple insert.
    I just need to know if there are any benefits of using append insert on truncated table or simple insert would be same in term of performance with respect to insert with append.
    Regards
    Nits

    Hi,
    if you don't need the data truncate the table. There is no negativ impact whether you are using an conventional path or a direct path insert.
    If you use append less redo is written for the table if the table is in NOLOGGING mode, but redo is written for all indexes. I would recommand to create a full backup after that (if needed), because your table will not be recoverable after that (no REDO Information).
    Dim

  • Truncate table related questions

    Hi Folks,
    Environment: 10g Rel 2
    I am trying to prove the following two points by way of experimentation
    a, The truncate table operation will reset the high water mark (HWM) to the first usable data block in the table segment
    # Take a HWM snap shot before the truncate operation
    select a.BLOCKS - b.EMPTY_BLOCKS -1 HWM
    from
      (SELECT BLOCKS
       FROM   DBA_SEGMENTS
       WHERE  OWNER=UPPER('JIM') AND SEGMENT_NAME = UPPER('EMPLOYEES')) a,
       (SELECT EMPTY_BLOCKS
        FROM   DBA_TABLES
        WHERE  OWNER=UPPER('JIM') AND TABLE_NAME = UPPER('EMPLOYEES')) b;Output: 7
    truncate table JIM.EMPLOYEES;
    Re ran the above code and got the same result (i.e. 7 blocks). I was expecting to see 0 blocks instead? Is the above query the right method of
    finding the HWM?
    b, The truncate operation will also truncate the corresponding indexes for the table
    Q, Is there a view that will show all the index values of the table? These values will probably be meaningless, but I would like to see them before
    and after the truncate operation.
    Thanks
    rogers42

    a) If you would have read on the empty_blocks column in dba_tables, you would have known it is populated by dbms_stats.
    Did you run dbms_stats.analyze_table?
    b)
    There is no such view.
    All dictionary views are documented in the view DICT and the online documentation.
    Sybrand Bakker

  • TRUNCATE TABLE NOT WORKING AFTER DROPPING CONSTRAINTS

    Hi,
    I have a table with a foreign key constraint. I know you can't truncate tables when there are foreign key constraints. So I drop the constraints before running the TRUNCATE TABLE command. But SQL Server is still stating there are foreign key constraints
    even after they have just been dropped.
    When I use SQL Server Management Studio to generate a drop & create script on this table or any other table with an FK consttaint, the generated script fails stating that there are still foreign key constraints??
    I have the same problem for every table that has FK constraints, for those without FK, TRUNCATE table works without issues.
    The end goal is to reset the identity value of the primary key. Since DBCC does not work on Azure, TRUNCATE TABLE is the only way left, especially if you can't even drop and recreate tables with FK constraints.
    What am I missing here?
    Peter

    Hi,
    Thanks for posting here.
    TRUNCATE TABLE is similar to the DELETE statement with no WHERE clause; however, TRUNCATE TABLE is faster and uses fewer system and transaction log resources.
    TRUNCATE TABLE removes all rows from a table, but the table structure and its columns, constraints, indexes, and so on remain. To remove the table definition in addition to its data, use the DROP TABLE statement.
    If the table contains an identity column, the counter for that column is reset to the seed value defined for the column. If no seed was defined, the default value 1 is used. To retain the identity counter, use DELETE instead.
    Restrictions
    You cannot use TRUNCATE TABLE on tables that:
    •Are referenced by a FOREIGN KEY constraint. (You can truncate a table that has a foreign key that references itself.)
    •Participate in an indexed view.
    •Are published by using transactional replication or merge replication.
    For tables with one or more of these characteristics, use the DELETE statement instead.
    TRUNCATE TABLE cannot activate a trigger because the operation does not log individual row deletions. For more information, see CREATE TRIGGER (Transact-SQL).
    Truncating Large Tables
    Microsoft SQL Server has the ability to drop or truncate tables that have more than 128 extents without holding simultaneous locks on all the extents required for the drop.
    Permissions--------------------------------------------------------------------------------
     The minimum permission required is ALTER on table_name. TRUNCATE TABLE permissions default to the table owner, members of the sysadmin fixed server role, and the db_owner and db_ddladmin fixed database roles, and are not transferable. However, you
    can incorporate the TRUNCATE TABLE statement within a module, such as a stored procedure, and grant appropriate permissions to the module using the EXECUTE AS clause.
    You cannot truncate a table which has an FK constraint on it.
    Typically my process for this is:
    Drop the constraints
    Trunc the table
    Recreate the constraints.
    Hope this helps you.
    Girish Prajwal

  • Truncate table lock issue

    Hi,
        In my SQL2000 stored procedure, there are 9 truncate table commands.
         But the the stored procedure is take above 15 minutes to execute.
         In this stored procedure, truncate table command has no problem.
         But an insert query into that table is very slow.
         In the insert query, select some views output and insert into the table. But these select output is very slow.
         I search some forums. They said that lock problem for the object. Query execution delayed for a exclusively accessed object.
        How can I remove the lock for my strored procedure running faster ? 

    Here are the bad news: you need to have some understanding of indexing to get some results out of it. But since we don't know anything about your queries, we cannot really give much better advice. What we can say is that TRUNACTE TABLE has nothing to
    do with it. Probably not locking either. Locking would come from concurrent activity in the database. Is there any?
    Normally, we ask people to submit the code they have problem with. In this case we would also need see the view definitions. (Else we would still be in the dark.) And if the views are built on views, we need to see these as well. This may result in more
    code that is practic to handle here, but I leave that up to you. As a hint: in the next step we are much likely to ask for the table and index definitions.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Does a truncate table solve corrupt blocks in a table

    Hi Guys,
    Got a question:
    Does a truncate table solve corrupt blocks in a table?
    I have found corrupt blocks in rman, located them, they are in 1 table.
    And contacted the business, and have permission to drop and recreate the table,
    but my question is does truncate table drop storage also solves my problem?
    And will it let me to do a full backup without set max corrupt blocks?
    To my knowledge does a truncate table moves the high watermark to 0 + 1 extend, but I am unsure how this will effect the corrupt blocks.
    Thanks in advance for your advice

    Hi,
    Yes truncate/drop table fixes the corruption at the database level. You may like to take the backup(if you have index on it) of that table so that you may restore it later if anything goes wrong.
    Note: This would not fix any corruption at the disk level (like bad sectors).
    Regards
    Anurag

  • Internal Behaviour of Truncate Table Command in Oracle Database

    Hi,
    Can anyone let me know the internal behaviour of Truncate Table Command in Oracle Database?
    Thanks,
    Harshad.

    Hi Tuhinshoor,
    I know the functioning of Truncate Command.
    But, I needed to know whether it drops the table before recreating it, maintaining all the indexes and constraints intact??
    Thanks,
    Harshad.

  • Flashback the truncate table is possible in 11g?

    Is it possible, to recover the truncate table data using flashback? with out any db downtime. if yes, steps please.

    Phil Florent wrote:
    Flashback is a great thing but the olds methods are still there. You can do a restoration/recover of a part of your database (the minimum required + the datafile(s) with the segment(s) you need) and then open this small database, export the table and import it in your original database. No downtime.For sure, that's good to point out.
    The OP was asking specifically about FlashBack so i assumed (perhaps incorrectly) those methods were ruled out already for whatever reasons. Never hurts to have too much information though, unless your brain happens to explode i suppose :)

  • How to obtain the table index in word use LabVIEW Report Generation Toolkit for Microsoft Office

    I created a word templete and it had several tables. When I use the "Word Edit Cell" function in LabVIEW Report Generation Toolkit for Microsoft Office, the function need "table index", and I didn't find any function to get or set the table index in word document. How can I achieve my attention to write value to specified table cell using the "Word Edit Cell" function?
    Thanks for reply!
    YangAfreet

    Hi yangafreet
    You do not need to get the table index for the word edit cell.vi from anywhere. LabVIEW will automatically index all the tables in the document. See the attatched vi for an example.
    Rich
    Attachments:
    Table Edit.vi ‏23 KB

  • To Use  Cursor or  TYPE table Index by PLS_integer

    Hi All,
    Let's see if I have table with no. of records 19,26,20,000.
    If I want to loop through all the records which will be a optimized way To Use Cursor or TYPE table Index by PLS_integer.
    Please guide.
    Thanks.

    What is it you want to do to/with the rows you're looping through?
    Ideally you want to avoid looping, as that's row by row (aka slow by slow) processing and it's expensive time-wise.
    If you're doing DML (insert/update/delete) then you're best off doing it in one sql statement, rather than looping.

  • Fact Table index vs BIA Index

    BIA gurus..
    Prior to our BIA implementation we had the drop and rebuild index process variants in our process chains.
    Now after the BIA implementation we have the BIA index roll-up process variant included in the process chain.
    Is it still required to have the drop and rebuilt index process variants during data load ?
    Do the infocube fact table indexes ever get hit after the BIA implementation ?
    Thanks,
    Ajay Pathak.

    I think you still need the delete/create Index variants as it not only helps in query performance but also speeds up the load to your cubes.
    Documentation in Perfomance tab:
    "Indices can be deleted before the load process and after the loading is finished be recreated. This accelerates the data loading. However, simultaneous read processes to a cube are negatively influenced: they slow down dramatically. Therefore, this method should only be used if no read processes take place during the data loading."
    More details at:
    [http://help.sap.com/saphelp_nw70/helpdata/EN/80/1a6473e07211d2acb80000e829fbfe/frameset.htm]

Maybe you are looking for