Cannot drop or recompile view

hi ,
i created a view and i wanted to change some criteria
when i tried to recompile or even to drop it just "hang" there or it's taking a real long time to execute the command
what could go wrong here ?
tks & rdgs

Is there any session already using this view? That can hold a lock and prevent compilation of the view again.
v$locked_object can give you more details.

Similar Messages

  • Cannot drop table

    Versions are Oracle 11.2.0.1.0 and SQL Developer 4.0.0.12 on Windows 7 Ultimate SP1.
    Hi
    I'm following the CBT Nuggets SQL Fundementals training (video #11) and cannot drop a table I have just created.  The command executed and error are:
    drop table newprods;
    Error starting at line : 1 in command -
    drop table newprods
    Error report -
    SQL Error: ORA-00604: error occurred at recursive SQL level 1
    ORA-20000: Cannot drop object
    ORA-06512: at line 2
    00604. 00000 -  "error occurred at recursive SQL level %s"
    *Cause:    An error occurred while processing a recursive SQL statement
               (a statement applying to internal dictionary tables).
    *Action:   If the situation described in the next error on the stack
               can be corrected, do so; otherwise contact Oracle Support.
    As the HR user I created two tables and created a FK constraint between them.  After truncating the table with this FK, I am unable to drop it.  Even if I remove the FK, the error is the same.  Issing the command in SQL*Plus gives the same error.
    This is the first time I have created any tables since installing Oracle on this machine and is my first attempt at dropping a table.  I have not created any sequences, triggers or views based on these newly created tables.
    Does anyone have any ideas?
    Cheers

    C:\Oracle>sqlplus hr@orcl
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Sep 4 18:58:55 2013
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> CREATE TABLE table1 (column1 VARCHAR2(20 BYTE));
    Table created.
    SQL> select * from table1;
    no rows selected
    SQL> drop table table1;
    drop table table1
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-20000: Cannot drop object
    ORA-06512: at line 2
    SQL>
    Can I run a query to see if there are any triggeres on the table?
    EDIT: Ok it looks like no triggers:
    SQL> show user
    USER is "SYS"
    SQL> select * from DBA_TRIGGERS where table_name like '%table1%';
    no rows selected
    SQL> select * from USER_TRIGGERS where table_name like '%table1%';
    no rows selected

  • Cannot drop cube or analytic workspace due to ORA-37409

    The error is ORA-37409: cannot delete or truncate AW used by CUBE ORGANIZED table.
    This seems very closely related to the bug discussed in this thread: Drop cube organized table
    We need to drop and rebuild a cube due to a design change. It looks like there are some CR$ tables related to the cube preventing the drop.
    We cannot drop the CR$ table, nor can we drop the cube, nor can we drop the analytic workspace. We have tried disabling materialized view refresh on the cubes (which works but leaves the CR$ tables out there). We have tried the drop using dbms_aw.aw_delete and with dbms_cube.import_xml (to remove everything). No such luck.
    Is there a workaround you can give me that will allow us to drop the CR$ tables? Or a workaround that will allow us to drop the workspace?

    Update:
    Our last attempt to drop the analytic workspace did remove almost all OLAP metadata. However, there were still rows in sys.olap_tab$ with object IDs relating the problem CR$ tables. In a test database, we confirmed that deleting these rows does allow us to drop the CR$ tables that cannot otherwise be dropped. However, running DML against a sys-owned table like this is unwise at best, and certainly an unsupported workaround (unless we can get Oracle's blessing to do it).
    We may go through MOS and see if Oracle can provide a one-off patch for the bug listed above, to correct this situation. Or perhaps they may be able to provide some other direction.
    This puts us in a situation where our only immediate option may be to uninstall the OLAP option and reinstall it.

  • Cannot Drop Database

    This is the error and the additional info:
    An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in EntityFramework.SqlServer.dll
    Additional information: Cannot drop the database 'master' because it is a system database.
    I am using the code first MVC data context method,
    originally I created a database using the:
    public class CustomDatabaseInitializer : CreateDatabaseIfNotExists<DataContext>
    it worked and created a data base fine called Master.
    Then I added SimpleMembership and used this method:
    public
    classCustomDatabaseInitializer:
    DropCreateDatabaseIfModelChanges<DataContext>
    but it gives the preceding error, does anyone know about this?
    irwinindy
    Problem Resolved. Thank You,
    This was the ConnectionString and I created the master because that was the Calalog="Master" I changed to Catolog="CodedInventoryDEV"
    <addname="CodedInventoryDEV"connectionString="Data
    Source=(localdb)\ProjectsV12;Initial Catalog=CodedInventoryDEV;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False"providerName="System.Data.SqlClient"/>

    Hello,
    >>it worked and created a data base fine called Master.
    I am a bit confused how you create the master database, because this database is a
    system database which exists as soon as the database instance is created and we cannot drop it. As far as I know, for the database name in code first approach, it follows the
    rule: its namespace + class name.
    By default, it uses its namespace + class name as the database name, please check if you use the mode.
    I am not sure if you have specify the database to the “master” by using ways described in this
    blog(Point 7), if you have, I do not suggest that you use that key word in database, please use other name instead.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Newbie to SJSC : Cannot drop component onto page NoClassDefFoundError

    Hello,
    I recently downloaded and installed Sun Java Studio Creator 2 (SJSC) and was trying the tutorial to get myself familiarized with it.
    I cannot drop any JSF (not even standard or basic) onto the page1 JSP, i get this error:
    ********* Exception occurred ************ at 10:45 AM on Mar 21, 2006
    java.lang.NoClassDefFoundError: com/sun/jsfcl/xhtml/FramesetFrameset
            at com.sun.rave.designer.DndHandler.createBeans(DndHandler.java:1425)
            at com.sun.rave.designer.DndHandler.importBean(DndHandler.java:868)
            at com.sun.rave.designer.DndHandler.importItem(DndHandler.java:702)
            at com.sun.rave.designer.DndHandler.importDataDelayed(DndHandler.java:376)
            at com.sun.rave.designer.DndHandler.access$000(DndHandler.java:114)
            at com.sun.rave.designer.DndHandler$1.run(DndHandler.java:298)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    [catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)I think that this error is NOT related to the upgrade issues related to "You cannot drop components on plan HTML documents, only on web forms."
    I have read the forum extensively but cannot find any helpful topics so i decided to post.
    I really appreciate your time for reading this far, if you have any ideas, please llet me know.
    Thank you very much!!!!
    Federico Vela

    Sandeep,
    Thank you for your reply.
    Although it did not fix the issue, reinstalling to c:/sun/creator did change the error!
    I get the big ugly red bar in the design view that says there are errors on the page.
    Now the problem is an undefined symbol on the inheritance of the page
    public class Page1 extends AbstractPageBean***cannot find symbol AbstractPageBean******
    If i scroll up to the import statement
    import com.sun.rave.web.ui.appbase.AbstractPageBean;***package com.sun.rave.web.ui.appbase does not exist*****
    furthermore, if i try to compile i get the following error
    C:\Documents and Settings\Federico Vela\My Documents\Creator\Projects\HelloWebTutorial\nbproject\build-impl.xml:371: Warning: Could not find file C:\Program Files\Sun\Creator2\rave2.0\modules\autoload\ext\errorhandler.jar to copy.I will try your suggestion of deleting the user folder. I'll let you know if I make any progress. Thanks a bunch.!!!
    federico

  • ORA-02303: cannot drop or replace a type with type or table dependents

    Oracle 10.2.0.3 on solaris :
    I am trying to do a
    CREATE OR REPLACE TYPE WickType_StringArray AS TABLE OF VARCHAR2(256);
    I am getting the error :
    ORA-02303: cannot drop or replace a type with type or table dependents
    I then looked for the dependencies :
    select * from dba_dependencies where name = 'WICKTYPE_STRINGARRAY' and owner='HARPER';
    (Columns below with values are delimited by pipe | )
    OWNER|NAME|TYPE|REFERENCED_OWNER|REFERENCED_NAME|REFERENCED_TYPE|REFERENCED_LINK_NAME|DEPENDENCY_TYPE
    HARPER|WICKTYPE_STRINGARRAY|TYPE|SYS|STANDARD|PACKAGE||HARD     
    What is the best way for me to proceed to get my CREATE OR REPLACE statement working ?
    Thanks

    Well you could move to 11g but I'd suggest a less drastic measure for now. Save the data, drop the table, reload the table.
    But give serious consideration to Tom Kyte's advice about object tables: Don't use them. Instead use relational tables and object views.

  • Error: Cannot drop schema because it is being referenced by object

    My database has a schema with the same name as a user (let's call it 'username'). This schema was not explicitly created. I want to drop the User 'username' but I have to drop the schema 'username' first; However, when I tried to do that I got the message...
    "Cannot drop schema 'username' because it is being referenced by object 'vw_Inventory'
    There is a view named 'vw_Inventory' but I don't see where it's referencing this schema, or any schema for that matter. Why would I get this error and how do I resolve it so I can drop the Schema and User?
    Darrell H Burns

    If a Schema has some objects in it, then you cannot drop that Schema until you remove all the objects out of it. You can change the schema owner
    to another database principal and drop the user like,
    Alter Authorization ON Schema::username TO DBO; Drop User username;
    other option would be
    Transfer the username schema objects to a different schema and drop username schema and user like.
    Alter Schema DBO Transfer Username.[OBEJECTNAME] ;
    --need to repeat this until you transfer all objects under this schema
    Drop Schema username;
    Drop User username;
    Regards,
    Praveen D'sa
    MCITP - Database Administrator - 2008
    sqlerrors

  • ORA-00604 error occured at recursive level1,ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,ORA-06512

    Dear All,
         I created one table like
    create table cls_lrn_tab_unique (F_no number unique UK_F_NO );
    after performing some operations I want to delete the same.
    At that time i got following error. Please help me and tell what is the reason for the error.
    ORA-00604 error occured at recursive level1
    ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,
    ORA-06512 at line no 2
    Thanks and Regards
    Prasad

    26bffcad-f9a2-4dcf-afa0-e1e33d0281bf wrote:
    Dear All,
         I created one table like
    create table cls_lrn_tab_unique (F_no number unique UK_F_NO );
    after performing some operations I want to delete the same.
    At that time i got following error. Please help me and tell what is the reason for the error.
    ORA-00604 error occured at recursive level1
    ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,
    ORA-06512 at line no 2
    Thanks and Regards
    Prasad
    ORA-20123 is a localized/customized error code & message; therefore any solution depends upon what is unique inside your DB now.
    I suspect that some sort of TRIGGER exists, which throws posted error, but this is just idle speculation on my part.
    How do I ask a question on the forums?
    https://forums.oracle.com/message/9362002#9362002

  • Why do I receive this message? The Adobe Acrobat Reader that is running cannot be used to view PDF files in a browser. Please exit Adobe Acrobat Reader and your web browser and try again.

    The Adobe Acrobat Reader that is running cannot be used to view PDF files in a browser. Please exit Adobe Acrobat Reader and your web browser and try again.
    == This happened ==
    A few times a week
    == Early this year

    See these KB articles:
    https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox
    https://support.mozilla.com/en-US/kb/Opening+PDF+files+within+Firefox

  • HT1657 Hi All. I am new to this forum but hoping I can find some answers from some of you apple guru's out there. I have downloaded a mvie onto my iphone (which took forevere but I cannot find it to view it.Please help

    Hi All. I am new to this forum but hoping I can find some answers from some of you apple guru's out there. I have downloaded a mvie onto my iphone (which took forevere but I cannot find it to view it.Please help

    It should be in the Videos App - if it's not in there then have you got a film age rating set in Settings > General > Resttrictions that is hiding it ?

  • Can't drag and drop from page view

    Can't drag and drop from page view to desktop even though plus icon shows up for duplicating the page.  On Mac 10.9.2 Acrobat XI. I don't want to extract through the menu and associated dialogues.  Its slow and cumbersome.

    Hi Peterbruce,
    Acrobat for Windows will let you select pages in the Pages panel and drag them to your desktop, but that isn't an option in Acrobat for Mac OS. You can drag thumbnails from the Pages panel in one doc, to the Pages panel in another, however.
    Best,
    Sara

  • ORA-01940: cannot drop a connected user... No entries in v$session.

    Hi DBAs,
    Its on Linux Ubuntu... I want to drop a user. Getting error as below. When I check for connected sessions, I find no entries in v$session. Any other alternative? Please help!!!
    EGOVDBA@qadb> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    EGOVDBA@qadb> drop user egov_integrated cascade;
    drop user egov_integrated cascade
    ERROR at line 1:
    ORA-01940: cannot drop a user that is currently connected
    EGOVDBA@qadb> select username, osuser, machine, terminal, sid, serial# from v$session where username='EGOV_INTEGRATED';
    no rows selected
    EGOVDBA@qadb> drop user egov_integrated cascade;
    drop user egov_integrated cascade
    ERROR at line 1:
    ORA-01940: cannot drop a user that is currently connected

    oracle@hp2:~$ ps -ef | grep oracle
    oracle 7011 1 0 Mar31 ? 00:03:18 /orclins/u01/app/oracle/bin/tnslsnr LISTENER -inherit
    oracle 7166 1 0 Mar31 ? 00:00:08 ora_pmon_qadb
    oracle 7168 1 0 Mar31 ? 00:00:00 ora_psp0_qadb
    oracle 7170 1 0 Mar31 ? 00:00:16 ora_mman_qadb
    oracle 7172 1 0 Mar31 ? 00:01:32 ora_dbw0_qadb
    oracle 7174 1 0 Mar31 ? 00:01:47 ora_lgwr_qadb
    oracle 7176 1 0 Mar31 ? 00:00:08 ora_ckpt_qadb
    oracle 7178 1 0 Mar31 ? 00:00:42 ora_smon_qadb
    oracle 7180 1 0 Mar31 ? 00:00:00 ora_reco_qadb
    oracle 7182 1 0 Mar31 ? 00:00:09 ora_cjq0_qadb
    oracle 7184 1 0 Mar31 ? 00:00:06 ora_mmon_qadb
    oracle 7186 1 0 Mar31 ? 00:00:13 ora_mmnl_qadb
    oracle 7188 1 0 Mar31 ? 00:00:00 ora_d000_qadb
    oracle 7190 1 0 Mar31 ? 00:00:00 ora_s000_qadb
    oracle 7275 1 0 Mar31 ? 00:00:00 ora_qmnc_qadb
    oracle 7277 1 0 Mar31 ? 00:00:00 ora_q000_qadb
    oracle 7280 1 0 Mar31 ? 00:00:00 ora_q001_qadb
    oracle 7765 1 0 Mar31 ? 00:00:01 oracleqadb (LOCAL=NO)
    oracle 7767 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 7769 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 7771 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 7773 1 0 Mar31 ? 00:00:01 oracleqadb (LOCAL=NO)
    oracle 17325 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17327 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17329 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17331 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17333 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17337 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17339 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17341 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17343 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 17345 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 20219 1 15 Mar31 ? 02:07:49 oracleqadb (LOCAL=NO)
    oracle 20221 1 16 Mar31 ? 02:11:16 oracleqadb (LOCAL=NO)
    oracle 20227 1 15 Mar31 ? 02:00:44 oracleqadb (LOCAL=NO)
    oracle 20229 1 13 Mar31 ? 01:46:38 oracleqadb (LOCAL=NO)
    oracle 20376 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 20378 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 20380 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 20382 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 20384 1 0 Mar31 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 21336 1 0 00:00 ? 00:04:15 ora_j000_qadb
    oracle 24611 1 0 07:50 ? 00:00:00 oracleqadb (LOCAL=NO)
    root 25225 6477 0 08:37 ? 00:00:00 sshd: oracle [priv]
    oracle 25227 25225 0 08:37 ? 00:00:00 sshd: oracle@pts/0
    oracle 25228 25227 0 08:37 pts/0 00:00:00 -bash
    oracle 25273 1 0 08:41 ? 00:00:02 ora_j001_qadb
    oracle 26011 1 0 09:27 ? 00:00:00 oracleqadb (LOCAL=NO)
    oracle 26012 25228 0 09:27 pts/0 00:00:00 ps -ef
    oracle 26013 25228 0 09:27 pts/0 00:00:00 grep oracle
    oracle@hp2:~$

  • Cannot drop the table because it does not exist in the system catalog. Transaction context in use by another session

    Hi Every one,
    An error has occurred during report processing. (rsProcessingAborted)
    Get Online Help
    Query execution failed for data set 'NonFinTran'. (rsErrorExecutingCommand)
    Get Online Help
    Cannot drop the table '#NonFinTran', because it does not exist in the system catalog. Cannot drop the table '#MultipleNonFinTran',
    because it does not exist in the system catalog. Transaction context in use by another session.
    NOTE: NonFinTran &
    MultipleNonFinTran are
    the Temp table in my storedPoc.
    Please any help me to solve this issue. 
    Thanks & Regards,
    Anil Kumar
    Anil Kumar

    Hi Harsh,
     Below is my Stored Proc
    SELECT @ServerName=datasource from master.dbo.sysservers WHERE catalog='Voyager'    
     SELECT @ServerName3=datasource from master.dbo.sysservers WHERE catalog='AuditLog'    
     SELECT @ServerName2=datasource from master.dbo.sysservers WHERE catalog='Portal'    
     IF @ServerName IS NOT NULL SET @ServerName='[' + @ServerName + '].' ELSE SET @ServerName=''    
     IF @ServerName3 IS NOT NULL SET @ServerName3='[' + @ServerName3 + '].' ELSE SET @ServerName3=''    
     IF @ServerName2 IS NOT NULL SET @ServerName2='[' + @ServerName2 + '].' ELSE SET @ServerName2=''    
     IF Exists(Select * From tempdb.dbo.SysObjects Where Name Like '#NonFinTran%')     
      DROP TABLE #NonFinTran    
     IF Exists(Select * From tempdb.dbo.SysObjects Where Name Like '#MultipleNonFinTran%')     
      DROP TABLE #MultipleNonFinTran    
     CREATE TABLE #NonFinTran (FirstName VARCHAR(40), TaxId VARCHAR(40), TrxID VARCHAR(40), Status VARCHAR(255), Field1 VARCHAR(255), Field2 VARCHAR(255),    
       Field3 VARCHAR(255), Field4 VARCHAR(255), Field5 VARCHAR(255), Field6 VARCHAR(255), DateTime DATETIME,     
       BranchID CHAR(3), BankID CHAR(1), FromAccountID VARCHAR(255), FromAccountType VARCHAR(255))    
     CREATE TABLE #MultipleNonFinTran (FirstName VARCHAR(40), TaxId VARCHAR(40), TrxID VARCHAR(40), Status VARCHAR(255), Field1 VARCHAR(255), Field2 VARCHAR(255),    
       Field3 VARCHAR(255), Field4 VARCHAR(255), Field5 VARCHAR(255), Field6 VARCHAR(255), DateTime DATETIME,     
       BranchID CHAR(3), BankID CHAR(1), FromAccountID VARCHAR(255), FromAccountType VARCHAR(255))     
    INSERT #NonFinTran    
     EXEC('SELECT FirstName, TaxID,     
      TrxID, Status, TrxField1, TrxField2, TrxField3, TrxField4, TrxField5, TrxField6, DateTime, '''', '''', '''', ''''    
     FROM ' + @ServerName3 + 'AuditLog.dbo.CCAuditLogEntryView AS Audit, ' + @ServerName + 'Voyager.dbo.CCUser AS CCUser    
     WHERE CCUser.UserID = Audit.UserID     
      AND Audit.Succeeded = 1     
      AND Audit.TrxID IN (''ChangeBillPayDefaultAccountEdit'',''ChangeExpiryUserPassword'',''ChangePasswordEdit'',    
       ''ChangeUserPassword'',''ManageAddressMaint'',''ManageContactMaint'',''ManageSecretQuestionAnswerEdit'',    
       ''ManageTransLimitMaint'',''OtherBankAccountMaintAdd'',''OtherBankAccountMaintDelete'',''OtherBankAccountMaintEdit'',    
       ''WithinAmBankAccountMaintAdd'',''WithinAmBankAccountMaintDelete'',''WithinAmBankAccountMaintEdit'',    
       ''SetAccountMaskPreferenceAudit'',''ChangeLoginIdAudit'')     
      AND DATEDIFF(DAY, CONVERT(DATETIME, CONVERT(VARCHAR(10), ''' + @StartDate + '''), 103), Audit.DateTime) >= 0     
      AND DATEDIFF(DAY, CONVERT(DATETIME, CONVERT(VARCHAR(10), ''' + @EndDate + '''), 103), Audit.DateTime) <= 0 ')    
     INSERT #MultipleNonFinTran    
     EXEC('SELECT DISTINCT FirstName, TaxID,     
      TrxID, Status, TrxField1, TrxField2, TrxField3, TrxField4, TrxField5, TrxField6, Audit.DateTime as AuditDateTime,    
    (SELECT DISTINCT SUBSTRING(A.BranchCode,3,3)  FROM ' + @ServerName + 'AuditLog.dbo.CCAuditLogEntryView X INNER JOIN ' + @ServerName + 'Voyager.dbo.CCuser U
    ON X.UserId = U.UserId INNER JOIN ' + @ServerName + 'Voyager.dbo.AMHZ_CustomerProfile P ON P.EnrolId = U.TAXID 
    INNER JOIN ' + @ServerName + 'Voyager.dbo.AMHZ_AccountListing A ON A.CIFNO = P.CIFNO
    WHERE X.UserId = Audit.UserId AND A.AccountNo = SUBSTRING(Audit.TrxField1,11,16) AND P.CIFNO = A.CIFNO
    AND (SUBSTRING(A.BranchCode,3,3) <> NULL OR SUBSTRING(A.BranchCode,3,3) <> '''')
    AND CHARINDEX(''AccountID='', Audit.TrxField1, 1) > 0),
      SUBSTRING(TrxField1,14,1), CASE WHEN CHARINDEX(''AccountID='', TrxField1, 1) > 0 THEN     
      SUBSTRING(TrxField1,11,16) ELSE '''' END, CASE WHEN CHARINDEX(''AccountType='', TrxField2, 1) > 0 THEN SUBSTRING(TrxField2,13,3) ELSE '''' END    
     FROM ' + @ServerName3 + 'AuditLog.dbo.CCAuditLogEntryView AS Audit, ' + @ServerName + 'Voyager.dbo.CCUser AS CCUser    
     WHERE CCUser.UserID = Audit.UserID     
      AND Audit.Succeeded = 1     
      AND Audit.TrxID IN (''SetAccountAttributesAudit'',''SetAccountFriendlyNameAudit'',    
      ''AccountProfileMaintULDelete'',''AccountProfileMaintLHAAdd'',''AccountProfileMaintLSCAdd'')
      AND DATEDIFF(DAY, CONVERT(DATETIME, CONVERT(VARCHAR(10), ''' + @StartDate + '''), 103), Audit.DateTime) >= 0     
      AND DATEDIFF(DAY, CONVERT(DATETIME, CONVERT(VARCHAR(10), ''' + @EndDate + '''), 103), Audit.DateTime) <= 0 ')  
      SET @stmt = '    
     SELECT * FROM    
     SELECT BranchName,
     CASE WHEN SUBSTRING(FromAccountID,1,6) IN (''519901'',''559409'')  THEN ''DC''  
    ELSE       
     CASE FromAccountType WHEN ''01'' THEN ''SA '' WHEN ''02'' THEN ''CA '' WHEN ''03'' THEN ''FD ''     
        WHEN ''SA'' THEN ''SA '' WHEN ''CA'' THEN ''CA '' WHEN ''FD'' THEN ''FD '' ELSE FromAccountType + '' ''    
     END 
     END +     
    case when Len(FromAccountID) =16 Then  
       CASE FromAccountType WHEN ''VC'' THEN   
       SUBSTRING(FromAccountID,1,6)+''******''+SUBSTRING(FromAccountID,13,4)      
    WHEN ''MC'' THEN SUBSTRING(FromAccountID,1,6)+''******''+SUBSTRING(FromAccountID,13,4)  END  
         when Len(FromAccountID) =15 Then 
    CASE FromAccountType WHEN ''VC'' THEN   
       SUBSTRING(FromAccountID,1,6)+''******''+SUBSTRING(FromAccountID,13,3)      
    WHEN ''MC'' THEN SUBSTRING(FromAccountID,1,6)+''******''+SUBSTRING(FromAccountID,13,3)  END  
         ELSE FromAccountID   
    ENd  
     AS FromAcctNo,    
     CASE TrxId  
     WHEN ''AccountProfileMaintLHAAdd'' THEN ''Link Account/Card''    
     WHEN ''AccountProfileMaintLSCAdd'' THEN ''Link Account/Card''    
     WHEN ''APMFamilyFirstAdd'' THEN ''Link Family First Account''    
     WHEN ''AccountProfileMaintULDelete'' THEN ''Unlink Account/Card''    
     WHEN ''BalInqFD'' THEN CASE  WHEN Field3 IN (''APMLink=SUCCESS'') THEN ''APMLink Success'' ELSE ''Fixed Deposit Balance Inquiry'' END  
     WHEN ''BalInqCASA'' THEN CASE  WHEN Field3 IN (''APMLink=SUCCESS'') THEN ''APMLink Success'' ELSE
         CASE WHEN FromAccountType IN (''SA'',''01'') THEN ''Savings Account Balance Inquiry'' 
        ELSE ''Current Account Balance Inquiry'' 
       END 
      END    
     WHEN ''StopCheck'' THEN ''Stop Cheque Request''    
     WHEN ''CheckReorder'' THEN ''Order Your Cheque''    
     WHEN ''CheckInquiry'' THEN ''Cheque Inquiry''    
     WHEN ''TransHistFD'' THEN ''Fixed Deposit Transaction History''    
     WHEN ''TransHistCASA'' THEN    
      CASE WHEN FromAccountType IN (''SA'',''01'') THEN ''Savings Account Transaction History'' ELSE ''Current Account Transaction History'' END    
     WHEN ''StmtInqCC'' THEN    
      CASE WHEN FromAccountType IN (''DR'',''03'') THEN ''Debit Card Statement Inquiry'' ELSE ''Credit Card Statement Inquiry'' END    
     WHEN ''StmtInqDA'' THEN    
      CASE WHEN FromAccountType IN (''SA'',''01'') THEN ''Savings Account Statement Inquiry'' ELSE ''Current Account Statement Inquiry'' END    
     WHEN ''StmtReq'' THEN ''Printed Statement Request''    
     WHEN ''StmtInqIAMSTAR'' THEN ''E-AMSTAR Statement Inquiry''    
     WHEN ''Repayment/Transfer Inquiry'' THEN ''Repayment/Transfer Inquiry''    
     WHEN ''Account Inquiry'' THEN ''Account Inquiry''    
     WHEN ''Payment Inquiry'' THEN ''Payment Inquiry''    
     END AS TransType,    
     FirstName AS CustomerName,    
     TaxId, CONVERT(VARCHAR, DateTime, 103) AS Date, CONVERT(VARCHAR, DateTime, 108) AS Time    
     FROM #NonFinTran, ' + @ServerName3 + 'Portal.dbo.TB_Branch AS TB_Branch    
     WHERE     
     BranchId = TB_Branch.BranchCode     
     AND (TB_Branch.InstCode IN (''00001'', ''00003'',''001'',''002''))    
     AND (FromAccountType IN (''SA'', ''CA'', ''FD'', ''01'', ''02'', ''03'')))'    
    EXEC (@stmt)
    IF Exists(Select * From tempdb.dbo.SysObjects Where Name Like '#NonFinTran%')     
     DROP TABLE #NonFinTran    
     IF Exists(Select * From tempdb.dbo.SysObjects Where Name Like '#MultipleNonFinTran%')     
      DROP TABLE #MultipleNonFinTran    
    Anil Kumar

  • Cannot drop old undo tablespace. Cause: active rollback segment

    dear all.
    db: oracle 10.2.0.1
    os: rhel as version 5 64 bits.
    This is a testing database. And my database is online and open. But i can free the external usb disk that contains my ols undotbs.
    I want to drop old undo tablespace but this is not possible.
    1.- In order to open my database i had my datafile( '/mnt/hdext/back_plelds/undotbs02.dbf') offline drop, and then i can to open my database.
    2.- When i try to delete my old undo tablespace im getting this error:
    SQL> drop tablespace undotbs1 including contents and datafiles;
    drop tablespace undotbs1 including contents and datafiles
    ERROR at line 1:
    ORA-01548: active rollback segment '_SYSSMU1$' found, terminate dropping
    tablespace
    3.- My default undo_tablespace is another that i was created before step 1.
    SQL> sho parameter undo_ta
    NAME TYPE VALUE
    undo_tablespace string UNDOTMP
    SQL>
    Well i search in metalink ORA-01548 code error and in 18947.1 doc whows me that the solution is:
    Action: Shut down instances that use the active rollback segments in the
    tablespace and then drop the tablespace.
    4.- I try to shutdown but im getting:
    SQL> shutdown immediate;
    ORA-00376: file 10 cannot be read at this time
    ORA-01110: data file 10: '/mnt/hdext/back_plelds/undotbs02.dbf'
    SQL>
    This /mnt/hdext is an external USB disk and i have all permissions. I exported tables without any problem and i can read all files.
    i search un metalink again ora codes (ORA-00376 ORA-01110) and the doc id: 427801.1 shows in the solution:
    Drop the old undo tablespace instead of making it offline.
    but when i try to drop the tablespace it shows the error describe in the step 2.
    Facts:
    - my tablespace UNDOTBS1 is ONLINE. I put in offline and this is not the solution.
    - This is the status of my rollback segments:
    SQL> select segment_name, status from dba_rollback_segs where
    2 tablespace_name='UNDOTBS1';
    SEGMENT_NAME STATUS
    _SYSSMU1$                      NEEDS RECOVERY
    _SYSSMU2$                      NEEDS RECOVERY
    _SYSSMU3$                      NEEDS RECOVERY
    _SYSSMU4$                      NEEDS RECOVERY
    _SYSSMU5$                      NEEDS RECOVERY
    _SYSSMU6$                      NEEDS RECOVERY
    _SYSSMU7$                      NEEDS RECOVERY
    _SYSSMU8$                      NEEDS RECOVERY
    _SYSSMU9$                      NEEDS RECOVERY
    _SYSSMU10$                     NEEDS RECOVERY
    _SYSSMU11$                     OFFLINE
    SEGMENT_NAME STATUS
    _SYSSMU12$                     OFFLINE
    12 rows selected.
    SQL>
    - I have the note (Unable to drop und tablespace In this article describe the problem but this is not the same. The difference is that i cannot drop the rollback segment that describe in step 2.
    SQL> drop rollback segment "_SYSSMU1$";
    drop rollback segment "_SYSSMU1$"
    ERROR at line 1:
    ORA-30025: DROP segment '_SYSSMU1$' (in undo tablespace) not allowed
    in metalink the doc id: 173696.1 shows the solution:
    Action:     Check the undo segment name and reissue statement if necessary.
    i cannot drop the rollback_segment
    What can i do ???
    thanks a lot.

    in step 4 did you try with shutdown abort?
    If its still does not work then create another new table space with new file and then swtich to that tablespace http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/undo.htm#sthref1504Khurram

  • Cannot drop undo tablespace with Active extents but no active sessions

    Hi all,
    I am running on 10gr2 oracle database in a Linux 32 bit environment.
    I have a corrupted undo datafile. I've been able to recover the datafile but still the alert logs is still showing that it is corrupted.
    Now what I'm trying to do is to drop the old undo tablespace like the one discussed here Change undo tablespace in Oracle - Switch Oracle's Undo tablespace.
    My problem is I have an Active extent but no active session corresponding to it:
    SYS@ccasdb AS SYSDBA > SELECT a.name,b.status
    FROM   v$rollname a,v$rollstat b
    WHERE  a.usn = b.usn
    AND    a.name IN (
                      SELECT segment_name
                      FROM dba_segments
                      WHERE tablespace_name = 'UNDOTBS1'
                     );  2    3    4    5    6    7    8
    NAME                           STATUS
    _SYSSMU18$                     PENDING OFFLINE
    SYS@ccasdb AS SYSDBA > SELECT a.name,b.status , d.username , d.sid , d.serial#
      2  FROM   v$rollname a,v$rollstat b, v$transaction c , v$session d
      3  WHERE  a.usn = b.usn
      4  AND    a.usn = c.xidusn
      5  AND    c.ses_addr = d.saddr
      6  AND    a.name IN (
      7               SELECT segment_name
      8               FROM dba_segments
      9               WHERE tablespace_name = 'UNDOTBS1'
    10              );
    no rows selected
    but still cannot drop the undotablespace.
    SYS@ccasdb AS SYSDBA > drop tablespace UNDOTBS1 including contents and datafiles;
    drop tablespace UNDOTBS1 including contents and datafiles
    ERROR at line 1:
    ORA-30013: undo tablespace 'UNDOTBS1' is currently in use
    Regards,
    Tim

    Yes i was able to recover the datafile but the alert_log kept on prompting that it is still corrupted. The datafile's status is online.
    I want to kill the session/s contributing to the PENDING OFFLINE status of the rollback segment so I can already drop the undotablespace and so
    that the alert log will stop prompting for that corrupted datafile in that UNDOTABLESPACE.
    Can i Just alter the tablespace's datafiles to offline drop then just drop it. Then I drop the tablespace?

Maybe you are looking for

  • Artist name not appearing in list

    I received a new Ipod Classic 160GB for Christmas. I have transferred some CD's to it and some of the names of the artists are not appearing in the list of names. The albums are there - is there any way to get these to display? Thanks!

  • Love Hate Relationship

    This is my first Apple product and it is truly a remarkable phone and I have no intentions of getting rid of it. I love the great email viewing, app store, threaded text messages, ease of handling WI-Fi, 3G and EDGE without any intervention from the

  • Transfer rented movie from Z10 to Playbook

    Is there a way to transfer a rented movie on the Z10 to my Playbook or vise versa? Any thoughts or suggestions?

  • Adding info to the about window

    how do you add text to the 'about this app' window. I'd like to have some words in bold if possible, thanks.

  • Condition value in SD is multiplied every time

    Hello, I have one pricing condition (ZH03) which is manualy entered at header level. If I press Activate, this condition is copied to each item (I have 2 items in my test invoice) with the same value. But after every reload of pricing scren, conditio