暂无图片
暂无图片
1
暂无图片
暂无图片
暂无图片

达梦V8数据库安装(单机)

IT小Chen 2021-11-25
5970

DM V8数据库介质下载地址:

https://eco.dameng.com/download/

安装文档:

https://eco.dameng.com/docs/zh-cn/start/install-dm-linux-prepare.html

安装前准备:

新建 dmdba 用户

创建用户所在的组,命令如下:
groupadd dinstall
创建用户,命令如下:
useradd -g dinstall -m -d /home/dmdba -s /bin/bash dmdba
修改用户密码,命令如下:
passwd dmdba

修改文件打开最大数

重启服务器后永久生效
使用 vi 编辑器打开 /etc/security/limits.conf 文件,命令如下:
vi /etc/security/limits.conf
在最后添加四条语句,需添加的语句如下:
dmdba hard nofile 65536
dmdba soft nofile 65536
dmdba hard stack 32768
dmdba soft stack 16384
切换到 dmdba 用户,查看是否生效,命令如下
su - dmdba
ulimit -a
设置参数临时生效
可使用 dmdba 用户执行如下命令,使设置临时生效:
ulimit -n 65536

准备安装介质

切换到 root 用户,将 DM 数据库的 iso 安装包保存在任意位置,例如 /opt 目录下,执行如下命令挂载镜像:

[root@cjcos02 opt]# unzip dm8_20210818_x86_rh7_64_ent.zip 
[root@cjcos02 opt]# ll -rth
total 741M
drwxr-xr-x. 2 root root 6 Sep 5 2017 rh
drwxr-xr-x 3 root root 22 Jan 25 2020 ORCLfmap
drwxr-xr-x 2 root root 127 Aug 20 10:42 dm8_20210818_x86_rh7_64_ent
-rw-r--r-- 1 root root 741M Nov 19 21:59 dm8_20210818_x86_rh7_64_ent.zip

解决安装介质

[root@cjcos02 dm8_20210818_x86_rh7_64_ent]# ll -rth
total 752M
-rw-r--r-- 1 root root 167 Aug 20 09:06 dm8_20210818_x86_rh7_64_ent_8.1.2.18_pack13.iso_SHA256.txt
-rw-r--r-- 1 root root 752M Aug 20 09:06 dm8_20210818_x86_rh7_64_ent_8.1.2.18_pack13.iso

挂载安装介质

[root@cjcos02 dm8_20210818_x86_rh7_64_ent]# mount -o loop dm8_20210818_x86_rh7_64_ent_8.1.2.18_pack13.iso /mnt
mount: /dev/loop0 is write-protected, mounting read-only

新建安装目录

在根目录下创建 /dm8 文件夹,用来安装 DM 数据库。命令如下: 
mkdir /dm8

修改安装目录权限

将新建的安装路径目录权限的用户修改为 dmdba,用户组修改为 dinstall。命令如下: 
chown dmdba:dinstall -R /dm8/
给安装路径下的文件设置 755 权限。命令如下:
chmod -R 755 /dm8

数据库安装

DM 数据库在 Linux 环境下支持命令行安装和图形化安装,本章节主要介绍命令行安装。

命令行安装

切换至 dmdba 用户下,在 /mnt 目录下使用命令行安装数据库程序,依次执行以下命令安装 DM 数据库。

su - dmdba
[dmdba@cjcos02 ~]$ cd /mnt/
[dmdba@cjcos02 mnt]$ ls
DM8 Install.pdf DMInstall.bin
[dmdba@cjcos02 mnt]$ ./DMInstall.bin --help
Failed to get the parameter of the install mode! the default mode is GUI Install, Command-Line Install: ./DMInstall -i, Silent Install: ./DMInstall -q confi_file_path
[dmdba@cjcos02 mnt]$ ./DMInstall.bin -i
###安装语言选择英文
Please select the installer's language (E/e:English C/c:Chinese) [E/e]:
Extract install files..........
Welcome to DM DBMS Installer


Whether to input the path of Key File? (Y/y:Yes N/n:No) [Y/y]:n


