cancel
Showing results for 
Search instead for 
Did you mean: 

delete filesystem with error

Former Member
0 Kudos

I created a datafile in a wrong location. I then remove the filesystem of the OS with the command "rm" but the database is still recall the datafile so I can not delete it and the more I fear that there are already Data in this filesystem. Then I created another datafile in a good location and I put the first to offline, but the problem is that the online did not work because the database still looking the old datafile.

Could you please help me.

Thx in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HOW TO MOVE A DATA FILE FROM ONE FILE SYSTEM TO ANOTHER FILE SYSTEM.

You can do it via brtools or try below method

If you have created data file called "ODSD.DATA54" wrongly under ":\oracle\test\saparch\data4"

you can move it to the required location ie. to the new location '\oracle\PROD\sapdata3\data4\ODSD.DATA54'

1) Before taking the database to shutdown state:

alter database backup controlfile to '\oracle\PROD\sapreorg\cntrlPROD.old';

2)Shoutdown normal

3)Move the dtatafile ODSD.DATA54 from \oracle\test\saparch\data to the new location \oracle\PROD\sapdata3\data4

4)Make a new path like \oracle\PROD\sapdata3\data4 , if data4 folder is not there under sapdate3 create

folder data4

5)alter database mount;

6)alter database rename file '\oracle\test\saparch\data4\ODSD.DATA54' to

'\oracle\PROD\sapdata3\data4\ODSD.DATA54';

7)Alter database open;

😎 alter database backup controlfile to '\oracle\PROD\sapreorg\cntrlPROD.new';

9)After the database is up you can check the status of the database by

select status from v$instance;

Former Member
0 Kudos

thank you very much freind, all responses are helpful.

but do you have other way to move the datafile without shutdow the database??

Former Member
0 Kudos

You can't as all the datafiles will be in used when you open the database.

Answers (3)

Answers (3)

JPReyes
Active Contributor
0 Kudos

Sunil is right... you can't delete a datafile without expecting this to happen.

If the datafile is gone/deleted you are going to have to restore from backup

Regards

Juan

Former Member
0 Kudos

I think you should go though the Database administration documentation.

Which OS and DB you are using?

You can't simply delete the datafile while database is online or offline. You can move the datafiles from one location to another using brtools if you are on oracle.

Do you have the backup of your system before you deleted the datafile? If yes then please restore and then move the datafiles using database commands or brtools.

Former Member
0 Kudos

Hi,

If its oracle use Move datafile options , same is avialable with brtools also.

Regards,