2021-09-29 oracle用户常用登陆命令

1、运行SQLPLUS工具

  C:\Users\wd-pc>sqlplus

2、直接进入SQLPLUS命令提示符

  C:\Users\wd-pc>sqlplus /nolog

3、以OS身份连接 

  C:\Users\wd-pc>sqlplus / as sysdba   或

  SQL>connect / as sysdba

4、普通用户登录

  C:\Users\wd-pc>sqlplus scott/123456  或

  SQL>connect scott/123456  或

  SQL>connect scott/123456@servername

5、以管理员登录

  C:\Users\wd-pc>sqlplus sys/123456 as sysdba 或

  SQL>connect sys/123456 as sysdba

6、切换用户

  SQL>conn hr/123456 

注:conn同connect

 7、退出

  exit

 8、用户赋权限

 grant connect,resource to user;

    grant create any sequence to user; 

    grant create any table to user; 

    grant delete any table to user; 

    grant insert any table to user; 

    grant select any table to user; 

    grant unlimited tablespace to user; 

    grant execute any procedure to user; 

    grant update any table to user; 

    grant create any view to user;

    grant all privileges to user;

    grant dba to user;

 9、创建用户

  create user 用户名 identified by 密码

        default tablespace 表空间;

 10、删除用户

    drop user 用户名 cascade;

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容