oracle 处理锁表,创建新的数据库实例

it2022-05-05  124

select saddr,sid,serial#,paddr,username,status from v$session where username is not null and username = 'EHR' ;

select 'alter system kill session '''||sid||','||serial#||''';' from v$session where username is not null and username = 'EHR' ;

alter system kill session '8,13';alter system kill session '71,73';alter system kill session '131,952';

 

drop user EHR cascade;drop tablespace ehrdb INCLUDING CONTENTS;drop tablespace ehrdbindex1 INCLUDING CONTENTS;

 

create tablespace ehrdb datafile '\home\oracle\ehrdb.dbf' size 200m autoextend on next 10m maxsize unlimited;create tablespace ehrdbindex datafile '\home\oracle\ehrdbindex.dbf' size 200m autoextend on next 10m maxsize unlimited;create user gxehr identified by gxehr default tablespace ehrdb;grant resource,connect,dba to gxehr;

转载于:https://www.cnblogs.com/leolzi/p/10037009.html


最新回复(0)