1、[oracle@dbserver ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Mar 15 15:16:03 2022
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
SQL>
2、查询表空间名称
SQL> select name from v$tablespace;
NAME
--------------------------------------------------------------------------------
SYSTEM
SYSAUX
UNDOTBS1
TEMP
USERS
ADDRESSLISTDB
HUAZHIXU
7 rows selected.
3、查询数据文件路径和名称
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/ORDB/system01.dbf
/u01/app/oracle/oradata/ORDB/sysaux01.dbf
/u01/app/oracle/oradata/ORDB/undotbs01.dbf
/u01/app/oracle/oradata/ORDB/users01.dbf
/u01/app/oracle/oradata/ORDB/ADDRESSLIST.dbf
/u01/app/oracle/oradata/ORDB/huazhixu.dbf
6 rows selected.
SQL>
4、查询实例名
SQL> select instance_name from v$instance;
INSTANCE_NAME
------------------------------------------------
ORDB
SQL>
5、查询普通用户当前有哪些表,名字是什么
SQL> select table_name from tabs;
TABLE_NAME
--------------------------------------------------------------------------------
T_TEST
STUDENT
COURSE
SCORE
TEACHER
SQL>