zoukankan      html  css  js  c++  java
  • OCM_Session1_8_Schema Statistics and Parameter File Configuration

    8. Schema Statistics and Parameter File Configuration
     8.1 Compute statistics for the various schemas in the database as necessary for use with cost based optimization.
     8.2 Investigate the parameter file for reasonable sizes for each parameter listed. Add additional parameters as you deem necessary to support an optimal database environment. In addition,modify or add the following listed parameters:
          UTL_FILE_DIR=('/home/oracle','/home/oracle/temp','/home/oracle/scripts')
          Note: Applications that use Oracle 10g features will be running therefore,ensure the database and instance are appropriately configured.


    参考联机文档:
    PL/SQL Packages and Types Reference ==> 103 DBMS_STATS ==>GATHER_DATABASE_STATS Procedures



    • 8.1收集资料
    • 8.1 Compute statistics for the various schemas in the database as necessary for use with cost based optimization.不同schema收集资料
    SQL> begin
      2  DBMS_STATS.GATHER_DATABASE_STATS(degree=>3); 这里的3表示并发的操作,也可以指定其他数字
      3  end;
      4  /

    PL/SQL procedure successfully completed.

    • 8.2修改参数
    • 8.2 Investigate the parameter file for reasonable sizes for each parameter listed. Add additional parameters as you deem necessary to support an optimal database environment. In addition,modify or add the following listed parameters:修改或添加下列参数
    •       UTL_FILE_DIR=('/home/oracle','/home/oracle/temp','/home/oracle/scripts')
    •       Note: Applications that use Oracle 10g features will be running therefore,ensure the database and instance are appropriately configured.

    [oracle@ocm1 Disk1]$ cd /home/oracle/
    [oracle@ocm1 ~]$ mkdir temp
    [oracle@ocm1 ~]$ ll
    total 8
    drwxr-xr-x 2 oracle oinstall 4096 Mar 19 14:22 scripts
    drwxr-xr-x 2 oracle oinstall 4096 Mar 19 14:51 temp

    此处注意题干给的有括号,而操作时没有括号
    SQL> alter system set utl_file_dir='/home/oracle','/home/oracle/temp','/home/oracle/scripts' scope=spfile;

    System altered.

    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.

    Total System Global Area  524288000 bytes
    Fixed Size                  1220360 bytes
    Variable Size             163578104 bytes
    Database Buffers          356515840 bytes
    Redo Buffers                2973696 bytes
    Database mounted.
    Database opened.


  • 相关阅读:
    Oracle一次可以查询多个表的结果的方法
    nagios+logstash实时监控java日志(一)
    原 ELK+Filebeat集中式日志解决方案(centos7)
    关于系统运维监控规范的几点建议和思考
    web文件管理系统和日志实时监控工具
    [运维]ELK实现日志监控告警
    阿里云服务器 发送邮箱 STMP 25端口 465端口问题 Javamail 25被禁用
    Elasticsearch5.6搭建及拼音中文混合搜索实现
    ELK pipeline
    图解Elasticsearch中的_source、_all、store和index属性
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13315894.html
Copyright © 2011-2022 走看看