Home » RDBMS Server » Server Administration » database shrink
database shrink [message #62576] Fri, 30 July 2004 04:39 Go to next message
roberto
Messages: 10
Registered: February 2002
Junior Member
Hello

I have a questuin for you:

I have a database from 450 gb and i want to shrink it to 50gb.
How can i solve this problem
Re: database shrink [message #62579 is a reply to message #62576] Fri, 30 July 2004 05:32 Go to previous message
Frank Naude
Messages: 4587
Registered: April 1998
Senior Member
Hi,

Log in to Oracle Enterprise Manager and resize the database's data files. You can also do it manually:

SQL> select name, bytes/1024/1024 "Meg" from v$datafile;

NAME                                                 Meg
--------------------------------------------- ----------
/app/oracle/oradata/orcl/system01.dbf                460
/app/oracle/oradata/orcl/undotbs01.dbf                60
/app/oracle/oradata/orcl/sysaux01.dbf                350
/app/oracle/oradata/orcl/users01.dbf                  10
/app/oracle/oradata/orcl/example01.dbf               100

SQL> alter database datafile '/app/oracle/oradata/orcl/users01.dbf' resize 5M;

Database altered.

SQL> alter database  datafile '/app/oracle/oradata/orcl/users01.dbf' resize 1M;
alter database  datafile '/app/oracle/oradata/orcl/users01.dbf' resize 1M
*
ERROR at line 1:
ORA-03297: file contains used data beyond requested RESIZE value


Best regards.

Frank
Previous Topic: Defination of Advance queing + Lock and Latch + Replication
Next Topic: Migration Oracle 8.0 -> Oracle 8.1.7.4
Goto Forum:
  


Current Time: Thu Jan 23 15:46:45 CST 2025