ITPub博客

首页 > 数据库 > 国内数据库 > YashanDB实例启停

YashanDB实例启停

国内数据库 作者:崖山数据库系统YashanDB 时间:2025-02-26 11:48:29 0 删除 编辑

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

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

SELECT status FROM V$INSTANCE;STATUS-----------------OPENSELECT 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阶段。


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70028812/viewspace-3073787/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: YashanDB环境变量
请登录后发表评论 登录
全部评论
崖山数据库系统YashanDB是深圳计算科学研究院完全自主研发设计的新型数据库系统,融入原创理论,支持单机/主备、共享集群、分布式等多种部署方式,覆盖OLTP/HTAP/OLAP交易和分析混合负载场景,为客户提供一站式的企业级融合数据管理解决方案。

注册时间:2023-04-11

  • 博文量
    722
  • 访问量
    640316