TRUNCATE Table - task failed

Hi friends,

Im making a loading SCM using R12.1.3 when running I met an error like below
2012-08-07 15:24:07.734 TRUNCATE TABLE:OPI_OBIA_W_BOM_HEADER_DS:"Table Action: Override OPI truncate command" template has started.
ANOMALY INFO::: Error while executing : TRUNCATE TABLE:OPI_OBIA_W_BOM_HEADER_DS:"Table Action: Override OPI truncate command" template
MESSAGE:::com.siebel.analytics.etl.execution.exceptions.ActionFailedException: Running Custom Sql list TRUNCATE TABLE:OPI_OBIA_W_BOM_HEADER_DS:"Table Action: Override OPI truncate command" template
Default retries for this custom SQL is 1.

executing sql (Truncate OPI:EBS11i)
TRUNCATE TABLE OPI.OPI_OBIA_W_BOM_HEADER_DS
For the foregoing regarding the link below error, they said like to apply a path 10422612

https://forums.Oracle.com/forums/thread.jspa?threadID=2386306 & tstart = 75_ +.

But when I tried to download this patch to resolve the above issue, a password is required to download the file in mysupport.

Is there an alternative link to download this patch file.

Thank you

Kind regards
Saro

Yes, you need to get the password of Oracle by SR.

Given that you do not use these tables, you can make it inactive task force TASK_GROUP_Extract_BOM. Of course respective tasks of SDE and SIL are also inactive.
Once you with changes assemble the business sector and build of EP.

Hope this helps

Tags: Business Intelligence

