|
[human@dbserver human]$ sqlplus '/as sysdba'
SQL> startup
SQL> @LABS/moreemphist
SQL> !ps
PID TTY TIME CMD
23738 pts/2 00:00:00 bash
24241 pts/2 00:00:00 sqlplus
24272 pts/2 00:00:00 ps
SQL>
SQL>
SQL> !ps -ef |grep human
human 24269 24241 1 22:34 ? 00:00:00 oracleHUMAN (DESCRIPTION=(
SQL> show parameter user_dump_dest
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
user_dump_dest string /home/human/admin/HUMAN/udump
SQL>
SQL>
SQL>
SQL> alter database backup controlfile to trace;
Database altered.
SQL>
SQL>
SQL> select name from v$datafile;
NAME
----------------------------------------------------------------------
----------
/home/human/oradata/HUMAN/system01.dbf
/home/human/oradata/HUMAN/undotbs01.dbf
/home/human/oradata/HUMAN/drsys01.dbf
/home/human/oradata/HUMAN/indx01.dbf
/home/human/oradata/HUMAN/tools01.dbf
/home/human/oradata/HUMAN/users01.dbf
/home/human/oradata/HUMAN/xdb01.dbf
/home/human/oradata/HUMAN/nanune01.dbf
/home/human/oradata/HUMAN/isaya01.dbf
/home/human/oradata/HUMAN/query01.dbf
10 rows selected.
SQL> select member from v$logfile;
MEMBER
----------------------------------------------------------------------
----------
/home/human/oradata/HUMAN/redo01.log
/home/human/oradata/HUMAN/redo02.log
/home/human/oradata/HUMAN/redo01b.rdo
/home/human/oradata/HUMAN/log02b.rdo
SQL> select name from v$tempfile;
NAME
----------------------------------------------------------------------
----------
/home/human/oradata/HUMAN/temp01.dbf
SQL> !rm $HOME/oradata/HUMAN/*.ctl
SQL> shutdown abort
$ vi admin/HUMAN/udump/human_ora_24269.trc
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "HUMAN" NORESETLOGS ARCHIVELOG
-- SET STANDBY TO MAXIMIZE PERFORMANCE
MAXLOGFILES 5
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 226
LOGFILE
GROUP 1 (
'/home/human/oradata/HUMAN/redo01.log',
'/home/human/oradata/HUMAN/redo01b.rdo'
) SIZE 100M,
GROUP 2 (
'/home/human/oradata/HUMAN/redo02.log',
'/home/human/oradata/HUMAN/log02b.rdo'
) SIZE 100M
-- STANDBY LOGFILE
DATAFILE
'/home/human/oradata/HUMAN/system01.dbf',
'/home/human/oradata/HUMAN/undotbs01.dbf',
'/home/human/oradata/HUMAN/drsys01.dbf',
'/home/human/oradata/HUMAN/indx01.dbf',
'/home/human/oradata/HUMAN/tools01.dbf',
'/home/human/oradata/HUMAN/users01.dbf',
'/home/human/oradata/HUMAN/xdb01.dbf',
'/home/human/oradata/HUMAN/nanune01.dbf',
'/home/human/oradata/HUMAN/isaya01.dbf'
CHARACTER SET KO16KSC5601
;
RECOVER DATABASE
ALTER SYSTEM ARCHIVE LOG ALL;
ALTER DATABASE OPEN;
ALTER DATABASE RENAME FILE 'MISSING00013'
TO '/home/human/oradata/HUMAN/query01.dbf';
ALTER TABLESPACE "QUERY_DATA" ONLINE;
ALTER TABLESPACE TEMP ADD TEMPFILE '/home/human/oradata/HUMAN/temp01.dbf'
SIZE 15728640 REUSE AUTOEXTEND OFF;
$ sqlplus '/as sysdba'
SQL> @admin/HUMAN/udump/human_ora_24269.trc
-Á¤»óÀΰ¡ È®ÀÎ
SQL> select name from v$datafile;
SQL> select member from v$logfile;
SQL> select name from v$tempfile;
SQL> select count(*) from hr.emphist;
|