1.1数据库的模式:

1、普通模式(normal):用户可以正常访问数据库,操作没有限制。
2、主库模式(PRIMARY):用户正常访问数据库,所有对数据库对象的修改强制生成redo日志,在归档有效的时候,发送redo日志到备库。
3、备库模式(standby):接收主库发送过来的redo日志并重做日志,数据对用户只读。

1.2数据库的状态:

1、配置状态(MOUNT):不允许访问数据库对象,只能进行控制文件,参数文件维护,归档配置,数据库模式修改等操作。
2、打开状态(OPEN):不能进行控制文件维护,归档配置等操作,可以访问数据库对象,对外提供正常的数据库服务。
3、挂起状态(suspend):open状态唯一的区别:限制磁盘写入功能,一旦个数据页,触发redo日志,数据页刷盘,当前用户将被挂起。
4、关闭状态:shutdown.

1.3状态切换:

Shutdown----mount
Shutdown----open
Open–mount

Mount—open

1.4启动过程:

1shutdown----mount
分配共享内存,启动后台的进程或是线程,打开控制文件。
2mount----open
根据控制文件,打开所有的数据文件和重做日志文件。
启动实例:
1、服务查看器

2、命令行前台启动:dmserver

[dmdba@localhost bin]$ ./dmserver /opt/dmdbms/data/DAMENG/dm.ini

 

file dm.key not found, use default license!

version info: develop

Use normal os_malloc instead of HugeTLB

Use normal os_malloc instead of HugeTLB

DM Database Server x64 V8 1-1-144-20.11.06-129436-ENT  startup...

Database mode = 0, oguid = 0

License will expire on 2021-11-06

file lsn: 44833

ndct db load finished

ndct fill fast pool finished

iid page's trxid[11094]

NEXT TRX ID = 11095

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.

[dmdba@localhost bin]$ ./DmServiceDMSERVER start

Starting DmServiceDMSERVER:                                [ OK ]

判断DM数据库是不是启动的:
1、端口 netstat -ntl|grep 523*
1Dmserverps -ef |grep dmserver

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