我试图制作控制文件但是,我发现了错误。当我运行语法(select name from v$controlfile;
)时,结果为no rows selected
但是当我用SQL > SHOW PARAMETER CONTROL_FILES
检查控制文件时,它有一个结果。
P.S:我使用Oracle Developer Days(Oracle Virtual Manager)
首先,我做了什么
SQL > SHOW PARAMETER CONTROL_FILES;
And the output :
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string /home/oracle/app/oracle/oradat
a/orcl/control01.ctl, /home/or
acle/app/oracle/flash_recovery
_area/orcl/control02.ctl, /hom
e/oracle/825160030/control03.c
tl
其次,我想复制CONTROLFILE所以,我关闭了数据库
SQL > SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
然后,我创建了PFILE
SQL> create pfile from spfile;
File created.
之后,我复制ControlFile1并制作一个新的
SQL> !cp /home/oracle/app/oracle/oradata/orcl/control01.ctl /home/oracle/825160030/control08.ctl
然后,我创建了SPFILE
SQL> create spfile from pfile;
File created.
而且,正如我的讲师所说,制作一个新的ControlFile和冬青废话后必须启动,我得到了这个:
SQL> startup
ORACLE instance started.
Total System Global Area 456146944 bytes
Fixed Size 1344840 bytes
Variable Size 348129976 bytes
Database Buffers 100663296 bytes
Redo Buffers 6008832 bytes
ORA-00205: error in identifying control file, check alert log for more info
,我试图看到我的控制文件的名称但是,它什么都没有
SQL> select name from v$controlfile;
no rows selected
但是,我在SHOW PARAMETER CONTROL_FILES
上看到它有一个结果
SQL> show parameter control_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string /home/oracle/app/oracle/oradat
a/orcl/control01.ctl, /home/or
acle/app/oracle/flash_recovery
_area/orcl/control02.ctl, /hom
e/oracle/825160030/control03.c
tl, /home/oracle/825160030/con
trol08.ctl
我再次尝试alter my database
,但仍有错误
SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-00205: error in identifying control file, check alert log for more info
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01507: database not mounted
然后我再次shutdown
,我仍然遇到错误
SQL> shutdown
ORA-01507: database not mounted
aORACLE instance shut down.
我再次尝试改变我的数据库,但仍然遇到问题。请帮我。