Purge dba_recyclebin

All,

My version of oracle: 11.2.0.2

Can someone help me fix this sql? I am wrong conversion date function and try to make a count of objects escaped before serving more than 15 days.

SQL> select count(*) from   dba_recyclebin where to_date('droptime','YYYY-MM-DD:HH:MI:SS') > to_date('sysdate','YYYY-MM-DD:HH:MI:SS')-15;
select count(*) from   dba_recyclebin where to_date('droptime','YYYY-MM-DD:HH:MI:SS') > to_date('sysdate','YYYY-MM-DD:HH:MI:SS')-15
                                                    *
ERROR at line 1:
ORA-01841: (full) year must be between -4713 and +9999, and not be 0

Thank you

You also have a problem with your date format mask, it must be of 24 hours.

orcl112 > select count (*) from dba_recyclebin where to_date(droptime,'YYYY-MM-DD:HH24:MI:SS') > sysdate-15;

COUNT (*)

----------

6

orcl112 > select count (*) from dba_recyclebin where to_date(droptime,'YYYY-MM-DD:HH:MI:SS') > sysdate-15;

Select count (*) from dba_recyclebin where to_date(droptime,'YYYY-MM-DD:HH:MI:SS') > sysdate-15

*

ERROR on line 1:

ORA-01849: time must be between 1 and 12

orcl112 > select count (*) from dba_recyclebin where to_date(droptime,'YYYY-MM-DD:HH24:MI:SS') > sysdate-15;

COUNT (*)

----------

6

orcl112 >

Tags: Database

