Table purge

Hi,
I have a table which is growing fast and I want to keep only 5 days worth of data. Rest of the data I want to move to a history table and purge from the original table. Any body have a script for doing this sort of work?
Thanks,
GK

First off, have you considered partitioning to address this problem? If you have this sort of issue on many tables in a database, I would suspect that partitioning would be the easier and more maintainable approach.
Second, you can write a stored procedure that uses dynamic SQL to do this sort of thing
CREATE PROCEDURE archive( tbl_name VARCHAR2, hist_tbl VARCHAR2, days NUMBER )
AS
  sqlStmt VARCHAR2(1000);
BEGIN
  sqlStmt := 'INSERT INTO ' || hist_tbl ||
             '  SELECT * FROM ' || tbl_name ||
             '   WHERE time_col > TRUNC(sysdate - ' || TO_CHAR(days) || ')';
  EXECUTE IMMEDIATE sqlStmt;
  sqlStmt := 'DELETE FROM ' || tbl_name ||
             ' WHERE time_col > TRUNC(sysdate - ' || TO_CHAR(days) || ')';
  EXECUTE IMMEDIATE sqlStmt;
END;Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • Tables Purge in Oracle 10g

    After puging tables from recyclebin space is not reclaiming
    Any reason ?

    Recycled objects are considered as free space: http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/flashptr004.htm#sthref615
    >
    Recycle bin objects are not counted as used space. If you query the space views to obtain the amount of free space in the database, objects in the recycle bin are counted as free space.
    >
    Edited by: P. Forstmann on 19 janv. 2010 06:38

  • Does oracle record table drops/purges ?

    Hello,
    I am using Oracle 11.2.0.3 Enterprise Edition and recently found certain users tables are missing. Does oracle record anything with respect to tables purged ? And in my case these are external tables. Pls revert back if I have to lookup in alert log or any v$ view. As far as I know if table is just dropped it can be found in dba_recyclebin ( not sure about retention) but I didn't find any information in that view. Any help would be great !  Thanks

    Hi,
    I am using Oracle 11.2.0.3
    By default, some DDL commands are audited by default in Oracle 11g.
    SQL> SELECT privilege from dba_priv_audit_opts where user_name is NULL;
    PRIVILEGE
    CREATE EXTERNAL JOB
    CREATE ANY JOB
    GRANT ANY OBJECT PRIVILEGE
    EXEMPT ACCESS POLICY
    CREATE ANY LIBRARY
    GRANT ANY PRIVILEGE
    DROP PROFILE
    ALTER PROFILE
    DROP ANY PROCEDURE
    ALTER ANY PROCEDURE
    CREATE ANY PROCEDURE
    ALTER DATABASE
    GRANT ANY ROLE
    CREATE PUBLIC DATABASE LINK
    DROP ANY TABLE
    ALTER ANY TABLE
    CREATE ANY TABLE
    DROP USER
    ALTER USER
    CREATE USER
    CREATE SESSION
    AUDIT SYSTEM
    ALTER SYSTEM
    So, maybe you can try find out if another user dropped your tables making use of DROP ANY TABLE privilege. For this, you need to take a look at DBA_AUDIT_TRAIL view:
    select * from dba_audit_trail where action_name = 'DROP TABLE' order by 5 desc;
    Cheers
    Legatti

  • INVENTORY TRANSACTION PURGE시 해당 TABLE들의 정보

    제품 : MFG_INV
    작성날짜 : 2004-05-20
    INVENTORY TRANSACTION PURGE 시 해당 TABLE들의 정보
    ===========================================
    PURPOSE
    Inventory Transaction Purge에 의해 삭제되는 data들을
    파악하고자 한다.
    Problem Description
    Inventory module의 Transaction Purge시 다음의
    Table들은 정상적으로 Purge된다.
    MTL_MATERIAL_TRANSACTIONS
    MTL_TRANSACTION_LOT_NUMBERS
    MTL_UNIT_TRANSACTIONS
    MTL_TRANSACTION_ACCOUNTS
    MTL_MATERIAL_TXN_ALLOCATIONS
    다음의 table들은 Purge대상에서 제외되어 있다.
    wip_scrap_values
    mtl_cst_actual_cost_details
    mtl_cst_txn_cost_details
    MTL_ACTUAL_COST_SUBELEMENT
    Workaround
    N/A
    Solution Description
    Applied a Patch#2165174. fixed in 11.5.9
    이 Patch에 의해 위에 언급한 모든 table들에 대해
    정상적으로 Purge된다.
    Reference Documents
    Bug2165174

  • Unable to descripe the table and unable to drop the table

    Hi,
    I have a temp table that we use like staging table to import the data in to the main table through some scheduled procedures.And that will dropped every day and will be created through the script.
    Some how while I am trying to drop the table manually got hanged, There after I could not find that table in dba_objects, dba_tables or any where.
    But Now I am unable to create that table manually(Keep on running the create command with out giving any error), Even I am not getting any error (keep on running )if I give drop/desc of table.
    Can you please any one help on this ? Is it some where got stored the table in DB or do we any option to repair the table ?
    SQL> select OWNER,OBJECT_NAME,OBJECT_TYPE,STATUS from dba_objects where OBJECT_NAME like 'TEMP%';
    no rows selected
    SQL> desc temp
    Thank in advance.

    Hi,
    if this table drops then it moved DBA_RECYCLEBIN table. and also original name of its changed automatically by oracle.
    For example :
    SQL> create table tst (col varchar2(10), row_chng_dt date);
    Table created.
    SQL> insert into tst values ('Version1', sysdate);
    1 row created.
    SQL> select * from tst ;
    COL        ROW_CHNG
    Version1   16:10:03
    If the RECYCLEBIN initialization parameter is set to ON (the default in 10g), then dropping this table will place it in the recyclebin:
    SQL> drop table tst;
    Table dropped.
    SQL> select object_name, original_name, type, can_undrop as "UND", can_purge as "PUR", droptime
      2  from recyclebin
    SQL> /
    OBJECT_NAME                    ORIGINAL_NAME TYPE  UND PUR DROPTIME
    BIN$HGnc55/7rRPgQPeM/qQoRw==$0 TST           TABLE YES YES 2013-10-08:16:10:12
    All that happened to the table when we dropped it was that it got renamed. The table data is still there and can be queried just like a normal table:
    SQL> alter session set nls_date_format='HH24:MI:SS' ;
    Session altered.
    SQL> select * from "BIN$HGnc55/7rRPgQPeM/qQoRw==$0" ;
    COL        ROW_CHNG
    Version1   16:10:03
    Since the table data is still there, it's very easy to "undrop" the table. This operation is known as a "flashback drop". The command is FLASHBACK TABLE... TO BEFORE DROP, and it simply renames the BIN$... table to its original name:
    SQL> flashback table tst to before drop;
    Flashback complete.
    SQL> select * from tst ;
    COL        ROW_CHNG
    Version1   16:10:03
    SQL> select * from recyclebin ;
    no rows selected
    It's important to know that after you've dropped a table, it has only been renamed; the table segments are still sitting there in your tablespace, unchanged, taking up space. This space still counts against your user tablespace quotas, as well as filling up the tablespace. It will not be reclaimed until you get the table out of the recyclebin. You can remove an object from the recyclebin by restoring it, or by purging it from the recyclebin.
    SQL> select object_name, original_name, type, can_undrop as "UND", can_purge as "PUR", droptime
      2  from recyclebin
    SQL> /
    OBJECT_NAME                    ORIGINAL_NAME TYPE                      UND PUR DROPTIME
    BIN$HGnc55/7rRPgQPeM/qQoRw==$0 TST           TABLE                     YES YES 2006-09-01:16:10:12
    SQL> purge table "BIN$HGnc55/7rRPgQPeM/qQoRw==$0" ;
    Table purged.
    SQL> select * from recyclebin ;
    no rows selected
    Thank you
    And check this link:
    http://www.orafaq.com/node/968
    http://docs.oracle.com/cd/B28359_01/server.111/b28310/tables011.htm
    Thank you

  • Event Polling Table

    1. I created an event polling table S_NQ_EPT in MS SQL SERVER.
    3. Imported the table S_NQ_EPT into RPD and designated as EPT.
    4. Inserted the record as
    INSERT INTO dbo.S_NQ_EPT
    VALUES (1,
    getdate (),
    NULL,
    NULL,
    NULL,
    'TBL_OBIEE_DRIVE_LOB',
    NULL);
    INSERT INTO dbo.S_NQ_EPT
    5. After 5 minutes it deleted the cache associated with the table.
    6. However it did not truncate the S_NQ_EPT table and instead copied the same row in the S_NQ_EPT table.
    Conclusion it deletes the cache but it does not truncate the table. Which results into multiple rows getting replicated after every 15 minutes. Even though the data hasn't changed for the physical tables. ALso, it would unnecessarily delete the cache due to this.
    I have checked the user that OBIEE uses has truncate rights and Read write privileges on the database.
    Please help
    Edited by: 974664 on May 23, 2013 10:22 AM

    Hi Raj,
    What you said is correct , Event Polling is one of the method to improve the performance in obiee.
    http://gerardnico.com/wiki/dat/obiee/event_table
    Oracle BI Server event polling table (event table) is a way to notify the Oracle BI Server that one or more physical tables have been updated and then that the query cache entries are stale. Each row that is added to an event table describes a single update event, such as an update occurring to a Product table. The Oracle BI Server cache system reads rows from, or polls, the event table, extracts the physical table information from the rows, and purges stale cache entries that reference those physical tables.
    why we have to go exactly for event polling table for cache purging?
    A. If you want to table wise polling data the we can implement this method, whenever table update or insert into database immediately event pool table purge the exit cache and stale the update one means included modified data also.
    Hope this help's
    Thanks,
    Satya

  • How to organize partitions and chronological data purging

    I need some help in automatic table purging (10g)
    How to organize a new table to be chronologically purged ?
    It will be helpful if good links will be posted.
    Thanks.
    bol
    Message was edited by:
    Bolev
    Message was edited by:
    Bolev

    Therefore ... please expand ... what exactly are youtrying to accomplish.
    and here is your answer to your question:
    Therefore, this kind of purge now gets
    filed under 'archiving old data' in this tired old
    brain of mine. Archive to some alternate storage,
    perhaps reformatted, and the source records
    eliminated. AKA 'move data to near-line or
    alternate storage') That is exactly what it is and in my understanding
    there is no conflict with term "chronologically
    purged" (unfortunately English is my second language
    :) Got it. And now, perhaps, you understand why we needed the explanation.
    >
    Actually this is not a simple issue and I am trying
    to accomplish this the most efficient way.
    I guess, archive-truncate will be the best solution
    in most cases.
    You are quite correct. It is not a simple issue. And we still need more information, simply because there is no 'one size fits all' solution. A significant amount is determined by the table and index statistics as well as how many indexes.
    So next set of questions starts with:
    for each table, describe
    - are there foreign keys ... dependents must be handled first;
    - the general table storage statistics (mainly rows per block);
    - is partitioning [option] involved;
    - the key, or foreign key, which you can use to purge;
    - is that key indexed;
    - how many other indexes and constraints will be impacted by the purge;
    - roughly ow much (percentage) of the table will be purged each time;
    - how often;
    As I noticed in my original post I was also asking
    about good related references (links) if exist
    Perhaps Niall can help. He admitted to experience <g>
    Impressed with this board We try. It's sometimes also quite a madhouse.

  • How to get the total time spent by a Portal User for a given Date?

    Hello,
    We need to develop a Daily Audit Track Report that displays
    the Users logged into our System for a given day and the total login duration in Hours( should include all the
    Login-Logouts of a given date).
    While Portal30_SSO.WWSSO_AUDIT_LOG_TABLE$ can help me get the Users login to Portal for a day, there is no Login/Logout periods in it.
    Any help would be appreciated.
    Thanks
    Madhav

    You may want to consult with the view WWLOG_ACTIVITY_LOGS. Not sure how your environment is configured, but ours includes two WWLOG_ACTIVITY_LOG tables (1 & 2). These tables purge themselves based on your configuration. In other words, Portal will log activity in WWLOG_ACTIVITY_LOG1$ for a certain period of time, then switch to WWLOG_ACTIVITY_LOG2$ while purging the first one. You can specify the purge timetable in the Adminster tab of the Admin page (under Global Settings). If you just key on just 1 log table, you're logs may someday go blank.
    The actions used are 'login' and 'logout'. You can link the actions using the key_1 and key_2 columns of the view. From our current experience, Portal does not account for users that simply close the browser. In other words, we have not been able to get a log event for the action 'logout' for the same key_2 value if someone does this.

  • OAM Context showing error when updating context file on 11i apps

    HI,
    When i am trying to update context file using OAM, i am getting following error.
    Failed when writing Context Configuration files back to file system. Possible causes: An error occurred while attempting to establish an Applications File Server connection with the node FNDFSP_dbora12. There may be a network configuration problem, or the TNS listener on node FNDFSP_dbora12 may not be running. Please contact your system administrator. . However, you still can run AutoConfig and restart services to make sure these settings take effects.

    Sawwan,
    What is the application release? OS?
    HP Unix
    Has this ever worked? If yes, what changes have been done recently?
    This is cloned environment.
    Do you have proper entry in the hosts file?
    yes
    Is the application listener up and running? Can you view the concurrent requests log/output files? If not, please see (Note: 117012.1 - Troubleshooting the "Error Occurred While Attempting to Establish an Applications File Server Connection").
    yes application listener is up and running.
    Is the value "FNDFSP_dbora12" correct or it points to the source instance in case this is a cloned one? If the value is incorrect, please validate the entries in FND_NODES table (purge the table and run AutoConfig -- I believe you are familiar with the steps
    Value of RRA: Service Prefix is FNDSP_ not FNDSP_dbora12.

  • Reporting SP in Oracle 10g

    Hi Friends,
    Our Oracle version is 10.2.0.4.0. we have one cron job for reporting purpose.
    The stored proc with pull the 45 days back counts and populate counts into reporting tables.
    for some reasons this cron run successfully for 45 days and some times it run for only 7 days.
    I couldn't get any reason why its behaving like that.
    any one comments , advices are appreciate.
    Thanks

    Is the stored procedure instrumented? If not, modify it to record start time, end time, and to record all errors into a job log tracking table via an anonymous transaction logging procedure. Then you can look at the logging table to see what happened. All your batch jobs should do this. Do not forget to set up a logging table purge task.
    HTH -- Mark D Powell --

  • Recover a deleted record in NOARCHIVELOG mode?

    Hello,
    I'm running 10gR2 in NOARCHIVELOG mode and we do not take backups (please, let's not get into a discussion about this!).
    I need to know if there is any possible way to recover a record once it has been deleted and a COMMIT has been issued? A user inserted two records in the database that they should not have, and I need to verify there is no possible way to recover those once they have been deleted.
    Thank you,
    Mimi

    Mimi Miami wrote:
    Ok so my UNDO_RETENTION parameter is set to 900...so 15 minutes after I delete the records they should not be querable using Flashback Query any longer, right?No,
    UNDO_RETENTION is low threshold value of undo retention. Meaning, Oracle will try to keep at least that time before overwritten.
    However, it's not gurranteed if not enough undo tablespace available, meaning it can be overwritten before the value is up if not enough undo tablespace to serve new transaction.
    On the other-hand, it will not remove the undo record until it's overwritten, meaning the record could stay there for considerable amount of time if your database is not busy and undo tablespace is big.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams222.htm#REFRN10225
    Not sure what's the intention to make your delete irreversible,
    you could actually create table newtable as select .. from old_table where <except the two records>.
    Drop the old table and rename new table.
    purge the recycle bin of your database

  • Lingering query cannot process

    Hi, I need some help tracking the reason behind the lingering of a Create Table as Select STATEMENT;
    Something is hapening, most probably some locks have been aquired and never released by the server.
    First of, i am runing queries against a database server with one client: myself. All the queries it runs are ordered by me.
    I cannot make any sense of what is making my query sometimes run, and others not.
    The query I am trying to run:
    CREATE TABLE FAVFRIEND
    NOLOGGING TABLESPACE TARGET
    AS
    SELECT USRID, FAVF
    FROM (
         SELECT ID AS USRID, FAVF
         FROM PROFILE P
         MODEL
              PARTITION BY (ID)
              DIMENSION BY (1 as FINDEX)
              MEASURES (FAVF1, FAVF2, FAVF3, FAVF4, FAVF5, 0 AS FAVF)
              RULES (
                   FAVF[1] = FAVF1[1],
                   FAVF[2] = FAVF2[1],
                   FAVF[3] = FAVF3[1],
                   FAVF[4] = FAVF4[1],
                   FAVF[5] = FAVF5[1]
         ) FAVFRIEND
    WHERE FAVF IS NOT NULL
    The query Is syntatically correct, and has finished more than once.
    Before this query is run my program launches sqlplus with a script that performs
    DROP TABLE FAVFRIEND PURGE;
    QUIT;
    After this I snapshot a set of statistics. That do not involve querying neither the PROFILE table, nor the FAVFRIEND table.
    Finally I order the execution of this query, and most times, it just hangs there not doing any processing.
    I can tell with certanty that all the other sql I have sent to the database has finished execution.
    1) because it was processed via sqlplus, which always disconnects after processing a batch.
    2) because I run the following query:
    select s.username,s.sid,s.serial#,s.last_call_et/60 mins_running,q.sql_text
    from v$session s join v$sqltext_with_newlines q on s.sql_address = q.address
    where status='ACTIVE'
    and s.username = 'SONO99'
    and type <>'BACKGROUND'
    and last_call_et> 0
    order by sid,serial#,q.piece
    Which tells me that the only query sono99 (my user) is running, is the CREATE TABLE as SELECT.
    Furthermore, the exact same procedure that isn't working for this query has worked before with the Unpivot query and the Select Project and Union queries.
    The only thing that changed from the previous benchmakrs to this one is that this one involves the model query.
    Another piece of information, let's say my sqlplus is haning there... trying to execute the Model query that just does not run. I kill sqlplus. Instantly when i query Oracle for the lingering queries with the select from v%session and sql_text, I notice that my CREATE TABLE with model is no longer there. So: disconnecting from the database is enough for oracle to know that the client is no longer interested in a server response.
    After making sure nothing from sono99 is runing against the database, i try to DROP FAVFRIEND TABLE PURGE;
    The statement fails because no FAVFRIEND table was created. And finally i wonder: could it be that the PROFILE table that was only selected upon was locked?
    Well, i try to drop the profile table... and it drops.
    So: my conclusion is! No locks exist neither on the Profile table nor on the Database object Favfriend (which does not exist at the point that i issue the execution of this query). Possibly some temporary tablespace was aquired by the Model query that has not been made available by oracle at the End of a previous successful CRETE TABLE as select statement.
    But even if this was the case, any locks should have been released because I always restart the database before going into the
    snapshot
    create table as select
    snapshot.
    I have no idea what may be making oracle not process my statement.
    Something else that I have just tried:
    Now I just tried bulk loading the 5 million rows of data into the Profile table, and runing the query again.
    The data was of course inserted successfully, and the query is of course still hanging.
    I tried however, in parallel to run a second query, this one just performing a SELECT count(*) FROM PROFILE, and it succeeded doing so.
    A Select NAME FROM PROFILE WHERE ID=500000 also returns a result.
    The profile table is definably not the issue here.
    by the way i just exported to a txt the status of my haning oracle system, and it looks like this:
    "USERNAME"     "SID"     "SERIAL#"     "MINS_RUNNING"     "SQL_TEXT"
    "SONO99"     "140"     "40"     "10,9"     "CREATE TABLE FAVFRIEND
    NOLOGGING TABLESPACE TARGET
    AS
    SELECT USR"
    "SONO99"     "140"     "40"     "10,9"     "ID, FAVF
    FROM (
         SELECT ID AS USRID, FAVF
         FROM PROFILE P
         MODEL"
    "SONO99"     "140"     "40"     "10,9"     "
              PARTITION BY (ID)
              DIMENSION BY (1 as FINDEX)
              MEASURES (FA"
    "SONO99"     "140"     "40"     "10,9"     "VF1, FAVF2, FAVF3, FAVF4, FAVF5, 0 AS FAVF)
              RULES (
                   FAVF[1]"
    "SONO99"     "140"     "40"     "10,9"     " = FAVF1[1],
                   FAVF[2] = FAVF2[1],
                   FAVF[3] = FAVF3[1],
                   FA"
    "SONO99"     "140"     "40"     "10,9"     "VF[4] = FAVF4[1],
                   FAVF[5] = FAVF5[1]
         ) FAVFRIEND
    WHERE F"
    "SONO99"     "140"     "40"     "10,9"     "AVF IS NOT NULL
    This is way beyond my comprehention of Oracle. Going to try to run this again with 100 k tuples instead.
    Edited by: user10282047 on Oct 20, 2009 12:05 PM
    Now, trying the same process, without even restarting the database once (i just killed the lingering sqlplus connection) and recreated the profile table with 100k tuples. It executed successfuly my query. I am starting to think that this problem has something to with oracle and the number of threads it tries to created to run a modal query with 5 Million partitions. But if it is so, it shouldn't work sometimes and others not.
    Edited by: user10282047 on Oct 20, 2009 12:23 PM

    This definably looks like an oracle bug!
    Throughout the night the computer ran several tests against the database with source tables containing less than 5 million tupels and it succeeded in processing them.
    The 5 million tuple query has like 1 in 100 chances of succeeding.
    I thought about chaning the query implementation and eleminating the Partion By (ID),
    but unfortantly the CV(ID) function can only be used on the right side of a rule.
    I cannot right a rule like FAVF(cv(ID), 1) = FAVF1(CV(ID),1),
    and so. While the first CV works the last doesn't.
    Just finished trying this query with 3 million tuples, and It also worked.
    I am gonna quit trying to find out a problem on my behalf, this clearly on Oracle's hands not mine.
    There is some breaking point where the model query stops working.
    Currently i think that it may be related with the Partition By clause, Oracle may not be prepared to handle that many partitions. Unfortunately I can not process the query with just one partiton (that being the whole database table, because they don't allow me to use the CV function on the left side of a rule).
    So I will consider the operator tested.
    Edited by: sono99 on Oct 21, 2009 8:27 AM

  • UCCE 7.5 HDS (ICMDBA v/s Registry)

    Has anyone else noticed a mismatch between what is showing in the Retain column in ICMDBA Space Used Summary v/s what is actually set in the registry? I am looking at two different 7.5 systems (7.5.7 and 7.5.8) that are both not reflecting the actual retention values in the registry. This was not an issue prior to upgrading from 7.2.7.

    Hi to all,
    I've verified that the purging of t_Skill_Group_Interval is based on registry key ...\Recovery\Purge\Retain\Interval\AgentSkillGroup insteed of ...\Recovery\Purge\Retain\Interval\SkillGroup.
    All the other of mismatches between ICMDBA Space Used Summary and registry key values are on tables purged by SQL DTS and so are not important (and are always values of incorrect keys). The unique real probem is on t_Skill_Group_Interval: I was forced to set the Interval\AgentSkillGroup registry key for both tables. So I cannot have different retain values for t_Agent_Skill_Group_Interval and t_Skill_Group_Interval. I believe this is a little bug in replication.exe process.
    Andrea

  • How to drop these

    i dropped some tables and after , when i issue,
    SELECT * FROM TAB;
    TNAME TABTYPE CLUSTERID
    BIN$9sbjQChwTxeA23XrZuL0Iw==$0 TABLE
    BIN$xSyv7VXhRa6t7sanNksS8A==$0 TABLE
    BIN$QRh6sniLS9eHmr9pkmwngQ==$0 TABLE
    BIN$x8YbWt9NRqyT9cRA29OYRA==$0 TABLE
    BIN$WeWb2jYzT9aTbCuJsKwByA==$0 TABLE
    BIN$nPXdqWtfQfSTD5qFK/SLxA==$0 TABLE
    BIN$hklVy9W5SDCsgYnHs9btyA==$0 TABLE
    BIN$R2LG1OB+RmWBSzW8InnjgQ==$0 TABLE
    BIN$DALe2I+LR5WcNqIbAjY77g==$0 TABLE
    BIN$lwtDfQIjR9enWRwnnpVRrQ==$0 TABLE
    it returned the above tables, how do i delete these tables.

    Hi,
    user649208 wrote:
    SELECT * FROM TAB;You could also stop using TAB, which has been deprecated for decades.
    Instead use TABS (Synonym for USER_TABLES)
    10gR2>create table t (x number);
    Table created.
    10gR2>alter session set recyclebin = ON;
    Session altered.
    10gR2>drop table t;
    Table dropped.
    10gR2>select * from tab where tname like 'BIN%';
    TNAME                          TABTYPE  CLUSTERID
    BIN$fxYiU4TmMETgQ6wcKsgwRA==$0 TABLE
    1 row selected.
    10gR2>select * from TABS where table_name like 'BIN%';
    no rows selected
    10gR2>purge table t;
    Table purged.
    10gR2>Regards
    Peter

  • Reclaim unused space in db

    My db has become full. I have deleted unwanted tables, purged recycle bin, etc. I have also tried to resize but I got an error.
    I have also tried to shrink the tablespace
    alter tablespace FLOW_1208305167860918 coalesce;'
    I have also dropped unwanted the tablespace
    DROP TABLESPACE FLOW_11979008940762532
    INCLUDING CONTENTS AND DATAFILES;

    Hi Paul,
    I tried this....
    select tablespace_name,sum(bytes)/1024/1024 from dba_free_space
    group by tablespace_name;
    and I got ...
    FLOW_4316132665424903      1.375
    SYSAUX 15.5625
    USERS 59.5625
    FLOW_1208305167860918 1023.0625
    SYSTEM 1467.8125
    UNDO     489.6875
    I tried to resize the datafile which had become full but it could not and it gave some error that data extends beyond limit something...
    Yes , I do know that the data limit is 4g. But even after deleting a lot of rows, a lot ot tables,emptying the recycle bin, unwanted workspaces,schema,etc, I think some space should be there....
    As about the name .... As Shakespeare said, What's in a name? :) You can call me Eric though
    Edited by: eric clapton on Dec 9, 2010 8:48 PM
    Edited by: eric clapton on Dec 9, 2010 8:50 PM

Maybe you are looking for