zoukankan      html  css  js  c++  java
  • oracle 用户:创建并指定表空间、授权,连接用户,删除用户,修改,解锁,加锁、

    oracle用户解锁

    alter user scott account unlock;

    alter user scott account lock;

    oracle用户修改密码

    alter user scott identified by 123;

    alter user scott identified by syj default tablespace student quota 1M ON system

    SQL> passw
    更改 SCOTT 的口令
    旧口令:
    新口令:
    重新键入新口令:
    口令已更改

     删除用户:例如创建了一个用户 A,要删除它可以这样做
    connect sys/密码 as sysdba;
    drop user A cascade;//--删除用户,不能删除已经连接的用户;cascade级联删除该用户的所有对象
    注:授权还有:create any procedure,select any dictionary(登陆oem需要),select any table等.

    --查看用户 

    select * from dba_user;

    --select * from all_users --查看系统所有用户

    --select * from user_users --查看当前用户

    显示当前连接用户:show user;

    --创建用户,指定用户名,密码,表空间,临时表空间
    create user xjgs2 identified by xjgs2 default tablespace xjgs2 temporary tablespace xjgs2_temp;

    2.查看用户系统权限:
    select * from user_sys_privs;

    --显示已经被授予的全部对象特权,要查syj用户对象权限可以在后面加上 where grantee='SYJ'

    --SELECT*FROM sys.dba_tab_privs where grantee='SYJ'
    --给用户授予权限
    grant connect,resource to xjgs2;

    grant dba to xjgs2;

    grant select ,insert(sno,cno),update on sscc to syj --为用户对象付特权

    --GRANT CREATE USER,ALTER USER,DROP USER TO syj WITH ADMIN OPTION

    --取消syj用户权限和对象特权

    revoke CREATE USER,ALTER USER,DROP USER from syj ;

    revoke dba from xjgs2;--撤销dba权限从xjgs2用户;

  • 相关阅读:
    Telnet远程测试
    数据库笔记
    gcc 链接不到 函数实现, undefined reference to xxx
    usb2ttl 引脚定义
    ip v4 地址中 局域网地址范围
    vdi 磁盘文件转换为 vmdk文件的命令
    tftp 命令使用
    无法通过vnc连接到局域网内的树莓派
    镜像服务网站
    C语言 scanf 输入浮点数的用法
  • 原文地址:https://www.cnblogs.com/hy928302776/p/2969797.html
Copyright © 2011-2022 走看看