欢迎光临
我们一直在努力

DM 系统管理员:核心职责与数据库运维实战指南

一、DM 系统管理员:角色定位与核心职责

1.1 DM 系统管理员:系统内置账户解析

在达梦数据库 (DM8) 中,DM 系统管理员是数据库的最高权限拥有者。默认的系统管理员账户为 SYSDBA。在 DM8 的初始安装版本中,SYSDBA 的默认密码为 SYSDBA001 (出于安全考虑,新版本强制要求更复杂的密码)。SYSDBA 拥有几乎所有的数据库系统权限,能够对数据库进行全方位的管理和维护。

1.2 DM 系统管理员:日常管理核心职责

作为 DM 系统管理员,主要职责包括但不限于以下几项:

  • 数据库实例的启动、停止与状态监控。
  • 管理数据库存储结构,包括表空间、数据文件和重做日志。
  • 创建和管理用户、角色,分配系统权限与对象权限。
  • 执行数据库的物理备份与逻辑备份,保障数据安全。
  • 处理数据库故障,执行数据恢复与灾难恢复演练。
  • 1.3 DM 系统管理员:与其他内置账户的区别

    DM8 实行三权分立的安全体系,除了 DM 系统管理员 (SYSDBA),还包括系统安全员 (SYSSSO) 和系统审计员 (SYSAUDITOR)。SYSDBA 负责日常管理和维护,SYSSSO 负责安全策略配置,SYSAUDITOR 负责审计记录的查看与管理。这种机制避免了单一账户权力过大导致的安全风险。

    二、DM 系统管理员:数据库启停与连接管理

    2.1 DM 系统管理员:数据库实例启动与停止

    DM 系统管理员可以通过 DM 服务管理器或命令行工具 (DmService) 控制数据库实例的生命周期。以下是 Linux 环境下通过命令行启停数据库的标准步骤:

  • 启动数据库实例:切换至 dmdba 用户,执行 systemctl start DmServiceDMSERVER (假设服务名为 DmServiceDMSERVER)。
  • 停止数据库实例:执行 systemctl stop DmServiceDMSERVER。
  • 查看实例状态:执行 systemctl status DmServiceDMSERVER。
  • 2.2 DM 系统管理员:客户端连接配置与实践

    DM 系统管理员通常使用 DM 管理工具 (DEM) 或命令行工具 (disql) 连接数据库。使用 disql 连接的语法如下:

    disql SYSDBA/SYSDBA001@localhost:5236

    连接成功后,DM 系统管理员即可执行 SQL 语句进行管理操作。

    2.3 DM 系统管理员:状态监控与进程管理

    通过查询动态性能视图,DM 系统管理员可以实时掌握数据库运行状况。例如,查询当前数据库状态:

    SELECT status$ FROM v$instance;

    进程管理方面,DM 系统管理员需关注 dmserver 进程的内存与 CPU 占用,防止异常进程耗尽系统资源。

    三、DM 系统管理员:用户与权限体系构建

    3.1 DM 系统管理员:用户创建与密码管理

    DM 系统管理员负责为业务系统创建专属用户。创建用户时需指定密码策略,确保密码复杂度符合安全标准。示例代码如下:

    CREATE USER business_user IDENTIFIED BY "Busi@123456" DEFAULT TABLESPACE MAIN;

    3.2 DM 系统管理员:角色定义与权限分配

    为简化权限管理,DM 系统管理员通常会创建角色,将权限赋予角色,再将角色赋予用户。以下是完整的权限分配流程:

    #publish-mermaid-1786118236966-0{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#publish-mermaid-1786118236966-0 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#publish-mermaid-1786118236966-0 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#publish-mermaid-1786118236966-0 .error-icon{fill:#552222;}#publish-mermaid-1786118236966-0 .error-text{fill:#552222;stroke:#552222;}#publish-mermaid-1786118236966-0 .edge-thickness-normal{stroke-width:1px;}#publish-mermaid-1786118236966-0 .edge-thickness-thick{stroke-width:3.5px;}#publish-mermaid-1786118236966-0 .edge-pattern-solid{stroke-dasharray:0;}#publish-mermaid-1786118236966-0 .edge-thickness-invisible{stroke-width:0;fill:none;}#publish-mermaid-1786118236966-0 .edge-pattern-dashed{stroke-dasharray:3;}#publish-mermaid-1786118236966-0 .edge-pattern-dotted{stroke-dasharray:2;}#publish-mermaid-1786118236966-0 .marker{fill:#333333;stroke:#333333;}#publish-mermaid-1786118236966-0 .marker.cross{stroke:#333333;}#publish-mermaid-1786118236966-0 svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#publish-mermaid-1786118236966-0 p{margin:0;}#publish-mermaid-1786118236966-0 .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#publish-mermaid-1786118236966-0 .cluster-label text{fill:#333;}#publish-mermaid-1786118236966-0 .cluster-label span{color:#333;}#publish-mermaid-1786118236966-0 .cluster-label span p{background-color:transparent;}#publish-mermaid-1786118236966-0 .label text,#publish-mermaid-1786118236966-0 span{fill:#333;color:#333;}#publish-mermaid-1786118236966-0 .node rect,#publish-mermaid-1786118236966-0 .node circle,#publish-mermaid-1786118236966-0 .node ellipse,#publish-mermaid-1786118236966-0 .node polygon,#publish-mermaid-1786118236966-0 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#publish-mermaid-1786118236966-0 .rough-node .label text,#publish-mermaid-1786118236966-0 .node .label text,#publish-mermaid-1786118236966-0 .image-shape .label,#publish-mermaid-1786118236966-0 .icon-shape .label{text-anchor:middle;}#publish-mermaid-1786118236966-0 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#publish-mermaid-1786118236966-0 .rough-node .label,#publish-mermaid-1786118236966-0 .node .label,#publish-mermaid-1786118236966-0 .image-shape .label,#publish-mermaid-1786118236966-0 .icon-shape .label{text-align:center;}#publish-mermaid-1786118236966-0 .node.clickable{cursor:pointer;}#publish-mermaid-1786118236966-0 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#publish-mermaid-1786118236966-0 .arrowheadPath{fill:#333333;}#publish-mermaid-1786118236966-0 .edgePath .path{stroke:#333333;stroke-width:1px;}#publish-mermaid-1786118236966-0 .flowchart-link{stroke:#333333;fill:none;}#publish-mermaid-1786118236966-0 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#publish-mermaid-1786118236966-0 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#publish-mermaid-1786118236966-0 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#publish-mermaid-1786118236966-0 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#publish-mermaid-1786118236966-0 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#publish-mermaid-1786118236966-0 .cluster text{fill:#333;}#publish-mermaid-1786118236966-0 .cluster span{color:#333;}#publish-mermaid-1786118236966-0 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#publish-mermaid-1786118236966-0 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#publish-mermaid-1786118236966-0 rect.text{fill:none;stroke-width:0;}#publish-mermaid-1786118236966-0 .icon-shape,#publish-mermaid-1786118236966-0 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#publish-mermaid-1786118236966-0 .icon-shape p,#publish-mermaid-1786118236966-0 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#publish-mermaid-1786118236966-0 .icon-shape .label rect,#publish-mermaid-1786118236966-0 .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#publish-mermaid-1786118236966-0 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#publish-mermaid-1786118236966-0 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#publish-mermaid-1786118236966-0 .node .neo-node{stroke:#9370DB;}#publish-mermaid-1786118236966-0 [data-look=\”neo\”].node rect,#publish-mermaid-1786118236966-0 [data-look=\”neo\”].cluster rect,#publish-mermaid-1786118236966-0 [data-look=\”neo\”].node polygon{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#publish-mermaid-1786118236966-0 [data-look=\”neo\”].swimlane.cluster rect{filter:none;}#publish-mermaid-1786118236966-0 [data-look=\”neo\”].node path{stroke:#9370DB;stroke-width:1px;}#publish-mermaid-1786118236966-0 [data-look=\”neo\”].node .outer-path{filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#publish-mermaid-1786118236966-0 [data-look=\”neo\”].node .neo-line path{stroke:#9370DB;filter:none;}#publish-mermaid-1786118236966-0 [data-look=\”neo\”].node circle{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#publish-mermaid-1786118236966-0 [data-look=\”neo\”].node circle .state-start{fill:#000000;}#publish-mermaid-1786118236966-0 [data-look=\”neo\”].icon-shape .icon{fill:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#publish-mermaid-1786118236966-0 [data-look=\”neo\”].icon-shape .icon-neo path{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#publish-mermaid-1786118236966-0 :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    DM 系统管理员登录

    创建自定义角色

    为角色授予对象权限

    创建业务用户

    将角色赋予用户

    用户验证权限并开展业务

    3.3 DM 系统管理员:权限回收与安全审计

    当业务变更或人员调整时,DM 系统管理员需及时回收权限。回收权限的语法与授权类似,只需将 GRANT 替换为 REVOKE。

    REVOKE SELECT ON business_table FROM business_user;

    同时,配合系统审计员 (SYSAUDITOR) 的审计策略,DM 系统管理员可以追踪权限使用情况,确保数据访问合规。

    四、DM 系统管理员:备份恢复与容灾演练

    4.1 DM 系统管理员:逻辑备份与恢复策略

    逻辑备份使用 dexp 工具导出数据库对象。DM 系统管理员可按需导出全库或指定 schema。

    dexp SYSDBA/SYSDBA001@localhost:5236 FILE=dexp_full.dmp LOG=dexp_full.log FULL=Y

    恢复时使用 dimp 工具导入数据。

    4.2 DM 系统管理员:物理备份与还原实操

    物理备份是 DM 系统管理员保障数据安全的重中之重。通过 RMAN 工具执行联机或脱机备份。以下为脱机全备示例:

    dmrman CTLSTMT="BACKUP DATABASE '/opt/dmdbms/data/DAMENG/dm.ini' FULL TO DB_FULL BACKUPSET '/opt/dmdbms/data/BACKUP/DB_FULL'"

    4.3 DM 系统管理员:容灾演练流程图解

    为验证备份的有效性,DM 系统管理员需定期进行容灾演练。以下是标准演练流程:

    #publish-mermaid-1786118237014-1{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#publish-mermaid-1786118237014-1 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#publish-mermaid-1786118237014-1 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#publish-mermaid-1786118237014-1 .error-icon{fill:#552222;}#publish-mermaid-1786118237014-1 .error-text{fill:#552222;stroke:#552222;}#publish-mermaid-1786118237014-1 .edge-thickness-normal{stroke-width:1px;}#publish-mermaid-1786118237014-1 .edge-thickness-thick{stroke-width:3.5px;}#publish-mermaid-1786118237014-1 .edge-pattern-solid{stroke-dasharray:0;}#publish-mermaid-1786118237014-1 .edge-thickness-invisible{stroke-width:0;fill:none;}#publish-mermaid-1786118237014-1 .edge-pattern-dashed{stroke-dasharray:3;}#publish-mermaid-1786118237014-1 .edge-pattern-dotted{stroke-dasharray:2;}#publish-mermaid-1786118237014-1 .marker{fill:#333333;stroke:#333333;}#publish-mermaid-1786118237014-1 .marker.cross{stroke:#333333;}#publish-mermaid-1786118237014-1 svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#publish-mermaid-1786118237014-1 p{margin:0;}#publish-mermaid-1786118237014-1 .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#publish-mermaid-1786118237014-1 .cluster-label text{fill:#333;}#publish-mermaid-1786118237014-1 .cluster-label span{color:#333;}#publish-mermaid-1786118237014-1 .cluster-label span p{background-color:transparent;}#publish-mermaid-1786118237014-1 .label text,#publish-mermaid-1786118237014-1 span{fill:#333;color:#333;}#publish-mermaid-1786118237014-1 .node rect,#publish-mermaid-1786118237014-1 .node circle,#publish-mermaid-1786118237014-1 .node ellipse,#publish-mermaid-1786118237014-1 .node polygon,#publish-mermaid-1786118237014-1 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#publish-mermaid-1786118237014-1 .rough-node .label text,#publish-mermaid-1786118237014-1 .node .label text,#publish-mermaid-1786118237014-1 .image-shape .label,#publish-mermaid-1786118237014-1 .icon-shape .label{text-anchor:middle;}#publish-mermaid-1786118237014-1 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#publish-mermaid-1786118237014-1 .rough-node .label,#publish-mermaid-1786118237014-1 .node .label,#publish-mermaid-1786118237014-1 .image-shape .label,#publish-mermaid-1786118237014-1 .icon-shape .label{text-align:center;}#publish-mermaid-1786118237014-1 .node.clickable{cursor:pointer;}#publish-mermaid-1786118237014-1 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#publish-mermaid-1786118237014-1 .arrowheadPath{fill:#333333;}#publish-mermaid-1786118237014-1 .edgePath .path{stroke:#333333;stroke-width:1px;}#publish-mermaid-1786118237014-1 .flowchart-link{stroke:#333333;fill:none;}#publish-mermaid-1786118237014-1 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#publish-mermaid-1786118237014-1 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#publish-mermaid-1786118237014-1 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#publish-mermaid-1786118237014-1 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#publish-mermaid-1786118237014-1 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#publish-mermaid-1786118237014-1 .cluster text{fill:#333;}#publish-mermaid-1786118237014-1 .cluster span{color:#333;}#publish-mermaid-1786118237014-1 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#publish-mermaid-1786118237014-1 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#publish-mermaid-1786118237014-1 rect.text{fill:none;stroke-width:0;}#publish-mermaid-1786118237014-1 .icon-shape,#publish-mermaid-1786118237014-1 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#publish-mermaid-1786118237014-1 .icon-shape p,#publish-mermaid-1786118237014-1 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#publish-mermaid-1786118237014-1 .icon-shape .label rect,#publish-mermaid-1786118237014-1 .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#publish-mermaid-1786118237014-1 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#publish-mermaid-1786118237014-1 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#publish-mermaid-1786118237014-1 .node .neo-node{stroke:#9370DB;}#publish-mermaid-1786118237014-1 [data-look=\”neo\”].node rect,#publish-mermaid-1786118237014-1 [data-look=\”neo\”].cluster rect,#publish-mermaid-1786118237014-1 [data-look=\”neo\”].node polygon{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#publish-mermaid-1786118237014-1 [data-look=\”neo\”].swimlane.cluster rect{filter:none;}#publish-mermaid-1786118237014-1 [data-look=\”neo\”].node path{stroke:#9370DB;stroke-width:1px;}#publish-mermaid-1786118237014-1 [data-look=\”neo\”].node .outer-path{filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#publish-mermaid-1786118237014-1 [data-look=\”neo\”].node .neo-line path{stroke:#9370DB;filter:none;}#publish-mermaid-1786118237014-1 [data-look=\”neo\”].node circle{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#publish-mermaid-1786118237014-1 [data-look=\”neo\”].node circle .state-start{fill:#000000;}#publish-mermaid-1786118237014-1 [data-look=\”neo\”].icon-shape .icon{fill:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#publish-mermaid-1786118237014-1 [data-look=\”neo\”].icon-shape .icon-neo path{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#publish-mermaid-1786118237014-1 :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    准备备份集与恢复环境

    停止生产数据库服务

    使用 dmrman 还原数据库

    应用归档日志进行恢复

    启动数据库并验证数据一致性

    演练完成并出具报告

    通过科学的备份与恢复机制,DM 系统管理员能够有效应对物理损坏、逻辑错误等极端场景,保障达梦数据库的高可用与数据完整性。

    赞(0)
    未经允许不得转载:171主机测评 » DM 系统管理员:核心职责与数据库运维实战指南
    分享到: 更多 (0)

    评论 抢沙发

    • 昵称 (必填)
    • 邮箱 (必填)
    • 网址