Recovering the dropped table

is there possible to recover the dropped table?
if means please give me example script to do that,please

That depends. What version of Oracle are you on? If you're on 10
SCOTT @ nx102 JCAVE9420> create table a( col1 number );
Table created.
Elapsed: 00:00:00.45
SCOTT @ nx102 JCAVE9420> insert into a values (1);
1 row created.
Elapsed: 00:00:00.00
SCOTT @ nx102 JCAVE9420> commit;
Commit complete.
Elapsed: 00:00:00.01
SCOTT @ nx102 JCAVE9420> drop table a;
Table dropped.
Elapsed: 00:00:01.21
SCOTT @ nx102 JCAVE9420> flashback table a to before drop;
Flashback complete.
Elapsed: 00:00:00.25
SCOTT @ nx102 JCAVE9420> select * from a;
      COL1
         1
Elapsed: 00:00:00.07Justin

Similar Messages

  • Recover the dropped table in 9i

    can we recover the dropped table in 9i with out using export and import?
    I think..it is not possible?
    any idea???

    oraDBA2 wrote:
    Hi,
    point in time recovery requires export and import right???
    but i need without export and import....
    I think it is not possible...just want to know, if there is any other way?no export and import is not required.You need hot backup and archivelogs backup for that purpose a litllte demo
    SQL> select count(*) from t
      2  /
      COUNT(*)
             0
    SQL> begin
      2    for i in 1..50
      3    loop
      4     insert into t values (i);
      5    end loop;
      6  end;
      7  .
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> commit
      2  /
    Commit complete.
    SQL> select count(*) from t
      2  /
      COUNT(*)
            50
    SQL> select to_char(sysdate,'DD-MM-YYYY HH24:MI:SS')
      2    from dual
      3  /
    TO_CHAR(SYSDATE,'DD
    13-05-2008 16:09:26see above i have 50 record within table.
    SQL> delete from t where a between 1 and 25
      2  /
    25 rows deleted.I deleted 25 out 0f 50
    SQL> commit
      2  /
    Commit complete.
    SQL> select count(*) from t
      2  /
      COUNT(*)
            25
    RMAN> run
    2> {
    3> shutdown immediate;
    4> startup mount;
    5> set until time "to_date('13-05-2008 16:09:26','DD-MM-YYYY HH24:MI:SS')";
    6> restore database;
    7> recover database;
    8> }
    database dismounted
    Oracle instance shut down
    connected to target database (not started)
    Oracle instance started
    database mounted
    Total System Global Area     171966464 bytes
    Fixed Size                      787988 bytes
    Variable Size                145488364 bytes
    Database Buffers              25165824 bytes
    Redo Buffers                    524288 bytes
    executing command: SET until clause
    Starting restore at 13-MAY-08
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=160 devtype=DISK
    channel ORA_DISK_1: starting datafile backupset restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    restoring datafile 00001 to C:\ORACLE\PRODUCT\10.1.0\ORADATA\PROD\SYSTEM01.DBF
    restoring datafile 00002 to C:\ORACLE\PRODUCT\10.1.0\ORADATA\PROD\UNDOTBS01.DB
    restoring datafile 00003 to C:\ORACLE\PRODUCT\10.1.0\ORADATA\PROD\SYSAUX01.DBF
    restoring datafile 00004 to C:\ORACLE\PRODUCT\10.1.0\ORADATA\PROD\USERS01.DBF
    channel ORA_DISK_1: restored backup piece 1
    piece handle=C:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\PROD\BACKUPSET\2008_
    _13\O1_MF_NNNDF_TAG20080513T155846_42LX37BF_.BKP tag=TAG20080513T155846
    channel ORA_DISK_1: restore complete
    Finished restore at 13-MAY-08
    Starting recover at 13-MAY-08
    using channel ORA_DISK_1
    starting media recovery
    media recovery complete
    Finished recover at 13-MAY-08
    RMAN> alter database open resetlogs
    2> ;
    database opened
    SQL> conn sys/sys as sysdba
    Connected.
    SQL> desc t
    Name                                      Null?    Type
    A                                                  NUMBER
    SQL> select count(*)
      2    from t
      3  /
      COUNT(*)
            50
    SQL> See above i did incomplete recovery till before deletion of 25 records out of 50 and got back my database before deletion of 25 records.This what is called incomplete recovery and there is only required hot backup and archivelogs.
    Khurram

  • How can recover the dropped table on oracle 9i and 10g ?

    This is the scnario...
    user dropped one table on his schema...
    oracle 10g DB
    flashback not enabled so no flashback drop possible
    but any way to recover it from recyclebin on 10g ? becuase this is not sysdba table ...if yes how about on 9i...if yes then will there be any limit on recycle bin like space pressure ??
    Scnario 2:
    we have two online redo log group with 2 member each..
    my currnet online redolog group currupted (including members)...we need the data's of that currnet group so we should'nt use the clear log command
    how to recover it ?
    Do we need to go for any block level revcovery ?
    thanks
    Moorthy
    Edited by: user13014926 on Jan 18, 2011 6:55 AM

    If you have no backup your only option is to perform incomplete recovery (point-in-time recovery) to the time just before the drop, export the table and then restore the database (for example, from a cold backup taken just before the incomplete recovery,) and import the table. This obviously requires a full backup
    taken before the drop which you don't seem to have, so the answer is "regrettably no."
    If you have a backup;
    Take backup of ur current db, apply previous day backup, do point in time recovery to get table back,export table, shutdown and apply latest backup, import table back
    Regards,

  • Generating the DROP TABLE statements in the correct order

    DB Version:11.1.0.7.0
    I have been given a list of 250 unwanted tables to be dropped. Because of the FK dependancy, the DROP TABLE statements has to be in the right order. ie Drop the child table first and then the parent.
    Is there way to generate a script (from a given list of tables names) which will create the DROP TABLE statments in the right order?

    Have you tried CASCADE CONSTRAINTS?
    Cheers
    Ben

  • Recovering dropped table without using pointing time recovery/

    Hi geeks,
    Noob here.I have a question*.I want to recover the dropped table with data with out using pointing time recovery.*
    for Ex:Use hasr dropped the table at 10:00 and realized that he dropped the table at 16:00hrs .So i want to fetch the data(DDL+DML) without using pointing time recovery.
    So please find answers for my question.
    Thank you,
    Rakesh M.

    Welcome to the forum!
    Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    >
    Noob here.I have a question*.I want to recover the dropped table with data with out using pointing time recovery.*
    for Ex:Use hasr dropped the table at 10:00 and realized that he dropped the table at 16:00hrs .So i want to fetch the data(DDL+DML) without using pointing time recovery.
    >
    FLASHBACK TABLE myTable TO BEFORE DROP;
    See the examples in the FLASHBACK TABLE section of the SQL Language doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_9012.htm
    >
    Retrieving a Dropped Table: Example If you accidentally drop the pm.print_media table and want to retrieve it, then issue the following statement:
    FLASHBACK TABLE print_media TO BEFORE DROP;
    If another print_media table has been created in the pm schema, then use the RENAME TO clause to rename the retrieved table:
    FLASHBACK TABLE print_media TO BEFORE DROP RENAME TO print_media_old;
    If you know that the employees table has been dropped multiple times, and you want to retrieve the oldest version, then query the USER_RECYLEBIN table to determine the system-generated name, and then use that name in the FLASHBACK TABLE statement. (System-generated names in your database will differ from those shown here.)
    SELECT object_name, droptime FROM user_recyclebin
    WHERE original_name = 'PRINT_MEDIA';
    OBJECT_NAME DROPTIME
    RB$$45703$TABLE$0 2003-06-03:15:26:39
    RB$$45704$TABLE$0 2003-06-12:12:27:27
    RB$$45705$TABLE$0 2003-07-08:09:28:01

  • How to recover dropped table

    Table is been dropped and i want o recover it.
    Database is running in archive log mode and i had valid full database rman backup too.
    flashback is disabled.
    database version -10g
    Please let me know the steps i can follow to recover the dropped table.

    Hello,
    If your RECYCLEBIN is activated you may Flashback Drop your Table.
    So you may check your RECYCLEBIN by using the following query:
    select object_name, original_name from user_recyclebin;If you can see your Table (original_name) so you may execute the statement below:
    flashback table <table_name> to before drop;Else, you'll need a Backup or a dump to restore your Table.
    For instance, by duplicating your database elsewhere and get back the Table by DataPump (expdp/impdp).
    Hope this help.
    Best regards,
    Jean-Valentin
    Edited by: Lubiez Jean-Valentin on Feb 3, 2010 10:13 PM

  • Segments exist even after dropping tables

    Oracle 11g on AIX.
    I dropped all the tables from my schema, 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==$0So my question is, why are segments still allocated even after I've dropped
    all the tables in my schema?
    Is there some command I can use to free them up?
    Thanks.

    They are just recyclebin objects given to you so that you can recover the dropped tables after the drop command too. Please see,
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10595/tables011.htm#ADMIN11681
    To drop these objects, you can use
    purge recyclebinHTH
    Aman....

  • Dropped table showing nt available in the database

    dear friends,
    my database is running in archive log mode and i dropped one table say table1.i ran the RMAN command shown below
    RMAN> run
    2> {
    3> restore database;
    4> recover database;
    5> }
    in the above command we are restoring the backup and applying all archivelogs,m i right?.
    after restoring and recovering the database using the above RMAN command,when i checked the dropped table table1,i m getting error --table1 is not existing in the database.
    can you please tell me why after restoring and applying all archivelog why i didnt get dropped table table?
    os-linux rhel 5.7
    db-10.2.0.3

    my database is running in archive log mode and i dropped one table say table1.i ran the RMAN command shown below
    RMAN> run
    2> {
    3> restore database;
    4> recover database;
    5> }
    in the above command we are restoring the backup and applying all archivelogs,m i right?.
    after restoring and recovering the database using the above RMAN command,when i checked the dropped table table1,i m getting error --table1 is not existing in the database.
    can you please tell me why after restoring and applying all archivelog why i didnt get dropped table table?the above command performs complete recovery
    if you want recover the table, you should use 'set until time_the_table_was_dropped' clause in the begining of run block

  • Recover a single table using RMAN

    Hi,
    I'm working on an Oracle Database 11g Release 11.1.0.6.0 - 64bit Production With the Real Application Clusters option.
    I did a bad update on a table.
    I have a full backup level 0 before the update
    Is it possibile to recover the single table in an instant before the update using RMAN?
    Thanks in advance.
    Samuel

    Hi Samuel,
    How long ago was the update committed? What's the value of undo_retention?
    If the undo has not yet expired, the easiest way to recovery is through flashback query. (Note that flashback database does not have to be enabled for flashback query to work.)
    See MOS Doc ID 238674.1.
    If that's not a possibility, and flashback database is not enabled, the only other option is to do an out-of-place restore, of SYSTEM, UNDO, and tablespace containing the table you want to recover, and recover to point in time before the update. Then, export table, drop the database, and import table into your primary database.
    Hope that helps,
    -Mark

  • How to Rollback a Dropped Table

    Hi
    How i do i rollback from a dropped table?
    I have created a sample table as follows
    begin transaction
    create table sample_t1
    (id int,
    class nvarchar(100),
    subject nvarchar(100))
    INSERT INTO sample_t1 VALUES(10,'XYZ','LKJ')
    INSERT INTO sample_t1 VALUES(10,'XYZ','LKJ')
    INSERT INTO sample_t1 VALUES(10,'XYZ','LKJ')
    INSERT INTO sample_t1 VALUES(10,'XYZ','LKJ')
    INSERT INTO sample_t1 VALUES(10,'XYZ','LKJ')
    SELECT * FROM sample_t1
    DROP TABLE sample_t1
    ROLLBACK ----> "when this command is issued, it says commands compelted successfully in the message area , but when i check through select * from sample_t1, it says " invalid object name sample_t1"
    Please help

    Hi Visakhm
    Thanks for your help on this.You have helped me get back the dropped table.
    However, in case my colleague drops a table without issuing
    "BEGIN TRANSACTION" command or the followed command "go"  and just directly drops a table using " drop table tablename"
    and how i can get this table back ?
    If you do not have transaction specified, you can not rollback the transaction.
    If you have log backup in place, you may be able to restore the database backups. Refer the below link for the same: http://social.msdn.microsoft.com/Forums/en-US/16efd46d-eba9-4f9a-8683-f55caa3b4ffa/restore-differential-database-backup-with-on-daily-basis?forum=databasedesign
    Top of all, Better option would be  DO NOT give permission to drop the tables to your colleagues. 

  • Recover from dropped SYSAUX datafile

    Trying to recover a DEV database without rebuilding it, but not hopeful at this point. Basically, someone dropped the SYSAUX (and a few other) datafiles, so now they are showing up in the database as MISSING0003 instead of the actual filename. There are no backups, but I want to drop the tablespaces (not SYSAUX) and in trying to do so, I'm getting an error about the SYSAUX tablespace for some reason. How can I rebuild or recover from the SYSAUX issue, since I cannot drop the SYSAUX tablespace, as it seems to be preventing me from dropping any of the other tablespaces that have missing datafiles as well. I really just need to recreate the tablespaces, but get the below error when I try to drop the schemas (with cascade) or the tablespaces (including contents).
    SQL> drop tablespace DATA001 including contents;
    drop tablespace DATA001 including contents
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 2
    ORA-00376: file 3 cannot be read at this time
    ORA-01111: name for data file 3 is unknown - rename to correct file
    ORA-01110: data file 3: 'C:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\MISSING00003'
    ORA-06512: at line 19
    Any help to get past the first issue of dropping the non-SYSTEM tablespaces would be great, and any follow-up on how to rebuild/recreate/recover from the dropped SYSAUX datafiles would be appreciated as well.
    DB is 10gR2 on Windows.

    user4257171 wrote:
    Trying to recover a DEV database without rebuilding it, but not hopeful at this point. Basically, someone dropped the SYSAUX (and a few other) datafiles, so now they are showing up in the database as MISSING0003 instead of the actual filename. There are no backups,
    > DB is 10gR2 on Windows.
    Without backups you are not going to be able recover the dropped data files. Given that one of the tablespaces was the required SYSAUX tablespace you are most likely looking at a rebuild instead of a restore.

  • About dropping tables

    Hi,
    When I was reading the features of Oracle 9i, I came across a new feature that is, "We can get the dropped table details" .. But I havent understood what exactly is that ... Can anyone explain about this please ??
    Regards

    krichards,
    If you could edit that link to be shorter, this thread would be a lot easier to read ;)
    Use:
    [url=some_url]text to display

  • DROP TABLE performance

    Hello,
    could someone share any tips on improving execution times for dropping tables?
    I have a blank table with over 200 columns and it takes 23-25s to drop. Smaller tables take something around 0.1s of course. Problem is I need to drop thousands of such tables and then recreate them. The recreate itself takes no more than a second.
    What's the origin of a longer time? Is it because of an implicit commit in the drop table command?
    I've tried this in noarchivelog mode with almost identical times. I've also tried different optimizer_mode settings and commit_logging, none have shown any usable results, but I'm still experimenting. The goal is to minimize execution time once I need to run the whole batch, maybe running multiple sessions can work out to be faster (while individual times are maybe longer), not sure yet.
    Here is a sample output:
    SQL> CREATE TABLE "SYSADM"."DRIVERTEST"
      2    (
      3      "PROCESS_INSTANCE"   NUMBER(10,0) NOT NULL ENABLE,
      4      "INTFC_ID"           NUMBER(*,0) NOT NULL ENABLE,
      5      "INTFC_LINE_NUM"     NUMBER(*,0) NOT NULL ENABLE,
      6      "TRANS_TYPE_BI"      VARCHAR2(4 CHAR) NOT NULL ENABLE,
      7      "TRANS_TYPE_BI_SEQ"  NUMBER(*,0) NOT NULL ENABLE,
      8      "HDR_FIELDS_KEY"     VARCHAR2(30 CHAR) NOT NULL ENABLE,
      9      "HDR_FIELDS_BILL_BY" VARCHAR2(1 CHAR) NOT NULL ENABLE,
    10      "ADJ_TRANS_TYPE"     VARCHAR2(5 CHAR) NOT NULL ENABLE,
    11      "CREATE_NEW_BILL"    VARCHAR2(1 CHAR) NOT NULL ENABLE,
    12      "TMP_BILL_FLG"       VARCHAR2(1 CHAR) NOT NULL ENABLE,
    13      "ENTRY_TYPE"         VARCHAR2(5 CHAR) NOT NULL ENABLE,
    14      "ENTRY_REASON"       VARCHAR2(5 CHAR) NOT NULL ENABLE,
    15      "ENTRY_EVENT"        VARCHAR2(10 CHAR) NOT NULL ENABLE,
    16      "LOAD_STATUS_BI"     VARCHAR2(3 CHAR) NOT NULL ENABLE,
    17      "ERROR_STATUS_BI"    VARCHAR2(4 CHAR) NOT NULL ENABLE,
    18      "BUSINESS_UNIT"      VARCHAR2(5 CHAR) NOT NULL ENABLE,
    19      "BUSINESS_UNIT_GL"   VARCHAR2(5 CHAR) NOT NULL ENABLE,
    20      "BILL_TO_CUST_ID"    VARCHAR2(15 CHAR) NOT NULL ENABLE,
    21      "ADDRESS_SEQ_NUM"    NUMBER(*,0) NOT NULL ENABLE,
    22      "BILL_TO_COPIES"     NUMBER(*,0) NOT NULL ENABLE,
    23      "CNTCT_SEQ_NUM"      NUMBER(*,0) NOT NULL ENABLE,
    24      "NAME1"              VARCHAR2(40 CHAR) NOT NULL ENABLE,
    25      "INTERUNIT_FLG"      VARCHAR2(1 CHAR) NOT NULL ENABLE,
    26      "BUSINESS_UNIT_TO"   VARCHAR2(5 CHAR) NOT NULL ENABLE,
    27      "DIRECT_INVOICING"   VARCHAR2(1 CHAR) NOT NULL ENABLE,
    28      "RANGE_SELECTION_ID" VARCHAR2(30 CHAR) NOT NULL ENABLE,
    29      "BILL_SOURCE_ID"     VARCHAR2(10 CHAR) NOT NULL ENABLE,
    30      "BILL_TYPE_ID"       VARCHAR2(3 CHAR) NOT NULL ENABLE,
    31      "BILL_CYCLE_ID"      VARCHAR2(10 CHAR) NOT NULL ENABLE,
    32      "BILL_BY_ID"         VARCHAR2(10 CHAR) NOT NULL ENABLE,
    33      "PAYMENT_METHOD"     VARCHAR2(3 CHAR) NOT NULL ENABLE,
    34      "PYMNT_TERMS_CD"     VARCHAR2(5 CHAR) NOT NULL ENABLE,
    35      "BANK_CD"            VARCHAR2(5 CHAR) NOT NULL ENABLE,
    36      "BANK_ACCT_KEY"      VARCHAR2(4 CHAR) NOT NULL ENABLE,
    37      "BI_CURRENCY_CD"     VARCHAR2(3 CHAR) NOT NULL ENABLE,
    38      "BASE_CURRENCY"      VARCHAR2(3 CHAR) NOT NULL ENABLE,
    39      "CUR_RT_TYPE"        VARCHAR2(5 CHAR) NOT NULL ENABLE,
    40      "RATE_MULT"          NUMBER(15,8) NOT NULL ENABLE,
    41      "RATE_DIV"           NUMBER(15,8) NOT NULL ENABLE,
    42      "CUR_RT_SOURCE"      VARCHAR2(1 CHAR) NOT NULL ENABLE,
    43      "INVOICE_DT" DATE,
    44      "ACCOUNTING_DT" DATE,
    45      "ACCRUE_UNBILLED"    VARCHAR2(1 CHAR) NOT NULL ENABLE,
    46      "TARGET_INVOICE"     VARCHAR2(22 CHAR) NOT NULL ENABLE,
    47      "INVOICE"            VARCHAR2(22 CHAR) NOT NULL ENABLE,
    48      "DOC_TYPE"           VARCHAR2(8 CHAR) NOT NULL ENABLE,
    49      "CONSOL_SETID"       VARCHAR2(5 CHAR) NOT NULL ENABLE,
    50      "CONSOL_CUST_ID"     VARCHAR2(15 CHAR) NOT NULL ENABLE,
    51      "CONSOL_KEY"         VARCHAR2(22 CHAR) NOT NULL ENABLE,
    52      "INVOICE_TO_ADJ"     VARCHAR2(22 CHAR) NOT NULL ENABLE,
    53      "ADJ_DELTA_ACTION"   VARCHAR2(3 CHAR) NOT NULL ENABLE,
    54      "LINE_SEQ_TO_ADJ"    NUMBER(*,0) NOT NULL ENABLE,
    55      "LINE_SEQ_NUM"       NUMBER(*,0) NOT NULL ENABLE,
    56      "LINE_DST_SEQ_NUM"   NUMBER(*,0) NOT NULL ENABLE,
    57      "LINE_DFR_SEQ_NUM"   NUMBER(*,0) NOT NULL ENABLE,
    58      "LINE_UAR_SEQ_NUM"   NUMBER(*,0) NOT NULL ENABLE,
    59      "LAST_NOTE_SEQ_NUM"  NUMBER(*,0) NOT NULL ENABLE,
    60      "NOTES_SEQ_NUM"      NUMBER(*,0) NOT NULL ENABLE,
    61      "LINE_TYPE"          VARCHAR2(4 CHAR) NOT NULL ENABLE,
    62      "IDENTIFIER"         VARCHAR2(18 CHAR) NOT NULL ENABLE,
    63      "DESCR"              VARCHAR2(30 CHAR) NOT NULL ENABLE,
    64      "UNIT_OF_MEASURE"    VARCHAR2(3 CHAR) NOT NULL ENABLE,
    65      "QTY"                NUMBER(15,4) NOT NULL ENABLE,
    66      "ORIG_QTY"           NUMBER(15,4) NOT NULL ENABLE,
    67      "UNIT_AMT"           NUMBER(15,4) NOT NULL ENABLE,
    68      "LIST_PRICE"         NUMBER(15,4) NOT NULL ENABLE,
    69      "PPRC_PROMO_CD"      VARCHAR2(20 CHAR) NOT NULL ENABLE,
    70      "MERCH_TYPE"         VARCHAR2(10 CHAR) NOT NULL ENABLE,
    71      "TAX_CD"             VARCHAR2(8 CHAR) NOT NULL ENABLE,
    72      "TAX_EXEMPT_CERT"    VARCHAR2(30 CHAR) NOT NULL ENABLE,
    73      "TAX_EXEMPT_FLG"     VARCHAR2(1 CHAR) NOT NULL ENABLE,
    74      "TAX_EXEMPT_RC"      VARCHAR2(2 CHAR) NOT NULL ENABLE,
    75      "TAX_JOB_NUM"        VARCHAR2(10 CHAR) NOT NULL ENABLE,
    76      "BI_TAX_TIMING"      VARCHAR2(1 CHAR) NOT NULL ENABLE,
    77      "CUSTOMER_GROUP"     VARCHAR2(10 CHAR) NOT NULL ENABLE,
    78      "VAT_TXN_TYPE_CD"    VARCHAR2(4 CHAR) NOT NULL ENABLE,
    79      "TAX_CD_VAT"         VARCHAR2(8 CHAR) NOT NULL ENABLE,
    80      "VAT_APPLICABILITY"  VARCHAR2(1 CHAR) NOT NULL ENABLE,
    81      "VAT_PRODUCT_GROUP"  VARCHAR2(10 CHAR) NOT NULL ENABLE,
    82      "PROD_GRP_SETID"     VARCHAR2(5 CHAR) NOT NULL ENABLE,
    83      "IST_TXN_FLG"        VARCHAR2(1 CHAR) NOT NULL ENABLE,
    84      "IDENTIFIER_TBL"     VARCHAR2(3 CHAR) NOT NULL ENABLE,
    85      "SHIP_FROM_LOC"      VARCHAR2(10 CHAR) NOT NULL ENABLE,
    86      "ORD_ACCEPT_LOC"     VARCHAR2(10 CHAR) NOT NULL ENABLE,
    87      "ORD_ORIGIN_LOC"     VARCHAR2(10 CHAR) NOT NULL ENABLE,
    88      "STORE_LOC"          VARCHAR2(10 CHAR) NOT NULL ENABLE,
    89      "TITLE_PASSAGE"      VARCHAR2(1 CHAR) NOT NULL ENABLE,
    90      "TAX_GROUP"          VARCHAR2(10 CHAR) NOT NULL ENABLE,
    91      "TAX_USER_AREA"      VARCHAR2(25 CHAR) NOT NULL ENABLE,
    92      "TAX_TRANS_TYPE"     VARCHAR2(1 CHAR) NOT NULL ENABLE,
    93      "TAX_TRANS_SUB_TYPE" VARCHAR2(1 CHAR) NOT NULL ENABLE,
    94      "NET_EXTENDED_AMT"   NUMBER(26,3) NOT NULL ENABLE,
    95      "GROSS_EXTENDED_AMT" NUMBER(26,3) NOT NULL ENABLE,
    96      "REV_RECOG_BASIS"    VARCHAR2(3 CHAR) NOT NULL ENABLE,
    97      "PROJECT_ID"         VARCHAR2(15 CHAR) NOT NULL ENABLE,
    98      "BUSINESS_UNIT_OM"   VARCHAR2(5 CHAR) NOT NULL ENABLE,
    99      "ORDER_NO"           VARCHAR2(10 CHAR) NOT NULL ENABLE,
    100      "ORDER_INT_LINE_NO"  NUMBER(*,0) NOT NULL ENABLE,
    101      "SCHED_LINE_NBR"     NUMBER(*,0) NOT NULL ENABLE,
    102      "DEMAND_SOURCE"      VARCHAR2(2 CHAR) NOT NULL ENABLE,
    103      "DEMAND_LINE_NO"     NUMBER(*,0) NOT NULL ENABLE,
    104      "BUSINESS_UNIT_RMA"  VARCHAR2(5 CHAR) NOT NULL ENABLE,
    105      "RMA_ID"             VARCHAR2(10 CHAR) NOT NULL ENABLE,
    106      "RMA_LINE_NBR"       NUMBER(*,0) NOT NULL ENABLE,
    107      "PRODUCT_ID"         VARCHAR2(18 CHAR) NOT NULL ENABLE,
    108      "ORDER_DATE" DATE,
    109      "PO_REF"       VARCHAR2(30 CHAR) NOT NULL ENABLE,
    110      "PO_LINE"      NUMBER(*,0) NOT NULL ENABLE,
    111      "CONTRACT_NUM" VARCHAR2(25 CHAR) NOT NULL ENABLE,
    112      "CONTRACT_DT" DATE,
    113      "CONTRACT_TYPE"     VARCHAR2(15 CHAR) NOT NULL ENABLE,
    114      "CONTRACT_LINE_NUM" NUMBER(*,0) NOT NULL ENABLE,
    115      "FREIGHT_TERMS"     VARCHAR2(10 CHAR) NOT NULL ENABLE,
    116      "BILL_OF_LADING"    VARCHAR2(30 CHAR) NOT NULL ENABLE,
    117      "COUNTRY_SHIP_FROM" VARCHAR2(3 CHAR) NOT NULL ENABLE,
    118      "COUNTRY_SHIP_TO"   VARCHAR2(3 CHAR) NOT NULL ENABLE,
    119      "SHIP_TO_CUST_ID"   VARCHAR2(15 CHAR) NOT NULL ENABLE,
    120      "SHIP_TO_ADDR_NUM"  NUMBER(*,0) NOT NULL ENABLE,
    121      "SHIP_ID"           VARCHAR2(10 CHAR) NOT NULL ENABLE,
    122      "SHIP_TYPE_ID"      VARCHAR2(10 CHAR) NOT NULL ENABLE,
    123      "SHIP_FROM_BU"      VARCHAR2(5 CHAR) NOT NULL ENABLE,
    124      "SHIP_DATE" DATE,
    125      "SHIP_TIME" TIMESTAMP (6),
    126      "PACKSLIP_NO"      VARCHAR2(22 CHAR) NOT NULL ENABLE,
    127      "LC_ID"            VARCHAR2(12 CHAR) NOT NULL ENABLE,
    128      "LOC_DOC_ID"       VARCHAR2(15 CHAR) NOT NULL ENABLE,
    129      "SEQUENCE_NBR"     NUMBER(*,0) NOT NULL ENABLE,
    130      "SOLD_TO_CUST_ID"  VARCHAR2(15 CHAR) NOT NULL ENABLE,
    131      "SOLD_TO_ADDR_NUM" NUMBER(*,0) NOT NULL ENABLE,
    132      "BUSINESS_UNIT_PC" VARCHAR2(5 CHAR) NOT NULL ENABLE,
    133      "BUSINESS_UNIT_CA" VARCHAR2(5 CHAR) NOT NULL ENABLE,
    134      "RT_EFFDT" DATE,
    135      "BILL_PLAN_ID"      VARCHAR2(10 CHAR) NOT NULL ENABLE,
    136      "PC_DISTRIB_STATUS" VARCHAR2(1 CHAR) NOT NULL ENABLE,
    137      "BPLAN_LN_NBR"      NUMBER(*,0) NOT NULL ENABLE,
    138      "EVENT_OCCURRENCE"  NUMBER(*,0) NOT NULL ENABLE,
    139      "XREF_SEQ_NUM"      NUMBER(*,0) NOT NULL ENABLE,
    140      "CONTRACT_PPD_SEQ"  NUMBER(*,0) NOT NULL ENABLE,
    141      "ANALYSIS_TYPE"     VARCHAR2(3 CHAR) NOT NULL ENABLE,
    142      "RESOURCE_ID"       VARCHAR2(40 CHAR) NOT NULL ENABLE,
    143      "RESOURCE_TYPE"     VARCHAR2(5 CHAR) NOT NULL ENABLE,
    144      "RESOURCE_CATEGORY" VARCHAR2(5 CHAR) NOT NULL ENABLE,
    145      "RESOURCE_SUB_CAT"  VARCHAR2(5 CHAR) NOT NULL ENABLE,
    146      "ACTIVITY_ID"       VARCHAR2(15 CHAR) NOT NULL ENABLE,
    147      "ACTIVITY_TYPE"     VARCHAR2(5 CHAR) NOT NULL ENABLE,
    148      "DIST_CFG_FLAG"     VARCHAR2(1 CHAR) NOT NULL ENABLE,
    149      "PRODUCT_KIT_ID"    VARCHAR2(18 CHAR) NOT NULL ENABLE,
    150      "SYSTEM_SOURCE"     VARCHAR2(3 CHAR) NOT NULL ENABLE,
    151      "EMPLID"            VARCHAR2(11 CHAR) NOT NULL ENABLE,
    152      "EMPL_RCD"          NUMBER(*,0) NOT NULL ENABLE,
    153      "START_DT" DATE,
    154      "END_DT" DATE,
    155      "FROM_DT" DATE,
    156      "TO_DT" DATE,
    157      "SERVICE_CUST_ID"    VARCHAR2(15 CHAR) NOT NULL ENABLE,
    158      "SERVICE_ADDR_NUM"   NUMBER(*,0) NOT NULL ENABLE,
    159      "NOTE_TYPE"          VARCHAR2(10 CHAR) NOT NULL ENABLE,
    160      "STD_NOTE_FLAG"      VARCHAR2(1 CHAR) NOT NULL ENABLE,
    161      "INTERNAL_FLAG"      VARCHAR2(1 CHAR) NOT NULL ENABLE,
    162      "HDR_OR_LINE_NOTE"   VARCHAR2(1 CHAR) NOT NULL ENABLE,
    163      "AR_LVL"             VARCHAR2(1 CHAR) NOT NULL ENABLE,
    164      "AR_DST_OPT"         VARCHAR2(1 CHAR) NOT NULL ENABLE,
    165      "GL_LVL"             VARCHAR2(1 CHAR) NOT NULL ENABLE,
    166      "ENABLE_DFR_REV_FLG" VARCHAR2(1 CHAR) NOT NULL ENABLE,
    167      "BILLING_SPECIALIST" VARCHAR2(8 CHAR) NOT NULL ENABLE,
    168      "BILLING_AUTHORITY"  VARCHAR2(8 CHAR) NOT NULL ENABLE,
    169      "BILLING_FREQUENCY"  VARCHAR2(3 CHAR) NOT NULL ENABLE,
    170      "BILL_INQUIRY_PHONE" VARCHAR2(24 CHAR) NOT NULL ENABLE,
    171      "SALES_PERSON"       VARCHAR2(8 CHAR) NOT NULL ENABLE,
    172      "COLLECTOR"          VARCHAR2(8 CHAR) NOT NULL ENABLE,
    173      "CR_ANALYST"         VARCHAR2(8 CHAR) NOT NULL ENABLE,
    174      "INVOICE_FORM_ID"    VARCHAR2(10 CHAR) NOT NULL ENABLE,
    175      "STD_NOTE_CD"        VARCHAR2(10 CHAR) NOT NULL ENABLE,
    176      "TOT_LINE_DST_AMT"   NUMBER(26,3) NOT NULL ENABLE,
    177      "TOT_LINE_DST_PCT"   NUMBER(5,2) NOT NULL ENABLE,
    178      "TOT_LINE_DFR_PCT"   NUMBER(5,2) NOT NULL ENABLE,
    179      "TOT_LINE_DFR_AMT"   NUMBER(26,3) NOT NULL ENABLE,
    180      "TOT_LINE_UAR_AMT"   NUMBER(26,3) NOT NULL ENABLE,
    181      "TOT_LINE_UAR_PCT"   NUMBER(5,2) NOT NULL ENABLE,
    182      "SSN"                VARCHAR2(9 CHAR) NOT NULL ENABLE,
    183      "CHARGE_FROM_DT" DATE,
    184      "CHARGE_TO_DT" DATE,
    185      "SUBCUST_QUAL1"      VARCHAR2(15 CHAR) NOT NULL ENABLE,
    186      "SUBCUST_QUAL2"      VARCHAR2(15 CHAR) NOT NULL ENABLE,
    187      "REIMB_AGREEMENT"    VARCHAR2(25 CHAR) NOT NULL ENABLE,
    188      "TOT_DISCOUNT_AMT"   NUMBER(26,3) NOT NULL ENABLE,
    189      "TOT_SURCHARGE_AMT"  NUMBER(26,3) NOT NULL ENABLE,
    190      "ACCUMULATE"         VARCHAR2(1 CHAR) NOT NULL ENABLE,
    191      "VAT_TREATMENT_GRP"  VARCHAR2(4 CHAR) NOT NULL ENABLE,
    192      "COUNTRY_VAT_BILLFR" VARCHAR2(3 CHAR) NOT NULL ENABLE,
    193      "COUNTRY_VAT_BILLTO" VARCHAR2(3 CHAR) NOT NULL ENABLE,
    194      "VAT_TREATMENT"      VARCHAR2(4 CHAR) NOT NULL ENABLE,
    195      "PHYSICAL_NATURE"    VARCHAR2(1 CHAR) NOT NULL ENABLE,
    196      "COUNTRY_LOC_BUYER"  VARCHAR2(3 CHAR) NOT NULL ENABLE,
    197      "STATE_LOC_BUYER"    VARCHAR2(6 CHAR) NOT NULL ENABLE,
    198      "COUNTRY_LOC_SELLER" VARCHAR2(3 CHAR) NOT NULL ENABLE,
    199      "STATE_LOC_SELLER"   VARCHAR2(6 CHAR) NOT NULL ENABLE,
    200      "VAT_SVC_SUPPLY_FLG" VARCHAR2(1 CHAR) NOT NULL ENABLE,
    201      "VAT_SERVICE_TYPE"   VARCHAR2(1 CHAR) NOT NULL ENABLE,
    202      "COUNTRY_VAT_PERFRM" VARCHAR2(3 CHAR) NOT NULL ENABLE,
    203      "STATE_VAT_PERFRM"   VARCHAR2(6 CHAR) NOT NULL ENABLE,
    204      "COUNTRY_VAT_SUPPLY" VARCHAR2(3 CHAR) NOT NULL ENABLE,
    205      "STATE_VAT_SUPPLY"   VARCHAR2(6 CHAR) NOT NULL ENABLE,
    206      "STATE_SHIP_FROM"    VARCHAR2(6 CHAR) NOT NULL ENABLE,
    207      "STATE_SHIP_TO"      VARCHAR2(6 CHAR) NOT NULL ENABLE,
    208      "MAST_CONTR_ID"      VARCHAR2(25 CHAR) NOT NULL ENABLE,
    209      "TAX_CUST_ID"        VARCHAR2(15 CHAR) NOT NULL ENABLE,
    210      "BUSINESS_UNIT_AM"   VARCHAR2(5 CHAR) NOT NULL ENABLE,
    211      "BUSINESS_UNIT_AMTO" VARCHAR2(5 CHAR) NOT NULL ENABLE,
    212      "ASSET_ID"           VARCHAR2(12 CHAR) NOT NULL ENABLE,
    213      "PROFILE_ID"         VARCHAR2(10 CHAR) NOT NULL ENABLE,
    214      "COST_TYPE"          VARCHAR2(1 CHAR) NOT NULL ENABLE,
    215      "STATE_VAT_DEFAULT"  VARCHAR2(6 CHAR) NOT NULL ENABLE,
    216      "SO_ID"              VARCHAR2(15 CHAR) NOT NULL ENABLE,
    217      "BUSINESS_UNIT_RF"   VARCHAR2(5 CHAR) NOT NULL ENABLE,
    218      "SOURCE_REF_TYPE"    VARCHAR2(3 CHAR) NOT NULL ENABLE,
    219      "SOURCE_REF_NO"      VARCHAR2(35 CHAR) NOT NULL ENABLE,
    220      "SOURCE_REF_KEY"     VARCHAR2(5 CHAR) NOT NULL ENABLE,
    221      "USER_AMT1"          NUMBER(26,3) NOT NULL ENABLE,
    222      "USER_AMT2"          NUMBER(26,3) NOT NULL ENABLE,
    223      "USER_DT1" DATE,
    224      "USER_DT2" DATE,
    225      "USER1" VARCHAR2(1 CHAR) NOT NULL ENABLE,
    226      "USER2" VARCHAR2(1 CHAR) NOT NULL ENABLE,
    227      "USER3" VARCHAR2(1 CHAR) NOT NULL ENABLE,
    228      "USER4" VARCHAR2(1 CHAR) NOT NULL ENABLE,
    229      "USER5" VARCHAR2(1 CHAR) NOT NULL ENABLE,
    230      "USER6" VARCHAR2(1 CHAR) NOT NULL ENABLE,
    231      "USER7" VARCHAR2(1 CHAR) NOT NULL ENABLE,
    232      "USER8" VARCHAR2(1 CHAR) NOT NULL ENABLE,
    233      "USER9" VARCHAR2(1 CHAR) NOT NULL ENABLE,
    234      "SETID" VARCHAR2(5 CHAR) NOT NULL ENABLE,
    235      "ADD_DTTM" TIMESTAMP (6),
    236      "LAST_UPDATE_DTTM" TIMESTAMP (6),
    237      "DELETE_ROWS" VARCHAR2(1 CHAR) NOT NULL ENABLE,
    238      "BOOK"        VARCHAR2(10 CHAR) NOT NULL ENABLE,
    239      "DTTM_STAMP" TIMESTAMP (6),
    240      "VAT_RVRSE_CHG_GDS"  VARCHAR2(1 CHAR) NOT NULL ENABLE,
    241      "TAX_CD_VAT_RVC"     VARCHAR2(8 CHAR) NOT NULL ENABLE,
    242      "TAX_CD_VAT_RVC_PCT" NUMBER(7,4) NOT NULL ENABLE,
    243      "VAT_AMT_RVC"        NUMBER(26,3) NOT NULL ENABLE,
    244      "VAT_AMT_RVC_BSE"    NUMBER(26,3) NOT NULL ENABLE,
    245      "VAT_AMT"            NUMBER(26,3) NOT NULL ENABLE,
    246      "VAT_AMT_BSE"        NUMBER(26,3) NOT NULL ENABLE,
    247      "TAX_CD_VAT_PCT"     NUMBER(7,4) NOT NULL ENABLE
    248    )
    249    SEGMENT CREATION DEFERRED PCTFREE 10 PCTUSED 80 INITRANS 1 MAXTRANS 255 N
    OCOMPRESS LOGGING STORAGE
    250    (
    251      INITIAL 16384 NEXT 16384 MAXEXTENTS 2147483645 PCTINCREASE 0
    252    )
    253    TABLESPACE "AMAPP" ;
    Table created.
    Elapsed: 00:00:00.76
    SQL> CREATE UNIQUE INDEX "SYSADM"."DRIVERTEST1" ON "SYSADM"."DRIVERTEST"
      2    (
      3      "PROCESS_INSTANCE", "INTFC_ID", "INTFC_LINE_NUM", "TRANS_TYPE_BI", "TRA
    NS_TYPE_BI_SEQ"
      4    )
      5    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
      6    (
      7      INITIAL 16384 NEXT 106496 MAXEXTENTS 2147483645 PCTINCREASE 0
      8    )
      9    TABLESPACE "PSINDEX" ;
    Index created.
    Elapsed: 00:00:00.04
    SQL>
    SQL> drop table DRIVERTEST;
    Table dropped.
    Elapsed: 00:00:24.90This is Oracle 11.2.0.3 Enterprise on Windows 64bit.
    Thank you for any input.

    >
    Then I hope this is an academic question (and I understand wanting to answer a question from a purely academic standpoint).
    Because ... dropping tables and recreating them -- especially with different structures should be a one-time operation. It would be very easy to spend more time trying to reduce the run time than the non-optimal run time takes. From a business standpoint, it costs more to find a solution than the problem itself is costing. And I'd bet you've already crossed that threshold.
    But again, even without a real business problem, it is sometimes worth while to pursue an answer just so you'll have a better understanding of the processes involved.
    >
    Yes, it is only meant to be run once in a prod environment, eventually. At this point, I'm trying to reduce the execution time to give me options in case I only get a limited maintenance window. Granted, I could have it run for a longer period of time, but it's nice to know of workarounds. After all, this particular script is one of many.
    But in a test enviornment? I can run this as many times as I like without affecting anyone. So yes, it is at least 50% curiosity to see if it is possible, but if it provides me with a solution I decide is worth the saved time, then I'll be a happy camper.

  • Flashback the truncate table is possible in 11g?

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

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

  • How to recover the data from a  dropped table in production/archive mode

    How to recover the data/change on a table that was dropped by accident.
    The database is on archive mode.

    Oracle Version. ? If 10g.
    Try this Way
    SQL> create table taj as select * from all_objects where rownum <= 100;
    Table created.
    SQL> drop table taj ;
    Table dropped.
    SQL> show recyclebin
    ORIGINAL NAME    RECYCLEBIN NAME                OBJECT TYPE  DROP TIME
    TAJ              BIN$b3MmS7kYS9ClMvKm0bu8Vw==$0 TABLE        2006-09-10:16:02:58
    SQL> flashback table taj to before drop;
    Flashback complete.
    SQL> show recyclebin;
    SQL> desc taj;
    Name                                      Null?    Type
    OWNER                                              VARCHAR2(30)
    OBJECT_NAME                                        VARCHAR2(30)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                          NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                            DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    SQL>M.S.Taj

Maybe you are looking for