Command to open database with missing datafile
Can you tell me the command(s) or procedure to open a database that has a missing datafile due to a media failure (external device)? The database is in noarchivelog mode, there's not any backup and the version is 10g Release 2. It doesn't matter if the data is lost or inaccesible, I just want at least to open the database.
startup mount alter database datafile '/directory/filename' offline drop; alter database open; drop tablespace ts_name including contents and datafiles;The last command will remove the tablespace from the database, but that is OK in your case since you are missing the datafile anyway.
After this is done, you might want to look at implementing a sound backup and recovery strategy.