1. Check
SELECT database_status FROM v$instance;
2. Startup
STARTUP [FORCE] [RESTRICT] [PFILE=filename]
[EXCLUSIVE | PARALLEL | SHARED]
[OPEN [RECOVER][database]|MOUNT |NOMOUNT]
Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.
DB11G:/u01/app/oracle/product/11.2.0.4/db_1:Y
ALTER SYSTEM disable restricted session;
OPEN DATABASE KHI DATAIFLE BỊ LỖI
Khi đang open database 1 datafile bị lỗi, mất ví dụ /filesystem01/datafile11.dbf bị mất
Thông tin khi gõ lệnh startup:
Database Mounted
ORA-01116: Error in opening database file 34
ORA-01110: Datafile 34 : '/filesystem01/datafile11.dbf'
ORA-27041: Unable to open file.
Dưới đây là workground để bật nhanh database, sqlplus as sysdba.
1. STARTUP NOMOUNT;
2. ALTER DATABASE MOUNT;
3. ALTER DATABASE DATAFILE '/filesystem01/datafile11.dbf' OFFLINE DROP;
4. ALTER DATABASE OPEN;
5. ALTER TABLESPACE TEST OFFLINE;
6.RESTORE DATAFILE 34;
7.RECOVER DATAFILE 34;
8.ALTER TABLESPACE TEST ONLINE;
3. Shutdown
SHUTDOWN [NORMAL | TRANSACTIONAL | IMMEDIATE | ABORT ]
4.Suspend, resume
ALTER system { SUSPEND | RESUME }
5. Automatically start Instance
/var/opt/oracle/oratab (OR /etc/oratab)
-- Automatically start Oracle 11g on solaris after server reboot (N), disable (Y)
+ASM2:/oracle/grid:N # line added by Agent
oraazdb:/oracle/db:N # line added by Agent