标签:用户表 res _id ada quota session files connect sharp
Oracle 数据结构部署
用例:
select tablespace_name, file_id,file_name, round(bytes/(1024*1024),0) total_space from dba_data_files order by tablespace_name; select * from dba_data_files;
--/home/oracle/app/oracle/oradata/orcl/users01.dbf
drop user ecom cascade; drop tablespace ERPDATA including contents and datafiles;
create tablespace ERPDATA datafile ‘D:/test/ecom_00.dbf‘ size 200M;
alter database datafile ‘D:/test/ecom_00.dbf‘ AUTOEXTEND ON NEXT 100M MAXSIZE 3000M; alter tablespace ERPDATA add datafile ‘/data/oracle/data/orcl/ecom_01.dbf‘ size 200M; alter database datafile ‘/data/oracle/data/orcl/ecom_01.dbf‘ AUTOEXTEND ON NEXT 100M MAXSIZE 3000M;
alter database datafile ‘/data/oracle/data/orcl/ecom_01.dbf‘ resize 5000m;
create user ecom identified by "passwd111" account unlock default tablespace ERPDATA;
grant "CONNECT" TO ecom; grant resource to ecom; grant "JAVASYSPRIV" TO ecom; grant "JAVAUSERPRIV" TO ecom; grant create view to ecom; grant create synonym to ecom;
操作点:
select count(table_name) from user_tables ;
alter user sourcedata quota unlimited on SRC_DATA;
select username ,sid,serial# from v$session
alter system kill session ‘687,4263‘;
alter system kill session ‘491,34491‘;
select * from dba_sys_privs d where d.GRANTEE = ‘ECOM‘;
select ‘grant ‘||u.privilege||‘ on ‘||u.TABLE_NAME||‘ to ‘||u.GRANTEE||‘ with grant option;‘
from user_tab_privs u where u.table_name not like ‘%==%‘;
--撤销授权不级联
with admin option;
--撤销授权级联
with grant option;
标签:用户表 res _id ada quota session files connect sharp
原文地址:https://www.cnblogs.com/fuhaha/p/9223534.html