oracle启用归档日志

2020-05-17  本文已影响0人  Minnakey

oracle启用归档日志

1.用有dba权限的用户登录:sys用户
2.创建一个新用户:create user abc identified by 123456;
3.授予DBA权限: grant connect,resource,dba to abc;
select * from dba_users;  查看数据库里面所有用户,前提是你是有dba权限的帐号,如sys,system
select * from all_users; 查看你能管理的所有用户!
select * from user_users; 查看当前用户信息 !
SQL> conn / as sysdba(以DBA身份连接数据库) 
SQL> shutdown immediate(立即关闭数据库)
SQL> startup mount(启动实例并加载数据库,但不打开)
SQL> alter database archivelog(更改数据库为归档模式)
SQL> alter database open(打开数据库)
SQL> alter system archive log start(启用自动归档)
SQL> archive log list 
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/arch_log
Oldest online log sequence     6
Next log sequence to archive   8
Current log sequence           8
SQL> select * from dba_sys_privs where GRANTEE='GGS'; 查看账户权限
上一篇下一篇

猜你喜欢

热点阅读