YashanDB实例启停

简介: YashanDB实例启停

本章节将介绍YashanDB数据库的实例启停方式。数据库安装过程中将实例自动切换成OPEN阶段,并创建名为yashandb的数据库。

执行如下SQL命令查看当前实例状态及数据库名称:

SELECT status FROM V$INSTANCE;

STATUS

OPEN

SELECT database_name FROM V$DATABASE;

DATABASE_NAME

yashandb

Copied!

执行如下命令关闭YashanDB服务:

$ yasboot cluster stop -c yashandb
 type | uuid             | name             | hostid | index    | status  | return_code | progress | cost
----------------------------------------------------------------------------------------------------------
 task | 3b62bda48bad7fd1 | StopYasdbCluster | -      | yashandb | SUCCESS | 0           | 100      | 1
------+------------------+------------------+--------+----------+---------+-------------+----------+------
task completed, status: SUCCESS

Copied!

执行如下命令开启YashanDB服务,同时会将实例切换至OPEN阶段:

$ yasboot cluster start -c yashandb
 type | uuid             | name             | hostid | index    | status  | return_code | progress | cost
----------------------------------------------------------------------------------------------------------
 task | 3b62bda48bad7fd1 | StopYasdbCluster | -      | yashandb | SUCCESS | 0           | 100      | 1
------+------------------+------------------+--------+----------+---------+-------------+----------+------
task completed, status: SUCCESS

Copied!

执行如下命令重启YashanDB数据库,并将实例启动至OPEN阶段:

$ yasboot cluster restart -c yashandb
 type | uuid             | name                | hostid | index    | status  | return_code | progress | cost
-------------------------------------------------------------------------------------------------------------
 task | 78d6449df62594b5 | ReStartYasdbCluster | -      | yashandb | SUCCESS | 0           | 100      | 3
------+------------------+---------------------+--------+----------+---------+-------------+----------+------
task completed, status: SUCCESS

Copied!

执行如下命令重启YashanDB数据库,并将实例启动至NOMOUNT阶段:

$ yasboot cluster restart -c yashandb -m nomount
 type | uuid             | name                | hostid | index    | status  | return_code | progress | cost
-------------------------------------------------------------------------------------------------------------
 task | 78d6449df62594b5 | ReStartYasdbCluster | -      | yashandb | SUCCESS | 0           | 100      | 3
------+------------------+---------------------+--------+----------+---------+-------------+----------+------
task completed, status: SUCCESS

Copied!

执行如下命令重启YashanDB数据库,并将实例启动至MOUNT阶段:

$ yasboot cluster restart -c yashandb -m mount
 type | uuid             | name                | hostid | index    | status  | return_code | progress | cost
-------------------------------------------------------------------------------------------------------------
 task | 78d6449df62594b5 | ReStartYasdbCluster | -      | yashandb | SUCCESS | 0           | 100      | 3
------+------------------+---------------------+--------+----------+---------+-------------+----------+------
task completed, status: SUCCESS

Copied!

Note:

如需进行正常的数据库操作,请将实例切换至OPEN阶段。

相关文章
|
7月前
|
数据库
YashanDB环境变量
YashanDB环境变量
|
7月前
|
SQL Linux 数据库
YashanDB客户端安装
YashanDB客户端安装
|
7月前
|
Linux 网络安全 数据库
YashanDB服务端安装
YashanDB服务端安装
|
7月前
|
网络协议 安全 Linux
YashanDB安装前准备
YashanDB安装前准备
|
7月前
|
存储 监控 数据库
YashanDB集群服务
YashanDB集群服务
|
7月前
|
SQL 监控 数据库
|
7月前
|
存储 网络安全 数据库
YashanDB加密方法
YashanDB加密方法
|
7月前
|
运维 安全 数据库
YashanDB访问控制
YashanDB访问控制
|
7月前
|
存储 缓存 运维
YashanDB文件系统
YashanDB文件系统
|
7月前
|
存储 安全 数据库
YashanDB用户管理
YashanDB用户管理