SQL> select count(*) from v$session #当前的连接数
SQL> Select count(*) from v$session where status='ACTIVE' #并发连接数
SQL> select value from v$parameter where name = 'processes' --数据库允许的最大连接数
SQL> show parameter processes #最大连接
SQL> select username,count(username) from v$session where username is not null group by username; #查看不同用户的连接数
show parameters sessions;
----------------------------------------------------------------------------------------------------------------------------------
sqlplus /nolog;
conn sys/change_on_install;
sqlplus "oracle/oracle" as sysdba
创建用户及表空间
create user zzg identified by zzg123;
alter user zzg identified by unis;
create tablespace ts_zzg datafile 'f:\ts_zzg\zzg_data.dbf' size 200M;
alter user zzg default tablespace ts_zzg;
grant connect,resource,dba to zzg;
查询所有表空间名字
select tablespace_name from dba_tablespaces;
查询oracle表空间数据文件位置
select t1.name,t2.name from v$tablespace t1,v$datafile t2 where t1.ts# = t2.ts#;
删除用户及表空间
1.select username,default_tablespace from dba_users;
2.drop user ×× cascade
3.DROP TABLESPACE xx INCLUDING CONTENTS AND DATAFILES;
删除表空间
drop
tablespace 表空间名;
删除用户
drop user 用户名;
导出导入数据库
exp command/command buffer=64000 file=C:\Users\Administrator\Desktop\huangruyuan\command.dmp owner=command
imp command/command full=y file=F:\ftp\command.dmp ignore=y
rows=y —— 带数据导出导入;rows=n —— 不带数据的导出导入,只移植结构。