Cannot drop or resıze datafile
Hi
My tablespace has 6 datafiles, and I moved every object to other segments.
However there are still objects, in this tablespace and I cannot make the datafile smaller or drop the datafile because of these objects.
What should I do?
select
owner,
file_id,
block_id end_block,
round(block_id * &m_block_size/1048576) possible_hwm,
segment_type,
segment_name,
partition_name
from
dba_extents
where
tablespace_name = 'DATA_AR'
order by
file_id, block_id
file_id end_block hwm segment_type segment_name
16,1889,15,LOBSEGMENT,SYS_LOB0000069294C00046$$,
16,1897,15,LOBINDEX,SYS_IL0000069294C00046$$,
16,1937,15,LOBSEGMENT,SYS_LOB0000069299C00002$$,
16,1945,15,LOBSEGMENT,SYS_LOB0000069299C00002$$,
16,1953,15,LOBINDEX,SYS_IL0000069299C00002$$,
16,2605825,20,358,LOBSEGMENT,SYS_LOB0000071665C00003$$,
16,2605833,20,358,LOBSEGMENT,SYS_LOB0000071665C00003$$,
16,2605841,20,358,LOBINDEX,SYS_IL0000071665C00003$$,
16,2619665,20,466,TABLE,PLAN_TABLE,
16,2619673,20,466,TABLE,PLAN_TABLE,
16,2619769,20,467,LOBSEGMENT,SYS_LOB0000071702C00014$$,
16,2619777,20,467,LOBINDEX,SYS_IL0000071702C00014$$,
16,2619881,20,468,TABLE,SQLN_EXPLAIN_PLAN,
16,2619889,20,468,TABLE,SQLN_EXPLAIN_PLAN,One thing I also didnt understand that all objects are in file_id 16 but I cannot drop other datafiles or resize other datafiles in this tablespace
since they are empty!!
You also may want to read the following Metalink note :
How to move LOB Data to Another Tablespace Doc ID: Note:130814.1
Or the LOB parameter of the ALTER TABLE statement.
Nicolas.
Similar Messages
-
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,
TimYes 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? -
Hello:
I've created a new undo tablespace undotbs2. I've set it to the default undo tablespace. When I've tried to drop the old one, I get the following error:
SQL> conn / as sysdba
Connected.
SQL> DROP TABLESPACE undotbs1 INCLUDING CONTENTS AND DATAFILES;
DROP TABLESPACE undotbs1 INCLUDING CONTENTS AND DATAFILES
ERROR at line 1: ORA-01548: active rollback segment '_SYSSMU7$' found, terminate dropping tablespace
This is a production database. The service is down because the partition with the Oracle tablespaces: system, undo, temp, etc is full.
After shutting down the database the problem persist: I cannot drop the old undo tablespace because of the same error.
I've followed the note 1321093.1. Here the query results:
Select segment_name, status, tablespace_name, rs.segment_id
from dba_rollback_segs rs
where status not in ('ONLINE','OFFLINE');
_SYSSMU7$ PARTLY AVAILABLE UNDOTBS1 7
SELECT KTUXEUSN, KTUXESLT, KTUXESQN, /* Transaction ID */ KTUXESTA Status, KTUXECFL Flags
FROM x$ktuxe
WHERE ktuxesta !='INACTIVE' AND ktuxeusn =7;
7 47 382687 ACTIVE DEAD
SELECT LOCAL_TRAN_ID,GLOBAL_TRAN_ID,STATE,MIXED,COMMIT# FROM DBA_2PC_PENDING;
No rows
SELECT LOCAL_TRAN_ID,IN_OUT,DATABASE,INTERFACE FROM dba_2pc_neighbors;
No rows
As you can see, there is no pending transactions. No application is connected to the database (service is down), however the database is appling rollbacks since 2 days.
A lot of archivelogs are being created at rolling back (30 GB archivelogs per hour). Here a tail of the alertlog file:
Wed Apr 17 06:19:53 2013
Thread 1 advanced to log sequence 7382
Current log# 5 seq# 7382 mem# 0: /ora2/origlogs/webfrbr/redo05_m1.log
Current log# 5 seq# 7382 mem# 1: /ora3/mirrorlogs/webfrbr/redo05_m2.log
Wed Apr 17 06:21:16 2013
Thread 1 advanced to log sequence 7383
Current log# 6 seq# 7383 mem# 0: /ora2/origlogs/webfrbr/redo06_m1.log
Current log# 6 seq# 7383 mem# 1: /ora3/mirrorlogs/webfrbr/redo06_m2.log
Wed Apr 17 06:22:41 2013
Thread 1 advanced to log sequence 7384
Current log# 4 seq# 7384 mem# 0: /ora2/origlogs/webfrbr/redo04_m1.log
Current log# 4 seq# 7384 mem# 1: /ora3/mirrorlogs/webfrbr/redo04_m2.log
Wed Apr 17 06:24:02 2013
Thread 1 advanced to log sequence 7385
Current log# 5 seq# 7385 mem# 0: /ora2/origlogs/webfrbr/redo05_m1.log
Current log# 5 seq# 7385 mem# 1: /ora3/mirrorlogs/webfrbr/redo05_m2.log
Wed Apr 17 06:25:24 2013
Thread 1 advanced to log sequence 7386
Current log# 6 seq# 7386 mem# 0: /ora2/origlogs/webfrbr/redo06_m1.log
Current log# 6 seq# 7386 mem# 1: /ora3/mirrorlogs/webfrbr/redo06_m2.log
Wed Apr 17 06:26:46 2013
Thread 1 advanced to log sequence 7387
Current log# 4 seq# 7387 mem# 0: /ora2/origlogs/webfrbr/redo04_m1.log
Current log# 4 seq# 7387 mem# 1: /ora3/mirrorlogs/webfrbr/redo04_m2.log
Oracle Database - Enterprise Edition 10.2.0.3
Linux x86-64 Oracle Linux 5
Please, consider the output of the following queries too:
select * from V$FAST_START_TRANSACTIONS
USN 7 -- Undo segment number of the transaction
SLT 47 -- Slot within the rollback segment
SEQ 382687 -- Incarnation number of the slot
STATE RECOVERING --
UNDOBLOCKSDONE 0 -- Number of undo blocks completed on the transaction
UNDOBLOCKSTOTAL 2079151 -- Total number of undo blocks that need recovery
PID 15 -- ID of the current server it has been assigned to
CPUTIME 1153 -- Time for which recovery has progressed (in seconds)
PARENTUSN 0 -- Undo segment number of the parent transaction in PDML
PARENTSLT 0 -- Slot of the parent transaction in PDML
PARENTSEQ 0 -- Sequence number of the parent transaction in PDML
XID 07002F00DFD60500 -- Transaction ID
PXID 0000000000000000 -- Parent transaction ID
RCVSERVERS 1 -- Number of servers used in the last recovery
select * from x$ktuxe where ktuxecfl = 'DEAD';
ADDR 00002B3E808B9BD8
INDX 145
INST_ID 1
KTUXEUSN 7
KTUXESLT 47
KTUXESQN 382687
KTUXERDBF 2
KTUXERDBB 2080076
KTUXESCNB 424110769
KTUXESCNW 0
KTUXESTA ACTIVE
KTUXECFL DEAD
KTUXEUEL 3739
KTUXEDDBF 0
KTUXEDDBB 0
KTUXEPUSN 0
KTUXEPSLT 0
KTUXEPSQN 0
KTUXESIZ 2079151
select * from v$fast_start_servers;
RECOVERING 0 15 07002F00DFD60500
IDLE 0 16 0000000000000000
IDLE 0 17 0000000000000000
IDLE 0 18 0000000000000000
IDLE 0 19 0000000000000000
IDLE 0 20 0000000000000000
IDLE 0 21 0000000000000000
IDLE 0 22 0000000000000000
IDLE 0 25 0000000000000000
IDLE 0 26 0000000000000000
IDLE 0 27 0000000000000000
IDLE 0 28 0000000000000000
IDLE 0 29 0000000000000000
IDLE 0 30 0000000000000000
IDLE 0 31 0000000000000000
IDLE 0 32 0000000000000000
Any ideas to solve this issue?
Thank you in advance
Edited by: albrotar on Apr 17, 2013 1:48 AM
Edited by: albrotar on Apr 17, 2013 1:49 AM
Edited by: albrotar on Apr 17, 2013 1:51 AM
Edited by: albrotar on Apr 17, 2013 1:52 AM
Edited by: albrotar on Apr 17, 2013 1:54 AMI've found some errors in alert log file occurred at shutting down the database:
+...+
Control autobackup written to DISK device
handle '/orabck/rman/webfrbr/ora_cfc-3587726327-20130414-00'
Completed: CREATE UNDO TABLESPACE undotbs2 DATAFILE '/orabck/undo/undotbs02.dbf'
SIZE 500M reuse autoextend ON NEXT 5M maxsize 32767M
Sun Apr 14 15:46:43 2013
Successfully onlined Undo Tablespace 5.
Undo Tablespace 1 moved to Pending Switch-Out state.
*** active transactions found in undo tablespace 1 during switch-out.
Sun Apr 14 15:46:44 2013
ALTER SYSTEM SET undo_tablespace='UNDOTBS2' SCOPE=BOTH;
Sun Apr 14 16:11:42 2013
ALTER ROLLBACK SEGMENT "_SYSSMU7$" offLINE
Sun Apr 14 16:11:42 2013
Completed: ALTER ROLLBACK SEGMENT "_SYSSMU7$" offLINE
Sun Apr 14 16:12:36 2013
DROP TABLESPACE undotbs1 INCLUDING CONTENTS AND DATAFILES
Sun Apr 14 16:12:36 2013
+...+
Thread 1 advanced to log sequence 5107
Current log# 4 seq# 5107 mem# 0: /ora2/origlogs/webfrbr/redo04_m1.log
Current log# 4 seq# 5107 mem# 1: /ora3/mirrorlogs/webfrbr/redo04_m2.log
Sun Apr 14 19:00:28 2013
Stopping background process CJQ0
Sun Apr 14 19:00:29 2013
Stopping background process QMNC
Sun Apr 14 19:00:31 2013
Stopping background process MMNL
Sun Apr 14 19:00:32 2013
Stopping background process MMON
Sun Apr 14 19:00:34 2013
Shutting down instance (immediate)
License high water mark = 31
Sun Apr 14 19:00:34 2013
Stopping Job queue slave processes
Sun Apr 14 19:00:34 2013
Job queue slave processes stopped
All dispatchers and shared servers shutdown
Sun Apr 14 19:00:42 2013
ALTER DATABASE CLOSE NORMAL
Sun Apr 14 19:04:28 2013
+...+
Thread 1 advanced to log sequence 5118
Current log# 6 seq# 5118 mem# 0: /ora2/origlogs/webfrbr/redo06_m1.log
Current log# 6 seq# 5118 mem# 1: /ora3/mirrorlogs/webfrbr/redo06_m2.log
Sun Apr 14 20:11:21 2013
Errors in file /ora1/admin/webfrbr/bdump/webfrbr_smon_4629.trc:
+ORA-07445: exception encountered: core dump [_intel_fast_memcpy.A()+10] [SIGSEGV] [Invalid permissions for mapped object] [0x2B6B66003000] [] []+*
Sun Apr 14 20:11:21 2013
Errors in file /ora1/admin/webfrbr/bdump/webfrbr_smon_4629.trc:
ORA-00600: internal error code, arguments: [999], [0x107C14015], [], [], [], [], [], []*
+ORA-07445: exception encountered: core dump [_intel_fast_memcpy.A()+10] [SIGSEGV] [Invalid permissions for mapped object] [0x2B6B66003000] [] []+*
Sun Apr 14 20:11:22 2013
+...+
Sun Apr 14 20:11:48 2013
Errors in file /ora1/admin/webfrbr/bdump/webfrbr_pmon_4617.trc:
ORA-00474: SMON process terminated with error
Sun Apr 14 20:11:48 2013
+...+
The instance could start up, but after this, it is recovering undo and generating redo since 2 days -
Cannot drop PDB - insufficient privileges
I created a PDB, and then tried to drop it. I cannot drop it, I get "insufficient privileges" error. Here is the SQL session :
==============================================
-bash-4.1$ ./sqlplus system/manager1
SQL*Plus: Release 12.1.0.1.0 Production on Thu Sep 18 07:28:53 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Last Successful login time: Thu Sep 18 2014 07:25:13 -07:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> create pluggable database test002 admin user test2 identified by test2 file_name_convert=('/u01/app/testuser/oradata/orcl/pdbseed', '/u01/app/testuser/oradata/orcl/test002');
Pluggable database created.
SQL> drop pluggable database test002 including datafiles;
drop pluggable database test002 including datafiles
ERROR at line 1:
ORA-01031: insufficient privileges
==============================================
I gave sysdba privileges to user "system", as follows :
SQL> grant sysdba to system;
Grant succeeded.
but still get the same error.
However, if I login as "sysdba", I can drop the PDB. I cannot use "sysdba" user for a number of reasons. I need to login as some other user. Any ideas?2639137 wrote:
I created a PDB, and then tried to drop it. I cannot drop it, I get "insufficient privileges" error. Here is the SQL session :
I gave sysdba privileges to user "system", as follows :
SQL> grant sysdba to system;
Grant succeeded.
but still get the same error.
Yes - as the exception says user 'system' does NOT have sufficient privileges to drop a PDB.
That grant of sysdba is ONLY for the current container which is the root.
Oracle 12c is NOT Oracle 11g - the multitenant architecture has SIGNIFICANT differences from previous versions in MANY areas especially in creating/managing users and granting privileges.
The default container for grants is whatever the current container is. If you want the grant to cover ALL containers then you need to specify that.
See the CONTAINER clause for the GRANT statement in the docs
GRANT
CONTAINER Clause
If the current container is a pluggable database (PDB):
Specify CONTAINER = CURRENT to locally grant a system privilege, object privilege, or role to a user or role. The privilege or role is granted to the user or role only in the current PDB.
If the current container is the root:
Specify CONTAINER = CURRENTto locally grant a system privilege, object privilege, or role to a common user or common role. The privilege or role is granted to the user or role only in the root.
Specify CONTAINER = ALL to commonly grant a system privilege, object privilege on a common object, or role, to a common user or common role.
If you omit this clause, then CONTAINER = CURRENT is the default.
See that last statement? -
I cannot drop the tablespace create earlier today by me. The tablespace have 2 files and they are empty. Here is the case.
Thansk a lot,mj
SQL> select tablespace_name from dba_tablespaces;
TABLESPACE_NAME
SYSTEM
UNDOTBS1
SYSAUX
TEMP
ADDR_IX2
CFG_DATA
CFG_IX
TS_ATTR_IX
TS_Nums_DT
TS_NAME_DT
TS_INSERT_ONLY_DT
11 rows selected.
Elapsed: 00:00:00.01
SQL> drop tablespace TS_Nums_DT INCLUDING CONTENTS and datafiles;
drop tablespace TS_Nums_DT INCLUDING CONTENTS and datafiles
ERROR at line 1:
ORA-00959: tablespace 'TS_NUMS_DT' does not existAs Aron says, there may be other, non-printing, characters in the name. You can check this by running:
SELECT DUMP(tablespace_name)
FROM dba_tablespaces
WHERE tablespace_name like 'TS\_N%' ESCAPE '\'Which will give you the ascii values of the characters in the tablespace name like this:
SQL> SELECT DUMP(tablespace_name)
2 FROM dba_tablespaces
3 WHERE tablespace_name = 'ONECALL';
DUMP(TABLESPACE_NAME)
Typ=1 Len=7: 79,78,69,67,65,76,76
O N E C A L LHTH
John -
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
Prasad26bffcad-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 -
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?
CheersC:\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 -
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 connectedoracle@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:~$ -
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 KumarHi 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 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. -
I am simply following the CBT nuggets fundamentals course and did the following:
create sequence seq_int_by1
INCREMENT BY 1 START WITH 1 MINVALUE 1;
create sequence SEQ_testsequence
increment by 100 start with 1000
maxvalue 100000 minvalue 1000 cache 20;
rename seq_testsequence to seq_junkme;
drop sequence seq_junkme;
Everything works except the last statement for which i get the following error:
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.
Any ideas why i cannot drop this sequence?
Your help is greatly appreciated!what is your db version?
I am able to do (below on 10g)
test1> create sequence seq_int_by1
INCREMENT BY 1 START WITH 1 MINVALUE 1;
create sequence SEQ_testsequence
increment by 100 start with 1000
maxvalue 100000 minvalue 1000 cache 20;
rename seq_testsequence to seq_junkme; 2
Sequence created.
Elapsed: 00:00:00.01
test1> GEM@ZBKTST1> 2 3
Sequence created.
Elapsed: 00:00:00.01
test1> drop sequence seq_junkme;
Sequence dropped.
Elapsed: 00:00:00.01
Edited by: vlethakula on Feb 18, 2013 7:37 AM -
Hi,
I am having a problem with dropping a column from a table. I am using 10g (10.2.0.1.0). Whenever I try to drop a column I got this error:
ORA-39726: unsupported add/drop column operation on compressed tables
Then I tried to drop it in a way that first make it unused and then drop it but this time I got the following erro: while unused operation was successful
ORA-12996: cannot drop system-generated virtual column
Well I restored this database from RMAN backups of my production system. One thing more that is, when I created a new table then from that table I can drop or add any column from/to it.
Any help........
Arshad.Well I have already tried this. As I explained in my first email that unused worked fine but as soon as I try to drop the unused column I got this error:
ORA-12996: cannot drop system-generated virtual column
Arshad. -
Hi,
in our project there is an mapping that seems to be corrupt. We cannot open it (when the editor opens, it shows nothing). So we would like to import that map from an older MDL-file. But we also cannot drop the mapping. OWB shows an API5072 Error then:
Internal Error: Null message for exception.
Is the there a way to get rid of that mapping?
Regards,
TobiasHi Tobias,
you may try to export everything but the corrupt mapping. Then import into a new repository. Eventually import the last backup of the corrupt mapping into the new repository.
But first try to quit and restart design center. Sometimes we experience strange errors that vanish after a restart.
Regards,
Carsten. -
Cannot drop column from table owned by SYS
Hello everybody,
How can I drop a column of table which is owned by sys? thanks!
Result as follows:
SQL> ALTER TABLE HELLO_TB DROP COLUMN NUM;
ALTER TABLE HELLO_TB DROP COLUMN NUM
ERROR at line 1:
ORA-12988: cannot drop column from table owned by SYS
newbie vYou can not 'change' the ownership.
You can, however, 'move' or 'clone' most objects by exporting and importing. As follows:
I create a table under SYS (shudder).
I then export it
- using userid SYS in this case,
- under normal circumstances I'd either use a DBA account or the owner's userid
- since I want a table, I use the TABLES option - a list is comma separated and in quotes
I then import it using a 'userid' switch - fromuser & touser options
- in this case from SYS to HR
Finally, I verify it was transported.
Actual console session in Linux follows:
pop2@fuzzy:~> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 10 19:58:01 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> create table test1 ( x1 number );
Table created.
SQL> insert into test1 values (2);
1 row created.
SQL> select * from test1;
X1
2
SQL> Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
pop2@fuzzy:~> exp file=exp.dmp tables='TEST1'
Export: Release 10.2.0.1.0 - Production on Fri Mar 10 20:00:07 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Username: sys/????? as sysdba
Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table TEST1 1 rows exported
Export terminated successfully without warnings.
pop2@fuzzy:~> imp file=exp.dmp fromuser=sys touser=hr
Import: Release 10.2.0.1.0 - Production on Fri Mar 10 20:00:44 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Username: sys/????? as sysdba
Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
Export file created by EXPORT:V10.02.01 via conventional path
import done in AL32UTF8 character set and AL16UTF16 NCHAR character set
. importing SYS's objects into HR
. . importing table "TEST1" 1 rows imported
Import terminated successfully without warnings.
pop2@fuzzy:~> sqlplus hr/hr
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 10 20:00:57 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> select * from test1;
X1
2
SQL>The export/import pair are incredibly powerful - and few people understand them well. If you are interested in digging into their capability, check out their chapters in the Utilities manual (under the Books tab) at http://www.oracle.com/pls/db102/portal.portal_db?selected=1
Maybe you are looking for
-
Lost network access to external drives
Hi, I'm using Leopard on my MacBook Pro and my iMac. My iMac has several external FW and USB drives connected. They use Mac OS Extended Filesystem (Journaled). I have AFP and SMB sharing turned on in my System Preferences. The only folder that's list
-
K8NGM2-FID MOBO Keeps beeping in Windows
Hi, I've had this mobo/pc for 2 years, and it all of a sudden the mobo pc speaker started beeping while Windows is loaded. Temperature isn't an issue, I checked several times. I formated the harddrive and tried to install windows again, and it starte
-
If you can't allow merging Apple IDs, at least don't lock us out of Match when we switch!
Hello. One of the things Apple stands for, in my mind at least, is enabling a mobile digital lifestyle. This involves people moving around a lot and knowing no borders. Eventually, iTunes and App Store should facilitate these concepts, instead of imp
-
I need to use my ipadmini with a digital projector which I will not have access to until the day of my presentation. The av/lightning HDMI adaptor will not transmit a signal. The VGA lightning adaptor will send a signal to a tv screen.Will a VGA inte
-
my windows is 7(ultimate)