CDB or PDB打开归档
admin
2023-04-21 10:43:21
0

11g 怎么开归档,多租户就怎么打开归档就好了。

APPLIES TO:

Oracle Database - Enterprise Edition - Version 12.1.0.1 and later
Information in this document applies to any platform.
GOAL

Running 12c database and need to configure archive log, shall we configure it in PDB or CDB?

SOLUTION

All PDBs share the same redo log files, so it's not possible to enable archivelog mode only for a specific PDB. 
All PDBs share the archivelog mode of CDB.
Remember that PDBs themselves don't have a dedicated instance (processes and memory areas) so they share CDB's ones.

Configuring of archivelog mode should be implemented in CDB.

For more details on how to configure this feature, please refer to below doc:

测试
$sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Sat Mar 10 12:34:59 2018

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB11                          READ WRITE NO

SQL> 
SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u01/app/oracle/product/12.1.0/dbhome_1/dbs/arch
Oldest online log sequence     32
Current log sequence           34
SQL> 
SQL> alter system set log_archive_dest_1='location=/u01/app/oracle/product/12.1.0/dbhome_1/dbs/arch';

System altered.

SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u01/app/oracle/product/12.1.0/dbhome_1/dbs/arch
Oldest online log sequence     32
Current log sequence           34
SQL>     

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 1174405120 bytes
Fixed Size                  2923680 bytes
Variable Size             436208480 bytes
Database Buffers          721420288 bytes
Redo Buffers               13852672 bytes
Database mounted.
SQL> alter database archivelog ;

Database altered.

SQL> alter database open;

Database altered.

SQL> 

SQL> alter system switch logfile;

System altered.

SQL> !ls -l /u01/app/oracle/product/12.1.0/dbhome_1/dbs/arch
total 4
-rw-r----- 1 oracle oinstall 1024 Mar 10 17:37 1_35_965910550.dbf

SQL> 

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB11                          MOUNTED
SQL> alter session set container=PDB11;

Session altered.

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/app/oracle/product/12.1.0/dbhome_1/dbs/arch
Oldest online log sequence     34
Next log sequence to archive   36
Current log sequence           36
SQL> alter system switch logfile;
alter system switch logfile
*
ERROR at line 1:
ORA-65040: operation not allowed from within a pluggable database

相关内容

热门资讯

【第一财经】“微信链接牛牛到底... 有 亲,根据资深记者爆料微信链接牛牛是可以开挂的,确实有挂(咨询软件无需...
最新引进“威信茶楼辅助器?”(... 家人们!今天小编来为大家解答威信茶楼透视挂怎么安装这个问题咨询软件客服徽9784099的挂在哪里买很...
今日重大通报“新金龙炸/金/花... 网上科普关于“新金龙炸/金/花有没有挂”话题很是火热,小编也是针对新金龙炸/金/花作*弊开挂的方法以...
终于了解“新蛮王牛牛开挂器?”... 家人们!今天小编来为大家解答新蛮王牛牛透视挂怎么安装这个问题咨询软件客服徽9752949的挂在哪里买...
玩家最新攻略“新上游牛牛有没有... 您好:新上游牛牛这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9752949】很多玩家在这款游...
我来教教您“人海牛牛开挂神器?... 您好:人海牛牛这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9752949】很多玩家在这款游戏...
重磅消息“闽游麻将真的有挂吗?... 重磅消息“闽游麻将真的有挂吗?”(原来真的有挂)您好,闽游麻将这个游戏其实有挂的,确实是有挂的,需要...
今日重大通报“白金岛麻将圈有没... 您好:白金岛麻将圈这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9752949】很多玩家在这款...
玩家最新攻略“TT语音真的有挂... 有 亲,根据资深记者爆料TT语音是可以开挂的,确实有挂(咨询软件无需打开...
今日重大发现“中至余干麻将是不... 有 亲,根据资深记者爆料中至余干麻将是可以开挂的,确实有挂(咨询软件无需...