概述
1.先查看数据库是否处于归档状态
SQL>archive log list;
Database log mode No Archive Mode表示没有开启归档
Automatic archival Disabled
Archive destination /u01/app/oracle/product/19.2.0/db_1/dbs/arch
Oldest online log sequence 16
Current log sequence 18
2.关闭数据库
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
3.启动数据库到mount状态
SQL>startup mount;
ORACLE instance started.
Total System Global Area 834664552 bytes
Fixed Size 9140328 bytes
Variable Size 381681664 bytes
Database Buffers 436207616 bytes
Redo Buffers 7634944 bytes
Database mounted.
4.启动归档状态
SQL>alter database archivelog;
Database altered.
5.再查看数据库是否处于归档状态
SQL> arching log list;
SP2-0734: unknown command beginning “arching lo…” - rest of line ignored.
SQL> archive log list;
Database log mode Archive Mode表示已经启动
Automatic archival Enabled
Archive destination /u01/app/oracle/product/19.2.0/db_1/dbs/arch
Oldest online log sequence 16
Next log sequence to archive 18
Current log sequence 18
6.现在开始关闭归档,先启动数据库
SQL>alter database open;
Database altered
7…关闭数据库
SQL>shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
8.启动数据库到mount状态
SQL> startup mount
ORACLE instance started.
Total System Global Area 834664552 bytes
Fixed Size 9140328 bytes
Variable Size 381681664 bytes
Database Buffers 436207616 bytes
Redo Buffers 7634944 bytes
Database mounted.
9.关闭归档模式
SQL> alter database noarchivelog;
Database altered.
最后
以上就是愉快便当为你收集整理的启动或关闭oracle的归档的全部内容,希望文章能够帮你解决启动或关闭oracle的归档所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复