###时区选21
Whether to Set The TimeZone? (Y/y:Yes N/n:No) [Y/y]:
TimeZone:
[ 1]: GTM-12=West Date Line
[ 2]: GTM-11=Samoa
[ 3]: GTM-10=Hawaii
[ 4]: GTM-09=Alaska
[ 5]: GTM-08=Pacific(America and Canada)
[ 6]: GTM-07=Arizona
[ 7]: GTM-06=Central(America and Canada)
[ 8]: GTM-05=East(America and Canada)
[ 9]: GTM-04=Atlantic(America and Canada)
[10]: GTM-03=Brasilia
[11]: GTM-02=Middle Atlantic
[12]: GTM-01=Azores
[13]: GTM=Greenwich Mean Time
[14]: GTM+01=Sarajevo
[15]: GTM+02=Cairo
[16]: GTM+03=Moscow
[17]: GTM+04=AbuDhabi
[18]: GTM+05=Islamabad
[19]: GTM+06=Dakar
[20]: GTM+07=BangKok,Hanoi
[21]: GTM+08=China
[22]: GTM+09=Seoul
[23]: GTM+10=Guam
[24]: GTM+11=Solomon
[25]: GTM+12=Fiji
[26]: GTM+13=Nukualofa
[27]: GTM+14=Kiribati
Please Select the TimeZone [21]:


###安装类型 典型安装
Installation Type:
1 Typical
2 Server
3 Client
4 Custom
Please Input the number of the Installation Type [1 Typical]:
Require Space: 1263M


###安装路径 /dm8
Please Input the install path [/home/dmdba/dmdbms]:/dm8
Available Space:142G
Please Confirm the install path(/dm8)? (Y/y:Yes N/n:No) [Y/y]:y


Pre-Installation Summary
Installation Location: /dm8
Require Space: 1263M
Available Space: 142G
Version Information:
Expire Date:
Installation Type: Typical
Confirm to Install? (Y/y:Yes N/n:No):y
2021-11-19 22:13:53
[INFO] Installing DM DBMS...
2021-11-19 22:13:53
[INFO] Installing BASE Module...
2021-11-19 22:14:12
[INFO] Installing SERVER Module...
2021-11-19 22:14:16
[INFO] Installing CLIENT Module...
2021-11-19 22:14:39
[INFO] Installing DRIVERS Module...
2021-11-19 22:14:43
[INFO] Installing MANUAL Module...
2021-11-19 22:14:47
[INFO] Installing SERVICE Module...
2021-11-19 22:14:48
[INFO] Move log file to log directory.
2021-11-19 22:14:49
[INFO] Installed DM DBMS completely.


Please execute the commands by root:
/dm8/script/root/root_installer.sh


End

执行脚本

[root@cjcos02 ~]# /dm8/script/root/root_installer.sh
Move /dm8/bin/dm_svc.conf to /etc
Modify the files' mode of DM Server
Create the DmAPService service
Created symlink from /etc/systemd/system/multi-user.target.wants/DmAPService.service to /usr/lib/systemd/system/DmAPService.service.
Finished to create the service (DmAPService)
Start the DmAPService service

看安装后的文件

[root@cjcos02 ~]# du -sh /dm8/
1.2G/dm8/
[root@cjcos02 ~]# ls /dm8/
bin desktop drivers jar license_en.txt log script uninstall web
bin2 doc include jdk license_zh.txt samples tool uninstall.sh

配置环境变量

