Truncate table will delete the corresponding LOB segment of table or not ?

Hi All,
I have few table with LOB segments, if i fire the truncate table on those table will it purge the LOB segment as well ?
Approximately how much time will take to truncate 100gb LOB segments.
Thanks

903787 wrote:
Hi ,
1.Truncate will delete the LOB segment or not ?It won't delete the LOB segments but it should release most of the allocated space.
>
2.To reclaim space we need to run the below command, is it correct ?
ALTER TABLE <table_name> MODIFY LOB (LOB_COLUMN) (SHRINK SPACE);
Should not be needed in 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>

Similar Messages

  • DELETE THE MATCHED RECORDS IN DB2 TABLE

    DELETE THE MATCHED RECORDS IN DB2 TABLE
    sql server table sqlserver_emp(c1,c2,c3,4)
    records:1 2 3 4
    DB2 table db2_emp(c1 key,c2,c3,c4)
    records:1 2 5 6 7 8
    Both tables having same structure
    Matched records : 1 2
    1.Delete the matched records in db2 table : 1 2 (without using truncate option for DB2 in Anywhere)
    2.Finally Load all records in sql server(Because duplicate records in db2 already removed so no duplicates occured)
    3.NEED final OUTPUT AS:db2 table: 5 6 7 8 1 2 3 4
    Note:
    1.DB2 truncate doesn't used
    2.STARING AREA: ORACLE
    3.SQLSERVER AND DB2 CLOSED ENVIRONMENT DOESN'T USED AS STAGING AREA.
    HOW MANY INTERFACES AND PROCEDURES SHOULD BE CREATE? WHAT ARE THEY?
    HOW TO REACH MY REQUIREMNT?
    Answer provider is more appricatable.
    Thanks in advance.
    Edited by: krishna on Nov 9, 2011 8:40 PM

    1st option
    See in this scenario you can use two interface and one procedure step.
    1st interface-->poricedure-->2nd interface
    1st interface will bring data to oracle staging-->then procedure will delete matched record from target using keys--->3rd interface will simple insert the the data in oracle staging.
    2nd option
    Insted of deleting the target matched records, you just update target matched record with latest records in your staging oracle.You can use IKM Merge
    Thanks

  • How to delete the data in New data table Because...

    Hi all,
    I have an urgent issue :
    in the process chain DSO has finished a delta load with 18592 data entries transfered and added, and activated , but when I checked New data table , there are still 18592 data entries there. This will cause problem I think, because this chain has to run daily, so next run will make the data in new data table added twice, so could you pls let me know the way to delete data in new data table?
    thanks in advance

    Dear Ryan Zhang  ,
    When activation DSO will automatically clears New table and places records in active table and change log table.
    If records still exist in New table means it has not activated properly.
    Check in active table and change log table if any entries are found.
    If not ,try activation again.
    If entries are there in active table then try these
    Go to SE14
    Give the active table name..
    Click on Edit
    Click on activate and adjust database.
    Load again and try to activate.
    Hope it helps
    Regards
    Bala

  • How to delete the duplicate data  from PSA Table

    Dear All,
    How to delete the duplicate data  from PSA Table, I have the purchase cube and I am getting the data from Item data source.
    In PSA table, I found the some cancellation records for that particular records quantity  would be negative for the same record value would be positive.
    Due to this reason the quantity is updated to target but the values would summarized and got  the summarized value  of all normal and cancellation .
    Please let me know the solution how to delete the data while updating to the target.
    Thanks
    Regards,
    Sai

    Hi,
    in deleting the records in PSA table difficult and how many you will the delete.
    you can achieve the different ways.
    1. creating the DSO maintain the some key fields it will overwrite the based on key fields.
    2. you can write the ABAP logic deleting the duplicate records at info package level check with the your ABAPer.
    3.you can restrict the cancellation records at query level.
    Thanks,
    Phani.

  • Delete the parent records and child table records at a time

    hi all;
    I am facing the pbm like to delete the all records in child table and corresponding records in parent table at a time. so I want to delete the all the records in child table and corresponding parent records in parent table by using single SQL query. plz help me
    Thanks in advance

    You want to use one single SQL statement to delete the child records in a table and the corresponding master records in the master table??
    That's not quite possible with a single SQL, of course unless you are talking about Oracle Forms, where you have a relation and set the delete behavior to Cascading, like said in the above posts.
    Tony

  • How SID table will get the data?

    Hi,
    Any one can please let me know, how the SID table will get the data. I am not able to trace.
    Thanks in Advance.
    Regards,
    Suree.B

    Hi
    SID will not have data it will only contains data
    when the masterdata loads it will also create corresponding SID's  which can be later used to link master data table to fact table
    cheers,
    Swapna.G

  • Hi. How can I delete the table without deleting the content? My pages is 5.2.2.

    Hi. How can I delete the table without deleting the content? My pages version is 5.2.2. Thank you for your help.

    There is no convert Table to text capability in Pages v5.2.2, as there was in Pages ’09 v4.3.
    You can keep the table while making the table grid vanish, leaving the existing tabular text structure. Select the table, and under the Format panel > Table tab, the following settings will produce this output. If selected, you can refine its document placement in the Arrange tab.

  • Look up x & y values in a table and output the corresponding number?

    I'm trying to take a temperature input and an elevation input from the FP and find the corresponding number in a table.  For example, if I had a temp of 15 degrees and the elevation is 900 feet the resulting output would be 1325.  I've looked a several examples of lookup tables and arrays in the forum, but none of them look like they would be useful for what I'm wanting to do or atleast I can't figure out how I could use them.  I'm sure it isn't too complicated, but I've only gotten as far as my lacking experience can get me.  Any help with this would be greatly appreciated.
    Thanks!
    Attachments:
    Takeoff Distance FP.jpg ‏41 KB

    I assume that your temperature and altitude values are assigned as the column and row headers on the table. If that is the case you can use a property nodes to read column and row headers/names. Search each of these arrays for the desired value. Your search will give you the row and column indices you need to index the 2D array for the value.
    I have attched a very basic example. You will need to put logic in to determine what to do if you do not have an exact match.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot
    Attachments:
    Table Lookup.vi ‏9 KB

  • How to delete the line for 300SAP* in table USR02 in SQL Management studio

    Hello
    I used to delete the line for 300SAP* in table USR02 in SQL Enterprise Manager. After I could log on with “pass”.
    I wander how to delete it in SQL Management studio. When I expand tdatabase it takes so long time and it is uncontrollable

    Hello,
    you have to delete the row by a sql statement.
    Open a new query and run a script like this:
    use <Your SID DB>                 -- e.g. use PRD
    setuser 'your sid in lowercase'  --- e.g. setuser 'prd'
    delete from USR02 where MANDT = '300' and BNAME = 'sap*'
    go
    Run a complete backup before deleting data manually.
    Regards
      Clas

  • How to delete the duplicate records in a table without promary key

    I have a table that contains around 1 million records and there is no promary key or auto number coulums. I need to delete the duplicate records from this table. what is the simple effective way to do this.

    Please see this link:
    Remove duplicate records ...
    sqldevelop.wordpress.com

  • How can we delete the data in e-fact table.

    how can we delete the data in e-fact table.

    hii,
    You cannot delete the request individually but you can one of the following:
    1. Do a selective deletion from the cube. RSA1 -> Cube -> Contents -> selective deletion.
    2. Delete all the data in the cube and then reconstruct only the required request ids. This would work only if you have the PSA available for all the requests.
    3. Reverse posting is another possibility.
    hope it helps,
    partha

  • I've tried multiply times to update itunes 10.5 but it keeps saying that it can't find the file and i can't reinstall itunes because it will delete the 100 gigabites of info on it what can i do

    i've tried multiply times to update itunes 10.5 but it keeps saying that it can't find the file and i can't reinstall itunes because it will delete the 100 gigabites of info on it what can i do

    I've had all kinds of trouble keeping my iTunes software current over the past year, but have found the easiest way to remedy the issue is to simply download the latest version of iTunes as though I am a first-time user and then just install it into the directory my current version of iTunes is using. Doing this has allowed me to update my software without losing any of my media/data. Hope this helps! Best of luck!!!

  • Which table will give the completion timestamp of the last success run?

    Which table will give the completion date timestamp of the last successful execution of an OWB Mapping or Process_flow.?
    I was thinking of using
    select max(RTA_LOAD_DATE|| RTA_LOAD_TIME) from OWBSYS.OWB$WB_RT_AUDIT
    where
    trim(RTA_LOB_NAME) like '%EMP_LOAD1%'
    and
    rta_status = '1'
    But the RTA_LOAD_DATE AND RTA_LOAD_TIME is null
    and RTA_STATUS column is having the value 1 irrespective of whether the JOB has completed or abended
    Please advise??

    Check with these tables :
    <b>coss
    cosl
    cosp</b>
    aufk
    qmat

  • I want to delete the transactional record from database table

    Hai,
    I want to delete the transactional data from database table with out using the dialog programming is it there any trancation for this.
    for master data we have the transaction code for delete the records. The t.code is 'OBR2'.
    Plz help in that cse.
    Thanks and regards,
    P.Naganjana Reddy

    Hai,
    Plz help me urgent.
    I am asking i want to delete transactional data from database table without using the dialog programming.
    Thanks and Regards,
    P.Naganjana

  • In Which table Will maintain the All Workflows Triggering Event Details?

    Hi,
    Can Any one tell me
    In Which table Will maintain the All Workflows Triggering Event Details?

    Hi Mohit,
    The Tr Codes KE29N/KE28L will give me the Logs of Past TDD runs. However, i would like to see the all the variants in a go. Due to a Organizational change, there is a new characteristics introduced. Now we need to change the sequence of the TDD runs. Since there are lot of TDD Variants that are in use. we need to get all of them into an excel and then decide the necessary changes.
    Thanks & Regards
    Surya

Maybe you are looking for

  • .xml file not recreating

    I'm trying to use iPhoto and sync to an iTunes playlist, but it turns out that my iTunes Music Library.xml file hasn't modified itself since December. That means it no longer matches my real library and iPhoto can't use it. I dragged the iTunes Music

  • How many times can you download a free trial, on the same computer?

    about how many times are you allowed to download the same free trial software on the same computer?

  • How can I tell if my AT&T ipad mini came unlocked?

    I know that some iPads were said to have shipped unlocked.  I tried to go through AT&T's unlock request for my iPad Mini wifi & 3G and as soon as I put in the IMEI # and before I completed the request, a message came up saying it could not be unlocke

  • What is the firewire for?

    (I apologize for the newbie question) I have a very vague understanding of what the firewire is for. I'm not going to be using a digital camera with my MacBook Pro, but is there a way to use the firewire to get a faster internet connection? What can

  • UCCX 8.0.2 application script update fails

    Screenshot attached. When try to change application parameter and pressing the update button produces the screen that is attached and the change does not go thru of course. Restarting the CCX Engine did not change anything. Recycling the box entirely