增加dbfile大小
ALTER DATABASE DATAFILE '/u01/app/oradata/shdb/data_test08.dbf' RESIZE 20G
新建tablespace
REATE SMALLFILE TABLESPACE "TEST" DATAFILE '/u01/app/oracle/oradata/dbtest/dbtest01' SIZE 100M LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
--查询每个表存放路径
select * from all_all_tables;
--- 查询每个表空间对应的db文件
select /*tablespace_name,file_name,AUTOEXTENSIBLE ,bytes,*/ * from dba_data_files
--查看DBFILE具体位置
select * from v$dbfile;
utlpwdmg.sql 设置oracle登陆的复杂度,路径 rdbms/admin.
/u01/app/oracle/product/11.2.0/db_1/rdbms/admin 中记录了oracle常用的sql脚本工具;
select SID, SERIAL#, USERNAME
from V$SESSION where SID in
(select BLOCKING_SESSION from V$SESSION /* where BLOCKING_SESSION is not null*/);
--alter system kill session '75,37' immediate; 用immediate可以快速将进程kill掉并释放资源。
select * from Sys.aud$ ---审计信息表
select * from DBA_AUDIT_TRAIL;
select * from DBA_fga_AUDIT_TRAIL;
select * from DBA_common_AUDIT_TRAIL;
select * from dba_snapshots;
select * from dba_snapshot_logs;
select * from dba_snapshot_refresh_times;
select * from DBA_OUTSTANDING_ALERTS;
select * from DBA_ALERT_HISTORY;
select * from v$system_event;
select * from v$session_connect_info;
select * from v$session;
select * from all_objects;
select * from dba_invalid_objects;

本文介绍了Oracle数据库中关于表空间、数据文件管理和查询的重要操作,包括调整数据文件大小、创建表空间及如何进行相关查询。同时提供了常用SQL脚本路径和会话管理等实用信息。
312

被折叠的 条评论
为什么被折叠?



