Ok, so you have no backup.
You made sure it is not a permission issue.
But you have Data Pump dumps, at least that is something.
First try to recover the datafile without data loss:
startup mount
alter database datafile 'V:\DB\CST001.DBF' online;
recover datafile 'V:\DB\CST001.DBF';
Answer the prompts accordingly, if any. If this succeeds, you can open the database with:
alter database open resetlogs;
I highly doubt the above would work in your case, so below is the data loss scenario.
startup mount
alter database datafile 'V:\DB\CST001.DBF' offline drop;
alter database open;
Using OFFLINE DROP
allows you to open the instance (as long as the affected datafile is not critical) without it trying to access that file. Since you can not restore and recover the datafile without backup, you can drop the tablespace (I am just guessing the name from the datafile):
drop tablespace cst including contents and datafiles;
Recreate the tablespace:
create tablespace cst datafile 'V:\DB\CST001.DBF' size ..;
alter tablespace cst add datafile 'V:\DB\CST002.DBF' ...;
...
Regrant any tablespace quotas if you had them before (check DBA_TS_QUOTAS
before dropping the tablespace).
And import what you have in your Data Pump dumps.
The not so easy way would be trying to salvage data from the other datafiles in the tablespace before dropping it.
Since you have the following error message that mean either hostname
is not correct and/or the domain you are using.
How to know if everything is working fine or not?
You need to execute hostname
command, lets say the output is oracle_12C
, and execute cat /etc/resolve.con
lets say the domain name mydomain.com
, then you need to edit /etc/hosts
like the following
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
127.0.0.1 localhost4
127.0.0.1 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
::127.0.0.1 localhost.localdomain localhost
172.31.15.86 oracle_12C.mydomin.com oracle_12C
Note if you are not using domain then /etc/hosts/
should be like the following
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
127.0.0.1 localhost4
127.0.0.1 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
::127.0.0.1 localhost.localdomain localhost
172.31.15.86 oracle_12C
Now lets move to tnsnames.ora
, inside this file you need to search for your database section (in your question orcl) replace it like the following (note you need to take a backup from this file before doing any changes):
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <hostname as /etc/hosts>)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
Note for host if you have doming then HOST = oracle_12C.mydomain.com
, else it should be HOST = oracle_12C
Now save the file and close it.
After that lets move to listener.ora
, take a backup from it and edit it like the following:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <hostname as /etc/hosts>)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
Now restart your listener by executing lsnrctl stop
and lsnrctl start
then try to connect to the database by using the following commands
export ORACLE_SID=orcl
sqlplus system/Forest123
Best Answer
You need to make sure the the Grid Infrastructure services are started first. They provide all of the networking and ASM storage for the cluster, and you can't start a database instance without them.
On Linux, as root, run
crsctl start crs
The command
crsctl stat res -t
should show you the state of all cluster services.