Similar Questions

  • ODI-1228: SrcSet0 (load) task fails on the target of ORACLE EBS_ connection

    Hello

    I'm integrating bulk data from one database to another DB, when I run the data in another DB all the success, but I am unable to see the result in another DB.so I checked in the operation tab I can see some belligerents message here.


    warnning:

    ODI-1228: SrcSet0 (load) task fails on the connection target ORACLE EBS_Customers.
    Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist


    someone please you suggest on this.


    Kind regards
    Anil

    Hello

    There is really little detail, but if you work on eBS I suspect you're pointing the synonymous or something similar.

    Go to step "Create table of work." What do you see? Get the name and try will refuse this table exists

    Let us know

  • Using 'STORAGE of REUSE' with the command 'TRUNCATE TABLE '.

    Because ' truncate table... reuse storage "speed up the tronquantes process?

    Sometimes statements truncation takes about 30 minutes and other times just a few minutes.

    What are the backs of uinsg print 'reuse storage?

    The RE-USE of STORAGE clause is used to prevent the allocated storage of back to the pool.
    Consider this scenario for a typical daily load of an intermediate table

    1. Empty the table of yesterday's data - TRUNCATE it
    2. Load the table with today's data - INSERT 
    

    If you load a large number of records it takes time for Oracle to allocate storage for records
    When you use Oracle TRUNCATED must return the storage allocated to the pool.
    Then when you INSERT new records, that oracle has to allocate the space that he could have used, but returned to the pool.

    If you use TRUNCATE... RE-USE of STORAGE Oracle truncates the table but keep the storage and it will reuse the same storage
    When you do the INSERT instead of having to take the time to allocate new storage.

    So, there are two options to speed up ETL processes like that.
    1. use TRUNCATED... RE-USE of STORAGE and a standard INSERT query

    2. use TRUNCATE and INSERT / * + APPEND * / and make the table NOLOGGING to INSERT it. This will make a big
    load. Oracle must allocate space, but the load mass will make them more effective than a standard INSERT.

    -editing to update after reading the reference asktom
    Storage of back to the pool takes time, so REUSE STORAGE of coding may be faster. The real advantage comes with the next load of data, however if you use a standard INSERT (and not in BULK or direct load) because Oracle failed to reallocate storage.

    If RE-USE eliminates the return of storage to the pool, as well as the allocation of the new storage for the next INSERTION.

    Published by: rp0428 on February 20, 2012 11:16

  • Grant to truncate table

    I truncate tables 4 to another user.

    I grant kind of what I need to to my user to perform this specific task in the table in another schema?

    Thank you
    Luciana

    The only way to be able to issue a command TRUNCATED on a table, you aren't owner would be to give the DROP ANY TABLE privilege. No worthy of their name DBA would allow that to happen.

    Another solution would be to create a stored procedure, owned by the owner of the tables (or a DBA account) who performs the dynamic SQL statements to truncate the tables in question. The owner of this procedure would then grant you EXECUTE access to the procedure.

    Justin

  • Interruption of TRUNCATE TABLE command

    Hello

    I made very dangerous mistake today: TRUNCATE TABLE on the production database. :-(

    But in a few seconds (2 or 3), I managed to break the operation (before the end of the run).
    It was quite a large table, now (after the accident), there is more records then 32 million.

    We need to know, are all deleted records?

    We have no proper backup, to compare the records with her.
    And I couldn't find any detailed description of the works to TRUNCATE.

    Can you please:
    1. say, on any method to check if there are deleted records?
    2. relationship to any resource, where I can read in detail, on the operation of TRUNCATE TABLE .

    Thank you, in advance, to help

    I know that the table TRUNCATE TABLE statement is atomic. It fails or succeeds. Don't truncate all the lines or none at all. So if you interrupt a statement TRUNCATE TABLE your table must remain in its original state.

    This can be illustrated below:

    SQL > CREATE TABLE TEST AS SELECT * FROM ALL_OBJECTS;
    
    Table created.
    
    SQL > INSERT INTO TEST SELECT * FROM TEST;
    
    12421 rows created.
    
    SQL > INSERT INTO TEST SELECT * FROM TEST;
    
    24842 rows created.
    
    SQL > INSERT INTO TEST SELECT * FROM TEST;
    
    49684 rows created.
    
    SQL > INSERT INTO TEST SELECT * FROM TEST;
    
    99368 rows created.
    
    SQL > INSERT INTO TEST SELECT * FROM TEST;
    
    198736 rows created.
    
    SQL > INSERT INTO TEST SELECT * FROM TEST;
    
    397472 rows created.
    
    SQL > INSERT INTO TEST SELECT * FROM TEST;
    
    794944 rows created.
    
    SQL > INSERT INTO TEST SELECT * FROM TEST;
    
    1589888 rows created.
    
    SQL > SELECT COUNT(*) FROM TEST;
    
      COUNT(*)
    ----------
       3179776
    
    SQL > TRUNCATE TABLE TEST;
    ^C
    H:\>sqlplus /@testdb
    
    SQL*Plus: Release 10.2.0.4.0 - Production on Mon Aug 3 08:20:11 2009
    
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    
    Enter password:
    
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL > SELECT COUNT(*) FROM TEST;
    
      COUNT(*)
    ----------
       3179776
    

    HTH!

  • Truncate Table generates cancel?

    What I understand, TRUNCATE TABLE resets the high water and after some discussions and information on the web creates a small amount of cancellation. For example, http://www.orafaq.com. However, documentation of Oracle 11 g 2 to truncating Tables and Clusters makes clear that it does not generate just undo.

    Quote: A TRUNCATE statement does not generate the cancellation information and committed immediately. It is a DDL statement and cannot be cancelled.

    TRUNCATE is apparently done a COMMIT before and after he runs, which would explain why there is no ROLLBACK. And if I'm not mistaken, any DML or DDL statement must create an entry in the log again first, before you run.

    Which is correct? Does TRUNCATE really create no CANCELLATION and implicit VALIDATION is perhaps only a protection measure, or what is the real story here? I tried a few tests, playing with the employee_demo table, but I have not been able so far to know what has changed in the UNDO tablespace. Unfortunately, I'm not a great expert on PL/SQL and do not use it much. Is there a way to simply to query or compare the cancellation of table before and after a truncate table operation to see the difference? By comparing the size is not.

    Thank you!

    Summary/Conclusion:

    The answer, in other words, is that TRUNCATE TABLE Undo. This cancellation information cannot be used by the user to RESTORE a TRUNCATE TABLE, which also applies to the other DDL statements, but may be required by the body to perform the database crash recovery.

    Because TRUNCATE TABLE changes the metadata in the data dictionary and resets the high tide of the object, it produces much less that cancel the DML statements as DELETE. However, it would probably not be the Oracle database if everything were that easy.

    If you happen to find this interesting question and wish to know more on it again and cancel the process regarding the DDL statements, some of the responses I received the case very resourceful and provided information you many not know or will not find in the usual documentation.

    I can mark only one answer is right and just caught the first response that provided an answer to my original question. The answers that I've marked as useful are those replies which I think has provided good explanations or added interesting new aspects or information thereon.

    Thank you all for your time and your contributions!

    To check the generation of cancellation (example):

    SQL > select count (*) from t1;

    COUNT (*)

    ----------

    1000000

    1 selected line.

    SQL > select name, value of V$ mystat ms, v$ statname sn where sn.statistic # ms.statistic # and sn.name like '% cancellation' and ms.value =! = 0 ;

    NAME                                                                  VALUE

    ---------------------------------------------------------------- ----------

    cancel changes vector size 192

    1 selected line.

    SQL > truncate table t1;

    Table truncated.

    SQL > select name, value of V$ mystat ms, v$ statname sn where sn.statistic # ms.statistic # and sn.name like '% cancellation' and ms.value =! = 0 ;

    NAME                                                                  VALUE

    ---------------------------------------------------------------- ----------

    cancel the change in size of vector 31272

    1 selected line.

    The cancellation that would have been generated by a deletion would have been of the order of one hundred twenty megabytes - but you'll have to take my word for it.

    This small amount of cancellation would have been associated a few blocks management cleared space, the day and possibly put segment header some updating of the data dictionary (your changes of $ tab_stats).

    To prove that some cancel the blocks of space for the table (and its indexes) management, you would probably have to spend just before truncation, then truncation of log files, then empty the current log file to get a picture of minimum log that you could review to see which blocks had been affected by again them and the bits from the redo had correspondent (or on the contrary (, reversing) entries created in cancel it. You would then be able to see exactly what had happened to the table (and index) blocks and how this action had been protected by the cancellation.

    Bottom line - people often say that "truncate" generates no cancellation, what they really mean is that it generates no cancellation for data, although it always generates a relatively small amount of cancellation for the meta-data.

    Concerning

    Jonathan Lewis

    P.S. before everybody does point out that there are always special cases - truncation of a table in a cluster is implemented as a deletion.

  • Truncate table audit

    11.2.0.4.0

    Possible to truncate table of audit?  Ive tried some of the methods that are being pushed on the web, but nothing works.

    -clear the aud$

    truncate table sys.aud$

    create the table t1_trunc as

    (select * from dba_objects)

    Audit truncated;

    table of audit;

    truncate table t1_trunc;

    Select * from sys.aud$ not = no line.

    user47708, I don't think that you should open a SR because I can audit truncated.  First sysdba users are given unverified as regular users, then you need to perform the truncation of a new session started after the audit truncate was issued.  I have both audit and audit table truncate together.  The database must have naturally the audit_trail one value other than 'none '.

    - -

    > audit truncated;

    Verification succeeded.

    > table of audit;

    Verification succeeded.

    > connect mpowel01
    Enter the password:
    Connected.
    MPOWEL01 > truncate table marktest.

    Table truncated.

    MPOWEL01 > select count (*) in the dba_audit_trail where action_name like "TRUNC % % ';

    COUNT (*)
    ----------
    1

    - -

    HTH - Mark D Powell.

    PS - test ran on the 10.2.0.5 version

  • The truncated table rows

    Hi team,

    One of my colleague ran a batch which will truncate a table and insert the final table by extracting data from different tables in backup taking the old table.

    But today before 10 minutes he missed to keep the export backup of this table and ran the batch. All the old data of the truncated table and now we need these data.

    Flashback is DISABLED in our case and Undo retention is dry 7200 and since it is a DDL so it will change the definition of the table.

    Is it possible to get the data that truncated.

    Daily HT full backup will run and we are in the process of restoring the backup but the db size is 4 TB and it will take time and then let's apply archive logs, before that got truncated.

    Until can we try something else?

    Hemant seems good to me.

    Please check the Version of Oracle where you are restoring the database and the Oracle version of the primary database that saves youi have taken.

    I'm 100% sure that there could be the difference in the release.

    We faced this problem 2 times and every time the issue is different binary or different architecture was the problem.

  • DAC: tasks failed during the ETL for financial applications

    I'm looking for my first ETL on OLIVIER 7.9.6.4

    I use Oracle EBS 12.1.1 as source system.

    the ETL full 200 + tasks successfully, but it fails for the rest of them

    first task that fails is:

    SDE_ORA_GL_AR_REV_LinkageInformation_Extract


    Error message:

    All the batch jobs

    Lot of Informatica Session

    ------------------------------

    INFORMATICA TASK: SDE_ORAR1211_Adaptor:SDE_ORA_GL_AR_REV_LinkageInformation_Extract_Full:1: (Source: COMPLETE target: FULL)

    ------------------------------

    2013-09-03 14:57:14.627 acquisition of resources

    2013-09-03 14:57:14.643 acquired resources

    2013-09-03 14:57:14.658 INFORMATICA TASK: SDE_ORAR1211_Adaptor:SDE_ORA_GL_AR_REV_LinkageInformation_Extract_Full:1: (Source: COMPLETE target: FULL) began.

    FAULT INFO: Error executing: INFORMATICA TASK: SDE_ORAR1211_Adaptor:SDE_ORA_GL_AR_REV_LinkageInformation_Extract_Full:1: (Source: COMPLETE target: FULL)

    Message:

    Fatal error

    pmcmd startworkflow sv - infor_int d Domain_AMAZON-9C628AAE - u Linguiste2 Pei * f SDE_ORAR1211_Adaptor - paramfile C:\Informatica\server\infa_shared\SrcFiles\SDE_ORAR1211_Adaptor.SDE_ORA_GL_AR_REV_LinkageInformation_Extract_Full.ORA_R1211.txt SDE_ORA_GL_AR_REV_LinkageInformation_Extract_Full

    Status / / Desc: failure

    WorkFlowMessage:

    Error message: unknown reason 36331 error code

    Error code: 36331

    EXCEPTION CLASS: com.siebel.analytics.etl.etltask.IrrecoverableException

    com.siebel.analytics.etl.etltask.InformaticaTask.doExecute(InformaticaTask.java:254)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.doExecuteWithRetries(GenericTaskImpl.java:477)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.execute(GenericTaskImpl.java:372)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.execute(GenericTaskImpl.java:253)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.run(GenericTaskImpl.java:655)

    com.siebel.analytics.etl.taskmanager.XCallable.call(XCallable.java:63)

    java.util.concurrent.FutureTask$ Sync.innerRun (unknown Source)

    java.util.concurrent.FutureTask.run (unknown Source)

    java.util.concurrent.Executors$ RunnableAdapter.call (unknown Source)

    java.util.concurrent.FutureTask$ Sync.innerRun (unknown Source)

    java.util.concurrent.FutureTask.run (unknown Source)

    java.util.concurrent.ThreadPoolExecutor$ Worker.runTask (unknown Source)

    java.util.concurrent.ThreadPoolExecutor$ Worker.run (unknown Source)

    java.lang.Thread.run (unknown Source)

    (Number of attempts: 1).

    pmcmd startworkflow sv - infor_int d Domain_AMAZON-9C628AAE - u Linguiste2 Pei * f SDE_ORAR1211_Adaptor - paramfile C:\Informatica\server\infa_shared\SrcFiles\SDE_ORAR1211_Adaptor.SDE_ORA_GL_AR_REV_LinkageInformation_Extract_Full.ORA_R1211.txt SDE_ORA_GL_AR_REV_LinkageInformation_Extract_Full

    2013-09-03 15:15:01.346 INFORMATICA TASK: SDE_ORAR1211_Adaptor:SDE_ORA_GL_AR_REV_LinkageInformation_Extract_Full:1: (Source: COMPLETE target: FULL) has finished running with the Failed state.

    ------------------------------

    (Failed)

    After that, many dependent tasks fail

    log files of session at the "SDE_ORA_GL_AR_REV_LinkageInformation_Extract_Full_SESSIONS.log":

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

    STD OUTPUT

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

    Informatica (r) PMCMD, version [9.1.0 HotFix2], build [357.0903], 32-bit Windows

    Copyright (c) Informatica Corporation 1994-2011

    All rights reserved.

    Called my Sep 03 15:14:24 2013

    Connected to the Service of integration: [infor_int].

    File: [SDE_ORAR1211_Adaptor]

    Workflow: [SDE_ORA_GL_AR_REV_LinkageInformation_Extract_Full]

    Instance: [SDE_ORA_GL_AR_REV_LinkageInformation_Extract_Full]

    Mapping: [SDE_ORA_GL_AR_REV_LinkageInformation_Extract]

    Session log file: [C:\Informatica\server\infa_shared\SessLogs\. SDE_ORA_GL_AR_REV_LinkageInformation_Extract_Full.ORA_R1211.log]

    Success of the source lines: [0]

    Source has no lines: [0]

    Target lines of success: [0]

    Target lines failed: [0]

    Number of errors in transformation: [0]

    First error code [4035]

    First error message: [[error SQL RR_4035

    ORA-00904: "XLA_EVENTS." "" UPG_BATCH_ID ": invalid identifier

    Database driver error...

    Function name: run

    Stmt SQL: SELECT DISTINCT

    DLINK. SOURCE_DISTRIBUTION_ID_NUM_1 DISTRIBUTION_ID,

    DLINK. SOURCE_DISTRIBUTION_TYPE TABLE_SOURCE,

    AELINE. ACCOUNTING_CLASS_CODE,

    GLIMPREF. JE_HEADER_ID JE_HEADER_ID,

    GLIMPREF. JE_LINE_NUM JE_LINE_NUM,

    AELINE. AE_HEADER_ID AE_HEADER_ID,

    AELINE. AE_LINE_NUM AE_LINE_NUM,

    T.LEDGER_ID LEDGER_ID,

    T.LEDGER_CATEGORY_CODE LEDGER_TYPE,

    JBATCH.NAME BATCH_NAME,

    JHEADER.NAME HOSTHEADERNAME,

    BY. END_DATE,

    AELINE. CODE_COMBINATI]

    Task run status: [failure]

    Integration service: [infor_int]

    The integration of Service process: [infor_int]

    Grid integration Service: [infor_int]

    ----------------------------

    Name of node [node01_AMAZON-9C628AAE]

    Fragment of preparation

    Partition: #1 [Partition]

    Instance of transformation: [SQ_XLA_AE_LINES]

    Transformation: [SQ_XLA_AE_LINES]

    Apply the lines: [0]

    Number of rows affected: [0]

    Rejected lines: [0]

    Throughput(Rows/sec): [0]

    Throughput(bytes/sec): [0]

    Last [16004] error code, message [ERROR: prepare failed.: []]

    ORA-00904: "XLA_EVENTS." "" UPG_BATCH_ID ": invalid identifier

    Database driver error...

    Function name: run

    Stmt SQL: SELECT DISTINCT

    DLINK. SOURCE_DISTRIBUTION_ID_NUM_1 DISTRIBUTION_ID,

    DLINK. SOURCE_DISTRIBUTION_TYPE TABLE_SOURCE,

    AELINE. ACCOUNTING_CLASS_CODE,

    GLIMPREF. JE_HEADER_ID JE_HEADER_ID,

    GLIMPREF. JE_LINE_NUM JE_LINE_NUM,

    AELINE. AE_HEADER_ID AE_HEADER_ID,

    AELINE. AE_LINE_NUM AE_LINE_NUM,

    T.LEDGER_ID LEDGER_ID,

    T.LEDGER_CATEGORY_CODE LEDGER_TYPE,

    JBATCH.NAME BATCH_NAME,

    JHEADER.NAME HOSTHEADERNAME,

    BY. END_DATE,

    AELINE. CODE_CO]

    Departure time: [kills Sep 03 15:06:16 2013]

    End time: [kills Sep 03 15:06:16 2013]

    Partition: #1 [Partition]

    Instance of transformation: [W_GL_LINKAGE_INFORMATION_GS]

    Transformation: [W_GL_LINKAGE_INFORMATION_GS]

    Apply the lines: [0]

    Number of rows affected: [0]

    Rejected lines: [0]

    Throughput(Rows/sec): [0]

    Throughput(bytes/sec): [0]

    Last error code [0], message [no errors].

    Departure time: [kills Sep 03 15:06:20 2013]

    End time: [kills Sep 03 15:06:20 2013]

    Disconnection of Service integration

    Finished my Sep 03 15:14:59 2013

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

    ERROR OUTPUT

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

    the next task of fault is:

    SDE_ORA_APTransactionFact_Payment_Full

    Error log:

    java.lang.Thread.run (unknown Source)

    305 SEVERE kills Sep 03 11:19:43 GMT 2013 ask to start a workflow: "SDE_ORAR1211_Adaptor:SDE_ORA_APTransactionFact_Payment_Full with the name of the instance SDE_ORA_APTransactionFact_Payment_Full" finished with the error code 0

    306 SEVERE kills Sep 03 11:20:16 GMT 2013 ask to start a workflow: "SDE_ORAR1211_Adaptor:SDE_ORA_APTransactionFact_PaymentSchedule_Full with the name of the instance SDE_ORA_APTransactionFact_PaymentSchedule_Full" finished with the error code 0

    307 SEVERE kills Sep 03 11:20:18 GMT 2013 ask to start a workflow: "SDE_ORAR1211_Adaptor:SDE_ORA_APTransactionFact_Distributions_Full with the name of the instance SDE_ORA_APTransactionFact_Distributions_Full" finished with the error code 0

    308 SEVERE kills Sep 03 11:20:24 GMT 2013 ask to start a workflow: "SDE_ORAR1211_Adaptor:SDE_ORA_Stage_ValueSetHier_Flatten with the name of the instance SDE_ORA_Stage_ValueSetHier_Flatten" finished with the error code 0

    311 SEVERE kills Sep 03 11:22:14 GMT 2013 MESSAGE: no value for @DAC_SOURCE_PRUNED_REFRESH_TIMESTAMP available!

    I searched online but can't find useful information about errors

    could someone help, please?


    Another question: can I continue the ETL when it fails? without starting from the beginning?

    Hi Mate,

    Simply delete the duplicate value, it is not a problem

    Finally give the validation in your PB, make waiting in line and raise your execution plan...

    I'm sure that this task is now complete.

    It will be a great help on your side, if you share did you read me the article. and give me the number?

    I am also looking for a validation script now.

    Thank you

    Guylain

    mkashu.blogspot.com

  • I want to know when we issue statement truncate table in oracle.

    I want to know when we issue statement truncate table in oracle. No newspaper will be write in the redo log. But we can recover data using flashback or SNA. I want to know where the actually truncate table statement log is stored in the oracle database. Please explain to me in detail step by step.

    >
    I understand your SNA. But I want to know where the truncate statement stored log. But in the redo log, no entry for truncate.but I want to go which connect there is no market value back...
    >
    If you are still wondering after getting the answer so you don't "understand".

    You have received the reply above. Archive of flashback stores data.

    See the link provided above to CREATE an ARCHIVE of FLASHBACK in the doc of SQL language
    http://docs.Oracle.com/CD/E11882_01/server.112/e26088/statements_5010.htm
    >
    TABLESPACE clause

    Specify the table space where the data archived for this flashback data archive referring to be stored. You can specify that a tablespace with this clause. However, you can then add tablespaces to archive flashback with a statement ALTER FLASHBACK ARCHIVE database.
    >
    The data is moved to storage of archives and restored from there when you query for archive flashback.

  • Truncate table removes the corresponding LOB segment of the table or not?

    Hi all

    I have little table with BUSINESS segments, if I pull the table truncated on the table it will purge the LOB segment as well?

    About how long will take to truncate 100 GB LOB segments.

    Thank you

    903787 wrote:
    Hello

    1 Truncate will delete the LOB segment or not?

    It will not erase the LOB segments, but it must release the majority of the allocated space.

    >

    2. If you want to recover the space, we need to run the command, below is correct?

    ALTER TABLE CHANGE LOB (LOB_COLUMN) (SHRINK SPACE);

    Should not be necessary to 11.2:

    SQL> select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for 32-bit Windows: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    
    SQL> select count(*) from user_segments;
    
      COUNT(*)
    ----------
             0
    
    SQL>
    SQL> create table t(x clob);
    
    Table created.
    
    SQL> select segment_name, segment_type, bytes
      2  from user_segments;
    
    SEGMENT_NAME                             SEGMENT_TYPE            BYTES
    ---------------------------------------- ------------------ ----------
    T                                        TABLE                   65536
    SYS_IL0000030908C00001$$                 LOBINDEX                65536
    SYS_LOB0000030908C00001$$                LOBSEGMENT              65536
    
    SQL>
    SQL> insert into t select lpad(segment_name,8192) from dba_segments;
    
    6312 rows created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL>
    SQL> select segment_name, segment_type, bytes
      2  from user_segments;
    
    SEGMENT_NAME                             SEGMENT_TYPE            BYTES
    ---------------------------------------- ------------------ ----------
    T                                        TABLE                  393216
    SYS_IL0000030908C00001$$                 LOBINDEX                65536
    SYS_LOB0000030908C00001$$                LOBSEGMENT           53477376
    
    SQL>
    SQL> truncate table t;
    
    Table truncated.
    
    SQL>
    SQL> select segment_name, segment_type, bytes
      2  from user_segments;
    
    SEGMENT_NAME                             SEGMENT_TYPE            BYTES
    ---------------------------------------- ------------------ ----------
    T                                        TABLE                   65536
    SYS_IL0000030908C00001$$                 LOBINDEX                65536
    SYS_LOB0000030908C00001$$                LOBSEGMENT              65536
    
    SQL>
    SQL> alter table t modify lob(x) (shrink space);
    
    Table altered.
    
    SQL>
    SQL> select segment_name, segment_type, bytes
      2  from user_segments;
    
    SEGMENT_NAME                             SEGMENT_TYPE            BYTES
    ---------------------------------------- ------------------ ----------
    T                                        TABLE                   65536
    SYS_IL0000030908C00001$$                 LOBINDEX                65536
    SYS_LOB0000030908C00001$$                LOBSEGMENT              65536
    
    SQL>
    
  • Truncate table issues

    Hi people,

    Environment: 10g Rel 2

    I am trying to prove the following two points by way of experimentation

    truncate table operation, her will reset the high water mark (HWM) on the first block of data for use in the segment of the table

    # Take a snapshot of HWM before the truncation 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;
    Released: 7

    truncate table JIM. EMPLOYEES;

    Re ran the code above and got the same result (i.e. 7 blocks). I expect to see 0 instead blocks? The query above is the correct method of
    find the HWM?



    b, the truncate operation also truncates the corresponding indices of the table

    Q, is there a view that will show you all the values of indexes on the table? These values will probably be meaningless, but I would like to see them before
    and after the truncation operation.

    Thank you

    rogers42

    (a) If you would read on the empty_blocks column in dba_tables, you would have known that it is populated with dbms_stats.
    Did you run dbms_stats.analyze_table?

    (b)
    Didn't this view.
    All the dictionary views are documented in the DICT view and documentation online.

    ------------
    Sybrand Bakker

  • Truncate table procedure

    Hello
    I would like to create the following procedure on Oracle 10 g:
    ----------
    CREATE OR REPLACE PROCEDURE TEST2_RUN AS
    BEGIN
    truncate the storage of drop table TEST2;
    Insert into TEST2)
    FORMATTED_BATCH_ID,
    A_AKT_MYRAKT_CELL_1AIRE_BAF3,
    A_ALK_NPM_ALK_CELL_1AIRE_BAF3,
    A_ALK_NPM_ALK_CELL_2AIRE_BAF3,
    A_BCRABL_CELL_1AIRE_BAF3,
    A_BCRABL_CELL_2AIRE_BAF3,
    A_BCRABL_CELL_2AIRE_KU_812,
    A_BCRABL_T315I_CELL_1AIRE_BAF3,
    A_BCRABL_T315I_CELL_2AIRE_BAF3,
    A_BLK_TEL_BLK_CELL_1AIRE_BAF3,
    A_BRAF_WT_CELL_2AIRE_MEL_WO
    )
    Select formatted_batch_id
    a_AKT_MYRAKT_CELL_1AIRE_BAF3, a_ALK_NPM_ALK_CELL_1AIRE_BAF3, a_ALK_NPM_ALK_CELL_2AIRE_BAF3
    a_BCRABL_CELL_1AIRE_BAF3, a_BCRABL_CELL_2AIRE_BAF3, a_BCRABL_CELL_2AIRE_KU_812
    a_BCRABL_T315I_CELL_1AIRE_BAF3, a_BCRABL_T315I_CELL_2AIRE_BAF3, a_BLK_TEL_BLK_CELL_1AIRE_BAF3
    a_BRAF_WT_CELL_2AIRE_MEL_WO
    of cell_assays_union_all_piv_vw
    ;
    END TEST2_RUN;
    -----------------------

    I know I need to add permissions to use the 'truncate' function in a procedure, but I can't make it work adding 'WITH EXECUTE AS SELF"
    CREATE OR REPLACE PROCEDURE TEST2_RUN
    WITH EXECUTE AS SELF
    AS
    BEGIN
    ...

    I get the error "PLS-00103: encountered the symbol EXECUTE when expecting one of the following values: interface.

    Could someone help me please?
    I thank very you much in advance!

    Miriam

    DDL statements are to be executed using execute immediate PL/SQL code, for example

    ..
    ..
    EXECUTE IMMEDIATE 'TRUNCATE TABLE fred';
    ..
    ..
    

    Only SQL (DML statements) can be incorporated directly into the PL/SQL code.

  • truncate table another user via trigger?

    Oracle 10.2.0.4

    A user USER1 should be able to truncate a table of another user, user 2.

    I will not give drop any table, there are a lot of patterns in this PB. It must be transparent, because it happens from an application, so I can't substitute a procedure:

    exec ('table_name') drop_user2_table;

    but USER1 executes: truncate table table_name;


    Is there an any place of relaxation for this command?.

    You thought you found the solution. If so, please indicate the post as answer and correct.

  • Truncate table use in the procedure...

    Dear,

    I created the test table.

    Now, I have written a procedure like this.

    create or replace procedure trunc_test
    (ov_v_output OUT VARCHAR2) IS
    Start
    truncate table stable.
    end;

    I got error message like

    PLS-00103: encountered the symbol "TABLE" when the expected in the following way:

    := . ( @ % ;

    Someone help with this...

    Thank you and best regards,
    Raja.

    TRUNCATE is a DDL statement, so you cannot use it directly in PL/SQL. You must run dynimically using EXECUTE IMMEDIATE.

    So, your code should be

    create or replace procedure trunc_test (ov_v_output OUT VARCHAR2)
    is
    begin
     execute immediate 'truncate table testing';
     ov_v_output := 'Success';
    end;
    

Maybe you are looking for