日期:2014-05-16 浏览次数:20460 次
sqlplus /nolog;
?
conn / as sysdba;
这样就进入了sqlplus的里面;如果你的数据库处于打开状态,那么请执行:
shutdown immediate;
?
执行完以后的步骤后,就要开始进行归档模式与非归档模式之间的转换了:
startup mount;
?
归档->非归档
alter database noarchivelog;
?
非归档->归档
alter database archivelog;
?
检查是否成功:
????? 在执行startup?mount;SQL代码时可能会遇到提示:ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务。
????? 遇到上面问题请在oracle\product\10.2.0\db_1\NETWORK\ADMIN目录下找到listener.ora文件,然后修改
SID_LIST_LISTENER =
? (SID_LIST =
??? (SID_DESC =
????? (SID_NAME = PLSExtProc)
????? (ORACLE_HOME = E:\oracle10\product\10.2.0\db_1)
????? (PROGRAM = extproc)
??? )
???)
LISTENER =
? (DESCRIPTION_LIST =
??? (DESCRIPTION =
????? (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
????? (ADDRESS = (PROTOCOL = TCP)(HOST = TEST-HJ)(PORT = 1521))
??? )
? )
为:
SID_LIST_LISTENER =
? (SID_LIST =
??? (SID_DESC =
????? (SID_NAME = PLSExtProc)
????? (ORACLE_HOME = E:\oracle10\product\10.2.0\db_1)
????? (PROGRAM = extproc)
??? )
??? (SID_DESC?? =
?????? (GLOBAL_DBNAME?? =?? ORCL)
?????? (ORACLE_HOME?? =?? E:\oracle\product\10.2.0\db_1)??????
?????? (SID_NAME?? =?? ORCL)
???? )
??)
LISTENER =
? (DESCRIPTION_LIST =
??? (DESCRIPTION =
????? (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
????? (ADDRESS = (PROTOCOL = TCP)(HOST = TEST-HJ)(PORT = 1521))
??? )
? )
上述SID为orcl,如果为其他SID请填写对应SID即可,保存并覆盖原有文件,重启实例后再运行上面的命令即可。