zoukankan      html  css  js  c++  java
  • Oracle12C_____处理数据库01033连接错误问题.sql



    image

      1 Microsoft Windows [版本 6.1.7601]
      2 版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
      3 
      4 C:UsersAdministrator>sqlplus /nolog
      5 
      6 SQL*Plus: Release 12.1.0.2.0 Production on 星期一 7月 25 00:10:15 2016
      7 
      8 Copyright (c) 1982, 2014, Oracle.  All rights reserved.
      9 
     10 SQL> conn /  as sysdba;
     11 已连接。
     12 SQL> select * from v$version;
     13 
     14 BANNER
     15 --------------------------------------------------------------------------------
     16 
     17     CON_ID
     18 ----------
     19 Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
     20          0
     21 
     22 PL/SQL Release 12.1.0.2.0 - Production
     23          0
     24 
     25 CORE    12.1.0.2.0      Production
     26          0
     27 
     28 
     29 BANNER
     30 --------------------------------------------------------------------------------
     31 
     32     CON_ID
     33 ----------
     34 TNS for 64-bit Windows: Version 12.1.0.2.0 - Production
     35          0
     36 
     37 NLSRTL Version 12.1.0.2.0 - Production
     38          0
     39 
     40 
     41 SQL> select sys_context ('USERENV', 'CON_NAME') from dual;
     42 
     43 SYS_CONTEXT('USERENV','CON_NAME')
     44 --------------------------------------------------------------------------------
     45 
     46 CDB$ROOT
     47 
     48 SQL> select con_id,dbid,NAME,OPEN_MODE from v$pdbs;
     49 
     50     CON_ID       DBID NAME                           OPEN_MODE
     51 ---------- ---------- ------------------------------ ----------
     52          2 1902492643 PDB$SEED                       READ ONLY
     53          3 3763780899 PDBORCL                        MOUNTED
     54 
     55 SQL>  alter pluggable database pdborcl open;
     56 
     57 插接式数据库已变更。
     58 
     59 SQL> select con_id,dbid,NAME,OPEN_MODE from v$pdbs;
     60 
     61     CON_ID       DBID NAME                           OPEN_MODE
     62 ---------- ---------- ------------------------------ ----------
     63          2 1902492643 PDB$SEED                       READ ONLY
     64          3 3763780899 PDBORCL                        READ WRITE
     65 
     66 SQL> select sys_context ('USERENV', 'CON_NAME') from dual;
     67 
     68 SYS_CONTEXT('USERENV','CON_NAME')
     69 --------------------------------------------------------------------------------
     70 
     71 CDB$ROOT
     72 
     73 SQL> alter session set container=PDBORCL;
     74 
     75 会话已更改。
     76 
     77 SQL> select sys_context ('USERENV', 'CON_NAME') from dual;
     78 
     79 SYS_CONTEXT('USERENV','CON_NAME')
     80 --------------------------------------------------------------------------------
     81 
     82 PDBORCL
     83 
     84 SQL>
     85 
  • 相关阅读:
    diary and html 文本颜色编辑,行距和其它编辑总汇
    bash coding to changeNames
    virtualbox ubuntu 网络连接 以及 连接 secureCRT
    linux 学习6 软件包安装
    linux 学习8 权限管理
    vim 使用2 转载 为了打开方便
    ubuntu
    linux 学习15 16 启动管理,备份和恢复
    linux 学习 14 日志管理
    linux 学习 13 系统管理
  • 原文地址:https://www.cnblogs.com/ios9/p/8048194.html
Copyright © 2011-2022 走看看