首先用sys登录数据库,查看oracle是否开启归档模式(su - oracle切换用户,然后sqlplus / as sysdba进入sql模式)
输入archive log list来查看是否开启,如图说明不是归档模式
1.管理员身份连接数据库C:\Users\Administrator>sqlplus
sys/sys@xxxxx
as
sysdba
2.查看当前归档模式,是归档还是非归档
SQL>
archive
log
list
Database
log
mode
No
Archive
Mode
(此状态为非归档状态)
3.关闭数据库
SQL>
shutdown
immediate
Database
closed.
Database
dismounted.
ORACLE
instance
shut
down.
4.启动数据库到mount状态
SQL>
startup
mount
5.启动归档模式
SQL>
alter
database
archivelog
(此命令为将归档模式启用)
Database
altered.
SQL>
archive
log
list
Database
log
mode
Archive
Mode
(此状态为归档状态)
6.启动数据库
SQL>
alter
database
open
Database
altered.
7.关闭归档模式
SQL>
shutdown
immediate
Database
closed.
Database
dismounted.
ORACLE
instance
shut
down.
SQL>
startup
mount
ORACLE
instance
started.
SQL>
alter
database
noarchivelog
(此命令为将归档模式关闭)
Database
altered.
SQL>
archive
log
list
Database
log
mode
No
Archive
Mode
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)