zoukankan      html  css  js  c++  java
  • Oracle更改租户数据库的名称步骤

    例子 更改pdb名字BJSYSY为BJSYSY_BAK
    
    
    
    [root@saas-db1 ~]# su - oracle
    
    Last login: Tue Jul  7 01:00:02 CST 2020
    
    [oracle@saas-db1 ~]$ sqlplus / as sysdba
    
    
    
    SQL*Plus: Release 18.0.0.0.0 - Production on Tue Jul 7 17:03:22 2020
    
    Version 18.3.0.0.0
    
    
    
    Copyright (c) 1982, 2018, Oracle.  All rights reserved.
    
    
    
    
    
    Connected to:
    
    Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
    
    Version 18.3.0.0.0
    
    
    
    SQL> show pdbs;
    
    
    
        CON_ID          CON_NAME               OPEN MODE  RESTRICTED
    
    ---------- ------------------------------ ---------- ----------
    
       2                PDB$SEED               READ ONLY    NO
    
       22               BJSYSY                 READ WRITE   NO
    
       23               BXHL                   READ WRITE   NO
    
    
    
    SQL> archive log list;
    
    Database log mode        Archive Mode
    
    Automatic archival        Enabled
    
    Archive destination        /backup/archive
    
    Oldest online log sequence     55336
    
    Next log sequence to archive   55341
    
    Current log sequence        55341
    
    
    
    
    
    SQL> alter pluggable database BJSYSY close immediate;
    
    
    
    Pluggable database altered.
    
    
    
    
    
    SQL> alter pluggable database BJSYSY open restricted;
    
    
    
    Pluggable database altered.
    
    
    
    
    
    
    
    SQL> show pdbs;
    
    
    
        CON_ID        CON_NAME                OPEN MODE  RESTRICTED
    
    ---------- ------------------------------ ---------- ----------
    
       2              PDB$SEED                  READ ONLY  NO
    
       22             BJSYSY                    READ WRITE YES
    
       23             BXHL                      READ WRITE NO
    
    
    
    SQL> alter pluggable database BJSYSY rename global_name to BJSYSY_BAK;
    
    Pluggable database altered.
    
    
    
    SQL> show pdbs;
    
    
    
        CON_ID               CON_NAME          OPEN MODE  RESTRICTED
    
    ---------- ------------------------------ ---------- ----------
    
          22                 BJSYSY_BAK        READ WRITE YES
    
    SQL> 
    
    
    
    
    
    SQL> conn / as sysdba     
    
    Connected.
    
    
    
    SQL> alter pluggable database BJSYSY_BAK close immediate;
    
    
    
    Pluggable database altered.
    
    
    
    SQL> alter pluggable database BJSYSY_BAK open;
    
    
    
    Pluggable database altered.
  • 相关阅读:
    lr http_get访问webservice
    lr http_post请求webservice
    快速幂(fast power)
    运算符重载
    1010 Radix 二分
    1054 The Dominant Color
    1042 Shuffling Machine
    1059 Prime Factors
    1061 Dating
    1078 Hashing
  • 原文地址:https://www.cnblogs.com/dll102/p/15770829.html
Copyright © 2011-2022 走看看