oracle常用命令

#搜索用户
select default_tablespace,username from dba_users where default_tablespace like 'NEWYZ%';
#搜索连接的用户sessionid
select username,sid,serial# from v$session where username = 'NEWYZ'; #强行中断用户连接session
alter system kill session'495,2285'; select saddr,sid,serial#,paddr,username,status from v$session where username is not null and username = 'NEWHJ' and status = 'INACTIVE'
#删除表空间及文件 drop tablespace newyz including contents and datafiles; #删除表空间用户
drop user newyz cascade; #新建表空间newyz create tablespace newyz datafile “D:\oracldata\newyz.dbf” size 32m autoextend on next 32m maxsize 2048m extent management local; #新建表空间用户newyz密码123456789 并将表空间newyz授权给用户newyz
create user newyz identified by "123456789" default tablespace newyz temporary tablespace temp profile default quota unlimited on newyz; #授权给用户newyz
grant create session, resource to newyz; grant EXPORT FULL DATABASE to newyz; grant connect to newyz grant dba to newyz
#变更表空间test为读(写)权限
alter tablespace test read only; alter tablespace test read write; #修改密码 alter user sw identified by sw;

 

转载于:https://www.cnblogs.com/Tester-ABX/p/6282414.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值