YashanDB 实例启停
 作者:YashanDB
- 2025-02-26  广东
 本文字数:1586 字
阅读完需:约 5 分钟
本章节将介绍 YashanDB 数据库的实例启停方式。数据库安装过程中将实例自动切换成 OPEN 阶段,并创建名为 yashandb 的数据库。
执行如下 SQL 命令查看当前实例状态及数据库名称:
SELECT status FROM V$INSTANCE;
STATUS-----------------OPEN
SELECT database_name FROM V$DATABASE;
DATABASE_NAME----------------------------------------------------------------yashandb复制代码
 执行如下命令关闭 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复制代码
 执行如下命令开启 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复制代码
 执行如下命令重启 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复制代码
 执行如下命令重启 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复制代码
 执行如下命令重启 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复制代码
 Note:
如需进行正常的数据库操作,请将实例切换至 OPEN 阶段。
划线
评论
复制
发布于: 刚刚阅读数: 3
版权声明: 本文为 InfoQ 作者【YashanDB】的原创文章。
原文链接:【http://xie.infoq.cn/article/d37ecb65154cfb50c57640767】。文章转载请联系作者。
YashanDB
关注
全自研国产新型大数据管理系统 2022-02-15 加入
还未添加个人简介







    


评论