分以下两种情况:
如果有备份文件,可以重新初始化一个新的数据库(初始化参数要和原库一样,比如页大小、大小写敏感、字符集等,这些可以在 DM 数据库安装路径,…/data/DAMENG 目录下以 dminit+日期时间.log 命名的文件中查询),然后将备份文件和归档日志文件拷贝到新的环境,然后再进行备份 + 归档的还原操作。
如果没有备份,可以通过修改永久魔术值的方式来恢复,但是这种情况下有可能丢失数据
[dmdba@localhost dmdata]$ /dmdbms/bin/dminit PATH=/dmdata INSTANCE_NAME=inst1 PORT_NUM=15236 PAGE_SIZE=32 EXTENT_SIZE=32 LOG_SIZE=2048
initdb V8
db version: 0x7000c
file dm.key not found, use default license!
License will expire on 2025-07-03
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
log file path: /dmdata/DAMENG/DAMENG01.log
log file path: /dmdata/DAMENG/DAMENG02.log
write to dir [/dmdata/DAMENG].
create dm database success. 2024-09-01 11:05:01
[dmdba@localhost bin]$ ./dmserver /dmdata/DAMENG/dm.ini
file dm.key not found, use default license!
version info: develop
csek2_vm_t = 1408
nsql_vm_t = 328
prjt2_vm_t = 176
ltid_vm_t = 216
nins2_vm_t = 1048
nset2_vm_t = 272
ndlck_vm_t = 192
ndel2_vm_t = 776
slct2_vm_t = 208
nli2_vm_t = 192
aagr2_vm_t = 280
pscn_vm_t = 288
dist_vm_t = 896
DM Database Server 64 V8 03134284194-20240703-234060-20108 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 2025-07-03
file lsn: 0
ndct db load finished, code:0
ckpt2_exec_immediately begin.
checkpoint begin, used_space[4096], free_space[4294955008]…
checkpoint end, 2 pages flushed, used_space[8192], free_space[4294950912].
checkpoint begin, used_space[8192], free_space[4294950912]…
checkpoint begin, used_space[0], free_space[4294959104]…
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
pseg_set_gtv_trxid_low next_trxid in mem:[2002]
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!
next_trxid in mem:[4004]
next_trxid = 6006.
pseg recv finished
nsvr_startup end.
uthr_pipe_create, create pipe[read:10, write:11]
uthr_pipe_create, create pipe[read:12, write:13]
uthr_pipe_create, create pipe[read:14, write:15]
uthr_pipe_create, create pipe[read:16, write:17]
uthr_pipe_create, create pipe[read:18, write:19]
uthr_pipe_create, create pipe[read:20, write:21]
uthr_pipe_create, create pipe[read:22, write:23]
uthr_pipe_create, create pipe[read:24, write:25]
uthr_pipe_create, create pipe[read:26, write:27]
uthr_pipe_create, create pipe[read:28, write:29]
uthr_pipe_create, create pipe[read:30, write:31]
uthr_pipe_create, create pipe[read:32, write:33]
uthr_pipe_create, create pipe[read:34, write:35]
uthr_pipe_create, create pipe[read:36, write:37]
uthr_pipe_create, create pipe[read:38, write:39]
uthr_pipe_create, create pipe[read:40, write:41]
aud sys init success.
aud rt sys init success.
trx: 6007 purged 1 pages
trx: 6026 purged 1 pages
。。。。
trx: 6744 purged 1 pages
systables desc init success.
ndct_db_load_info finished, code:0.
nsvr_process_before_open begin.
nsvr_process_before_open success.
SYSTEM IS READY.
[root@localhost DAMENG]# ll
total 4749412
drwxr-xr-x. 2 dmdba dinstall 6 Sep 1 11:04 bak
drwxr-xr-x. 2 dmdba dinstall 78 Sep 1 11:07 ctl_bak
-rw-r–r--. 1 dmdba dinstall 2147483648 Sep 1 11:07 DAMENG01.log
-rw-r–r--. 1 dmdba dinstall 2147483648 Sep 1 11:07 DAMENG02.log
-rw-r–r--. 1 dmdba dinstall 5632 Sep 1 11:07 dm.ctl
-rw-r–r--. 1 dmdba dinstall 79454 Sep 1 11:04 dm.ini
-rw-r–r--. 1 dmdba dinstall 887 Sep 1 11:05 dminit20240901110458.log
-rw-r–r--. 1 dmdba dinstall 633 Sep 1 11:05 dm_service.prikey
drwxr-xr-x. 2 dmdba dinstall 6 Sep 1 11:05 HMAIN
-rw-r–r--. 1 dmdba dinstall 134217728 Sep 1 11:05 MAIN.DBF
-rw-r–r--. 1 dmdba dinstall 134217728 Sep 1 11:07 ROLL.DBF
-rw-r–r--. 1 dmdba dinstall 714 Sep 1 11:04 sqllog.ini
-rw-r–r--. 1 dmdba dinstall 222298112 Sep 1 11:07 SYSTEM.DBF
-rw-r–r--. 1 dmdba dinstall 77594624 Sep 1 11:07 TEMP.DBF
drwxr-xr-x. 2 dmdba dinstall 6 Sep 1 11:07 trace
[root@localhost DAMENG]# rm -rf ROLL.DBF
[root@localhost DAMENG]# ls -ltr
total 4618340
drwxr-xr-x. 2 dmdba dinstall 6 Sep 1 11:04 bak
-rw-r–r--. 1 dmdba dinstall 79454 Sep 1 11:04 dm.ini
-rw-r–r--. 1 dmdba dinstall 714 Sep 1 11:04 sqllog.ini
-rw-r–r--. 1 dmdba dinstall 633 Sep 1 11:05 dm_service.prikey
drwxr-xr-x. 2 dmdba dinstall 6 Sep 1 11:05 HMAIN
-rw-r–r--. 1 dmdba dinstall 134217728 Sep 1 11:05 MAIN.DBF
-rw-r–r--. 1 dmdba dinstall 887 Sep 1 11:05 dminit20240901110458.log
-rw-r–r--. 1 dmdba dinstall 2147483648 Sep 1 11:07 DAMENG02.log
drwxr-xr-x. 2 dmdba dinstall 6 Sep 1 11:07 trace
-rw-r–r--. 1 dmdba dinstall 77594624 Sep 1 11:07 TEMP.DBF
-rw-r–r--. 1 dmdba dinstall 2147483648 Sep 1 11:07 DAMENG01.log
-rw-r–r--. 1 dmdba dinstall 222298112 Sep 1 11:07 SYSTEM.DBF
-rw-r–r--. 1 dmdba dinstall 5632 Sep 1 11:07 dm.ctl
drwxr-xr-x. 2 dmdba dinstall 78 Sep 1 11:07 ctl_bak
[dmdba@localhost bin]$ ./disql SYSDBA/SYSDBA:15236
服务器[LOCALHOST:15236]:处于普通打开状态
登录使用时间 : 5.135(ms)
disql V8
SQL> create table test2 as select * from dba_tables;
操作已执行
已用时间: 126.863(毫秒). 执行号:64901.
SQL> update test2 set TABLE_NAME=TABLE_NAME||‘1’;
影响行数 91
已用时间: 1.577(毫秒). 执行号:64902.
SQL> commit;
操作已执行
已用时间: 1.411(毫秒). 执行号:64903.
SQL>
trx: 6728 purged 1 pages
trx: 6731 purged 2 pages
trx: 6738 purged 1 pages
trx: 6740 purged 1 pages
trx: 6742 purged 1 pages
trx: 6744 purged 1 pages
systables desc init success.
ndct_db_load_info finished, code:0.
nsvr_process_before_open begin.
nsvr_process_before_open success.
SYSTEM IS READY.
checkpoint requested by INI_INTERVAL, rlog free space[4281257984], used space[13701120]
checkpoint generate by ckpt_interval
checkpoint begin, used_space[13701120], free_space[4281257984]…
checkpoint requested by INI_INTERVAL, rlog free space[4294795264], used space[163840]
checkpoint generate by ckpt_interval
checkpoint begin, used_space[163840], free_space[4294795264]…
checkpoint end, 0 pages flushed, used_space[163840], free_space[4294795264].
数据库并没有挂
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 database dictionary subsystem…OK
shutdown file 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.
[dmdba@localhost bin]$
[dmdba@localhost bin]$ ./dmserver /dmdata/DAMENG/dm.ini
file dm.key not found, use default license!
version info: develop
csek2_vm_t = 1408
nsql_vm_t = 328
prjt2_vm_t = 176
ltid_vm_t = 216
nins2_vm_t = 1048
nset2_vm_t = 272
ndlck_vm_t = 192
ndel2_vm_t = 776
slct2_vm_t = 208
nli2_vm_t = 192
aagr2_vm_t = 280
pscn_vm_t = 288
dist_vm_t = 896
DM Database Server 64 V8 03134284194-20240703-234060-20108 startup…
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
Database mode = 0, oguid = 0
/dmdata/DAMENG/ROLL.DBF not exist, can not startup
[dmdba@localhost bin]$
提示undo文件丢失
[dmdba@localhost DAMENG]$ cat dminit20240901110458.log
start init database: V8, 2024-09-01 11:04:58
init params:
db path: /dmdata/DAMENG
db name: DAMENG
auto overwrite: 0
page size: 32768
extent size: 32
char_fix_storage: 0
sql_log_forbid: 0
secur_flag: 2
time zone: +08:00
string case sensitive: 1
charset: 0
page check mode: 3
page check algorithm id: 0
priv flag: 0
env label: 0
rlog enc flag: 0
use new hash: 1
blank pad mode: 0
sec priv mode: 0
huge with delta: 1
rlog gen for huge: 1
pseg_mgr_flag: 0
log file path: /dmdata/DAMENG/DAMENG01.log
log file path: /dmdata/DAMENG/DAMENG02.log
create ini file /dmdata/DAMENG/dm.ini success.
create rlog file /dmdata/DAMENG/DAMENG01.log success.
create rlog file /dmdata/DAMENG/DAMENG02.log success.
SYSTEM file : /dmdata/DAMENG/SYSTEM.DBF
MAIN file : /dmdata/DAMENG/MAIN.DBF
ROLL file : /dmdata/DAMENG/ROLL.DBF
create dm database success. 2024-09-01 11:05:01
[dmdba@localhost DAMENG]$
[dmdba@localhost data2]$ /dmdbms/bin/dminit PATH=/dmdata/data2 INSTANCE_NAME=inst1 PORT_NUM=15236 PAGE_SIZE=32 EXTENT_SIZE=32 LOG_SIZE=2048
initdb V8
db version: 0x7000c
file dm.key not found, use default license!
License will expire on 2025-07-03
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
log file path: /dmdata/data2/DAMENG/DAMENG01.log
log file path: /dmdata/data2/DAMENG/DAMENG02.log
write to dir [/dmdata/data2/DAMENG].
create dm database success. 2024-09-01 12:48:05
[dmdba@localhost dmdata]$ /dmdbms/bin/dmserver /dmdata/data2/DAMENG/dm.ini
file dm.key not found, use default license!
version info: develop
csek2_vm_t = 1408
nsql_vm_t = 328
prjt2_vm_t = 176
ltid_vm_t = 216
nins2_vm_t = 1048
nset2_vm_t = 272
ndlck_vm_t = 192
ndel2_vm_t = 776
slct2_vm_t = 208
nli2_vm_t = 192
aagr2_vm_t = 280
pscn_vm_t = 288
dist_vm_t = 896
DM Database Server 64 V8 03134284194-20240703-234060-20108 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 2025-07-03
file lsn: 0
ndct db load finished, code:0
ckpt2_exec_immediately begin.
checkpoint begin, used_space[4096], free_space[4294955008]…
checkpoint end, 2 pages flushed, used_space[8192], free_space[4294950912].
checkpoint begin, used_space[8192], free_space[4294950912]…
checkpoint begin, used_space[0], free_space[4294959104]…
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
pseg_set_gtv_trxid_low next_trxid in mem:[2002]
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!
next_trxid in mem:[4004]
next_trxid = 6006.
pseg recv finished
nsvr_startup end.
uthr_pipe_create, create pipe[read:10, write:11]
uthr_pipe_create, create pipe[read:12, write:13]
uthr_pipe_create, create pipe[read:14, write:15]
uthr_pipe_create, create pipe[read:16, write:17]
uthr_pipe_create, create pipe[read:18, write:19]
uthr_pipe_create, create pipe[read:20, write:21]
uthr_pipe_create, create pipe[read:22, write:23]
uthr_pipe_create, create pipe[read:24, write:25]
uthr_pipe_create, create pipe[read:26, write:27]
uthr_pipe_create, create pipe[read:28, write:29]
uthr_pipe_create, create pipe[read:30, write:31]
uthr_pipe_create, create pipe[read:32, write:33]
uthr_pipe_create, create pipe[read:34, write:35]
uthr_pipe_create, create pipe[read:36, write:37]
uthr_pipe_create, create pipe[read:38, write:39]
uthr_pipe_create, create pipe[read:40, write:41]
aud sys init success.
aud rt sys init success.
trx: 6007 purged 1 pages
。。。。。
trx: 6744 purged 1 pages
systables desc init success.
ndct_db_load_info finished, code:0.
nsvr_process_before_open begin.
nsvr_process_before_open success.
SYSTEM IS READY.
^CServer is stopping…
listener closed and all sessions disconnected
adjust undo_retention & wakeup purge thread…full check point starting…
generate force checkpoint, rlog free space[4281262080], used space[13697024]
checkpoint begin, used_space[13697024], free_space[4281262080]…
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 logic log 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 local parallel threads pool successfully.
shutdown pthd_pools…OK
shutdown session subsystem…shutdown aux session subsystem…OK
shutdown rollback segments purging 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[0], free_space[4294959104]…
checkpoint end, 0 pages flushed, used_space[8192], free_space[4294950912].
checkpoint begin, used_space[8192], free_space[4294950912]…
checkpoint begin, used_space[0], free_space[4294959104]…
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 database dictionary subsystem…OK
shutdown file 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.
[dmdba@localhost data2]$ cp /dmdata/data2/DAMENG/ROLL.DBF /dmdata/DAMENG
[dmdba@localhost bin]$ ./dmserver /dmdata/DAMENG/dm.ini
file dm.key not found, use default license!
version info: develop
csek2_vm_t = 1408
nsql_vm_t = 328
prjt2_vm_t = 176
ltid_vm_t = 216
nins2_vm_t = 1048
nset2_vm_t = 272
ndlck_vm_t = 192
ndel2_vm_t = 776
slct2_vm_t = 208
nli2_vm_t = 192
aagr2_vm_t = 280
pscn_vm_t = 288
dist_vm_t = 896
DM Database Server 64 V8 03134284194-20240703-234060-20108 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 2025-07-03
begin redo pwr log collect, last ckpt lsn: 44039 …
redo pwr log collect finished
main rfil[/dmdata/DAMENG/DAMENG01.log]'s grp collect 0 valid pwr record, discard 0 invalid pwr record
EP[0]'s cur_lsn[44041], file_lsn[44041]
begin redo log recover, last ckpt lsn: 44039 …
redo log recover finished
ndct db load finished, code:0
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
pseg_set_gtv_trxid_low next_trxid in mem:[8009]
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!
next_trxid in mem:[10011]
next_trxid = 12013.
pseg recv finished
nsvr_startup end.
uthr_pipe_create, create pipe[read:10, write:11]
uthr_pipe_create, create pipe[read:12, write:13]
uthr_pipe_create, create pipe[read:14, write:15]
uthr_pipe_create, create pipe[read:16, write:17]
uthr_pipe_create, create pipe[read:18, write:19]
uthr_pipe_create, create pipe[read:20, write:21]
uthr_pipe_create, create pipe[read:22, write:23]
uthr_pipe_create, create pipe[read:24, write:25]
uthr_pipe_create, create pipe[read:26, write:27]
uthr_pipe_create, create pipe[read:28, write:29]
uthr_pipe_create, create pipe[read:30, write:31]
uthr_pipe_create, create pipe[read:32, write:33]
uthr_pipe_create, create pipe[read:34, write:35]
uthr_pipe_create, create pipe[read:36, write:37]
uthr_pipe_create, create pipe[read:38, write:39]
uthr_pipe_create, create pipe[read:40, write:41]
aud sys init success.
aud rt sys init success.
systables desc init success.
ndct_db_load_info finished, code:0.
nsvr_process_before_open begin.
nsvr_process_before_open success.
SYSTEM IS READY.
数据库恢复成功
[dmdba@localhost dmdata]$ /dmdbms/bin/dminit PATH=/dmdata/ DB_NAME=db1 PORT_NUM=15236 PAGE_SIZE=32 EXTENT_SIZE=32 LOG_SIZE=2048
initdb V8
db version: 0x7000c
file dm.key not found, use default license!
License will expire on 2025-07-03
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
log file path: /dmdata/db1/db101.log
log file path: /dmdata/db1/db102.log
write to dir [/dmdata/db1].
create dm database success. 2024-09-01 13:08:33
[dmdba@localhost dmdata]$ /dmdbms/bin/dmserver /dmdata/db1/dm.ini
file dm.key not found, use default license!
version info: develop
csek2_vm_t = 1408
nsql_vm_t = 328
prjt2_vm_t = 176
ltid_vm_t = 216
nins2_vm_t = 1048
nset2_vm_t = 272
ndlck_vm_t = 192
ndel2_vm_t = 776
slct2_vm_t = 208
nli2_vm_t = 192
aagr2_vm_t = 280
pscn_vm_t = 288
dist_vm_t = 896
DM Database Server 64 V8 03134284194-20240703-234060-20108 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 2025-07-03
file lsn: 0
ndct db load finished, code:0
ckpt2_exec_immediately begin.
checkpoint begin, used_space[4096], free_space[4294955008]…
checkpoint end, 2 pages flushed, used_space[8192], free_space[4294950912].
checkpoint begin, used_space[8192], free_space[4294950912]…
checkpoint begin, used_space[0], free_space[4294959104]…
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
pseg_set_gtv_trxid_low next_trxid in mem:[2002]
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!
next_trxid in mem:[4004]
next_trxid = 6006.
pseg recv finished
nsvr_startup end.
uthr_pipe_create, create pipe[read:10, write:11]
uthr_pipe_create, create pipe[read:12, write:13]
uthr_pipe_create, create pipe[read:14, write:15]
uthr_pipe_create, create pipe[read:16, write:17]
uthr_pipe_create, create pipe[read:18, write:19]
uthr_pipe_create, create pipe[read:20, write:21]
uthr_pipe_create, create pipe[read:22, write:23]
uthr_pipe_create, create pipe[read:24, write:25]
uthr_pipe_create, create pipe[read:26, write:27]
uthr_pipe_create, create pipe[read:28, write:29]
uthr_pipe_create, create pipe[read:30, write:31]
uthr_pipe_create, create pipe[read:32, write:33]
uthr_pipe_create, create pipe[read:34, write:35]
uthr_pipe_create, create pipe[read:36, write:37]
uthr_pipe_create, create pipe[read:38, write:39]
uthr_pipe_create, create pipe[read:40, write:41]
aud sys init success.
aud rt sys init success.
trx: 6007 purged 1 pages
trx: 6026 purged 1 pages
trx: 6027 purged 1 pages
trx: 6028 purged 1 pages
trx: 6029 purged 1 pages
trx: 6030 purged 1 pages
trx: 6040 purged 1 pages
trx: 6163 purged 1 pages
trx: 6176 purged 1 pages
trx: 6177 purged 1 pages
trx: 6178 purged 1 pages
。。。。
trx: 6744 purged 1 pages
systables desc init success.
ndct_db_load_info finished, code:0.
nsvr_process_before_open begin.
nsvr_process_before_open success.
SYSTEM IS READY.
[dmdba@localhost bin]$ ./disql SYSDBA/SYSDBA:15236
服务器[LOCALHOST:15236]:处于普通打开状态
登录使用时间 : 6.886(ms)
disql V8
SQL> create table test1 as select * from dba_tables;
操作已执行
已用时间: 44.448(毫秒). 执行号:64701.
SQL> update test1 set TABLE_NAME=TABLE_NAME||‘1’;
影响行数 90
已用时间: 1.196(毫秒). 执行号:64702.
SQL> commit;
操作已执行
已用时间: 0.992(毫秒). 执行号:64703.
SQL>
[dmdba@localhost db1]$ ll
total 4749412
drwxr-xr-x. 2 dmdba dinstall 6 Sep 1 13:08 bak
drwxr-xr-x. 2 dmdba dinstall 78 Sep 1 13:12 ctl_bak
-rw-r–r--. 1 dmdba dinstall 2147483648 Sep 1 13:14 db101.log
-rw-r–r--. 1 dmdba dinstall 2147483648 Sep 1 13:12 db102.log
-rw-r–r--. 1 dmdba dinstall 5632 Sep 1 13:12 dm.ctl
-rw-r–r--. 1 dmdba dinstall 79454 Sep 1 13:08 dm.ini
-rw-r–r--. 1 dmdba dinstall 845 Sep 1 13:08 dminit20240901130830.log
-rw-r–r--. 1 dmdba dinstall 633 Sep 1 13:08 dm_service.prikey
drwxr-xr-x. 2 dmdba dinstall 6 Sep 1 13:08 HMAIN
-rw-r–r--. 1 dmdba dinstall 134217728 Sep 1 13:08 MAIN.DBF
-rw-r–r--. 1 dmdba dinstall 134217728 Sep 1 13:12 ROLL.DBF
-rw-r–r--. 1 dmdba dinstall 714 Sep 1 13:08 sqllog.ini
-rw-r–r--. 1 dmdba dinstall 222298112 Sep 1 13:13 SYSTEM.DBF
-rw-r–r--. 1 dmdba dinstall 77594624 Sep 1 13:12 TEMP.DBF
drwxr-xr-x. 2 dmdba dinstall 6 Sep 1 13:12 trace
[dmdba@localhost db1]$ rm -rf db101.log
[dmdba@localhost db1]$ ls -ltr
total 2652260
drwxr-xr-x. 2 dmdba dinstall 6 Sep 1 13:08 bak
-rw-r–r--. 1 dmdba dinstall 714 Sep 1 13:08 sqllog.ini
-rw-r–r--. 1 dmdba dinstall 79454 Sep 1 13:08 dm.ini
-rw-r–r--. 1 dmdba dinstall 633 Sep 1 13:08 dm_service.prikey
drwxr-xr-x. 2 dmdba dinstall 6 Sep 1 13:08 HMAIN
-rw-r–r--. 1 dmdba dinstall 134217728 Sep 1 13:08 MAIN.DBF
-rw-r–r--. 1 dmdba dinstall 845 Sep 1 13:08 dminit20240901130830.log
-rw-r–r--. 1 dmdba dinstall 2147483648 Sep 1 13:12 db102.log
drwxr-xr-x. 2 dmdba dinstall 6 Sep 1 13:12 trace
-rw-r–r--. 1 dmdba dinstall 77594624 Sep 1 13:12 TEMP.DBF
-rw-r–r--. 1 dmdba dinstall 134217728 Sep 1 13:12 ROLL.DBF
-rw-r–r--. 1 dmdba dinstall 5632 Sep 1 13:12 dm.ctl
drwxr-xr-x. 2 dmdba dinstall 78 Sep 1 13:12 ctl_bak
-rw-r–r--. 1 dmdba dinstall 222298112 Sep 1 13:13 SYSTEM.DBF
^CServer is stopping…
listener closed and all sessions disconnected
adjust undo_retention & wakeup purge thread…full check point starting…
generate force checkpoint, rlog free space[4294836224], used space[122880]
checkpoint begin, used_space[122880], free_space[4294836224]…
checkpoint end, 0 pages flushed, used_space[4096], free_space[4294955008].
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 logic log 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 local parallel threads pool successfully.
shutdown pthd_pools…OK
shutdown session subsystem…shutdown aux session subsystem…OK
shutdown rollback segments purging 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[4096], free_space[4294955008]…
checkpoint end, 0 pages flushed, used_space[8192], free_space[4294950912].
checkpoint begin, used_space[8192], free_space[4294950912]…
checkpoint begin, used_space[0], free_space[4294959104]…
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 database dictionary subsystem…OK
shutdown file 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.
[dmdba@localhost dmdata]$
[dmdba@localhost dmdata]$ /dmdbms/bin/dmserver /dmdata/db1/dm.ini
file dm.key not found, use default license!
version info: develop
csek2_vm_t = 1408
nsql_vm_t = 328
prjt2_vm_t = 176
ltid_vm_t = 216
nins2_vm_t = 1048
nset2_vm_t = 272
ndlck_vm_t = 192
ndel2_vm_t = 776
slct2_vm_t = 208
nli2_vm_t = 192
aagr2_vm_t = 280
pscn_vm_t = 288
dist_vm_t = 896
DM Database Server 64 V8 03134284194-20240703-234060-20108 startup…
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
Database mode = 0, oguid = 0
/dmdata/db1/db101.log not exist, can not startup
提示/dmdata/db1/db101.log 文件丢失
[dmdba@localhost data2]$ /dmdbms/bin/dminit PATH=/dmdata/data2 DB_NAME=db1 PORT_NUM=15236 PAGE_SIZE=32 EXTENT_SIZE=32 LOG_SIZE=2048
initdb V8
db version: 0x7000c
file dm.key not found, use default license!
License will expire on 2025-07-03
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
log file path: /dmdata/data2/db1/db101.log
log file path: /dmdata/data2/db1/db102.log
write to dir [/dmdata/data2/db1].
create dm database success. 2024-09-01 13:20:32
[dmdba@localhost data2]$ /dmdbms/bin/dmserver /dmdata/data2/db1/dm.ini
file dm.key not found, use default license!
version info: develop
csek2_vm_t = 1408
nsql_vm_t = 328
prjt2_vm_t = 176
ltid_vm_t = 216
nins2_vm_t = 1048
nset2_vm_t = 272
ndlck_vm_t = 192
ndel2_vm_t = 776
slct2_vm_t = 208
nli2_vm_t = 192
aagr2_vm_t = 280
pscn_vm_t = 288
dist_vm_t = 896
DM Database Server 64 V8 03134284194-20240703-234060-20108 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 2025-07-03
file lsn: 0
ndct db load finished, code:0
ckpt2_exec_immediately begin.
checkpoint begin, used_space[4096], free_space[4294955008]…
checkpoint end, 2 pages flushed, used_space[8192], free_space[4294950912].
checkpoint begin, used_space[8192], free_space[4294950912]…
checkpoint begin, used_space[0], free_space[4294959104]…
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
pseg_set_gtv_trxid_low next_trxid in mem:[2002]
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!
next_trxid in mem:[4004]
next_trxid = 6006.
pseg recv finished
nsvr_startup end.
uthr_pipe_create, create pipe[read:10, write:11]
uthr_pipe_create, create pipe[read:12, write:13]
uthr_pipe_create, create pipe[read:14, write:15]
uthr_pipe_create, create pipe[read:16, write:17]
uthr_pipe_create, create pipe[read:18, write:19]
uthr_pipe_create, create pipe[read:20, write:21]
uthr_pipe_create, create pipe[read:22, write:23]
uthr_pipe_create, create pipe[read:24, write:25]
uthr_pipe_create, create pipe[read:26, write:27]
uthr_pipe_create, create pipe[read:28, write:29]
uthr_pipe_create, create pipe[read:30, write:31]
uthr_pipe_create, create pipe[read:32, write:33]
uthr_pipe_create, create pipe[read:34, write:35]
uthr_pipe_create, create pipe[read:36, write:37]
uthr_pipe_create, create pipe[read:38, write:39]
uthr_pipe_create, create pipe[read:40, write:41]
aud sys init success.
aud rt sys init success.
trx: 6007 purged 1 pages
。。。。。
systables desc init success.
ndct_db_load_info finished, code:0.
nsvr_process_before_open begin.
nsvr_process_before_open success.
SYSTEM IS READY.
^CServer is stopping…
listener closed and all sessions disconnected
adjust undo_retention & wakeup purge thread…full check point starting…
generate force checkpoint, rlog free space[4281262080], used space[13697024]
checkpoint begin, used_space[13697024], free_space[4281262080]…
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 logic log 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 local parallel threads pool successfully.
shutdown pthd_pools…OK
shutdown session subsystem…shutdown aux session subsystem…OK
shutdown rollback segments purging 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[0], free_space[4294959104]…
checkpoint end, 0 pages flushed, used_space[8192], free_space[4294950912].
checkpoint begin, used_space[8192], free_space[4294950912]…
checkpoint begin, used_space[0], free_space[4294959104]…
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 database dictionary subsystem…OK
shutdown file 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.
[dmdba@localhost data2]$
[dmdba@localhost db1]$ cp db101.log /dmdata/db1/
[dmdba@localhost db1]$
[dmdba@localhost db1]$ /dmdbms/bin/dmmdf TYPE=1 FILE=/dmdata/db1/SYSTEM.DBF
dmmdf V8
1 db_magic=109350809
2 next_trxid=6008
3 pemnt_magic=1359165948
4 enable_page_check=3
Please input which parameter you want to change(1-4), q to quit: q
[dmdba@localhost db1]$ /dmdbms/bin/dmmdf TYPE=2 FILE=/dmdata/db1/db101.log
dmmdf V8
1 sig = DMRLOG
2 ver = 7007
3 chksum = 902427726
4 sta = 1
5 n_magic = 7
6 db_magic = 880029348
7 len = 2147483648
8 free = 13717504
9 clsn = 43400
10 clsn_fil = 0
11 clsn_off = 13717504
12 pemnt_magic = 2106741328
13 fil_id = 0
15 next_seq = 3157
16 g_next_seq = 3157
17 arch_lsn = 0
18 arch_seq = 0
19 dbversion = 0x7000c
20 min_exec_version = V8.1.1.1
21 min_dct_version = 4
22 p_db_magic = 0
23 n_apply_ep = 0
24 apply_info_lsn = 0
pkg_seq_arr: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
apply_lsn_arr: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
25 recv_p_db_magic = 0
26 recv_n_apply_ep = 0
recv_pkg_seq_arr: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
recv_apply_lsn_arr: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
27 l_term_id = 0
28 term_id = 0
29 c_seqno = 3156
30 c_lsn = 43400
31 rpkg_crc_stand = 1
You can only reset sta(4) or db_magic (6) or clsn (9) or clsn_fil(10) or clsn_off(11) or pemnt_magic(12) or fil_id(13) or next_seq(15) or g_next_seq(16) or p_db_magic(22) or n_apply_ep(23).
Please input the num which one you want to change, q to quit: 6
Input the new value: 109350809
1 sig = DMRLOG
2 ver = 7007
3 chksum = 121197939
4 sta = 1
5 n_magic = 7
6 db_magic = 109350809
7 len = 2147483648
8 free = 13717504
9 clsn = 43400
10 clsn_fil = 0
11 clsn_off = 13717504
12 pemnt_magic = 2106741328
13 fil_id = 0
15 next_seq = 3157
16 g_next_seq = 3157
17 arch_lsn = 0
18 arch_seq = 0
19 dbversion = 0x7000c
20 min_exec_version = V8.1.1.1
21 min_dct_version = 4
22 p_db_magic = 0
23 n_apply_ep = 0
24 apply_info_lsn = 0
pkg_seq_arr: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
apply_lsn_arr: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
25 recv_p_db_magic = 0
26 recv_n_apply_ep = 0
recv_pkg_seq_arr: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
recv_apply_lsn_arr: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
27 l_term_id = 0
28 term_id = 0
29 c_seqno = 3156
30 c_lsn = 43400
31 rpkg_crc_stand = 1
Do you want to quit and save the change to file (y/n): y
Save to file success!
[dmdba@localhost ~]$ /dmdbms/bin/dmserver /dmdata/db1/dm.ini
file dm.key not found, use default license!
version info: develop
csek2_vm_t = 1408
nsql_vm_t = 328
prjt2_vm_t = 176
ltid_vm_t = 216
nins2_vm_t = 1048
nset2_vm_t = 272
ndlck_vm_t = 192
ndel2_vm_t = 776
slct2_vm_t = 208
nli2_vm_t = 192
aagr2_vm_t = 280
pscn_vm_t = 288
dist_vm_t = 896
DM Database Server 64 V8 03134284194-20240703-234060-20108 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 2025-07-03
Floating point exception
如果误删除,首先在日志上没有被应用的日志信息涉及的数据将丢失,此外可能导致数据库无法正常启动。还是需要通过备份进行还原数据库所以还是备份靠谱。
文章
阅读量
获赞