首页 » 达梦 » 初始,达梦数据库dm8命令行安装(on Oracle Linux7)

初始,达梦数据库dm8命令行安装(on Oracle Linux7)

达梦数据库简称DM,目前最新的版本是8.0版本,简称DM8。支持Windows、Linux和Unix操作系统,本次安装将采用Linux操作系统(Oracle Linux OS7),以高度兼容oracle颇受用户喜爱,前几天的blog提到语法兼容并不一定性能一定好,还是建议要按目标数据库的机制原生语法,后面测试一个前几天看到的执行计划,这里仅安装。

OS版本

$ cat /etc/*release
Oracle Linux Server release 7.7
NAME="Oracle Linux Server"
VERSION="7.7"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.7"
PRETTY_NAME="Oracle Linux Server 7.7"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:7:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.7
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.7
Red Hat Enterprise Linux Server release 7.7 (Maipo)
Oracle Linux Server release 7.7

# getconf LONG_BIT
64

还是我那台装了各种库的Oracle LINUX 虚机环境.

[root@oel7db1 ~]# df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     1.8G     0  1.8G   0% /dev
tmpfs                        1.8G     0  1.8G   0% /dev/shm
tmpfs                        1.8G  8.6M  1.8G   1% /run
tmpfs                        1.8G     0  1.8G   0% /sys/fs/cgroup
/dev/mapper/ol_oel7db1-root   48G   47G  642M  99% /
/dev/sdb1                     12G  9.4G  1.8G  85% /opensource
/dev/sda1                   1014M  181M  834M  18% /boot
/dev/mapper/ol_oel7db1-home   19G  117M   19G   1% /home
tmpfs                        368M     0  368M   0% /run/user/0

Note:
空间比较紧张,计划安装在/home下,生产不建议.

创建DM home和用户

mkdir /home/dm8

groupadd dinstall

useradd -g dinstall -m -d /home/dmdba -s /bin/bash dmdba

passwd dmdba

chown dmdba:dinstall -R /home/dm8

chmod -R 755 /home/dm8

vi /etc/security/limits.conf
dmdba hard nofile 65536
dmdba soft nofile 65536
dmdba hard stack 32768

安装前准备

[root@oel7db1 dmdba]# unzip dm8_20220720_x86_rh7_64_ent.zip
Archive:  dm8_20220720_x86_rh7_64_ent.zip
  inflating: dm8_20220720_x86_rh7_64_ent_8.1.2.114_pack11.iso_SHA256.txt
  inflating: dm8_20220720_x86_rh7_64_ent_8.1.2.114_pack11.iso
  
[root@oel7db1 dmdba]# ls
dm8_20220720_x86_rh7_64_ent_8.1.2.114_pack11.iso  dm8_20220720_x86_rh7_64_ent_8.1.2.114_pack11.iso_SHA256.txt  dm8_20220720_x86_rh7_64_ent.zip

[root@oel7db1 dmdba]# mkdir /mnt/dm8
[root@oel7db1 dmdba]# mount dm8_20220720_x86_rh7_64_ent_8.1.2.114_pack11.iso /mnt/dm8
mount: /dev/loop0 is write-protected, mounting read-only

[root@oel7db1 dmdba]# cd /mnt/dm8

[root@oel7db1 dm8]# ll
total 935307
-r-xr-xr-x 1 root root   2802614 Jul 20  2022 DM8 Install.pdf
-r-xr-xr-x 1 root root 954950767 Jul 20  2022 DMInstall.bin


[root@oel7db1 dm8]# df -h /tmp
Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/ol_oel7db1-root   48G   47G  642M  99% /

[root@oel7db1 dm8]# ls -l /home
total 28
drwx------   3 anbob    anbob     109 Jun  9  2020 anbob
drwxr-xr-x   2 root     root       21 Nov 22  2020 benchmarks
drwxr-xr-x   2 dmdba    dinstall    6 Jul 18 20:56 dm8
drwx------   2 dmdba    dinstall 4096 Jul 18 20:58 dmdba
drwx------   2 anbob    mysql      76 May  2  2020 mysql
drwx------   3 og       og       4096 Jun  1 16:11 og
drwx------   2 omm      dbgrp    4096 Apr 29  2022 omm
drwx------. 18 oracle   oinstall 8192 Jul 12 18:10 oracle
drwx------   4 postgres postgres 4096 Jan 10  2023 postgres


[root@oel7db1 dm8]# mkdir /home/temp

root@oel7db1 home]# chmod 777 /home/temp

[root@oel7db1 home]# su - dmdba
Last login: Tue Jul 18 21:10:40 CST 2023 on pts/0
[dmdba@oel7db1 ~]$ cd /home/temp
[dmdba@oel7db1 temp]$ touch a
[dmdba@oel7db1 temp]$ rm a
[dmdba@oel7db1 temp]$ export DM_INSTALL_TMPDIR=/home/temp
[dmdba@oel7db1 temp]$ cd /mnt/dm8
[dmdba@oel7db1 dm8]$ ls
DM8 Install.pdf  DMInstall.bin

Note:
软件1个G, 需要/tmp 1G空间,因为我虚机空间不足,配置了DM_INSTALL_TMPDIR环境变量, ISO文件中自带了安装的pdf文件,可以参考安装软件.

如果第一次安装失败中断,可能再执行会遇到下同的错误

[dmdba@oel7db1 dm8]$ ./DMInstall.bin -i
Please select the installer's language (E/e:English C/c:Chinese) [E/e]:C


[dmdba@oel7db1 dm8]$ ./DMInstall.bin -i
Please select the installer's language (E/e:English C/c:Chinese) [E/e]:C
解压安装程序.........
删除配置文件/tmp/dm_build.properties失败,请手动删除。
[dmdba@oel7db1 dm8]$ exit
logout
[root@oel7db1 home]# rm /tmp/dm_build.properties
rm: remove regular file ‘/tmp/dm_build.properties’? yes

命令行安装DM8 软件

[dmdba@oel7db1 dm8]$ ./DMInstall.bin -i
Please select the installer's language (E/e:English C/c:Chinese) [E/e]:c
解压安装程序.........
欢迎使用达梦数据库安装程序

是否输入Key文件路径? (Y/y:是 N/n:否) [Y/y]:n

是否设置时区? (Y/y:是 N/n:否) [Y/y]:
设置时区:
[ 1]: GTM-12=日界线西
[ 2]: GTM-11=萨摩亚群岛
[ 3]: GTM-10=夏威夷
[ 4]: GTM-09=阿拉斯加
[ 5]: GTM-08=太平洋时间(美国和加拿大)
[ 6]: GTM-07=亚利桑那
[ 7]: GTM-06=中部时间(美国和加拿大)
[ 8]: GTM-05=东部部时间(美国和加拿大)
[ 9]: GTM-04=大西洋时间(美国和加拿大)
[10]: GTM-03=巴西利亚
[11]: GTM-02=中大西洋
[12]: GTM-01=亚速尔群岛
[13]: GTM=格林威治标准时间
[14]: GTM+01=萨拉热窝
[15]: GTM+02=开罗
[16]: GTM+03=莫斯科
[17]: GTM+04=阿布扎比
[18]: GTM+05=伊斯兰堡
[19]: GTM+06=达卡
[20]: GTM+07=曼谷,河内
[21]: GTM+08=中国标准时间
[22]: GTM+09=汉城
[23]: GTM+10=关岛
[24]: GTM+11=所罗门群岛
[25]: GTM+12=斐济
[26]: GTM+13=努库阿勒法
[27]: GTM+14=基里巴斯
请选择设置时区 [21]:

安装类型:
1 典型安装
2 服务器
3 客户端
4 自定义
请选择安装类型的数字序号 [1 典型安装]:4
1 服务器组件
2 客户端组件
  2.1 DM管理工具
  2.2 DM性能监视工具
  2.3 DM数据迁移工具
  2.4 DM控制台工具
  2.5 DM审计分析工具
  2.6 SQL交互式查询工具
3 驱动
4 用户手册
5 数据库服务
  5.1 实时审计服务
  5.2 作业服务
  5.3 实例监控服务
  5.4 辅助插件服务
请选择安装组件的序号 (使用空格间隔) [1 2 3 4 5]:1 2 3 4 5
所需空间: 1611M

请选择安装目录 [/home/dmdba/dmdbms]:/home/dm8/dmdbms
可用空间: 14G
是否确认安装路径(/home/dm8/dmdbms)? (Y/y:是 N/n:否)  [Y/y]:y

安装前小结
安装位置: /home/dm8/dmdbms
所需空间: 1611M
可用空间: 14G
版本信息:
有效日期:
安装类型: 自定义
是否确认安装? (Y/y:是 N/n:否):y
2023-07-18 21:19:30
[INFO] 安装达梦数据库...
2023-07-18 21:19:30
[INFO] 安装 基础 模块...
2023-07-18 21:19:37
[INFO] 安装 服务器 模块...
2023-07-18 21:19:45
[INFO] 安装 客户端 模块...
2023-07-18 21:20:02
[INFO] 安装 驱动 模块...
2023-07-18 21:20:11
[INFO] 安装 手册 模块...
2023-07-18 21:20:12
[INFO] 安装 服务 模块...
2023-07-18 21:20:13
[INFO] 移动日志文件。
2023-07-18 21:20:18
[INFO] 安装达梦数据库完成。

请以root系统用户执行命令:
/home/dm8/dmdbms/script/root/root_installer.sh

安装结束

Note:
可选中文,测试无lic KEY所以就仅能使用一段时间,安装完后像oracle一样需要一个root.sh的脚本.

以root执行

[root@oel7db1 home]# cat /home/dm8/dmdbms/script/root/root_installer.sh
#!/bin/sh

#run by root
RUID=`/usr/bin/id|awk -F\( '{print $1}'|awk -F\= '{print $2}'`
if [ ${RUID} != "0" ]
then
         echo "必须以 root身份执行此脚本!"
        exit 1
fi

echo "移动 /home/dm8/dmdbms/bin/dm_svc.conf 到/etc目录"
mv "/home/dm8/dmdbms/bin/dm_svc.conf" /etc/dm_svc.conf

echo "修改服务器权限"
chmod ug+s "/home/dm8/dmdbms/bin/dminit"
chmod ug+s "/home/dm8/dmdbms/bin/dmserver"
chown 0:0 "/home/dm8/dmdbms/bin/dmcss"
chmod ug+s "/home/dm8/dmdbms/bin/dmcss"


[root@oel7db1 home]# /home/dm8/dmdbms/script/root/root_installer.sh
移动 /home/dm8/dmdbms/bin/dm_svc.conf 到/etc目录
修改服务器权限

创建初始化数据库,相当于dbca

mkdir -p /home/dm8/dmdbms/data
 
[dmdba@oel7db1 bin]$ pwd
/home/dm8/dmdbms/bin

[dmdba@oel7db1 bin]$ ./dminit PATH=/home/dm8/dmdbms/data PAGE_SIZE=8 CASE_SENSITIVE=1 CHARSET=0 DB_NAME=anbob INSTANCE_NAME=dm1 PORT_NUM=5236
initdb V8
db version: 0x7000c
file dm.key not found, use default license!
License will expire on 2023-08-01
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL

 log file path: /home/dm8/dmdbms/data/anbob/anbob01.log


 log file path: /home/dm8/dmdbms/data/anbob/anbob02.log

write to dir [/home/dm8/dmdbms/data/anbob].
create dm database success. 2023-07-18 21:31:56

Note:
更多说明可以使用dminit –help

生成SYSV服务(可自启动)

[dmdba@oel7db1 root]$ pwd
/home/dm8/dmdbms/script/root
[dmdba@oel7db1 root]$ ll
total 48
-rwxr-xr-x 1 dmdba dinstall 29116 Jul 18 21:20 dm_service_installer.sh
-rwxr-xr-x 1 dmdba dinstall  9623 Jul 18 21:20 dm_service_uninstaller.sh
-rwxr-xr-x 1 dmdba dinstall   483 Jul 18 21:20 root_installer.sh
[dmdba@oel7db1 root]$ ./dm_service_installer.sh -h
必须以 root 身份执行此脚本!
[dmdba@oel7db1 root]$


[root@oel7db1 dmdbms]# cd /home/dm8/dmdbms/script/root
[root@oel7db1 root]# ./dm_service_installer.sh -h
Usage: dm_service_installer.sh -t service_type [-p service_name_postfix] [-dm_ini dm_ini_file]
        [-watcher_ini watcher_ini_file ] [-monitor_ini monitor_ini_file] [-cssm_ini cssm_ini_file]
        [-dfs_ini dfs_ini_file] [-dcr_ini dcr_ini_file]
        [-dss_ini dss_ini_file] [-drs_ini drs_ini_file] [-dras_ini dras_ini_file] [-dcs_ini dcs_ini_file] [-server server_info]
        [-dmap_ini dmap_ini_file] [-dpc_mode SP|MP|BP] [-m open|mount] [-y dependent_service] [-auto true|false]
  or dm_service_installer.sh [-s service_file_path]
  or dm_service_installer.sh -h

   -t               服务类型,包括dmimon,dmap,dmserver,dmwatcher,dmmonitor,dmcss,dmcssm,dmasmsvr,dmasmsvr3,dmdcs,dmdrs,dmdras,dmdss
   -p               服务名后缀,对于dmimon,dmap服务类型无效
   -dm_ini          dm.ini文件路径
   -watcher_ini     dmwatcher.ini文件路径.
   -monitor_ini     dmmonitor.ini文件路径.
   -dcr_ini         dmdcr.ini文件路径.
   -cssm_ini        dmcssm.ini文件路径.
   -dss_ini         dss.ini文件路径.
   -drs_ini         drs.ini文件路径.
   -dras_ini        dras.ini文件路径.
   -dcs_ini         dcs.ini文件路径.
   -dfs_ini         dfs.ini文件路径.
   -dmap_ini        dmap.ini文件路径.
   -dpc_mode        DPC节点类型.
   -server          服务器信息(IP:PORT)
   -auto            设置服务是否自动启动,值为true或false,默认true.
   -m               设置服务器启动模式open或mount,只针对dmserver服务类型生效,可选
   -y               设置依赖服务,此选项只针对systemd服务环境下的dmserver,dmasmsvr,dmasmsvr3服务生效
   -s               服务脚本路径,设置则忽略除-y外的其他参数选项
   -h               帮助
[root@oel7db1 root]# ./dm_service_installer.sh -t dmserver -p DMSERVER -dm_ini /home/dm8/dmdbms/data/anbob/dm.ini
Created symlink from /etc/systemd/system/multi-user.target.wants/DmServiceDMSERVER.service to /usr/lib/systemd/system/DmServiceDMSERVER.service.
创建服务(DmServiceDMSERVER)完成
[root@oel7db1 root]#

启动数据库

# 命令行启动
[dmdba@oel7db1 bin]$ export DM_HOME=/home/dm8/dmdbms
[dmdba@oel7db1 bin]$ export PATH=$DM_HOME/bin:$PATH
[dmdba@oel7db1 bin]$ which dmserver
/home/dm8/dmdbms/bin/dmserver
[dmdba@oel7db1 bin]$ dmserver /home/dm8/dmdbms/data/anbob/dm.ini
file dm.key not found, use default license!
version info: develop
DM Database Server 64 V8 03134283890-20220720-165295-10045 startup...
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
Database mode = 0, oguid = 0
License will expire on 2023-08-01
file lsn: 0
ndct db load finished
ndct second level fill fast pool finished
ndct third level fill fast pool finished
ndct second level fill fast pool finished
ndct third level fill fast pool finished
ndct fill fast pool finished
iid page's trxid[1002]
NEXT TRX ID = 1003
pseg_collect_mgr_items, total collect 0 active_trxs, 0 cmt_trxs, 0 pre_cmt_trxs, 0 to_release_trxs, 0 active_pages, 0 cmt_pages, 0 pre_cmt_pages, 0 to_release_pages, 0 mgr pages, 0 mgr recs!
iid page's trxid[2004]
NEXT TRX ID = 3006.
total 0 active crash trx, pseg_crash_trx_rollback sys_only(0) begin ...
pseg_crash_trx_rollback end, total 0 active crash trx, include 0 empty_trxs, 0 empty_pages which only need to delete mgr recs.
pseg_crash_trx_rollback end
pseg recv finished
nsvr_startup end.
aud sys init success.
aud rt sys init success.
trx: 3006 purged 1 pages
trx: 3025 purged 1 pages
trx: 3026 purged 1 pages
trx: 3027 purged 1 pages
trx: 3028 purged 1 pages
trx: 3029 purged 1 pages
trx: 3039 purged 1 pages
trx: 3159 purged 1 pages
trx: 3172 purged 1 pages
trx: 3173 purged 1 pages
trx: 3174 purged 1 pages
trx: 3175 purged 1 pages
trx: 3176 purged 1 pages
trx: 3178 purged 1 pages
trx: 3179 purged 1 pages
trx: 3181 purged 1 pages
trx: 3183 purged 1 pages
trx: 3190 purged 1 pages
trx: 3196 purged 1 pages
trx: 3206 purged 1 pages
trx: 3219 purged 1 pages
trx: 3220 purged 1 pages
trx: 3221 purged 1 pages
trx: 3222 purged 1 pages
trx: 3234 purged 1 pages
trx: 3236 purged 1 pages
trx: 3237 purged 1 pages
trx: 3238 purged 1 pages
trx: 3283 purged 23 pages
trx: 3310 purged 1 pages
trx: 3311 purged 1 pages
trx: 3312 purged 1 pages
trx: 3313 purged 1 pages
trx: 3319 purged 1 pages
trx: 3321 purged 1 pages
trx: 3323 purged 1 pages
trx: 3328 purged 1 pages
trx: 3333 purged 1 pages
trx: 3338 purged 1 pages
trx: 3340 purged 1 pages
trx: 3343 purged 1 pages
trx: 3345 purged 1 pages
trx: 3351 purged 1 pages
trx: 3352 purged 1 pages
trx: 3501 purged 1 pages
trx: 3513 purged 1 pages
trx: 3518 purged 1 pages
trx: 3523 purged 1 pages
trx: 3542 purged 29 pages
trx: 3543 purged 1 pages
trx: 3544 purged 1 pages
trx: 3571 purged 1 pages
trx: 3575 purged 1 pages
trx: 3577 purged 1 pages
trx: 3579 purged 1 pages
trx: 3581 purged 1 pages
trx: 3583 purged 1 pages
trx: 3585 purged 1 pages
trx: 3587 purged 1 pages
trx: 3589 purged 1 pages
trx: 3591 purged 1 pages
trx: 3593 purged 1 pages
trx: 3595 purged 1 pages
trx: 3597 purged 1 pages
trx: 3599 purged 1 pages
trx: 3601 purged 1 pages
trx: 3603 purged 1 pages
trx: 3605 purged 1 pages
trx: 3607 purged 1 pages
trx: 3609 purged 1 pages
trx: 3611 purged 1 pages
trx: 3613 purged 1 pages
trx: 3615 purged 1 pages
trx: 3617 purged 1 pages
trx: 3619 purged 1 pages
trx: 3621 purged 1 pages
systables desc init success.
ndct_db_load_info success.
nsvr_process_before_open begin.
nsvr_process_before_open success.
total 0 active crash trx, pseg_crash_trx_rollback sys_only(0) begin ...
pseg_crash_trx_rollback end, total 0 active crash trx, include 0 empty_trxs, 0 empty_pages which only need to delete mgr recs.
pseg_crash_trx_rollback end
SYSTEM IS READY.

# systemctl也可以启动service

[root@oel7db1 root]# systemctl -a|grep -i dmse
  DmServiceDMSERVER.service                                                                                      loaded    inactive dead      DM Instance Service(DmServiceDMSERVER).

-- systemctl start DmServiceDMSERVER.service

[root@oel7db1 root]# systemctl status DmServiceDMSERVER.service
● DmServiceDMSERVER.service - DM Instance Service(DmServiceDMSERVER).
   Loaded: loaded (/usr/lib/systemd/system/DmServiceDMSERVER.service; enabled; vendor preset: disabled)
   Active: inactive (dead)

查看进程

[dmdba@oel7db1 ~]$ netstat -tanelp|grep dmserver
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp6       0      0 :::5236                 :::*                    LISTEN      54326      70959      29646/dmserver
[dmdba@oel7db1 ~]$ ps -ef|grep dmserver
dmdba    29646 25703  1 21:41 pts/0    00:00:05 dmserver /home/dm8/dmdbms/data/anbob/dm.ini
dmdba    30148 29860  0 21:49 pts/1    00:00:00 grep --color=auto dmserver

连接DM数据库

[dmdba@oel7db1 ~]$ disql SYSDBA/SYSDBA

服务器[LOCALHOST:5236]:处于普通打开状态
登录使用时间 : 2.727(ms)
disql V8
SQL>


[dmdba@oel7db1 ~]$ disql SYSDBA/SYSDBA@localhost:5236

服务器[localhost:5236]:处于普通打开状态
登录使用时间 : 2.870(ms)
disql V8

SQL> select * from v$database;

行号     NAME  CREATE_TIME         ARCH_MODE LAST_CKPT_TIME      STATUS$     ROLE$       MAX_SIZE             TOTAL_SIZE           DSC_NODES   OPEN_COUNT  STARTUP_COUNT        LAST_STARTUP_TIME
---------- ----- ------------------- --------- ------------------- ----------- ----------- -------------------- -------------------- ----------- ----------- -------------------- -------------------
1          anbob 2023-07-18 21:31:55 N         2023-07-18 21:44:31 4           0           0                    20992                1           1           1                    2023-07-18 21:41:41

已用时间: 81.783(毫秒). 执行号:55200.
SQL> select * from dba_users;

行号     USERNAME   USER_ID     PASSWORD ACCOUNT_STATUS LOCK_DATE EXPIRY_DATE DEFAULT_TABLESPACE DEFAULT_INDEX_TABLESPACE TEMPORARY_TABLESPACE CREATED
---------- ---------- ----------- -------- -------------- --------- ----------- ------------------ ------------------------ -------------------- --------------------------
           PROFILE                                INITIAL_RSRC_CONSUMER_GROUP EXTERNAL_NAME PASSWORD_VERSIONS EDITIONS_ENABLED AUTHENTICATION_TYPE NOWDATE
           -------------------------------------- --------------------------- ------------- ----------------- ---------------- ------------------- -------------------
1          SYSAUDITOR 50331650    NULL     OPEN           NULL      NULL        SYSTEM             SYSTEM                   TEMP                 2023-07-18 21:41:32.603937
           /home/dm8/dmdbms/data/anbob/SYSTEM.DBF NULL                        NULL          0                 Y                NDCT_DB_AUTHENT     2023-07-18 21:46:18

2          SYSSSO     50331651    NULL     OPEN           NULL      NULL        SYSTEM             SYSTEM                   TEMP                 2023-07-18 21:41:32.603937
           /home/dm8/dmdbms/data/anbob/SYSTEM.DBF NULL                        NULL          0                 Y                NDCT_DB_AUTHENT     2023-07-18 21:46:18

3          SYSDBA     50331649    NULL     OPEN           NULL      NULL        MAIN               SYSTEM                   TEMP                 2023-07-18 21:41:32.603937
           /home/dm8/dmdbms/data/anbob/MAIN.DBF   NULL                        NULL          0                 Y                NDCT_DB_AUTHENT     2023-07-18 21:46:18


行号     USERNAME   USER_ID     PASSWORD ACCOUNT_STATUS LOCK_DATE EXPIRY_DATE DEFAULT_TABLESPACE DEFAULT_INDEX_TABLESPACE TEMPORARY_TABLESPACE CREATED
---------- ---------- ----------- -------- -------------- --------- ----------- ------------------ ------------------------ -------------------- --------------------------
           PROFILE                                INITIAL_RSRC_CONSUMER_GROUP EXTERNAL_NAME PASSWORD_VERSIONS EDITIONS_ENABLED AUTHENTICATION_TYPE NOWDATE
           -------------------------------------- --------------------------- ------------- ----------------- ---------------- ------------------- -------------------
4          SYS        50331648    NULL     OPEN           NULL      NULL        SYSTEM             SYSTEM                   TEMP                 2023-07-18 21:41:32.603937
           /home/dm8/dmdbms/data/anbob/SYSTEM.DBF NULL                        NULL          0                 Y                NDCT_DB_AUTHENT     2023-07-18 21:46:18


已用时间: 12.597(毫秒). 执行号:55201.
SQL> select * from v$tablespace;

行号     ID          NAME   CACHE TYPE$       STATUS$     MAX_SIZE             TOTAL_SIZE           FILE_NUM    ENCRYPT_NAME ENCRYPTED_KEY COPY_NUM    SIZE_MODE OPT_NODE    USED_SIZE
---------- ----------- ------ ----- ----------- ----------- -------------------- -------------------- ----------- ------------ ------------- ----------- --------- ----------- --------------------
1          0           SYSTEM       1           0           0                    3328                 1           NULL         NULL          NULL        NULL      NULL        2208
2          1           ROLL         1           0           0                    16384                1           NULL         NULL          NULL        NULL      NULL        1504
3          3           TEMP         2           0           0                    1280                 1           NULL         NULL          NULL        NULL      NULL        16
4          4           MAIN         1           0           0                    16384                1           NULL         NULL          NULL        NULL      NULL        16

已用时间: 1.482(毫秒). 执行号:55202.
SQL> select * from v$datafile;

行号     GROUP_ID    ID          PATH                                   CLIENT_PATH CREATE_TIME         STATUS$     RW_STATUS   LAST_CKPT_TIME      MODIFY_TIME         MODIFY_TRX
---------- ----------- ----------- -------------------------------------- ----------- ------------------- ----------- ----------- ------------------- ------------------- --------------------
           TOTAL_SIZE           FREE_SIZE            FREE_PAGE_NO         PAGES_READ           PAGES_WRITE          PAGE_SIZE   READ_REQUEST WRITE_REQUEST AUTO_EXTEND MAX_SIZE    NEXT_SIZE   MIRROR_PATH
           -------------------- -------------------- -------------------- -------------------- -------------------- ----------- ------------ ------------- ----------- ----------- ----------- -----------
1          0           0           /home/dm8/dmdbms/data/anbob/SYSTEM.DBF SYSTEM.DBF  2023-07-18 21:31:55 1           2           2023-07-18 21:44:31 2023-07-18 21:31:55 0
           3328                 2491                 2208                 40                   830                  8192        40           830           1           16777215    0           NULL

2          1           0           /home/dm8/dmdbms/data/anbob/ROLL.DBF   ROLL.DBF    2023-07-18 21:31:55 1           2           2023-07-18 21:44:31 2023-07-18 21:31:55 0
           16384                15217                1504                 1                    1242                 8192        1            1242          1           16777215    0           NULL

3          3           0           /home/dm8/dmdbms/data/anbob/TEMP.DBF   TEMP.DBF    2023-07-18 21:41:31 1           2           2023-07-18 21:44:31 2023-07-18 21:41:31 0
           1280                 1272                 16                   0                    0                    8192        0            0             1           16777215    0           NULL


行号     GROUP_ID    ID          PATH                                   CLIENT_PATH CREATE_TIME         STATUS$     RW_STATUS   LAST_CKPT_TIME      MODIFY_TIME         MODIFY_TRX
---------- ----------- ----------- -------------------------------------- ----------- ------------------- ----------- ----------- ------------------- ------------------- --------------------
           TOTAL_SIZE           FREE_SIZE            FREE_PAGE_NO         PAGES_READ           PAGES_WRITE          PAGE_SIZE   READ_REQUEST WRITE_REQUEST AUTO_EXTEND MAX_SIZE    NEXT_SIZE   MIRROR_PATH
           -------------------- -------------------- -------------------- -------------------- -------------------- ----------- ------------ ------------- ----------- ----------- ----------- -----------
4          4           0           /home/dm8/dmdbms/data/anbob/MAIN.DBF   MAIN.DBF    2023-07-18 21:31:55 1           2           2023-07-18 21:44:31 2023-07-18 21:31:55 0
           16384                16376                16                   1                    0                    8192        1            0             1           16777215    0           NULL


已用时间: 0.713(毫秒). 执行号:55203.
SQL> select * from v$session;
select * from v$session;
第1 行附近出现错误[-2106]:无效的表或视图名[V$SESSION].
已用时间: 0.254(毫秒). 执行号:0.

SQL> select * from v$version;

行号     BANNER
---------- ---------------------------------
1          DM Database Server 64 V8
2          DB Version: 0x7000c
3          03134283890-20220720-165295-10045

已用时间: 1.787(毫秒). 执行号:55300.

Note:
真是当oracle一样使用就可以,连动态视图名都大部分一样。

ok 先到这里回头测试功能,夜已深,明早出差,潦草结尾.

— enjob —

打赏

目前这篇文章有1条评论(Rss)评论关闭。

  1. Yorum Satın Al | #1
    2023-07-21 at 07:37

    Useful article, thank you. Top article, very helpful.