[oracle@localhost ~]$ cd /u01/app/oracle/
[oracle@localhost oracle]$ ls
admin cfgtoollogs checkpoints diag flash_recovery_area oradata product
[oracle@localhost oracle]$ cd flash_recovery_area/
[oracle@localhost flash_recovery_area]$ ls
orcl ORCL
[oracle@localhost flash_recovery_area]$ mv orcl/ test/
[oracle@localhost flash_recovery_area]$ mv ORCL/ test/
[oracle@localhost flash_recovery_area]$ cd ..
[oracle@localhost oracle]$ ls
admin cfgtoollogs checkpoints diag flash_recovery_area oradata product
[oracle@localhost oracle]$ cd oradata/
[oracle@localhost oradata]$ ls
orcl
[oracle@localhost oradata]$ mv orcl/ test/
[oracle@localhost oradata]$ ls
test
[oracle@localhost oradata]$ cd ..
[oracle@localhost oracle]$ ls
admin cfgtoollogs checkpoints diag flash_recovery_area oradata product
[oracle@localhost oracle]$ cd diag/
[oracle@localhost diag]$ ls
rdbms tnslsnr
[oracle@localhost diag]$ cd rdbms/
[oracle@localhost rdbms]$ ls
orcl
[oracle@localhost rdbms]$ mv orcl/ test/
[oracle@localhost rdbms]$ ls
test
[oracle@localhost rdbms]$ cd test
[oracle@localhost test]$ ls
i_1.mif test orcl
[oracle@localhost test]$ cd ..
[oracle@localhost rdbms]$ cd ..
[oracle@localhost diag]$ ls
rdbms tnslsnr
[oracle@localhost diag]$ cd ..
[oracle@localhost oracle]$ cd admin/
[oracle@localhost admin]$ ls
orcl
[oracle@localhost admin]$ cd orcl/
[oracle@localhost orcl]$ ls
adump dpdump pfile
[oracle@localhost orcl]$ cd ..
[oracle@localhost admin]$ mv orcl/ test/
[oracle@localhost admin]$ ls
test
[oracle@localhost admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sat Oct 1 17:18:02 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
2.9删除的控制文件。
[oracle@localhost oradata]$ cd test/
[oracle@localhost test]$ ls
control01.ctl redo01.log redo03.log system01.dbf undotbs01.dbf
example01.dbf redo02.log sysaux01.dbf temp01.dbf users01.dbf
[oracle@localhost test]$ mv control01.ctl control01.ctl.aaa
[oracle@localhost test]$ ls
control01.ctl.aaa redo01.log redo03.log system01.dbf undotbs01.dbf
example01.dbf redo02.log sysaux01.dbf temp01.dbf users01.dbf
[oracle@localhost test]$ cd ..
[oracle@localhost oradata]$ ls
test
[oracle@localhost oradata]$ cd..
bash: cd..: command not found
[oracle@localhost oradata]$ cd ..
[oracle@localhost oracle]$ ls
admin cfgtoollogs checkpoints diag flash_recovery_area oradata product
[oracle@localhost oracle]$ cd flash_recovery_area/
[oracle@localhost flash_recovery_area]$ ls
test test
[oracle@localhost flash_recovery_area]$ cd test/
[oracle@localhost test]$ ls
control02.ctl
[oracle@localhost test]$ mv control02.ctl control02.ctl.aaa
2.10登录oracle生成spfile文件
[oracle@localhost test]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sat Oct 1 17:23:34 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> create spfile from pfile='?/dbs/inittest.ora';
File created.
2.11调用前面步骤修改好的test.sql,目的是生成链接控制文件等
SQL> @/u01/app/oracle/diag/rdbms/test/test/trace/test.sql
ORACLE instance started.
Total System Global Area 539848704 bytes
Fixed Size 1337748 bytes
Variable Size 327157356 bytes
Database Buffers 205520896 bytes
Redo Buffers 5832704 bytes
Control file created.
Database altered.
Tablespace altered.
2.12查看结果