--------------------------------------------------------------------------------
/usr2/dbfile/hbzydb/HBZYDB/controlfile/o1_mf_548vz8o7_.ctl
ORACLE 例程已经启动。
Fixed Size 1997008 bytes
Variable Size 620758832 bytes
Database Buffers 2516582400 bytes
Redo Buffers 14778368 bytes
数据库装载完毕。
数据库已经打开。
SQL> show parameter control;
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string /oradata1/sysdata/o1_mf_548vz8
o7_.ctl
SQL> create spfile from pfile;
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup
ORACLE 例程已经启动。
Fixed Size 1997008 bytes
Variable Size 620758832 bytes
Database Buffers 2516582400 bytes
Redo Buffers 14778368 bytes
数据库装载完毕。
数据库已经打开。
SQL> show parameter pfile;
------------------------------------ ----------- ------------------------------
spfile string /opt/app/oracle/product/10.2.0
.1/dbs/spfilehbzydb.ora
SQL> select name from v$datafile;
--------------------------------------------------------------------------------
/usr2/dbfile/hbzydb/HBZYDB/datafile/o1_mf_system_548vzhnv_.dbf
/usr2/dbfile/hbzydb/HBZYDB/datafile/o1_mf_undotbs1_548w0nts_.dbf
/usr2/dbfile/hbzydb/HBZYDB/datafile/o1_mf_sysaux_548w1pxo_.dbf
/usr2/dbfile/hbzydb/HBZYDB/datafile/o1_mf_users_548w22pw_.dbf
/usr2/dbfile/dbdata/hbzydb/HBZHZY01.dbf
/usr2/dbfile/dbdata/hbzydb/INDX01.dbf
/usr2/dbfile/dbdata/hbzydb/TOOLS01.dbf
/usr2/dbfile/dbdata/hbzydb/UNDOTBS01.dbf
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> !cp /usr2/dbfile/hbzydb/HBZYDB/datafile/o1_mf_system_548vzhnv_.dbf /oradata2/hbzydb/o1_mf_system_548vzhnv_.dbf
ORACLE 例程已经启动。
Fixed Size 1997008 bytes
Variable Size 620758832 bytes
Database Buffers 2516582400 bytes
Redo Buffers 14778368 bytes
数据库装载完毕。
SQL> alter database rename file '/usr2/dbfile/hbzydb/HBZYDB/datafile/o1_mf_system_548vzhnv_.dbf' to '/oradata2/hbzydb/o1_mf_system_548vzhnv_.dbf';
--------------------------------------------------------------------------------
/oradata2/hbzydb/o1_mf_system_548vzhnv_.dbf
/oradata2/hbzydb/o1_mf_undotbs1_548w0nts_.dbf
/oradata2/hbzydb/o1_mf_sysaux_548w1pxo_.dbf
/oradata2/hbzydb/o1_mf_users_548w22pw_.dbf
/oradata2/hbzydb/HBZHZY01.dbf
/oradata2/hbzydb/INDX01.dbf
/oradata2/hbzydb/TOOLS01.dbf
/oradata2/hbzydb/UNDOTBS01.dbf
--------------------------------------------------------------------------------
TABLESPACE_NAME BYTES USER_BYTES
------------------------------ ---------- ----------
/usr2/dbfile/hbzydb/HBZYDB/datafile/o1_mf_temp_548w1vg4_.tmp
TEMP 1073741824 1072693248
SQL> select username,temporary_tablespace from dba_users;
------------------------------ ------------------------------
MGMT_VIEW TEMP
SYS TEMP
SYSTEM TEMP
DBSNMP TEMP
SYSMAN TEMP
HBZHZY TEMP
OUTLN TEMP
WMSYS TEMP
ORDSYS TEMP
EXFSYS TEMP
XDB TEMP
------------------------------ ------------------------------
SI_INFORMTN_SCHEMA TEMP
ORDPLUGINS TEMP
MDSYS TEMP
ANONYMOUS TEMP
TSMSYS TEMP
DIP TEMP
SQL> alter database default temporary tablespace temp01;
------------------------------ ------------------------------
MGMT_VIEW TEMP01
SYS TEMP01
SYSTEM TEMP01
DBSNMP TEMP01
SYSMAN TEMP01
HBZHZY TEMP01
OUTLN TEMP01
WMSYS TEMP01
ORDSYS TEMP01
EXFSYS TEMP01
XDB TEMP01
------------------------------ ------------------------------
SI_INFORMTN_SCHEMA TEMP01
ORDPLUGINS TEMP01
MDSYS TEMP01
ANONYMOUS TEMP01
TSMSYS TEMP01
DIP TEMP01
SQL> !mkdir /redo_log1/hbzydb
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- -------------------
1 1 1387 52428800 1 NO INACTIVE
16282625 2010-03-20 23:00:53
16326793 2010-03-21 22:27:07
16369044 2010-03-22 20:23:46
alter database add logfile member group 4 ('/redo_log1/hbzydb/redo01a.log',/redo_log2/hbzydb/redo01b.log') size 128M
*
第 1 行出现错误:
ORA-02236: 文件名无效
SQL> alter database add logfile group 4 ('/redo_log1/hbzydb/redo01a.log','/redo_log2/hbzydb/redo01b.log') size 128M;
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- -------------------
1 1 1387 52428800 1 NO INACTIVE
16282625 2010-03-20 23:00:53
16326793 2010-03-21 22:27:07
16369044 2010-03-22 20:23:46
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- -------------------
4 1 0 134217728 2 YES UNUSED
0
SQL> alter database drop logfile group 2;
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- -------------------
1 1 0 134217728 2 YES UNUSED
0
0
16369044 2010-03-22 20:23:46
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- -------------------
4 1 0 134217728 2 YES UNUSED
0
SQL> alter system switch logfile;
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- -------------------
1 1 1390 134217728 2 NO CURRENT
16379379 2010-03-25 21:26:59
0
16369044 2010-03-22 20:23:46
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- -------------------
4 1 0 134217728 2 YES UNUSED
0
SQL> alter database drop logfile group 4;
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- -------------------
1 1 1390 134217728 2 NO CURRENT
16379379 2010-03-25 21:26:59
0
0
SQL> select member from v$logfile;
--------------------------------------------------------------------------------
/redo_log1/hbzydb/redo02a.log
/redo_log1/hbzydb/redo02b.log
/redo_log1/hbzydb/redo04a.log
/redo_log2/hbzydb/redo04b.log
/redo_log1/hbzydb/redo03a.log
/redo_log2/hbzydb/redo03b.log
select name from v$datafiles
--------------------------------------------------------------------------------
/oradata2/hbzydb/o1_mf_system_548vzhnv_.dbf
/oradata2/hbzydb/o1_mf_undotbs1_548w0nts_.dbf
/oradata2/hbzydb/o1_mf_sysaux_548w1pxo_.dbf
/oradata2/hbzydb/o1_mf_users_548w22pw_.dbf
/oradata2/hbzydb/HBZHZY01.dbf
/oradata2/hbzydb/INDX01.dbf
/oradata2/hbzydb/TOOLS01.dbf
/oradata2/hbzydb/UNDOTBS01.dbf
------------------------------------ ----------- ------------------------------
db_create_file_dest string /oradata2/hbzydb
SQL> select name from v$controlfile;
--------------------------------------------------------------------------------
/oradata1/sysdata/o1_mf_548vz8o7_.ctl
--------------------------------------------------------------------------------
TABLESPACE_NAME BYTES USER_BYTES
------------------------------ ---------- ----------
/oradata3/hbzydb/temp01.dbf
TEMP01 4194304000 4193255424
SQL> show parameter undo;
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
SQL> select instance_name,status from v$instance;
---------------- ------------
hbzydb OPEN
SQL> show parameter control;
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string /oradata1/sysdata/o1_mf_548vz8
o7_.ctl
SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup
ORACLE 例程已经启动。
Fixed Size 1997008 bytes
Variable Size 620758832 bytes
Database Buffers 2516582400 bytes
Redo Buffers 14778368 bytes
数据库装载完毕。
数据库已经打开。