切换到 root 用户进入 dmdba 用户的根目录下,配置对应的环境变量。
DM_HOME 变量和动态链接库文件的加载路径在程序安装成功后会自动导入。命令如下:
[dmdba@cjcos02 ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
#PATH=$PATH:$HOME/.local/bin:$HOME/bin
#export PATH
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/dm8/bin"
export DM_HOME="/dm8
export PATH=$PATH:$DM_HOME/bin:$DM_HOME/tool
切换至 dmdba 用户下,执行以下命令,使环境变量生效。
su - dmdba
source .bash_profile

配置实例

DM 数据库在 Linux 环境支持命令行配置实例以及图形化配置实例。

命令行配置实例

使用 dmdba 用户配置实例,进入到 DM 数据库安装目录下的 bin 目录中,使用 dminit 命令初始化实例。

dminit 命令可设置多种参数,可执行如下命令查看可配置参数。

[dmdba@cjcos02 bin]$ pwd

/dm8/bin

查看dminit参数

[dmdba@cjcos02 bin]$ ./dminit help
initdb V8
db version: 0x7000c
file dm.key not found, use default license!
License will expire on 2022-08-10
Format: ./dminit KEYWORD=value


Example: ./dminit PATH=/public/dmdb/dmData PAGE_SIZE=16


Keyword Explanation(default value)
--------------------------------------------------------------------------------
INI_FILE dm.ini path
PATH database path
CTL_PATH control file path
LOG_PATH log file path
EXTENT_SIZE extent size of data file(16), optional value: 16, 32, 64, unit: PAGE
PAGE_SIZE page size(8), optional value: 4, 8, 16, 32, unit: K
LOG_SIZE log file size(256), unit: M, range: 64M ~ 2G
CASE_SENSITIVE whether case is sensitive(Y), optional value: Y/N or 1/0
CHARSET/UNICODE_FLAG CHARSET(0), optional value:0[GB18030],1[UTF-8],2[EUC-KR]
SEC_PRIV_MODE security privilege mode(0), optional value£º0[TRADITION], 1[BMJ], 2[EVAL]
LENGTH_IN_CHAR whether LENGTH for VARCHAR is in characters(N), optional value: Y/N, 1/0
SYSDBA_PWD set SYSDBA password(SYSDBA)
SYSAUDITOR_PWD set SYSAUDITOR password(SYSAUDITOR)
DB_NAME database name(DAMENG)
INSTANCE_NAME instance name(DMSERVER)
PORT_NUM listener port(5236)
BUFFER System buffer size(100), unit: M
TIME_ZONE set time zone(+08:00)
PAGE_CHECK page check mode(0), optional value: 0/1/2
EXTERNAL_CIPHER_NAME set default encrypt/decrypt algorithm
EXTERNAL_HASH_NAME set default hash algorithm
EXTERNAL_CRYPTO_NAME set crypto name to encrypt svr key
RLOG_ENC_FLAG whether encrypt redo log(N), optional value: Y/N, 1/0
USBKEY_PIN set usbkey pin
PAGE_ENC_SLICE_SIZE slice size for page encryption, optional value: 0, 512, 4096, unit: Byte
ENCRYPT_NAME set algorithm for encrypt the whole database
BLANK_PAD_MODE set blank padding mode(0), optional value:0/1
SYSTEM_MIRROR_PATH mirror path of system data file
MAIN_MIRROR_PATH mirror path of main file
ROLL_MIRROR_PATH mirror path of roll file
MAL_FLAG MAL_INI flag(0) in dm.ini
ARCH_FLAG ARCH_INI(0) flag in dm.ini
MPP_FLAG MPP_INI(0) flag in dm.ini
CONTROL control file path!
AUTO_OVERWRITE whether overwrite all files with the same name(0) 0: no 1: part 2: all
USE_NEW_HASH whether use new hash algorithm for string. (default 1)
DCP_MODE whether is DM CLUSTER PROXY mode(default 0)
DCP_PORT_NUM in DCP mode, set dcp_port_num
ELOG_PATH set the path of log file recording the contents during initialization
AP_PORT_NUM in ECS mode, AP listener port for cooperative work
DFS_FLAG DFS_INI flag(0) in dm.ini
DFS_PATH default path of db file when dfs_flag is true
DFS_HOST ip of ddfs(localhost)
DFS_PORT port number of ddfs(3332)
DFS_COPY_NUM copy num of dfs file(3)
DFS_DB_NAME database name in ddfs(default same as DB_NAME)
SHARE_FLAG database share flag in ddfs(default 0)
REGION_MODE system tablespace datafile region policy in ddfs(default 0) 0: MICRO 1: GREAT
HUGE_WITH_DELTA Only support to create with delta huge table(default 1) 1: YES 0: NO
RLOG_GEN_FOR_HUGE whether to generate redo log for with delta huge table(default 0) 1: YES 0: NO
PSEG_MGR_FLAG Only use manager segment to record trx info(default 0) 1: YES 0: NO
CHAR_FIX_STORAGE whether CHARACTER type stored by fixed length(N), optional value: Y/N, 1/0
HELP print help information
需要注意的是页大小 (page_size)、簇大小 (extent_size)、大小写敏感 (case_sensitive)、字符集 (charset) 这四个参数,一旦确定无法修改,需谨慎设置。
extent_size 指数据文件使用的簇大小,即每次分配新的段空间时连续的页数。只能是 16 页或 32 页或 64 页之一,缺省使用 16 页。
page_size 数据文件使用的页大小,可以为 4 KB、8 KB、16 KB 或 32 KB 之一,选择的页大小越大,则 DM 支持的元组长度也越大,但同时空间利用率可能下降,缺省使用 8 KB。
case_sensitive 标识符大小写敏感,默认值为 Y 。当大小写敏感时,小写的标识符应用双引号括起,否则被转换为大写;当大小写不敏感时,系统不自动转换标识符的大小写,在标识符比较时也不区分大小写,只能是 Y、y、N、n、1、0 之一。
charset 字符集选项。0 代表 GB18030;1 代表 UTF-8;2 代表韩文字符集 EUC-KR;取值 0、1 或 2 之一。默认值为 0。

可以使用默认参数初始化实例,需要附加实例存放路径,命令如下:

./dminit path=/dm/data

也可以自定义初始化实例的参数,参考如下示例:

以下命令设置页大小为 32 KB,簇大小为 32 KB,大小写敏感,字符集为 utf_8,数据库名为 DMDB,实例名为 DBSERVER,端口为 5237。

mkdir /dm8data
chown dmdba.dinstall /dm8data
[dmdba@cjcos02 bin]$ pwd
/dm8/bin
[dmdba@cjcos02 bin]$ ./dminit path=/dm8data PAGE_SIZE=32 EXTENT_SIZE=32 CASE_SENSITIVE=y CHARSET=1 DB_NAME=DMDB INSTANCE_NAME=DBSERVER PORT_NUM=5237
NCE_NAME=DBSERVER PORT_NUM=5237
initdb V8
db version: 0x7000c
file dm.key not found, use default license!
License will expire on 2022-08-10
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL


 log file path: /dm8data/DMDB/DMDB01.log
log file path: /dm8data/DMDB/DMDB02.log


write to dir [/dm8data/DMDB].
create dm database success. 2021-11-19 22:49:54
[dmdba@cjcos02 DMDB]$ pwd
/dm8data/DMDB
[dmdba@cjcos02 DMDB]$ ls -lrth
total 789M
drwxr-xr-x 2 dmdba dinstall 6 Nov 19 22:49 bak
-rw-r--r-- 1 dmdba dinstall 481 Nov 19 22:49 sqllog.ini
-rw-r--r-- 1 dmdba dinstall 50K Nov 19 22:49 dm.ini
-rw-r--r-- 1 dmdba dinstall 256M Nov 19 22:49 DMDB01.log
-rw-r--r-- 1 dmdba dinstall 256M Nov 19 22:49 DMDB02.log
-rw-r--r-- 1 dmdba dinstall 5.0K Nov 19 22:49 dm.ctl
drwxr-xr-x 2 dmdba dinstall 42 Nov 19 22:49 ctl_bak
-rw-r--r-- 1 dmdba dinstall 633 Nov 19 22:49 dm_service.prikey
-rw-r--r-- 1 dmdba dinstall 128M Nov 19 22:49 MAIN.DBF
-rw-r--r-- 1 dmdba dinstall 128M Nov 19 22:49 ROLL.DBF
drwxr-xr-x 2 dmdba dinstall 6 Nov 19 22:49 HMAIN
-rw-r--r-- 1 dmdba dinstall 811 Nov 19 22:49 dminit20211119224950.log
-rw-r--r-- 1 dmdba dinstall 20M Nov 19 22:49 SYSTEM.DBF

注册服务

命令行注册服务:

注册服务需使用 root 用户进行注册。使用 root 用户进入数据库安装目录的 /script/root 下,如下所示:

cd /dm8/script/root

注册服务,如下所示:

[root@cjcos02 root]#  ./dm_service_installer.sh -t dmserver -dm_ini /dm8data/DMDB/dm.ini -p DMSERVE
Created symlink from /etc/systemd/system/multi-user.target.wants/DmServiceDMSERVER.service to /usr/lib/systemd/system/DmServiceDMSERVER.service.
Finished to create the service (DmServiceDMSERVER)

户可根据自己的环境更改 dm.ini 文件的路径以及服务名,如下所示:

./dm_service_installer.sh -h

如需为其他实例注册服务,需打开 dbca 工具,进行注册服务,如下所示:

cd /dm8/tool
./dbca.sh

启停数据库

命令行启停数据库

服务注册成功后,启动数据库,如下所示:

[dmdba@cjcos02 ~]$ systemctl status DmServiceDMSERVER.service
● DmServiceDMSERVER.service - Dameng Database Service(DmServiceDMSERVER).
Loaded: loaded (/usr/lib/systemd/system/DmServiceDMSERVER.service; enabled; vendor preset: disabled)
Active: inactive (dead)
[dmdba@cjcos02 ~]$ systemctl start DmServiceDMSERVER.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ===

停止数据库,如下所示:

[dmdba@cjcos02 ~]$ systemctl stop DmServiceDMSERVER.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ===

重启数据库,如下所示:

[dmdba@cjcos02 ~]$ systemctl restart DmServiceDMSERVER.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ===

查看数据库服务状态,如下所示:

[dmdba@cjcos02 ~]$  systemctl status DmServiceDMSERVER.service
● DmServiceDMSERVER.service - Dameng Database Service(DmServiceDMSERVER).
Loaded: loaded (/usr/lib/systemd/system/DmServiceDMSERVER.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2021-11-19 23:10:40 CST; 15s ago
Process: 14390 ExecStop=/dm8/bin/DmServiceDMSERVER stop (code=exited, status=0/SUCCESS)
Process: 14472 ExecStart=/dm8/bin/DmServiceDMSERVER start (code=exited, status=0/SUCCESS)
Main PID: 14494 (dmserver)
CGroup: /system.slice/DmServiceDMSERVER.service
└─14494 /dm8/bin/dmserver /dm8data/DMDB/dm.ini -noconsole

可前台启动,进入 DM 安装目录下的 bin 目录下,命令如下:

[dmdba@cjcos02 bin]$ ./dmserver /dm8data/DMDB/dm.ini 
file dm.key not found, use default license!
version info: develop
DM Database Server x64 V8 1-2-18-21.08.10-145226-10013-ENT 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 2022-08-10
file lsn: 32264
ndct db load finished
ndct fill fast pool finished
iid page's trxid[6012]
NEXT TRX ID = 6013
pseg_collect_mgr_items, total collect 0 active_trxs, 0 cmt_trxs, 0 pre_cmt_trxs, 0 active_pages, 0 cmt_pages, 0 pre_cmt_pages, 0 mgr pages, 0 mgr recs!
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.
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.

该启动方式为前台启动,若想关闭数据库,则输入 exit 即可。

输入exit,回车,输出如下:

exit

Server is stopping...
listener closed and all sessions disconnected
purge undo records in usegs...OK
full check point starting...
generate force checkpoint, rlog free space[536595456], used space[267264]
checkpoint begin, used_space[267264], free_space[536595456]...
checkpoint end, 134 pages flushed, used_space[12288], free_space[536850432].
full check point end.
shutdown audit subsystem...OK
shutdown schedule subsystem...OK
shutdown timer successfully.
pre-shutdown MAL subsystem...OK
shutdown worker threads subsystem...OK
shutdown local parallel threads pool successfully.
shutdown replication subsystem...OK
shutdown sequence cache subsystem...OK
wait for mtsk link worker to exit..OK
shutdown mpp session subsystem...OK
wait for rapply is all over... OK
rapply worker threads exit successfully.
pre ending task & worker threads...OK
shutdown dblink subsystem...OK
shutdown session subsystem...OK
shutdown rollback segments purging subsystem...OK
shutdown rps subsystem...OK
shutdown transaction subsystem...OK
shutdown locking subsystem...OK
shutdown dbms_lock subsystem...OK
ending tsk and worker threads...OK
ckpt2_exec_immediately begin.
checkpoint begin, used_space[12288], free_space[536850432]...
checkpoint end, 0 pages flushed, used_space[20992], free_space[536841728].
checkpoint begin, used_space[20992], free_space[536841728]...
checkpoint end, 0 pages flushed, used_space[20992], free_space[536841728].
checkpoint begin, used_space[20992], free_space[536841728]...
checkpoint end, 0 pages flushed, used_space[0], free_space[536862720].
checkpoint begin, used_space[0], free_space[536862720]...
checkpoint end, 0 pages flushed, used_space[0], free_space[536862720].
shutdown archive subsystem...OK
shutdown redo log subsystem...OK
shutdown MAL subsystem...OK
shutdown message compress subsystem successfully.
shutdown task subsystem...OK
shutdown trace subsystem...OK
shutdown svr_log subsystem...OK
shutdown plan cache subsystem...OK
shutdown file subsystem...OK
shutdown database dictionary subsystem...OK
shutdown mac cache subsystem...OK
shutdown dynamic login cache subsystem...OK
shutdown ifun/bifun/sfun/afun cache subsystem...OK
shutdown crypt subsystem...OK
shutdown pipe subsystem...OK
shutdown compress component...OK
shutdown slave redo subsystem...OK
shutdown kernel buffer subsystem...OK
shutdown SQL capture subsystem...OK
shutdown control file system...OK
shutdown dtype subsystem...OK
shutdown huge buffer and memory pools...OK
close lsnr socket
DM Database Server shutdown successfully.

也可进入 DM 安装目录下的 bin 目录下,启动/停止/重启数据库,如下所示:

[dmdba@cjcos02 ~]$ cd /dm8/bin
[dmdba@cjcos02 bin]$ ./DmServiceDMSERVER stop
Stopping DmServiceDMSERVER:
[ OK ]
[dmdba@cjcos02 bin]$
[dmdba@cjcos02 bin]$ ./DmServiceDMSERVER start
Starting DmServiceDMSERVER:
[ OK ]
[dmdba@cjcos02 bin]$
[dmdba@cjcos02 bin]$ ./DmServiceDMSERVER restart
Stopping DmServiceDMSERVER:
[ OK ]
Starting DmServiceDMSERVER: 


[ OK ]

查看数据库状态,如下所示:

[dmdba@cjcos02 ~]$ cd /dm8/bin
[dmdba@cjcos02 bin]$ ./DmServiceDMSERVER status
DmServiceDMSERVER (pid 14494) is running.

登录数据库:

SQL 交互式查询工具

Linux 登录 disql

Linux 登录,进入数据库软件安装目录的 bin 目录下。登录方式为:./disql username/password@IP:PORT

[dmdba@cjcos02 ~]$ disql SYSDBA/SYSDBA@192.168.31.100:5237
Server[192.168.31.100:5237]:mode is normalstate is open
login used time : 2.026(ms)
disql V8
SQL>

查看数据库版本

SQL> select * from v$version;
LINEID BANNER
---------- -------------------------
1 DM Database Server 64 V8
2 DB Version: 0x7000c

查看用户信息:

SQL> select USERNAME,DEFAULT_TABLESPACE,TEMPORARY_TABLESPACE from dba_users;


LINEID USERNAME DEFAULT_TABLESPACE TEMPORARY_TABLESPACE
---------- ---------- ------------------ --------------------
1 SYSSSO SYSTEM TEMP
2 SYSDBA MAIN TEMP
3 SYS SYSTEM TEMP
4 SYSAUDITOR SYSTEM TEMP


used time: 124.020(ms). Execute id is 304.

查看表空间信息:

SQL> select TABLESPACE_NAME,FILE_NAME,BYTES/1024/1024 from dba_data_files;
LINEID TABLESPACE_NAME FILE_NAME BYTES/1024/1024
---------- --------------- ------------------------ --------------------
1 SYSTEM /dm8data/DMDB/SYSTEM.DBF 152
2 MAIN /dm8data/DMDB/MAIN.DBF 128
3 TEMP /dm8data/DMDB/TEMP.DBF 74
4 ROLL /dm8data/DMDB/ROLL.DBF 154


used time: 4.078(ms). Execute id is 308.

#####chenjuchao 2021-11-24 12:30#####

文章转载自IT小Chen,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论