Oracle数据库10G常用维护语句_Oracle数据库_黑客防线网安服务器维护基地--Powered by WWW.RONGSEN.COM.CN

Oracle10G常用维护语句

作者:黑客防线网安Oracle维护基地 来源:黑客防线网安Oracle维护基地 浏览次数:0

黑客防线网安网讯:   1 创建表空间CREATE TABLESPACE CPORTAL LOGGING DATAFILE '/dev/raw/raw1' SIZE 30000M REUSE EXTENT MANAGEMENT LOCAL     2 创建用户CREATE USER CPORTAL PROFILE DEFAULT ID...

   1 创建表空间

CREATE TABLESPACE CPORTAL LOGGING DATAFILE '/dev/raw/raw1' SIZE 30000M REUSE EXTENT MANAGEMENT LOCAL
 
    2 创建用户

CREATE USER CPORTAL PROFILE DEFAULT IDENTIFIED BY CPORTAL  DEFAULT
    TABLESPACE CPORTAL TEMPORARY  TABLESPACE TEMP ACCOUNT UNLOCK;
GRANT CONNECT TO CPORTAL;
GRANT RESOURCE TO CPORTAL;

    3 参数修改

ALTER SYSTEM SET sga_target = 1000M SCOPE=SPFILE;
ALTER SYSTEM SET pga_aggregate_target = 200M SCOPE=SPFILE;
ALTER SYSTEM SET OPEN_CURSORS=500 SCOPE=SPFILE;
ALTER SYSTEM SET processes=200 SCOPE=SPFILE;
ALTER SYSTEM SET remote_login_passwordfile = NONE
SCOPE=SPFILE;
create pfile from spfile;
-- ==============================================================
-- Modify the  other oracle parameter!                         --
-- ============================================================== ALTER DATABASE TEMPFILE '/opt/oracle/oradata/cportal/temp01.dbf' RESIZE  1024M;
ALTER DATABASE DATAFILE '/opt/oracle/oradata/cportal/undotbs01.dbf' RESIZE 1024M;
ALTER DATABASE DATAFILE '/opt/oracle/oradata/cportal/undotbs01.dbf' AUTOEXTEND ON MAXSIZE 10240M

    4 查看表空间名称和大小

select t.tablespace_name,round(sum(bytes/(1024*1024)),0) ts_size   from dba_tablespaces t dba_data_files d
  where t.tablespace_name = d.tablespace_name
  group by t.tablespace_name;

    5 查看表空间的使用情况

select sum(bytes)/(1024*1024) as free_space,tablespace_name   from dba_free_space   group by tablespace_name;

    6、查看表空间物理文件的名称及大小

select tablespace_name, file_id, file_name, round(bytes/(1024*1024),0) total_space from dba_data_files order by tablespace_name;

    7、查看数据库库对象

select owner, object_type, status, count(*) count# from all_objects group by owner, object_type, status; 

    8、查看控制文件

select name from v$controlfile;

    9、查看日志文件

select member from v$logfile;

    10 .结束用户会话

alter system kill session 'SID,SERIAL#'; select sid,serial#,username,program,machine,status from v$session;

    黑客防线网安服务器维护方案本篇连接:http://www.rongsen.com.cn/show-12840-1.html
网站维护教程更新时间:2012-03-23 00:46:43  【打印此页】  【关闭
我要申请本站N点 | 黑客防线官网 |  
专业服务器维护及网站维护手工安全搭建环境,网站安全加固服务。黑客防线网安服务器维护基地招商进行中!QQ:29769479

footer  footer  footer  footer