• 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用户;

  • 相关阅读:
    ASP.NET(C#) DataSet数据导出到Excel
    GridView生成导出EXECL
    Gridview 手动排序实现
    用DirectoryInfo搜索文件夹时过滤隐藏文件夹
    为 DropDownList 选项添加背景或样式 收
    IIS中 CS0016: 未能写入输出文件 …….*.dll拒绝访问
    singletontheorylazy.cs
    adaptertwowayseabird.cs
    StatefulLabel.cs
    LifecycleControl.cs
  • 原文地址:https://www.cnblogs.com/hy928302776/p/2969797.html
Copyright © 2020-2023  润新知