当前位置:Gxlcms > 数据库问题 > 【linux&oracle】常用命令汇总

【linux&oracle】常用命令汇总

时间:2021-07-01 10:21:17 帮助过:26人阅读

SQL> create user user1 identified by redhat;
SQL> conn user1/redhat
ERROR:
ORA-01045: user USER1 lacks CREATE SESSION privilege; logon denied
Warning: You are no longer connected to ORACLE.
SQL>
SQL> show user
USER is ""
SQL> conn / as sysdba
Connected.
SQL>
SQL> grant connect to user1;
SQL> conn user1/redhat;
Connected.
SQL>

 查看系统拥有哪些用户

SQL> select * from all_users;

 执行sql文件(PATH表示文件的路径)

SQL> @PATH/filename.sql

 测试sql语句执行时间

SQL>set timing on ;

 查看当前数据库名

SQL> select name from v$database;

 

【linux&oracle】常用命令汇总

标签:filename   select   name   创建用户   sys   warning   error:   用户   .sql   

人气教程排行