# 管理员登录
sqlplus / as sysdba
# 普通用户
sqlplus <username>/<password>
su oracle
sqlplus / as sysdba
# 登录
conn C##CA6/11111111
select name from v$database;
su – oracle
sqlplus / as sysdba
select instance_name from v$instance;
select * from v$version;
# 若配置了环境变量
echo $ORACLE_HOME
# 若未配置环境变量
more /etc/oratab4
cat /home/oracle/.bash_profile
SELECT * FROM Nls_Database_Parameters;
SELECT Userenv('language') FROM dual;
select dbtimezone from dual; --------查询数据库时区
select sessiontimezone from dual; --------查询session时区
show parameter memory_target;
show parameter sga;
show parameter pga;
# 当前的数据库连接数
select count(*) from v$process;
# 数据库允许的最大连接数
select value from v$parameter where name = ‘processes’;
drop tablespace <space_name> including contents and datafiles;
drop tablespace <space_name> including contents and datafiles;
drop tablespace <space_name> including contents and datafiles;
drop user <username> cascade;