--查詢某個表的數據的插入時間sql
select to_char(scn_to_timestamp(ORA_ROWSCN),'yyyy-mm-dd hh24:mi:ss') insert_time,app_id from CFG_APP;數據庫
-- 查詢數據庫字符集session
select userenv('language') from dual;併發
--查詢數據版本app
select * from v$instancespa
--查看當前正在使用數據的用戶io
SELECT osuser, a.username,cpu_time/executions/1000000||'s', b.sql_text,machine table
from v$session a, v$sqlarea b file
where a.sql_address =b.address order by cpu_time/executions desc; select
select count(*) from v$process
--數據庫容許的最大鏈接數
select value from v$parameter where name = 'processes'
--修改最大鏈接數:
alter system set processes = 300 scope = spfile;
--併發鏈接數
select count(*) from v$session where status='ACTIVE'
--查看用戶表空間
select username,default_tablespace,temporary_tablespace from dba_users where username='CFG';
--修改表空間
alter tablespace CFG_DB_DATA rename to CFG_DATA;