Oracle 登陆

2019-05-28  本文已影响0人  黑白_a9aa

登陆的几种方式

关于登陆命令 sqlplus /nolog

The /NOLOG option starts SQLPlus without connecting to a database.
/NOLOG选项表示启动SQL
Plus但不连接数据库

[oracle@localhost ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Tue May 28 10:41:10 2019

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> select user from dual;
SP2-0640: Not connected
SQL> 

关于登陆命令 sqlplus / as sysdba

[oracle@localhost ~]$ echo $ORACLE_SID
orcl
[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Tue May 28 10:39:08 2019

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select user from dual;

USER
------------------------------------------------------------
SYS

SQL> select name from v$database;

NAME
------------------
ORCL

SQL> 

Session

客户端与 Oracle 建立连接之后,会在v$session中留有相关的信息。

v$session 视图结构参考官方文档

上一篇 下一篇

猜你喜欢

热点阅读