Similar Questions

  • Recycle Bin purged, but DBA_SEGMENTS has too many objects $ BIN

    Hello

    I have purged the trash, but DBA_SEGMENTS shows many objects$ BIN.

    No idea why is that?

    Oracle 11g R2 on Windows 2008


    SQL > PURGE RECYCLEBIN;

    Purged Recyclebin.

    SQL > SELECT nom_segment, BYTES/1024/1024 MB, SEGMENT_TYPE

    FROM DBA_SEGMENTS

    WHERE NOM_TABLESPACE = "USERS".

    ORDER BY BYTES;

    NOM_SEGMENT SEGMENT_TYPE MB

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

    BIN$ PbBrHxfMRQWvpw22LYdAAw == $0 204 TABLE

    BIN$ T/QfYeIkRCChBlYyv7MGPQ == $0 204 TABLE

    BIN$ ZYmh2QYeQHazW9jvTZybMw == $0 204 TABLE

    BIN$ hQC0RGIqSlib5gAjGwtbKA == $0 204 TABLE

    BIN$ KrQQw7eVRVakGrcaE70g/A == $0 204 TABLE

    BIN$ n40tnsK + SkSms0j + ZfRu3A == $0 204 TABLE

    TABLE 204 TMP_LEE_SPOT2

    BIN$ H9nv6G49TNKv/v4UBVIBHQ == $0 204 TABLE

    BIN$ jK21hthETEKTCge90B7YKA == $0 204 TABLE

    TABLE 204 TEMP_TEST01_SCE

    BIN$ LeUANtbPQAiYNLi87n6jJA == $0 205 TABLE

    Hello

    You must use

    PURGE DBA_RECYCLEBIN

    http://www.orafaq.com/wiki/Recycle_bin

    Concerning

  • Unknown hidden column

    DB version: 12.1.0.2

    I'm doing a swap partition operation, but it failed with the error:

    ERROR on line 1:

    ORA-14097: type mismatch or the column ALTER TABLE EXCHANGE partition size

    After research, I detected the presence of a hidden column, but I do not know why this column SYS_NC00036$ should be there:

    SQL > select column_id column_name data_type, data_length, data_default, virtual_column, hidden_column from dba_tab_cols where table_name = 'CEL_FACTURA"of order 1.

    COLUMN_ID COLUMN_NAME DATA_TYPE, DATA_LENGTH HIDDEN VIR DATA_DEFAULT

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

    1 CODIGO_COMPROBANTE NOT ONLY NUMBER 22

    ...

    TOTAL_DESCUENTO 11 NUMBER 22 NO

    PROPINA 12 NUMBER 22 0.00 NO

    IMPORTE_TOTAL 13 NOT ONLY NUMBER 22

    14 MONEDA VARCHAR2 100 NO NO

    15 FECHAP DATE 7 TO_DATE (' 01/01/1900 ',' YYYY/MM/NO NO)

    ...

    TOTAL_BASE_IMPONIBLE_REEMBOLSO 32 NOT ONLY NUMBER 22

    33 TOTAL_IMPUESTO_REEMBOLSO NOT ONLY NUMBER 22

    VALOR_RETENCION_IVA 34 NOT ONLY NUMBER 22

    VALOR_RETENCION_RENTA 35 NOT ONLY NUMBER 22

    36 TIPO_FACTURA VARCHAR2 3 ', OR ' NO NO.

    ...

    FECHA_TRANSACCION 53 NOT ONLY NUMBER 22

    TOTAL_SUBSIDIO NUMBER 22 54 0 NO NO

    BASE_TARIFA_0 55 NOT ONLY NUMBER 22

    SYS_NC00036$ 126 BRUTES NO YES <-THIS COLUMN!

    56 selected lines.

    It seems only that column is due to a function based index but there is no indication of function based there:


    SQL > select * from dba_ind_expressions where index_name in (select index_name in dba_indexes where table_name = 'CEL_FACTURA');

    no selected line


    SQL >

    I have run the following query to view its content:

    08:22:13 prucel > select SYS_NC00036$, count (*) from the Group CEL_FACTURA of SYS_NC00036$;

    SYS_NC00036$ COUNT (*)

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

    55047156

    03                        838

    01                          1

    3 selected lines.

    I tried to delete the column, but it's impossible:

    SQL > alter table COMPROBANTES_ELECTRONICOS. Drop column SYS_NC00036 CEL_FACTURA $;

    *

    ERROR on line 1:

    ORA-14148: DML and DDL operations are not allowed on the guard column.

    SQL > alter table COMPROBANTES_ELECTRONICOS. CEL_FACTURA set the unused column SYS_NC00036$;

    *

    ERROR on line 1:

    ORA-14148: DML and DDL operations are not allowed on the guard column.

    SQL > purge DBA_RECYCLEBIN;

    Recyclebin DBA purged.

    I should also mention that this table is partitioned.

    (1) you can get the explanation of what is 'special' on a column looking at sys.col$ (query by object id and column name). The column 'property' is a bit field that describes the column.

      property      number not null,           /* column properties (bit flags): */
                    /* 0x0001 =       1 = ADT attribute column                   */
                    /* 0x0002 =       2 = OID column                             */
                    /* 0x0004 =       4 = nested table column                    */
                    /* 0x0008 =       8 = virtual column                         */
                    /* 0x0010 =      16 = nested table's SETID$ column           */
                    /* 0x0020 =      32 = hidden column                          */
                    /* 0x0040 =      64 = primary-key based OID column           */
                    /* 0x0080 =     128 = column is stored in a lob              */
                    /* 0x0100 =     256 = system-generated column                */
                    /* 0x0200 =     512 = rowinfo column of typed table/view     */
                    /* 0x0400 =    1024 = nested table columns setid             */
                    /* 0x0800 =    2048 = column not insertable                  */
                    /* 0x1000 =    4096 = column not updatable                   */
                    /* 0x2000 =    8192 = column not deletable                   */
                    /* 0x4000 =   16384 = dropped column                         */
                    /* 0x8000 =   32768 = unused column - data still in row      */
                /* 0x00010000 =   65536 = virtual column                         */
                /* 0x00020000 =  131072 = place DESCEND operator on top          */
                /* 0x00040000 =  262144 = virtual column is NLS dependent        */
                /* 0x00080000 =  524288 = ref column (present as oid col)        */
                /* 0x00100000 = 1048576 = hidden snapshot base table column      */
                /* 0x00200000 = 2097152 = attribute column of a user-defined ref */
                /* 0x00400000 = 4194304 = export hidden column,RLS on hidden col */
                /* 0x00800000 = 8388608 = string column measured in characters   */
               /* 0x01000000 = 16777216 = virtual column expression specified    */
               /* 0x02000000 = 33554432 = typeid column                          */
               /* 0x04000000 = 67108864 = Column is encrypted                    */
              /* 0x20000000 = 536870912 = Column is encrypted without salt       */
    
          /* 0x000800000000 = 34359738368 = default with sequence                */
          /* 0x001000000000 = 68719476736 = default on null                      */
          /* 0x002000000000 = 137438953472 = generated always identity column    */
          /* 0x004000000000 = 274877906944 = generated by default identity col   */
          /* 0x080000000000 = 8796093022208 = Column is sensitive                */
    

    Unfortunately, Oracle developers are not so strict these days and not all bits are documented.

    (2) oracle 12 (or was this some 11.2 end?) has introduced a new feature: possibility to add a new NULLable column with a default value, without updating the actual lines. However, it is not feasible 'usual way' - if the column is not present in the line, how can you tell if it is omitted because it is NULL ('trailing null values'), or because it was never there in the first place, and therefore the default value is the correct value?

    So the solution is Oracle adds a column '' custody '' at the table. This column is added when the value of the new column is updated - it forces the NULL values to be actually there. And even the guard column is a bitmap, marking whose columns are present here now.

    So... you did edit the table and added a few new columns with default values?

  • Segments exist even after a decline of tables

    Oracle 11g on AIX.

    I dropped all my schema tables, but the following query
    shows this:
    SQL> select distinct segment_name,segment_type
         from dba_segments
         where owner='ABC'
    
    SEGMENT_NAME                             SEGMENT_TYPE
    ---------------------------------------- ----------------------------------------
    BIN$hA51n8ndcCjgQ59/4sFwKA==$0           TABLE PARTITION
    BIN$hA51n8nccCjgQ59/4sFwKA==$0           INDEX PARTITION
    BIN$hA51n8nqcCjgQ59/4sFwKA==$0           TABLE PARTITION
    BIN$hA51n8oqcCjgQ59/4sFwKA==$0           TABLE
    BIN$hAyiirsGEErgQ59/4sEQSg==$0           TABLE
    BIN$hF/vMCFREwbgQ59/4sETBg==$0           TABLE
    BIN$hA51n8npcCjgQ59/4sFwKA==$0           INDEX PARTITION
    
    SQL> select owner, table_name
         from dba_part_tables
         where owner='ABC';
    
    OWNER                          TABLE_NAME
    ------------------------------ ------------------------------
    ABC                            BIN$hA51n8ndcCjgQ59/4sFwKA==$0
    ABC                            BIN$hA51n8nqcCjgQ59/4sFwKA==$0
    So my question is, why are still affected segments even after I dropped
    all of the tables in my schema?

    Y at - there a command I can use to free up?

    Thank you.

    It is objects that were inside the Recycle BIN when you dropped without PURGE option.

    SQL> purge dba_recyclebin
    
  • PUBLIC_DEPENDENCY AND DBA_OBJECTS

    In the data dictionary, I have PUBLIC_DEPENDENCY. Object_id that aren't in DBA_OBJECTS. Object_id, how can I tell what are these objects are there names

    Hello

    sql> purge dba_recyclebin;
    

    Concerning

  • Help deleting constraints

    Hello

    I have about 12 constraints in my user_constraints for tables that no longer exist. So, how to remove?

    The constraints all have weird names such as "BIN$ g 57 + 2qcYHsnhR7eVViBGHj == $0 ' and it shows that they exist on the tables the same weird like ' BIN$ 2gdcO6pUQ3OeA + QJuJ0xWA == $0".

    Not surprisingly, the following sql code does not work:

    ALTER table BIN$ 2gdcO6pUQ3OeA + QJuJ0xWA == constraint to drop $0 BIN$ g 57 + 2qcYHsnhR7eVViBGHj == $0;

    Thank you
    Martin

    Martin,

    They are in the recyclebin, so you must purge recylebin

    purge dba_recyclebin;
    
    or
    
    purge user_recyclebin;
    

    Concerning

    Published by: OrionNet on April 22, 2009 20:26

  • Temporary tables are themselves created, name starting with BIN$...

    Hello

    I use Oracle 10.2 and a problem that make certain operations on existing tables, some temporary tables to develop starting with BIN$.

    For ex: BIN$ HULdSlmnRZmbCXAl/pkA9w == $0

    But I do not see these tables in the database after two or three days. I found that these temporary tables are a replica of the existing tables and these contain only the structure of the table, but not the data. I couldn't even drop database.

    Can someone throw some tips on this?

    Thank you and best regards,
    Siva

    These paintings are in the trash of Oracle. When you delete a table, Oracle renames just for BIN$ xxx so that you can undrop table if you made a mistake.

    -You can ignore tables in the trash if you wish. Oracle purge them automatically when it needs the space.
    -You can prevent a table goes the trash by adding the command serve down, i.e.

    DROP TABLE table_name PURGE
    

    -You can empty the trash using the command

    SQL> purge dba_recyclebin
    

    (or just recyclebin if you do wish to erase objects you own to the recyclebin).

    Justin

  • Extra-Tables

    Hi all

    With 11 GR 1 material, I created two tables, but with these two here we can see two name strange table in the TAB not from USER_TABLES.

    SQL > select tNom in tab.

    TNOM
    ------------------------------
    BIN$ ApqPvBz0RHqsrBNGmJNXSA == $0
    BIN$ Wgrvtsv2RJSOQgSEkp0hdw == $0
    TEST1
    TEST2

    SQL > select table_name from user_tables;

    TABLE-NAME
    ------------------------------
    TEST1
    TEST2

    SQL > desc tab
    Name Null? Type
    ----------------------------------------- -------- ----------------------------

    TNOM NOT NULL VARCHAR2 (30)
    TABTYPE VARCHAR2 (7)
    NUMBER OF CLUSTERID

    SQL > select tNom, tabtype tab;

    TNOM TABTYPE
    ------------------------------ -------
    BIN$ ApqPvBz0RHqsrBNGmJNXSA == $0 TABLE
    BIN$ Wgrvtsv2RJSOQgSEkp0hdw == $0 TABLE
    TABLE TEST1
    TABLE TEST2

    SQL > desc BIN$ ApqPvBz0RHqsrBNGmJNXSA == $0
    SP2-0565: illegal identifier.
    SQL > select * from BIN$ ApqPvBz0RHqsrBNGmJNXSA == $0
    2;
    Select * from BIN$ ApqPvBz0RHqsrBNGmJNXSA == $0
    *
    ERROR on line 1:
    ORA-00933: SQL not correctly completed command.

    Is this a BUG?

    :-)

    These tables are in the trash. By default, when MOVE you the table, moves just to Oracle for recycling bin in 10g and later. Allows to undrop table at some point in the future.

    You can prevent this by adding the command PURGE when you delete a table, i.e.

    DROP TABLE table_name PURGE
    

    or by disabling the Recycle Bin. You can also clean the trash

    PURGE dba_recyclebin;
    

    or

    PURGE user_recyclebin
    

    Justin

  • In the Sierra how to purge the Macintosh HD

    I have a MacBook Pro (retina, 15 inches, early 2013) and am upgrading of El Cap of Sierra.

    Sierra storage tab "about this Mac" said that the Macintosh HD 70 GB which is purgeable.

    How to purge the Macintosh HD?

    http://www.Macworld.com/article/3101944/Macs/how-to-use-optimized-storage-in-Mac os - sierra.html

    If you look closely at the screenshot above, you can see a small white-with-gray-striped section. This is what Apple calls Purgeable, and it indicates that these are really old files that you possibly can archive, save it in the cloud or delete to free up storage space.

    You need to do the above manually

  • How to force the data purge

    I'm trying to free up space on my internal hard drive so I can use boot camp (needs 50 GB, has of 30 GB free) its saying that the use of the system on my hard drive went from 50 to 90 GB, is this normal and he'll come back down again?

    If you use Time Machine, it will make the snapshots which eventually get merged into the TM backup. The used space is supposed to automatically purge if necessary, but there are reports that stuck. If you temporarily disable TM, it must remove the local snapshots. However, I do not know if this is actually what caused the outbreak of its use.

  • iPhone 7 screen purge / uneven edge of the screen

    I noticed on a background of intermediate color as the backlight on my 32 GB iPhone Black 7 is uneven on the right side of the screen and I see dark spots 7 or 8, almost like a series of rectangles will light dark light dark. You don't see them on a white background or against black, but only against colors flat (a gray screen at 50% for example).

    ITI is particularly notable, if I pull the low notification Center or go to multitasking where the wallpaper becomes a pale blur.

    I tried to capture on camera as best as I can as shown on the attached photo (ignore the white line of thinking above).

    I don't know what is my best option, because stocks appear to be low, so I can't even order a new and send that back as the day 14 return policy runs out next Friday and another would not happen for 2-3 weeks. I can't imagine having enough stock to swap Apple stores either.

    I was wondering what think and what would be the best course of action.

    Given that I can't edit my original post, I would also like to add:

    These are dark spots certainly that the screen is uniformly bright above and below the area as apposed to bright spots that you wait with purge of 'normal' screen).

    Scroll the app facebook for example, you notice that it is when an image that goes to the edge of the screen and you saw a difference subtle when the image scrolls clear/dark areas.

  • my air ipad storage is almost full. How do I purge of the less important items? Y at - it app to serve the music and pictures in double?

    My air ipad storage is almost full.

    How do I purge of the less important items?

    Y at - it app to serve the music and pictures in double?

    How can I keep on my ipad apps that are shared by other devices?

    First, have you checked when most of the storage used for?

    Check your storage space on your iPhone, iPad and iPod touch - Apple Support

  • Post-Sudo Terminal error purging

    I ran sudo purge and wound up with this screen.  Now when I type other commands in the Terminal that they DO NOT WORK.  How can I get rid of this and get back to my normal command prompt?

    $ cd ~ /.

    CD = change directory

    ~ / = folder

    The trash is located in ~ /. Trash, you can also cd... Return to the previous or the parent directory.

    $ cd...

    -What are you talking about?

  • Variable with a value. «PURGE error: bad Argument Type.»

    
    

    Hi, my 50G calculator accuses a value for the variable 'X' but I can't find it in any directory, and when I try to delete I get the message "' PURGE error: bad Argument Type." " I also have the theta variable with the same problem. How can I remove the value of these variables? TKS

    In addition to Make suggestions, two other possibilities come to mind: 'X' can be a directory object (which would cause the error to the wrong Type of Argument because non-empty directory objects cannot be purged by PURGE, but must be purged by PGDIR), or it could be a local variable (which can only be served by putting an end to the environment that created which is usually a program).  So if Make suggestions don't work, try foster 'X' PGDIR and if that does not work, try KILL (which ends all the current environments).

    If those WHO do not work, please do 'X' TYPE HOME and tell us what object type 'X'.

    DISCLAIMER: I do not work for HP; I'm a happy user of HP Calculator.

  • Purge of the Images of the worksheet

    When I record a Numbers spreadsheet as a CSV file, I sometimes cannot be imported into a database table using phpMyAdmin. I need to copy the data into Excel, then save Excel as a CSV file.

    Rather than rely on this work around, I want to make it work with numbers. So, I start my troubleshooting with emphasis on images. I had problems in the past with seemingly invisible images on some of my worksheets. Is there a way to purge images of a Numbers spreadsheet?

    Thank you.

    I would like to start by determining if the images are a table cell or outside environments.

    THIS ONLY IN A COPY OF YOUR DOCUMENT

    To do this, select the table that contains the data, cut

    Now click on the drawing of the map area and all select, delete

    Now paste to replace table

    Now, try to export the data and import into your database

    If it works YES!

    If it doesn't then you should divide the data into two table until you isoliez the offending lines.

Maybe you are looking for