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

相关内容

热门资讯

燃气发电与电池储能相结合,成为... 来源:市场资讯 (来源:i商周) 孟菲斯一座xAI数据中心的燃气轮机 人工智能的用电飙升,让数据中心...
景嘉微:JM11性能大幅提升,... 有投资者在互动平台向景嘉微提问:“董秘您好!关注到近期有用户反馈公司JM11显卡推出了适配windo...
原创 v... 影像的发展进一步推动,不少品牌推出了专业影像手机,拥有2亿像素摄像头、色彩还原摄像头、影像芯片、影像...
荣耀首款自研耳夹式耳机官宣即将... 快科技5月13日消息,日前,荣耀首席营销官关海涛宣布,荣耀全场景团队自研首款耳夹式耳机马上上市,并称...
谷歌推出Googlebooks... IT之家 5 月 13 日消息,2026 年 I/O 开发者大会下周(5 月 19~20 日)召开之...
自控所推动GNC专业智能化升级 来源:滚动播报 (来源:中国航空报) 本报讯 5月6日,航空工业自控所召开 GNC+AI关键技术研发...
华电电力申请数据库访问方法专利... 国家知识产权局信息显示,华电电力科学研究院有限公司申请一项名为“数据库访问方法、装置、设备及介质”的...
苏州率先打造数据流通利用新范式 数据,作为第五大生产要素 具有流动性强、非消耗性、非均质性等特点 苏州率先打造数据流通利用新范式 夯...
伊媒披露伊美新一轮谈判5个先决... 当地时间5月12日,据伊朗法尔斯通讯社援引知情人士消息报道,伊朗对与美国新一轮谈判提出的5个先决条件...
英国将向霍尔木兹海峡多国护航行... 当地时间12日,总台记者从英国国防部获悉,英国将向在霍尔木兹海峡执行任务的多国护航行动提供无人机、战...