当前位置:网站首页>CDB 实例的启动与关闭
CDB 实例的启动与关闭
2022-07-05 18:33:00 【用户8006012】
1.1 关闭 cdb 实例
[email protected]> show con_name;
[email protected]> shutdown immediate;
查看后台进程
[[email protected] ~]$ ps -ef | grep ora_ | grep -v grep
1.2 启动 cdb 实例
[[email protected] ~]$ export ORACLE_SID=cdb1
[[email protected] ~]$ sqlplus / as sysdba
启动数据库实例到 nomount 状态
[email protected]> startup nomount;
查看实例状态
[email protected]> select instance_name,status from v$instance;
查看 v$pdbs 动态性能视图,显示没有结果
[email protected]> select name,con_id,open_mode from v$pdbs;
1.3 mount 装载 CDB
从 nomount 切换数据库实例到 mount 状态
[email protected]> alter database mount;
[email protected]> select instance_name,status from v$instance;
查看 pdb 情况,显示 pdb 也处于 mounted 状态
[email protected]> col name for a10
[email protected]> select name,con_id,open_mode from v$pdbs;
[email protected]> show pdbs
1.4 open 打开 CDB
open 打开数据库实例
[email protected]> alter database open;
[email protected]> select name,status from v$instance;
[email protected]> show pdbs
1.5 打开与关闭 PDB
1.5.1 查看 pdb 状态
[email protected]> show pdbs
cdb 处于 open 状态时, pdb 默认处于 mounted 状态(种子 pdb PDB$SEED 始终 read only 状态)
1.5.2 pdb 中操作 打开 pdb
切换到 pdb1
[email protected]> conn sys/[email protected] as sysdba
[email protected]> show pdbs
open 打开 pdb1
[email protected]> alter database open;
[email protected]> show pdbs;
SQL>CONNECT [email protected] AS SYSDBA
SQL> ALTER PLUGGGABLE DATABASE ALL OPEN;
SQL> select name,con_id,open_mode from v$pdbs;
1.5.3 pdb 中操作 关闭 pdb
pdb1 中执行命令
[email protected]> show pdbs;
[email protected]> shutdown immediate;
[email protected]> show pdbs
1.5.4 cdb 中操作 打开 pdb
[email protected]> conn / as sysdba
[email protected]> show pdbs
在 cdb 中使用 alter pluggable database 语句 open 打开 pdb
[email protected]> alter pluggable database pdb1 open;
[email protected]> show pdbs
1.5.5 cdb 中操作 关闭 pdb
使用 alter pluggable database 语句关闭 pdb
[email protected]> alter pluggable database pdb1 close immediate;
[email protected]> show pdbs
1.5.6 cdb 中操作 打开所有非种子 pdb
[email protected]> alter pluggable database all open;
[email protected]> show pdbs;
1.5.7 自动打开 pdb
1.5.7.1配置 CDB open 后 PDB 打开状态
当前 pdb1 open read write 状态
[email protected]> show pdbs
[email protected]> alter pluggable database pdb1 save state;
边栏推荐
- Insufficient picture data? I made a free image enhancement software
- [PM2 details]
- 深入底层C源码讲透Redis核心设计原理
- C final review
- The 11th China cloud computing standards and Applications Conference | China cloud data has become the deputy leader unit of the cloud migration special group of the cloud computing standards working
- ViewPager + RecyclerView的内存泄漏
- Record eval() and no in pytoch_ grad()
- Fix vulnerability - mysql, ES
- 什么是文本挖掘 ?「建议收藏」
- Login and connect CDB and PDB
猜你喜欢
怎么自动安装pythn三方库
2022 latest intermediate and advanced Android interview questions, [principle + practice + Video + source code]
小程序 修改样式 ( placeholder、checkbox的样式)
Reptile 01 basic principles of reptile
彻底理解为什么网络 I/O 会被阻塞?
About statistical power
【Autosar 十四 启动流程详解】
Use JMeter to record scripts and debug
Trust counts the number of occurrences of words in the file
The 2022 China Xinchuang Ecological Market Research and model selection evaluation report released that Huayun data was selected as the mainstream manufacturer of Xinchuang IT infrastructure!
随机推荐
AI open2022 | overview of recommendation systems based on heterogeneous information networks: concepts, methods, applications and resources
Use JMeter to record scripts and debug
U-Net: Convolutional Networks for Biomedical Images Segmentation
Exemple Quelle est la relation entre le taux d'échantillonnage, l'échantillon et la durée?
生词生词生词生词[2]
sample_rate(采樣率),sample(采樣),duration(時長)是什麼關系
Is it safe for Apple mobile phone to speculate in stocks? Is it a fraud to get new debts?
在通达信上做基金定投安全吗?
How to choose the most formal and safe external futures platform?
MySQL优化六个点的总结
LeetCode 6111. Spiral matrix IV
Rse2020/ cloud detection: accurate cloud detection of high-resolution remote sensing images based on weak supervision and deep learning
How to automatically install pythn third-party libraries
如何获取飞机穿过雷达两端的坐标
C final review
Is it safe to make fund fixed investment on access letter?
Isprs2022/ cloud detection: cloud detection with boundary nets
Reading notes of Clickhouse principle analysis and Application Practice (5)
AI Open2022|基于异质信息网络的推荐系统综述:概念,方法,应用与资源
websocket 工具的使用