首页 > 数据库技术 > 详细

oracle常用命令

时间:2017-01-13 14:05:10      阅读:250      评论:0      收藏:0      [点我收藏+]
#搜索用户
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 session495,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;

 

oracle常用命令

原文:http://www.cnblogs.com/Tester-ABX/p/6282414.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!