您的位置:首页 > 数据库 > Oracle

启动或关闭oracle的归档

2020-06-08 04:55 429 查看

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.

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: