Prev | Current Page 166 | Next

Richard Niemiec

"Oracle Database 10g Performance Tuning Tips & Techniques"

Then, we attempt to shrink it too much. Finally, we try to increase its size too much.
SQL> alter database
2 datafile '/u01/app/oracle/oradata/rmanrep/users01.dbf' resize 15m;
Database altered.
SQL> alter database
2 datafile '/u01/app/oracle/oradata/rmanrep/users01.dbf' resize 10m;
Database altered.
SQL> alter database
2 datafile '/u01/app/oracle/oradata/rmanrep/users01.dbf' resize 1m;
alter database
*
ERROR at line 1:
ORA-03297: file contains used data beyond requested RESIZE value
SQL> alter database
2 datafile '/u01/app/oracle/oradata/rmanrep/users01.dbf' resize 100t;
alter database
*
ERROR at line 1:
ORA-00740: datafile size of (13421772800) blocks exceeds maximum file size
SQL> alter database
2 datafile '/u01/app/oracle/oradata/rmanrep/users01.dbf' resize 50g;
alter database
*
ERROR at line 1:
ORA-01144: File size (6553600 blocks) exceeds maximum of 4194303 blocks
If the resize request cannot be supported by the free space available, or there is data beyond
the requested decreased size, or an Oracle file size limit is exceeded, Oracle returns an error.
To avoid manual resizing of tablespaces reactively, we can instead be proactive and use the
autoextend, next, and maxsize clauses when modifying or creating a datafile. Table 4-1 lists the
space-related clauses for modifying or creating datafiles in the alter datafile and alter tablespace
commands.
In the following example, we set autoextend to ON for the datafile /u01/app/oracle/oradata/
rmanrep/users01.


Pages:
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
news news news news news