• Oracle 12C -- 设置CDB启动后,PDBs自动启动


    CDB重启后,PDBs默认是处于mounted状态

    SQL> select name,open_mode from v$pdbs;
    
    NAME                           OPEN_MODE
    ------------------------------ ----------
    PDB$SEED                       READ ONLY
    PDB1                           READ WRITE
    PDB2                           READ WRITE
    
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup 
    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.
    Database opened.
    SQL> select name,open_mode from v$pdbs;
    
    NAME                           OPEN_MODE
    ------------------------------ ----------
    PDB$SEED                       READ ONLY
    PDB1                           MOUNTED
    PDB2                           MOUNTED
    
    SQL> 

    命令"alter pluggable database ... save state",可以让CDB重启后,pdb维持其关机前的状态。
    取消设置使用"alter pluggable database ... discard state"。

    SQL> select name,open_mode from v$pdbs;
    
    NAME                           OPEN_MODE
    ------------------------------ ----------
    PDB$SEED                       READ ONLY
    PDB1                           READ WRITE
    PDB2                           MOUNTED
    
    SQL> alter pluggable database pdb1 save state;
    
    Pluggable database altered.
    
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup ;
    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.
    Database opened.
    SQL> select name,open_mode from v$pdbs;
    
    NAME                           OPEN_MODE
    ------------------------------ ----------
    PDB$SEED                       READ ONLY
    PDB1                           READ WRITE
    PDB2                           MOUNTED
    
    SQL> 
  • 相关阅读:
    pip安装
    nfs
    源码方式安装软件
    自启动
    multipath
    linux永久添加和删除路由
    iscsi
    linux识别workstation磁盘的uuid
    centos镜像各种cd,dvd版本区别
    转:C# 中 MSCHART 饼状图显示百分比
  • 原文地址:https://www.cnblogs.com/abclife/p/4928088.html
Copyright © 2020-2023  润新知