You are on page 1of 2

F:\>sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 4 10:48:41 2011


Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> startup nomount
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 2550136832 bytes
Fixed Size 2006416 bytes
Variable Size 268436080 bytes
Database Buffers 2264924160 bytes
Redo Buffers 14770176 bytes
SQL> alter database mount;
Database altered.
SQL> alter database open;
Database altered.
SQL> connect JKBH/oracle
Connected.
SQL> desc tbl_users;

SQL>
SQL> ALTER TABLESPACE BAHISTORY ADD DATAFILE 'F:\AML\DATAFILES\ORCL\BAHISTORY13.
DBF' size 4096M;
Tablespace altered.
SQL> select instance_name from v$instance;

SQL> SELECT segment_name, tablespace_name, status


> FROM sys.dba_rollback_segs;

Undo Blocks per Second

SELECT MAX(undoblks/((end_time-begin_time)*3600*24))
UNDO_BLOCK_PER_SEC
FROM v$undostat;
Actual Undo Size

QL> SELECT SUM(a.bytes) "UNDO_SIZE"


2 FROM v$datafile a,
3 v$tablespace b,
4 dba_tablespaces c
5 WHERE c.contents ='UNDO' AND c.status ='ONLINE' AND b.name = c.tablespace_na
me
6 AND a.ts# = b.ts#;

Block Size
SELECT TO_NUMBER(value) DB_BLOCK_SIZE [KByte]
FROM v$parameter
WHERE name = 'db_block_size';

size for undo retention:


Actual Undo Size/(Undo Blocks per Second * Block Size)

10627000000
= -----------------
8192* 172.886667

=10627000000/1416287.576

=7503

You might also like