How do i drop my table

Hi guys ,
am trying to drop my table . but it is used by another user . am getting error message.
can give a suggession .
Edited by: Balajiraam on Mar 2, 2011 1:33 AM

Hi,
You cannot drop the table without the other user completing the transaction on the table. So the user's transaction has to be completed before you drop the table. As hoek said the user should either commit or rollback the transaction.
cheers
VT

Similar Messages

  • How could I drop temporary table in preserve rows?

    Hi,
    I created a global temporary table test with the option, on commit preserve rows.
    I try to drop it with another session but I can't, I always have the error message :
    ORA-14452. So what can I do?
    Thanks.

    We cannot drop a temporary table if a session is using it. This means once a session has inserted data into it we cannot drop the table until that session either commits or exits (depending on whether the table is of the type PRESERVE ROWS). You can see this by looking in v$lock.
    If you quit out of your first session the second session will be able to drop the table.
    Cheers, APC

  • Ora-00600 error when dropping a table

    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    When I tried to drop a table, I got 600 error:
    SQL> desc DEV.ATTR_IDX$EX
    Name Null? Type
    NODE_ID NOT NULL NUMBER
    COL1 NUMBER
    SQL> show user;
    USER is "DEV"
    SQL> select count(*) from DEV.ATTR_IDX$EX;
    COUNT(*)
    0
    SQL> drop table DEV.ATTR_IDX$EX;
    drop table DEV.ATTR_IDX$EX
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [15265], [], [], [], [], [], [], [],
    SQL> drop table DEV.ATTR_IDX$EX purge;
    drop table DEV.ATTR_IDX$EX purge
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [15265], [], [], [], [], [], [], [],
    I guess this is because it had a parent table, which I dropped (I used "drop table <parent_table>", and it did not give me error, very strange).
    SQL> select dbms_metadata.get_ddl('TABLE','ATTR_IDX$EX') from dual;
    DBMS_METADATA.GET_DDL('TABLE','ATTR_IDX$EX')
    CREATE TABLE "DEV"."ATTR_IDX$EX"
    ( "NODE_ID" NUMBER NOT NULL ENABLE,
    "COL1" NUMBER,
    FOREIGN KEY ("NODE_ID")
    REFERENCES () ON DELETE CASCADE ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS"
    MONITORING
    Try to drop FK constraints yields the same error.
    So now how can I drop this table table, any work around?
    Thanks.

    This is a bug. There is no Patch avaialble for this yet. This error is seen where recyclebin is enabled. Possible workaround is to disable the recyclebin.
    This happens with the dictionary corruption due to inconsistency between obj$ and seg$.
    This is a correct answer but still i would suggest to contact Oracle support.

  • Dropping Rollback table space in export dump and use the undo table space

    Hi,
    I want to upgrade my DB which is on 9.2.0.1.0 to 10.2.0.1.
    I have done an export.
    In order to import the DB I have created all the table spaces identical that of my export copy. While creating the Blank database I have already created Undo table space. In the exported DB I have a table space called rollback, how can I drop this table space and use undo table space. I believe this is the recommended table space that should be used in new releases
    Thank you

    Very briefly, these are the steps you will need to perform:
    1) Create an UNDO tablespace the same size as the Rollback tablespace, e.g.:
    CREATE UNDO TABLESPACE undo
    DATAFILE ‘/ora/$ORACLE_SID/001/oradata/$ORACLE_SID/undo_01.dbf’ size 1000M;
    2) Add the initialisation parameters UNDO_MANAGEMENT=AUTO, UNDO_TABLESPACE=UNDO. Omit the UNDO_RETENTION parameter unless it is to be set to a value other then the default of 900 (seconds)
    3) Remove the initialisation parameter ROLLBACK_SEGMENTS
    4) Bounce the database to bring the new parameters into effect.
    5) Drop the Rollback tablespace including contents and datafiles
    Cheers,
    Jason

  • Drop more tables

    Hi,
    Knows someone how can I drop more table, e.g. all tables that start with A and how can I add two columns to all tables that start with B?
    Thank you

    You need to write a script for that, using dynamic SQL.
    small example:
    create or replace procedure my_ddl_proc
    (p_tab_name in VARCHAR2)
    is
    begin
    for rec in
    (select table_name from user_tables where table_name like UPPER(p_tab_name))
    loop
    execute immediate 'DROP TABLE '||rec.table_name;
    end loop;
    end;
    Edited by: hoek on Mar 27, 2009 6:23 PM

  • Not drop a table

    Maybe this is a simple problem. I attempt to drop a table, but I fail. Although I quit the SQLPlus environment, I still cannot create a table with the same name next time. Please tell me how to completely drop the table.

    What is the error you receive when you try to drop the table? The only thing I can think of off of top of my head is that you have foreign key constraints referencing the table in question. If this is the case, you need to do a: drop table TABLE_NAME cascade constraints. This will drop the table and all foreign key constraints that reference the table.
    -Jim Wartnick
    [email protected]

  • How to put drop down in table control ?

    Hi All,
    I m writing one module pool program to edit table.
    I want dropdown to one field so that user can select the appropriate value. And also I want to save that record.
    So how to get the dropdown list and after editing that record how to save that in the database?
    Thanx in advance.
    -Umesh

    Hi Umesh,
    Please check this demo program RSDEMO_TABLE_CONTROL on how to add drop down list in table control. Also check this program DEMO_DYNPRO_TABCONT_LOOP_AT as well.
    To save to database you can code something like this in PAI.
    MODULE USER_COMMAND_0100 INPUT.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      CASE SAVE_OK.
        WHEN 'SAVE'.
          MODIFY <database table> FROM TABLE <table control>.
          IF SY-SUBRC = 0.
          ELSE.
          ENDIF.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Hope this will help.
    Regards,
    Ferry Lianto

  • How to find the user who dropped the tables

    Hi All,
    Some one has dropped 5 tables in the production database that has caused a SEV1 but thankfully we are having those tables in recyclebin and we are restored those with out data loss.
    But I want to know who has dropped those tables and want to know who has connected to database at that time. Can you please guide me in this how to find out....
    Database version: 11.2.0.2 version
    Thanks
    Kk
    Edited by: 908098 on Jan 18, 2012 4:23 AM

    Or you can use this kind of audit (i had used this some time ago)
    -is pretty detailed but is good for auditing purpuse.
    hope this helps
    CREATE TABLE AUDITORIA_ESQUEMA (
    operation VARCHAR2(30),
    os_user VARCHAR2(30),
    obj_owner VARCHAR2(30),
    object_name VARCHAR2(30),
    object_type VARCHAR2(30),
    sql_text     VARCHAR2(64),
    attempt_by VARCHAR2(30),
    attempt_dt DATE,
    Ip_adress VARCHAR2(15));
    CREATE OR REPLACE TRIGGER AUDITORIA_ESQUEMA
    BEFORE CREATE OR ALTER OR DROP OR RENAME or alter
    ON DATABASE
    DECLARE
    oper varchar2(200);
    sql_text ora_name_list_t;
    i      PLS_INTEGER;
    BEGIN
    SELECT ora_sysevent
    INTO oper
    FROM DUAL;
    i := sql_txt(sql_text);
    IF oper IN ('CREATE', 'DROP','RENAME','ALTER') THEN
         INSERT INTO AUDITORIA_ESQUEMA
         SELECT ora_sysevent,(select sys_context('USERENV','OS_USER') from dual)
    , ora_dict_obj_owner,
         ora_dict_obj_name,ora_dict_obj_type, sql_text(1), USER, SYSDATE,
         (select SYS_CONTEXT('USERENV', 'IP_ADDRESS') from dual)
         FROM DUAL;
    ELSIF oper = 'ALTER' THEN
         INSERT INTO AUDITORIA_ESQUEMA
         SELECT ora_sysevent,(select sys_context('USERENV','OS_USER') from dual)
    , ora_dict_obj_owner,
         ora_dict_obj_name,ora_dict_obj_type, sql_text(1), USER, SYSDATE,
         (select SYS_CONTEXT('USERENV', 'IP_ADDRESS') from dual)
         FROM sys.gv_$sqltext
         WHERE UPPER(sql_text) LIKE 'ALTER%'
         AND UPPER(sql_text) LIKE '%NEW_TABLE%';
    END IF;
    END AUDITORIA_ESQUEMA;

  • How can i retrive a table which is dropped by mistake

    hi
    how can i retrive a table which is dropped by mistake?
    Ragards Josh

    Please mention your database version?
    Suppose that a table as follows is dropped;
    SQL> drop table hr.departments cascade constraints;
    Table dropped.We can recover as follows;
    SQL> flashback table hr.departments to before drop;
    Flashback complete.Now we check that the dropped table has been retrieved;
    SQL> select object_name, object_type from dba_objects
    2     where owner='HR';
    OBJECT_NAME
    OBJECT_TYPE
    DEPARTMENTS
    TABLEFLASHBACK TABLE
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9012.htm#sthref8923
    Overview of Oracle Flashback Table
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/backrec.htm#i1015145
    When to Use Oracle Flashback
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/backrec.htm#sthref2426
    Extracted from the link above
    Flashback Table is a push button solution to restore the contents of a table to a given point in time.
    Using Flashback Drop and Managing the Recycle Bin
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tables.htm#sthref2381
    Adith

  • How to drop multiple tables in SQL Workshop

    Hi,
    I'd like to drop multiple tables in one time but
    SQL command processor returnes error message: ORA-00933.
    Could you please tell me how to drop multiple tables in
    one time?
    My trial was follows
    Drop table "table1", "table2"
    Result
    ORA-00933: SQL command not properly ended
    Regards,
    Hideki Sakamoto

    Hideki,
    SQL syntax permits you to specify only one table in a DROP TABLE command.
    The SQL Command Processor permits you to run one statement or PL/SQL block per submission.
    So there are at least two ways you can do this. You could either upload or create a SQL script in SQL Workshop which contains your multiple statements:
    drop table "table1"
    drop table "table2"
    or you could execute a single anonymous PL/SQL block in the SQL Command Processor, as in:
    begin
    execute immediate 'drop table "table1"';
    execute immediate 'drop table "table2"';
    end;
    Joel

  • How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?

    How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?
    I tried using DROP Tables, Truncate Database, Delete and many more but it is not working.  I want to delete all tables using Query Analyzer, i.e. through SQL Query.
    Please help me out in this concern.
    Nishith Shah

    Informative thread indeed. Wish I saw it early enough. Managed to come up with the code below before I saw this thread.
    declare @TTName Table
    (TableSchemaTableName
    varchar
    (500),
    [status] int
    default 0);
    with AvailableTables
    (TableSchemaTableName)
    as
    (select
    QUOTENAME(TABLE_SCHEMA)
    +
    +
    QUOTENAME(TABLE_NAME)
    from
    INFORMATION_SCHEMA.TABLES)
    insert into @TTName
    (TableSchemaTableName)
    select *
    from AvailableTables
    declare @TableSchemaTableName varchar
    (500)
    declare @sqlstatement nvarchar
    (1000)
    while 1=1
    begin
    set @sqlstatement
    =
    'DROP TABLE '
    + @TableSchemaTableName
    exec
    sp_executeSQL
    @sqlstatement
    print
    'Dropped Table : '
    + @TableSchemaTableName
    update @TTName
    set [status]
    = 1
    where TableSchemaTableName
    = @TableSchemaTableName
    if
    (select
    count([Status])
    from @TTName
    where [Status]
    = 0)
    = 0
    break
    end

  • How to drop the tables (articles) in subscription database MERGE replication.

    We have configured the merge replication from publication server to subscription server,
    Here I mistakenly selecting few tables (articles) in publication,
    Now I need to remove those mistakenly selected tables in subscription server database . 
    Note: I am trying to below way but unable to remove those tables in subscription server.
    1<sup>st</sup> I unselected those tables (articles) in publication, but not working.
    Could please tell me the how to remove those tables in subscription database.

    Ok that is normal, dont worry, if you mistakenly  chosen few tables, just add the new tables
    that you forgot it, just make click on the publication, you only have to Re-run the snapshot agent, i mean you must generate another snapshot and then synchronice with your suscriber, and then you will not need DROP the tables on the suscriber, if you have
    troubles yet, please post imagens to help you more !
    Thanks and regards.

  • How to drop multiple tables in one statement

    I could used to run the below syntax to drop multiple tables in MS SQL, but it doesn't work in Oracle seems like, I am using free Oracle SQL Developer. Not a big deal but wanna know if this can be done. Thanks,
    DROP TABLE A, B, C, D, F

    I'm not so sure in 1 select statement is it possible or not but you can try to use in this manner to see what happens ->
    drop table &tab;
    Enter value for tab: A
    Table A Successfully dropped.
    Enter value for tab: B
    Table B Successfully dropped.Regards.
    Satyaki De.

  • How to drop all tables in perticular schema??

    Hi,
    I am new in oracle.
    I want to drop all tables in one perticular schema,
    Please tell me solution.
    PratHamesh

    If your few of your tables have referential intigrity constraints and trying to drop master table whithout droping child table first, oracle will produce an error.
    Better option would be to drop the entire schema and then create a new schema with the same name.
    on sql plus.
    set long size 20000
    select dbms_metadata.get_ddl('USER','USERNAME') from dual;
    --then save the above output to create the user later.
    drop username cascade
    use the above saved script to create the user again.
    Jaffar

  • How to drop a table in another schema.

    Hi there, was looking to drop a table that is currently created under GL schema when consolidation process is done. These tables are kind of temporary and stay there if consolidation process doesn't complete successfully.
    So, I'm try to execute a script that would drop the table but the particularity is that this drop isn'T executed by apps but with bolinf (custom user).
    So, while trying to delete it with bolinf, I always get an error message that the table doesn't exists or so.
    Here's the code
    r_gl_int_ctrl.INTERFACE_TABLE_NAME is retreived from gl_interface_control table and from INTERFACE_TABLE_NAME column.
    EXECUTE IMMEDIATE 'DROP TABLE GL.' || r_gl_int_ctrl.INTERFACE_TABLE_NAME;
    and this generates the following error : ORA-00942: table or view does not exist
    R12.0.6
    RDBMS 10.2.0.3.0
    Custom package under bolinf schema is trying to drop GL.GL_CONS_INTERFACE_38190 and it's not working. Nevertheless, if I install this package under apps, table get dropped.
    Is there a way that I can drop a GL table like GL.GL_CONS_INTERFACE_38190 from BOLINF schema ? If so, what privileges/grant should user BOLINF have in order to drop this table from a GL Schema ?
    Thank you.

    Hi;
    You need to give drop grant to your user.Easy way is to give
    GRANT DROP ANY TABLE TO USER; << but its mean it will give drop grant for all table.
    Also see:
    OERR: ORA 942 "table or view does not exist" [ID 18536.1]
    Regard
    Helios

Maybe you are looking for

  • Update an ADF Task Flow based on Human Task

    Hello friends, I'm working on Oracle BPM Suite 11g. So, I created a process including its human tasks. Later, I created a Task Flow based in the human task that I setup before. Now I added a new parameter to the human task and I need to update the ta

  • IPad Error" There was a problem saving some data to the devices cache"

    We have purchased the app Environmental Science Buddy and there are presentations that can be viewed but I receive the above mentioned error when trying to play them on our school network. Took an iPad home and just as I thought no problem loading th

  • ASM newly created diskgroup is not being used by RAC10GR2 Database

    Hi, I created new ASM diskgroup by using one of the RAC node through Grid control , it created new disk group successfully , I can see all the diskgroups in Grid control including newly created, but some how data is not moving into newly created disk

  • VNC on Oracle Linux 6.3

    Hi, I have just installed Oracle Linux 6.3 and I have noticed there is vncserver located in /usr/bin. So I start the vncserver using cd /usr/bin ./vncserver I am prompted for a password, which I supply. An authority file /root/.Xauthority is created

  • History is not coming

    When ever I look for History.I found nothing at there,as if I have not open any site.My Firfox is not saving the sites that I have visited.