达梦数据库开启归档

[root@node01 ~]# mkdir -p /dm8/dmarch
[root@node01 ~]# chown -R dmdba.dinstall /dm8
[root@node01 ~]#
[root@node01 ~]#
[root@node01 ~]# su - dmdba
Last login: Tue Aug 16 10:02:55 CST 2022 on pts/5
[dmdba@node01 ~]$
[dmdba@node01 ~]$ disql sysdba/passwordfordmdba

Server[LOCALHOST:5236]:mode is normal, state is open
login used time : 1.959(ms)
disql V8
SQL> alter database mount;
executed successfully
used time: 2.749(ms). Execute id is 0.
SQL> alter database add archivelog 'type=local,dest=/dm8/dmarch,file_size=1024,space_limit=102400';
executed successfully
used time: 2.515(ms). Execute id is 0.
SQL> alter database archivelog;
executed successfully
used time: 5.144(ms). Execute id is 0.
SQL> alter database open;
executed successfully
used time: 51.351(ms). Execute id is 0.
SQL>
SQL> select NAME,ARCH_MODE,STATUS$ from v$database;

LINEID     NAME   ARCH_MODE STATUS$
---------- ------ --------- -----------
1          DAMENG Y         4

used time: 0.697(ms). Execute id is 2501.

  

posted @ 2022-08-16 11:15  orcl  阅读(93)  评论(0编辑  收藏  举报