【YashanDB知识库】ycm托管数据库时,数据库非OM安装无法托管
1.自关联外键插入数据时报错:YAS-02033 foreign key constraint violated parent key not found-YashanDB2.【YashanDB知识库】ycm托管数据库时,数据库非OM安装无法托管3.【YashanDB知识库】Java程序调用存储过程,在提取clob时报YAS-000044.【YashanDB知识库】kettle从DM8的number类型同步到YashanDB的varchar类型,存入是科学计数法形式的数据5.【YashanDB知识库】ODBC驱动类问题定位方法6.【YashanDB知识库】outline固化执行计划7.【YashanDB知识库】PHP使用OCI接口使用数据库绑定参数功能异常8.【YashanDB知识库】PHP使用ODBC驱动无法获取长度为256char以上的数据9.【YashanDB知识库】PHP使用ODBC使用数据库绑定参数功能异常10.【YashanDB知识库】YAC修改参数后关闭数据库夯住11.【YashanDB知识库】YAS-00103 no free block in dictionary cache12.【YashanDB知识库】YAS-00220, utf8 sequence is wrong13.【YashanDB知识库】YAS-02024 lock wait timeout, wait time 0 milliseconds14.【YashanDB知识库】YashanDB 开机自启15.【YashanDB知识库】yasql登录报错:YAS-0041316.【YashanDB知识库】表收集统计信息默认阈值引起SQL执行效率差17.【YashanDB知识库】调整NUMBER精度,再执行统计信息收集高级包偶现数据库异常退出18.【YashanDB知识库】含有NUL字节的varchar字符串查询时出现截断19.【YashanDB知识库】收集分区表统计信息采样率小于1导致SQL执行计划走偏20.【YashanDB知识库】手动停止统计信息自动收集任务导致的性能变差21.【YashanDB知识库】数据变化率超过阈值统计信息失效22.【YashanDB知识库】数据库审计shutdown immediate操作导致数据库异常退出23.【YashanDB知识库】同时设置默认值和非空约束时报错YAS-0207024.【YashanDB知识库】应用绑定参数的慢查询,慢日志抓取不到25.【YashanDB知识库】用户密码带@字符时exp和imp无法使用26.【YashanDB知识库】字段加上索引后,SQL查询不到结果27.【YashanDB知识库】存储过程报错snapshot too old28.【YashanDB知识库】virt虚拟内存远大于res内存问题分析29.【YashanDB知识库】swap空间使用超大报错30.【YashanDB知识库】oracle dblink varchar类型查询报错记录31.【YashanDB知识库】EXP导致主机卡死问题32.【YashanDB知识库】23.1.3.101版本创建物化视图coredump33.【YashanDB知识库】v$instance视图中实例角色含义不明确34.【YashanDB知识库】yac修改参数后关闭数据库hang住35.【YashanDB知识库】汇聚库23.1环境发生coredump36.【YashanDB知识库】离线升级一章22.2不支持直接升级到23.137.为何共享集群的高可用能力被频频称赞,它的机制有何不同?38.【YashanDB知识库】数据库使用shutdown immediate无响应导致coredump39.【YashanDB知识库】filter or改写问题40.【YashanDB知识库】stmt未close,导致YAS-00103 no free block in sql main pool part 0报错分析41.【YashanDB知识库】update/delete未选中行时,v$transaction视图没有事务,alter超时问题42.【YashanDB知识库】yasdb jdbc驱动集成BeetISQL中间件,业务(java)报autoAssignKey failure异常43.【YashanDB知识库】yasdb jdbc驱动集成druid连接池,业务(java)日志中有token IDENTIFIER start异常44.【YashanDB知识库】YashanDB的JDBC/OCI驱动如何设置字符编码45.【YashanDB知识库】绑定参数,同一个sql多个执行计划的问题46.【YashanDB知识库】服务端是GBK编码,导致从22.2.12.100升级到22.2.13.100失败问题47.【YashanDB知识库】开源调度框架Quartz写入Boolean值到YashanDB报错48.【YashanDB知识库】列与存储过程中重名变量/别名问题49.【YashanDB知识库】如何使用yasldr导入lob类型?50.【YashanDB知识库】如何远程连接、使用YashanDB?51.【YashanDB知识库】设置归档日志上限,但归档日志没自动清理,导致磁盘空间满52.【YashanDB知识库】使用select * 创建的物化视图无法进行查询重写53.【YashanDB知识库】账号被锁,如何分析具体原因54.【YashanDB知识库】自动选举配置错误引发的一系列问题55.【YashanDB知识库】IMP跨网络导入慢问题56.【YashanDB知识库】ycm纳管主机安装YCM-AGENT时报错“任务提交失败,无法连接主机”
57.【YashanDB知识库】ycm托管数据库时,数据库非OM安装无法托管
58.【YashanDB知识库】ycm托管数据库时报错OM host ip:127.0.0.1 is not support join to YCM59.【YashanDB知识库】自关联外键插入数据时报错:YAS-02033 foreign key constraint violated parent key not found60.【YashanDB知识库】statement级别的触发器在jdbc接口调用executeBatch时被多次触发61.【YashanDB数据库】大事务回滚导致其他操作无法执行,报错YAS-02016 no free undo blocks62.【YashanDB数据库】VMware虚拟机使用默认安装,在掉电之后数据库无法启动63.【YashanDB数据库】数据库运行正常,日志出现大量错误metadata changed64.【YashanDB数据库】由于网络带宽不足导致的jdbc向yashandb插入数据慢65.【YashanDB数据库】Mybatis-plus分页框架识别不到Yashandb66.【YashanDB数据库】PHP无法通过ODBC连接到数据库67.【YashanDB数据库】Ubuntu系统加载Yashan C驱动后无法使用PHP68.【YashanDB数据库】YAS-00413 wait for receive timeout69.【YashanDB数据库】YAS-02024 lock wait timeout, wait time 0 milliseconds70.【YashanDB数据库】YAS-02032 column type is incompatible with referenced column type71.【YashanDB数据库】YAS-02079 archive log mode must be enabled when database is in replication mode72.【YashanDB数据库】YAS-02143 invalid username/password, login denied73.【YashanDB数据库】yasboot查询数据库状态时显示数据库状态为off74.【YashanDB数据库】Yashandb表闪回业务表实践75.【YashanDB数据库】YashanDB如何回收表空间76.【YashanDB数据库】yasql登录有特殊字符@导致无法登录77.【YashanDB知识库】YMP元数据阶段二报错YAS-0420478.【YashanDB知识库】共享集群YAC换IP79.【YashanDB知识库】生成迁移报告失败,"报错未知类型错误异常:"80.【YashanDB知识库】主备延迟故障分析方法81.【YashanDB知识库】表数据量不多,lob数据段有大量空间,插入数据报错82.【YashanDB知识库】修改字段长度后,jdbc驱动接口报YAS-04007 Message:result set metadata changed异常83.【YashanDB知识库】执行sql语句时报YAS-04401 data type - expected, but BLOB got异常84.【YashanDB知识库】DBeaver无法访问数据库85.【YashanDB知识库】YAS-02025 no free space in virtual memory pool86.【YashanDB知识库】archivelog磁盘满导致数据库abnormal87.【YashanDB知识库】数据库获取时间和服务器时间不一致88.【YashanDB知识库】yasql对字符串中分号的判定89.【YashanDB知识库】单机升级典型问题及应急措施90.【YashanDB知识库】客户端字符集与数据库字符集兼容问题91.【YashanDB知识库】如何配置jdbc驱动使getDatabaseProductName()返回Oracle92.【YashanDB知识库】YAS-04110 invalid variant name93.【YashanDB知识库】查询YashanDB表空间使用率94.【YashanDB知识库】多表更新报错 YAS-04344 multi-table update is not supported95.【YashanDB知识库】yashandb执行包含带oracle dblink表的sql时性能差96.【YashanDB知识库】YMP迁移oracle不兼容给用户授权高级包97.【YashanDB知识库】php查询超过256长度字符串,数据被截断的问题98.【YashanDB知识库】如何查看共享集群共享盘的挂载关系问题现象
ps -ef | grep yas 查看无yasom和yasagent进程,且在{数据库安装目录}/om/{数据库名称}的目录下没有conf、data、log等目录,确定数据库不是用yasboot安装,是用脚本安装的
问题的风险及影响
非yasboot安装,ycm无法完成托管,无法监控
问题影响的版本
不涉及ycm的版本问题
问题发生原因
数据库版本太旧或安装数据库的人没有按照规范使用yasboot安装
解决方法及规避方式
将数据库先托管到yasom中,再托管到ycm中
问题分析和处理过程
(1)生成配置文件
-- ip必须是本机ip,install-path不能和安装的数据库path重重复
./bin/yasboot package config gen --cluster yasdb -u yashan -p Cod-2024 --ip 192.168.39.70 --install-path /home/yashan/yashandb/yasdb_yasom -t se
[yashan@KylinV10 yasdb_yasom]$ ./bin/yasboot package config gen --cluster yasdb -u yashan -p Cod-2024 --ip 192.168.39.70 --install-path /home/yashan/yashandb/yasdb_yasom -t se
192.168.39.70
192.168.39.70:1688 is already used
hostid | group | node_type | node_name | listen_addr | din_addr | replication_addr | data_path
--------------------------------------------------------------------------------------------------------------------------------------------------------
host0001 | dbg1 | db | 1-1 | 192.168.39.70:1688 | 192.168.39.70:1689 | 192.168.39.70:1690 | /home/yashan/yashandb/yasdb_yasom/data/yasdb
----------+-------+-----------+-----------+--------------------+--------------------+--------------------+----------------------------------------------
Generate config success
(2)安装yasom和yasagent
./bin/yasboot package install -i yashandb-22.2.3.0-linux-aarch64.tar.gz -t hosts.toml
[yashan@KylinV10 yasdb_yasom]$ ./bin/yasboot package install -i yashandb-22.2.3.0-linux-aarch64.tar.gz -t hosts.toml
checking install profile.toml...
install version: yashandb 22.2.3.0
update host to yasom...
[yashan@KylinV10 yasdb_yasom]$ ps -ef | grep yas
yashan 3945392 1 0 15:04 ? 00:00:25 yasdb open -D /home/yashan/yashandb/yasdb_data
root 3950422 3950243 0 15:37 pts/1 00:00:00 su - yashan
yashan 3950423 3950422 0 15:37 pts/1 00:00:00 -bash
root 3953443 3952376 0 15:49 pts/2 00:00:00 su - yashan
yashan 3953444 3953443 0 15:49 pts/2 00:00:00 -bash
yashan 3955488 1 0 16:05 ? 00:00:00 /home/yashan/yashandb/yasdb_yasom/bin/yasagent --init -c yasdb -l 192.168.39.70:1676 --host-id host0001 -k 564e9e581348c9ae -d
yashan 3955503 1 0 16:06 ? 00:00:00 /home/yashan/yashandb/yasdb_yasom/bin/yasom --init -c yasdb -l 192.168.39.70:1675 -k 564e9e581348c9ae -d
yashan 3955542 3950423 0 16:06 pts/1 00:00:00 ps -ef
yashan 3955543 3950423 0 16:06 pts/1 00:00:00 grep yas
(3)生成托管配置模版
./bin/yasboot package config join-demo -t SE
[yashan@KylinV10 yasdb_yasom]$ ./bin/yasboot package config join-demo -t SE
[yashan@KylinV10 yasdb_yasom]$ ll
总用量 221716
drwxrwxr-x 6 yashan yashan 70 5月 4 2023 admin
drwxrwxr-x 3 yashan yashan 220 5月 4 2023 bin
drwxrwxr-x 2 yashan yashan 30 4月 17 16:05 client
drwxrwxr-x 3 yashan yashan 126 4月 17 16:06 conf
-rw-rw-r-- 1 yashan yashan 10974 5月 4 2023 gitmoduleversion.dat
-rw------- 1 yashan yashan 386 4月 17 16:05 hosts.toml
drwxrwxr-x 2 yashan yashan 65 5月 4 2023 include
drwxrwxr-x 3 yashan yashan 17 5月 4 2023 java
-rw-r--r-- 1 yashan yashan 527 4月 17 16:15 join_demo.toml
drwxr-xr-x 2 yashan yashan 4096 5月 4 2023 lib
drwxrwxr-x 2 yashan yashan 6 4月 17 16:06 log
drwxrwxr-x 3 yashan yashan 38 4月 17 15:50 om
drwxrwxr-x 2 yashan yashan 115 5月 4 2023 scripts
-rw------- 1 yashan yashan 549 4月 17 16:05 yasdb.toml
drwxrwxr-x 3 yashan yashan 22 4月 17 15:48 yashandb
-rw-r--r-- 1 yashan yashan 227004643 4月 17 15:46 yashandb-22.2.3.0-linux-aarch64.tar.gz
(4)修改托管配置模版
[yashan@KylinV10 yasdb_yasom]$ cat join_demo.toml
cluster = "tt"
sys_password = "yasdb_123"
yas_type = "SE"
[primary_config]
manage_ip = "127.0.0.1"
yasdb_home = "/opt/yasom/yashandb/tt"
node_path = "/opt/yasom/yashandb/data/tt/db-1-1"
node_id = "1-1:1"
[[standby_config]]
manage_ip = "127.0.0.1"
yasdb_home = "/opt/yasom/yashandb/tt"
node_path = "/opt/yasom/yashandb/data/tt/db-1-2"
node_id = "1-2:1"
[[standby_config]]
manage_ip = "127.0.0.1"
yasdb_home = "/opt/yasom/yashandb/tt"
node_path = "/opt/yasom/yashandb/data/tt/db-1-3"
node_id = "1-3:1"
修改后:
[yashan@KylinV10 yasdb_yasom]$ cat join_demo.toml
cluster = "yasdb"
sys_password = "yasdb_123"
yas_type = "SE"
[primary_config]
manage_ip = "192.168.39.70"
yasdb_home = "/home/yashan/yashandb/yasdb_home"
node_path = "/home/yashan/yashandb/yasdb_data"
node_id = "1-1:1"
(5)执行托管
./bin/yasboot cluster join -t SE --config join_demo.toml
[yashan@KylinV10 yasdb_yasom]$ ./bin/yasboot cluster join -t SE --config join_demo.toml
the cluster status is as follow:
|key |value
|------------+------
|clusterName |yasdb
|version |22.2.3.0
the cluster status is as follow:
hostid | node_type | nodeid | pid | instance_status | database_status | database_role | listen_address | data_path
-------------------------------------------------------------------------------------------------------------------------------------------------
host0001 | db | 1-1:1 | 3945392 | open | normal | primary | 0.0.0.0:1688 | /home/yashan/yashandb/yasdb_data
----------+-----------+--------+---------+-----------------+-----------------+---------------+----------------+----------------------------------
Check success
Are you sure you to add yasdb yasdb to yasom[yes/no]: yes
type | uuid | name | hostid | index | status | return_code | progress | cost
-------------------------------------------------------------------------------------------------------
task | eb0ecf155a0db5e6 | JoinYasdbCluster | - | yasdb | SUCCESS | 0 | 100 | -
------+------------------+------------------+--------+-------+---------+-------------+----------+------
task completed, status: SUCCESS
(6)查看状态
yashan@KylinV10 ~]$ yasboot cluster status -c yasdb -d
hostid | node_type | nodeid | pid | instance_status | database_status | database_role | listen_address | data_path
--------------------------------------------------------------------------------------------------------------------------------------------------------
host0001 | db | 1-1:1 | 3945392 | open | normal | primary | 0.0.0.0:1688 | /home/yashan/yashandb/data/yasdb/db-1-1
----------+-----------+--------+---------+-----------------+-----------------+---------------+----------------+-----------------------------------------
托管至yasom完成后,再按照流程托管至ycm即可
经验总结
安装数据库要按照规范安装,非规范安装会导致一系列问题
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 【.NET】调用本地 Deepseek 模型
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库