Unable to Drop table from a corrupted Data Block

while exporting tables i got message data block corrupted 7481. and while i was trying to drop the table, found SQL Recursive Error.
Pls Help me. i am on the way to recreate my database..
Thanks
Rinson

Is 7481 the block number?. Block corruption can be diagnosed using the CLI (Command Line Interface) dbv (database verify). You can also diagnose it by looking for the corresponding error message in the alert.log.
Trying to recover data from a corrupt block is only possible using rman. Otherwise, the only thing you can do is to mark the block as corrupt using DBMS_REPAIR, rebuild the table and try to rescue data by recapturing it.

Similar Messages

  • Unable to drop materialized view with corrupted data blocks

    Hi,
    The alert log of our database is giving this message
    Wed Jan 31 05:23:13 2007
    ORACLE Instance mesh (pid = 9) - Error 1578 encountered while recovering transaction (6, 15) on object 13355.
    Wed Jan 31 05:23:13 2007
    Errors in file /u01/app/oracle/admin/mesh/bdump/mesh_smon_4369.trc:
    ORA-01578: ORACLE data block corrupted (file # 5, block # 388260)
    ORA-01110: data file 5: '/u03/oradata/mesh/mview.dbf'
    No one is using this mview still oracle is trying to recover this transaction (6, 15).
    when i tried to drop this mview it gives me this error
    ERROR at line 1:
    ORA-01578: ORACLE data block corrupted (file # 5, block # 388260)
    ORA-01110: data file 5: '/u03/oradata/mesh/mview.dbf'
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2255
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2461
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2430
    ORA-06512: at line 1
    I have tried to fix the corrupted data blocks by using dbms_repair package, but of no use.
    I have marked this block to be skipped by using dbms_repair.skip_block but still unable to drop it.
    Please suggest what should I do?
    Thanks in advance
    Anuj

    You are lucky if only your undesirable MV is affected by theese corrupted blocks. This is an advice to do a complete-super-full-hot-cold-middle backup of ypur database and search for any disk for a "possible replace".
    God save us!

  • Unable to retrieve tables from this connection

    I have been using Dreamweaver for over 5 years. I have been
    using an Access database and ASP the entire time. I am using a
    Windows 2000 server for the database and web site. I have used
    every verson of Dreamweaver since Ultra Dev. When I bought verson 8
    and upgraded to 8.0.2, I began getting the following message when I
    try to edit or create a recordset.
    "Unable to retrieve tables from this connection, click on the
    'Define...' button to test this connection."
    I don't know what to do. Is this a widespread problem? Is it
    a Windows problem? Is it a Dreamweaver problem? Is it a network
    problem?
    Please HELP!

    Did you ever get an answer for this ?
    I am having the same issue but using XP professional.

  • Obtaining the name of a table from it's data

    Hello,
    i have a strange need ... i would like to obtain the name of a table from it 's data !!!!
    Thank's in advance.

    ALTER TABLE t
    ADD (table_name VARCHAR2(30));
    then
    SELECT table_name FROM T;Though, as Martin said, I don't know how you get the data if you don't know the name of the table.

  • Unable to drop table

    Hello,
    I'm currently tring to drop a table using a process trigered by a button click
    Icreated my button and also a "PL/SQL process" and I put
    DROP TABLE &P0_TABLE_NAME. CASCADE CONSTRAINTS;
    inside field "source" with ticking the checkbox "Do not validate PL/SQL code (parse PL/SQL code at runtime only)."
    But when a click on the button I have the following error
    ORA-06550: line 1, column 7: PLS-00103: Encountered the symbol "DROP" when expecting one of the following: begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe
         Error      Error while dropping table
    OK      
    Do anyone have a clue about this ?
    Debug trace is
    A C C E P T: Request="Purge"
    0.00: Metadata: Fetch application definition and shortcuts
    0.00: alter session set nls_language="AMERICAN"
    0.00: alter session set nls_territory="AMERICA"
    0.00: ...NLS: Set Decimal separator="."
    0.00: ...NLS: Set NLS Group separator=","
    0.00: ...NLS: Set date format="DD-MON-RR"
    0.00: ...Setting session time_zone to +02:00
    0.00: NLS: wwv_flow.g_flow_language_derived_from=0: wwv_flow.g_browser_language=en-us
    0.00: Fetch session state from database
    0.01: ...Check session 2289784661666743 owner
    0.01: ...Check for session expiration:
    0.01: ...Metadata: Fetch Page, Computation, Process, and Branch
    0.01: Session: Fetch session header information
    0.01: ...Metadata: Fetch page attributes for application 121, page 2
    0.01: ...Validate item page affinity.
    0.03: ...Validate hidden_protected items.
    0.03: ...Check authorization security schemes
    0.03: Session State: Save form items and p_arg_values
    0.03: ...Session State: Save "P0_TABLE_NAME" - saving same value: "STATPHI_595730051"
    0.04: ...Session State: Save "P2_TABLE_NAME" - saving same value: "STATPHI_595730051"
    0.04: ...Session State: Save "P2_TYPE" - saving same value: "2"
    0.04: ...Session State: Save "P2_CALENDAR" - saving same value: "PA"
    0.04: ...Session State: Save "P2_FILE_NAME" - saving same value: ""
    0.04: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
    0.04: Branch point: BEFORE_COMPUTATION
    0.04: Computation point: AFTER_SUBMIT
    0.04: Tabs: Perform Branching for Tab Requests
    0.04: Branch point: BEFORE_VALIDATION
    0.04: Perform validations:
    0.04: Branch point: BEFORE_PROCESSING
    0.04: Processing point: AFTER_SUBMIT
    0.04: Item button "P2_PURGE_TABLE" pressed process.
    0.04: ...Process "DROP TABLE": PLSQL (AFTER_SUBMIT) DROP TABLE &P0_TABLE_NAME. CASCADE CONSTRAINTS;
    0.06: Encountered unhandled exception in process type PLSQL
    0.06: Show ERROR page...
    0.06: Performing rollback...
    ----

    Hi user631592 ;-)
    You can't used directly a DDL statment.
    But you can use an EXECUTE IMMEDIATE in your process.
    SO
    BEGIN
    EXECUTE IMMEDIATE ' DROP TABLE STATPHI_595730051';
    END;
    Regards

  • Drop Tables from Excel

    This is my code that I want to excecute using ORAOLEDB driver in Excel. It executes fine from Rapid/SQL but it will not run in Excel and I am not finding any docuemntation on much of anything to do with oraOLEDB.
    Declare
    PROCEDURE DropTable (tbl IN VARCHAR2) AS
    in_Exists int;
    BEGIN
    select count(*) into in_Exists from all_tables where UPPER(table_name) = upper(tbl);
    IF in_exists > 0 THEN
    EXECUTE IMMEDIATE ('DROP TABLE ' || upper(tbl) || ' CASCADE CONSTRAINTS PURGE');
    COMMIT;
    END IF;
    END;
    BEGIN
    DropTable('tmpEMP');
    DropTable('NOMSEmplExtract');
    DropTable('NOMSEmplRegionDX');
    DropTable('NOMSEmplRegionSubG');
    DropTable('NOMSEmplState');
    END;

    877648 wrote:
    My goal for all this is.
    To run a main set of quiries to get the data formated the way I want, then for serveral worksheets I will do quries off the main query to get the specific data. So using Temp tables may not always be the way I need to go.
    The error when running the Main query is this (I think this may be because it does not return data, but not sure).
    "The Query did not run, or the database table could not be opened.
    Check the database server or contract your database administrator. Make sure the external database is available and hasn't been moved or reorganized, then try the operation again."Well, that's not much information to go on. :-/
    a) Running queries off a main query is tantamount to a query loop and sounds like it'll be slow. If you really can't do it all in a single query then fair enough, but always aim to incorporate everything in a 1 hit query if you can so that all the work is done in the SQL engine, which is the best place for processing data.
    b) The fact the "query did not run", I'm guessing is referring to you calling that procedure you've shown us? (If not show us what it is doing at the time). If that procedure is not running you need to determine why not, so perhaps add some debug messages (log them to a table or something with an autonomous transaction procedure) and see how far it gets. It could be something as simple as needing explicitly granted permissions on those tables rather than relying on role based grants. It could also be to do with dependencies, because dropping tables at run time can render other things "invalid", which is why Oracle provides Global Temporary Tables so you don't have to create and drop tables at run time.

  • Drop tables from USERS tablesapce

    Hello,
    I am newbie to Oracle
    1) I want to DROP all tables we created except from those that begins with QNT letters. I tried
    BEGIN
    FOR T IN (SELECT TABLE_NAME FROM USER_TABLES)
    LOOP
    EXECUTE IMMEDIATE ('DROP TABLE MyUserName.' || T.TABLE_NAME);
    END LOOP;
    END;
    but I get error
    ORA-00933: SQL command not properly ended
    or when changing line 4
    EXECUTE IMMEDIATE ('DROP TABLE ' || T.TABLE_NAME);
    I get
    ORA-00903: Invalid table name
    What's the problem? How Can I ignore QNTxxxx tables?
    2) In addition, I get error when log in to Oracle Schema Manager (though, I log in successfully to SQL WorkSheet)
    MGR-02150: an unrecognized database version was encountered.
    why?
    The server app is 10g, and my computer client app is 8.0.5
    Your help will be appreciated,
    Ori

    note: I made little change: 'Q' instead of 'QNT'
    On sql plus i got error
    ERROR at line 1:
    ORA-06550: line 2, column 0:
    PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
    := . ( @ % ;
    And on sql worksheet the result is:
    SQLWKS> DECLARE v_sql VARCHAR2(50);
    2> BEGIN FOR t IN ( SELECT table_name FROM user_tables WHERE SUBSTR(table_name,1,1) <> 'Q' ) LOOP v_sql := 'drop table ' || t.table_name;
    3> EXECUTE IMMEDIATE v_sql;
    4> END LOOP;
    5> EXCEPTION WHEN OTHERS THEN RAISE_APPLICATION_ERROR ( -20000 , 'Error executing command:' || CHR(10) || v_sql , TRUE );
    6> END;
    7>
    ORA-20000: Error executing command:
    drop table Table1
    ORA-06512: at line 5
    ORA-00942: table or view does not exist

  • Drop tables from cat

    Hi all,
    How can delete 100 tables and clean all catalog?
    with select * from cat I found 100 tables and i need drop
    one by one drop table1, drop table 2...drop table100 using SQL command line.
    Is any complete delete (drop) all options in apex 3.1?
    Thanks all,

    I was typing this :
    declare
    begin
    select table_name bulk collect into tab_table_name from cat where table_name like 'B%';
    for i in 1..tab_table_name.count
    loop
    begin
    execute immediate 'drop table '||tab_table_name(i);
    exception
    when others then
    dbms_output.put_line('Error while dropping table '||tab_table_name(i)||' due to '||sqlerrm);
    end;
    end loop;
    exception
    when others then
    dbms_output.put_line(sqlerrm);
    end;
    I have this message:
    Error while dropping table BIN$Obn6Hki7qvfgQESYCLUEeQ==$0 due to ORA-00933: SQL command not properly ended
    Error while dropping table BIN$Obn7FW+Jn9vgQESYCLV3xw==$0 due to ORA-00933: SQL command not properly ended
    Error while dropping table BIN$ObqWpufAzn3gQESYCLVFAA==$0 due to ORA-00933: SQL command not properly ended
    Error while dropping table BIN$Obs+3SfHO+TgQESYCLViSw==$0 due to ORA-00933: SQL command not properly ended
    Error while dropping table BIN$Obs09yg3PA3gQESYCLVBqg==$0 due to ORA-00933: SQL command not properly ended

  • Need to create a procedure whic h search and drop tables from the db.

    Dear Gurus,
    I need to create a procedure, which first checks the tables and then drop those tables if find in the database. For example, I have 5 tables, then my procedure should first checks the existence , then drop all those 5 tables from the database. Actually, I have to attach this procedure to report buildeer, so please keep in mind the above mentioned scenario. Your input will be highly appriciated.
    hare krishna
    Alok

    Dropping 5 tables each time user hits the report!!! (According to my understanding)
    I would like to share my experience. My group developed many complex reports, we used oracle jobs to run the complex queries time to time, according to our business requirements and stored the result in a final table. Just for viewing at front end level, we used a simple select statement.
    -aijaz

  • SET_BLOCK_PROPERTY('QUERY_DATA_SOURCE_NAME') with FROM clause query data block

    Two block :
    - Block A based on table
    - Block B based on FROM clause query
    In WHEN-NEW-RECORD-INSTANCE of block A, I perform a SET_BLOCK_PROPERTY('BLOCK_B','QUERY_DATA_SOURCE_NAME','(...)'); and then query block B (... depends on value taken by 'code' column in block A).
    At runtime it works till 'code' does not change (query_data_source_name does not change) but when I navigate to a record having a different 'code', it got the folowing message :
    41380 - Cannot set the blocks query data source.
    Any idea or suggestion ?

    Hello all i m trying dynamically change query_data_source_name but its not working.
    i did the followings
    Forms(10g2) block level:Query_data_source_type
    Query_data_source_name:SELECT 1,2,3,4,5 FROM dual;
    in control Block:
    when_button_press my code is
    GO_BLOCK('blk_query');
    Clear_Block(No_Validate);
    set_block_property('blk_query',query_data_source_name,
    'SELECT col1,col2,col3,col4,col5 FROM mytable');
    execute_query;
    same result:unable to query error.
    any one can help me regarding this issue.

  • Using a second table in a Database Data Block ??

    In a Form, I have a Data Block which is a Database Data Block. The Items are associated with columns in a table.
    I want the items in this repeating block to show in a different order. To do this, I need to use a second table and say where table1.key = table2.key ....
    I keep getting problems at runtime with
    ORA-00918: column ambiguously defined
    I tried to qualify everywhere a column name is used. When I do show error it shows
    SELECT ROWID, ....
    And then the "column ambiguously defined".
    I do not have an item in my Form for ROWID. Maybe it is automatic. (This form DOES do update).
    Is it possible to use two tables in a Data Block like this?
    Thanks

    If you only need to order the records in the block, why not defining the "ORDER BY" clause in the block's property??
    Set the "ORDER BY" clause at design time from the property palette of the block or runtime with column of your choice.
    at runtime your can use:
    SET_BLOCK_PROPERTY('your_block', ORDER_BY, 'your_column');If you need to join to tables in one block read the [Block Based on Join|http://www.oracle.com/technology/products/forms/pdf/BlockOnAJoin.pdf] Documentation.
    Tony

  • Corrupted Data Block

    While doing a routine maintenance, I realized that my production database has two bad data block.
    select count(*) from v$database_block_corruption;
    COUNT(*)
    2I tried using blockrecover command in RMAN and quickly realized that we have already deleted the backup set that could have help us restored the corrupted blocks.
    Is there a way I could fix the corrupted block without the backup?
    Thank you,

    Pl see MOS Doc 28814.1 (Handling Oracle Block Corruptions in Oracle7/8/8i/9i/10g/11g)schavali
    Thank you, I will look at this document sometime today.

  • Unable to truncate table from plsql

    i want to collect stats as my query runs.
    i cannot do it from plsql
    declare
      -- Local variables here
      i integer;
    begin
      -- Test statements here
       SET AUTOTRACE ON;
    truncate  table plan_table;
    end;how do i do it.

    Hi,
    TRUNCATE TABLE is not a PL/SQL command; it's a SQL command.
    To run a purely SQL command in PL/SQL, use EXECUTE IMMEDIATE.
    SET AUTOTRACE isn't a PL/SQL command either; it's a SQL*Plus command, and I don't know of any way to run it except from the SQL*Plus command prompt.
    I think this is what you need to do:
    SET AUTOTRACE ON;
    declare
      -- Local variables here
      i integer;
    begin
      -- Test statements here
        EXECUTE IMMEDIATE 'truncate  table plan_table';
    end;

  • Unable to import table from database

    Hi,
    i am getting error connecting to database through oracle forms
    error:the connection has failed
    at the same time i can able to connect through sql devloper.suspected driver problem
    available driver:odbc3.5,oci11g not working
    thanks
    chinu

    Can you check the network connections ,if every thing is working fine then try to connect mannual from command mode
    $sqlplus system/<pwd>@connecting string
    Inmeantime send me error code for both import and network issue.
    Thanks
    satya

  • How create data block corruption for test DBMS_REPAIR

    Hello to all
    I wanna create data block corruption in a table for testing Dbms_repair
    is it possible ? if yes please say to me how I can do it ,by example please
    thanks

    thank you so much that link was helpful (specially it's last respond)
    I could create data block corruption and I tested DBMS_REPAIR and RMAN for data block recovery
    but now I got head spin that if we have rman backup from database so using dbms_repair is what for?
    while we can recover corrupted data blocks
    please guide me
    thanks

Maybe you are looking for