惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 南国之恋

解决delphi7在win10上安装后无法正常使用的问题 windows服务器C盘空间清理,发现大文件,可用!AutoCleanC_DeepScan - 南国之恋 查看分区表大小 系统表空间清理 postman调用deepseek webapi 将Nginx安装为windows服务,下载nssm 单词系列2 2025高考英语高频易错词汇分类速记 vs2019 本地源“C:\Program Files\DevExpress 22.2\Components\System\Components\Packages”不存在 - 南国之恋 mysql数据库定时事件 plsql查询oracle数据表时,将备注显示成列名 生成脚本 oracle密码过期问题,用户锁定问题 Delphi 7 编译软件申请管理员权限 mysql odbc delphi连接问题 调用Exe程序并且出现界面 CreateProc(ProcessName:String) c# winform exe.config不能更新 frp(fast reverse proxy)是一款高性能的反向代理应用 GitHub上整理的一些工具 Kettle 中文名称叫水壶
达梦数据库学习记录
南国之恋 · 2025-02-06 · via 博客园 - 南国之恋

模式切换
//查询当前模式
SELECT SYS_CONTEXT ('userenv', 'current_schema') FROM DUAL;
//设置当前登录用户的默认模式
SET SCHEMA SMARTWELL;

create tablespace "smartwell" datafile 'D:\dmdbms\data\DAMENG\smartwell.DBF' size 128 autoextend on next 100 maxsize 10240 CACHE = NORMAL encrypt with RC4;

create user "smartwell" identified by "smartwell@123" hash with SHA512 salt encrypt by "123456" default tablespace "smartwell" default index tablespace "smartwell";

grant "PUBLIC","SOI" to "smartwell";
grant "DBA" to "smartwell";
grant "RESOURCE" to "smartwell";

开发指南 .net dapper连接达梦数据库
https://eco.dameng.com/document/dm/zh-cn/app-dev/net-Dapper.html
chloe也支持达梦数据库

https://github.com/shuxinqin/Chloe

使用达梦数据库一段时间了,有些日常小细节需要注意,总结如下:
1、求一个平均数 select 3/2 from dual oracle得到的是1.5,达梦得到的1,这是因为DM对于长度小于10位的整数,默认为INT类型。DM7当做INT处理,返回INT。
解决方案:
(1)修改dm.ini参数COMPATIBLE_MODE=2,兼容Oracle的NUMBER(详情请参考《DM7系统管理员手册》)
可以通过执行DM函数修改:sp_set_para_value(2,'COMPATIBLE_MODE',2),注意:修改后需要重启数据库才能生效
修改后可以查询相关的视图进行确认。 最主要的视图是:
1)V$PARAMETER:显示 ini 参数和 dminit 建库参数的类型及参数值信息(当前会话值、系统值及 dm.ini
文件中的值)。
2)v$dm_ini:所有 ini 参数和 dminit 建库参数信息。 但这个视图查询的内容有点多,DM提供了分类的视图,比如V$DM_ARCH_INI,查询归档的相关参数值。
(2)将INT转为NUMBER select 3.0/2.0 from dual工作中采用的是第一种方法,避免了INT转NUMBER的操作,同时兼容了oracle。
另外还要注意,mybatis中返回变量要类型设置为java.lang.Float,jdbcType设置为DECIMAL就可以正常展示了
<result column="avg_remark_per_case" property="remarkCntPerCase" javaType="java.lang.Float" jdbcType="DECIMAL"/>
(3)如果以上方法还不能解决,尝试将CALC_AS_DECIMAL设置为1并重启数据库
2、全库导出后导入提示该工具不能解析此文件,请使用更高版本的文件
原因解析:说明导入人使用的dimp版本老了
解决方案:数据库导出的库的数据库软件安装目录下的dmdbms/bin文件夹整个打包发给导入的人,然后导入人在本地上使用这个包来导入。这样做的目的是想通过替换bin文件夹来升级dimp工具然后再导入。
另外要注意:导入的模式要保持一致,否则会新创建一个导出时使用的模式,无法导入到要求的模式下
3、查询语句中IS NOT NULL不起作用和1一样,也是设置为兼容模式
4、创建用户后登录总提示密码不对
发现是DM默认密码是大写,登录的时候输入大写就能登录了。
可以通过以下sql查看数据库是否大小写敏感。SELECT SF_GET_CASE_SENSITIVE_FLAG() --1:敏感 0:不敏感
5、还有其他一些问题,待续