Hi,
We have installed Oracle 10gR2 with patch updated to 10.2.3 on a RHEL 4 , update 4. Some how the dba made a mistake to install the database file on / folder instead of the /var folder which had loads of disk space. Now the / folder is used upto 100% of the disk space. Can creating a softlink to /var/database/ help in this case. Is there any other way to resolve this problem
thanks Hozefa
Hozefa Motiwala wrote:
We have installed Oracle 10gR2 with patch updated to 10.2.3 on a RHEL 4 , update 4. Some how the dba made a mistake to install the database file on / folder instead of the /var folder which had loads of disk space. Now the / folder is used upto 100% of the disk space. Can creating a softlink to /var/database/ help in this case. Is there any other way to resolve this problem
Supposing your DBA installed it on /oracle which exists on the root partition, you could do the following. Resize your /var to free up as much space as possible. Do leave a comfortable amount of space for /var. This is especially necessary in the case of log files. You need to have enough space to store all the logs as defined by your log retention policy. Create a new partition, format it in the appropriate FS type and mount it as /mnt/oracle. Move the contents of /oracle to /mnt/oratemp (or whatever). Take care to preserve file permissions. All oracle files are usually owned by the `oracle` (or whatever you specified during install) user. Better still, copy the files, verify the integrity and then empty /oracle. Make appropriate changes to /etc/fstab to mount the newly created oracle partition to /oracle. I am not sure what the effect would be on softlinks (if any) when this is being done, but I expect no problems. Needless to say, your database should be down and dismounted when doing the above. Ideally this should be done from the RHEL rescue shell (Disk 1), or even better, from a live CD that has the appropriate partition resizing tools.
On 7/25/07, Vivek J. Patankar list307@gmail.com wrote:
Hozefa Motiwala wrote:
We have installed Oracle 10gR2 with patch updated to 10.2.3 on a RHEL 4 , update 4. Some how the dba made a mistake to install the database file on / folder instead of the /var folder which had loads of disk space. Now the / folder is used upto 100% of the disk space. Can creating a softlink to /var/database/ help in this case. Is there any other way to resolve this problem
Assuming this is a system datafile, you can do this to move it to /var:
SQL> shu abort; ORACLE instance shut down.
$ mv /old-location/system.dbf /var/system.dbf
$sqlplus '/ as sysdba'
SQL> startup mount; ORACLE instance started.
Total System Global Area 97588504 bytes Fixed Size 451864 bytes Variable Size 46137344 bytes Database Buffers 50331648 bytes Redo Buffers 667648 bytes Database mounted. SQL> alter database rename 2 file '/old-location/system.dbf' 3 to '/var/system.dbf';
Database altered.
SQL> alter database open;
Database opened.
Verify the result.
SQL> select name from v$datafile;
NAME ------------------------ /var/system.dbf
Regards, NMK.