Little Star Blog

路在脚下,心向远方

Oracle Database 审计操作

安装oracle https://hub.docker.com/r/dragonbest520/oracle-xe-10g 查询是否开启审计 show parameter audit; 使用ssh登陆 ssh root@localhost -p 49160 password: admin 开启审计 alter system set audit_sys_operations=TRUE scope=spfile; alter system set audit_trail=DB scope=spfile; alter system set audit_trail=db,extended scope=spfile; 查看审计结果 select username 用户,action_

Oracle Database 常用命令

常用操作 用户相关 创建表空间以新用户 重启数据库实例 shutdown immediate; startup mount; alter database open; 创建表空间 CREATE TABLESPACE lxg DATAFILE 'F:\tablespace\demo' size 800M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO; 创建索引表空间 CREATE TABLESPACE lxg_index DATAFILE 'F:\tablespace\demo' size 512M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT

Oracle Database 用户相关

使用sysdba登陆 sqlplus sys/oracle as sysdba 查询DBA权限用户 select GRANTEE as username,admin_option from dba_role_privs where GRANTED_ROLE='DBA' 使用账号密码登录 sqlplus username/password 如:普通用户登录 sqlplus scott/tiger sqlplus username/password as sysdba 如:sqlplus sys/admin as sysdba sqlplus username/password@net_service_name 如