Can anybody help me on "what all users are using the undo tablespace and how much" in oracle database 11g r2. any pointers would be much appreciated.
Oracle Undo tablespace users
oracle
Related Solutions
Shouldn't you be looking in v$datafile to see if a datafile is offline rather than v$tablespace?
Offline Datafile:
08:09:38 coredev>select status, name from v$datafile where name like '%UNDO4%';
STATUS NAME
------- ----------------------------------------------------------------------
ONLINE F:\ORACLE\ORADATA\CD\UNDO4.DBF
08:09:47 coredev>alter database datafile 'F:\ORACLE\ORADATA\CD\UNDO4.DBF' offline;
Database altered.
08:09:58 coredev>select status, name from v$datafile where name like '%UNDO4%';
STATUS NAME
------- ----------------------------------------------------------------------
RECOVER F:\ORACLE\ORADATA\CD\UNDO4.DBF
08:10:02 coredev>select * from v$tablespace where name='UNDO';
TS# NAME INC BIG FLA ENC
---------- ------------------------------ --- --- --- ---
33 UNDO YES NO YES
Online Datafile:
08:10:53 coredev>alter database datafile 'F:\ORACLE\ORADATA\CD\UNDO4.DBF' online;
alter database datafile 'F:\ORACLE\ORADATA\CD\UNDO4.DBF' online
*
ERROR at line 1:
ORA-01113: file 21 needs media recovery
ORA-01110: data file 21: 'F:\ORACLE\ORADATA\CD\UNDO4.DBF'
08:11:04 coredev>recover datafile 'F:\ORACLE\ORADATA\CD\UNDO4.DBF';
Media recovery complete.
08:11:13 coredev>alter database datafile 'F:\ORACLE\ORADATA\CD\UNDO4.DBF' online;
Database altered.
08:11:49 coredev>select status, name from v$datafile where name like '%UNDO4%';
STATUS NAME
------- ----------------------------------------------------------------------
ONLINE F:\ORACLE\ORADATA\CD\UNDO4.DBF
I had no problems with a VirtualBox 4.14 Windows 8 preview VM and x64 Oracle 11gR2.
My VM uses 40 GB Hard Disk. While installing it downloaded .Net Framework 3.51 I started with a fresh Windows 8 VM in VirtualBox 4.14 and installed guest additions and run Windows update once. Afterwards I installed Oracle and got the items below on my Start page.
I find the databasefiles of my new database Bk_W8 in C:\app\berndk\oradata\Bk_W8. That is the location I would use for additional tablespaces.
The rest can be done by scripts which can be executed by sqlplus from this machine or from another client and is not Windows 8 specific.
Edit:
By right-clicking on the item on the start page, via advanced | open file location I found the path to the start menu:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Oracle - OraDb11g_home1\Konfigurations- und Migrations-Tools
I guess you will find
C:\ProgramData\Microsoft\Windows\Start Menu\Programs
the other is specific for a German Oracle installation.
To get access to the hidden C:\ProgramData folder see this link showing how to access folder options in Windows 8
Final hint: My VM currently uses 23 GB for the virtual hard disk.
OK I'm going to retry this with the Oracle Database Express Edition 11g Release 2 (September 2011). But that takes some time.
Installation done: The is the Web interface of Oracle 11g XE in Windows 8
For the question of creating addition databaseinstances: from this question on SO we learn, that it is not possible.
Creating tablespaces and users can be done using sqlplus. Which I found at C:\oraclexe\app\oracle\product\11.2.0\server\bin\sqlplus.exe.
Now going to remove that Virtual machine. I think there are better ways to learn Oracle.
Best Answer
This shows you the amount of undo size used by each session that is currently active.