sql>show user;查看当前用户
sql>show parameter instance_name;查看当前数据库实例
例如:
sqlplus登录:用sys用户登录(密码是123456)
conn[ect]:切换到sbgl用户(密码是sbgl)
C:Windowssystem32>sqlplus sys/123456@orcl as sysdba SQL*Plus: Release 11.2.0.1.0 Production on 星期五 2月 2 14:32:34 2018 Copyright (c) 1982, 2010, Oracle. All rights reserved. 连接到: 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> show user USER 为 "SYS" SQL> conn sbgl/sbgl@orcl 已连接。 SQL> show user USER 为 "SBGL" SQL> show parameter instance_name; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ instance_name string orcl
另一种:
C:Windowssystem32>sqlplus /nolog SQL*Plus: Release 11.2.0.1.0 Production on 星期五 2月 2 15:29:55 2018 Copyright (c) 1982, 2010, Oracle. All rights reserved. SQL> show user; USER 为 "" SQL> conn sbgl/sbgl@orcl as sysdba 已连接。 SQL> show user USER 为 "SYS" SQL> show parameter instance_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ instance_name string orcl