9月19日数据字典和参数、控制两个文件实验
1、动态视图和数据字典(1)动态性能视图特点:1、oracle自动维护2、保存在sga的shared pool中3、通常以v$开头,4、以表的形式存在于内存中5、负责收集系统各种信息(2)数据字典 1、oracle自动维护; 2、保存在system01.dbf文件(系统表空间文件)中 3、一般以all_dba_user_ 开头 实例1修改sga_max_size参数SQL> alter system set sga_max_size=1000m scope=both;alter system set sga_max_size=1000m scope=both *ERROR at line 1:ORA-02095: specified initialization parameter cannot be modifiedSQL> alter system set sga_max_size=1000m scope=spfile; 重启报错SQL> startupORA-00844: Parameter not taking MEMORY_TARGET into accountORA-00851: SGA_MAX_SIZE 1048576000 cannot be set to more than MEMORY_TARGET 834666496.因为不能直接对spfilefsdb.ora进行修改,需要转换成文本参数文件initfsdb.ora;方法一 在线Sql>create pfile from spfile;vim initfsdb.ora把 SGA_MAX_SIZE=700M,保存退出;启动再次报错SQL> startupORA-00844: Parameter not taking MEMORY_TARGET into accountORA-00851: SGA_MAX_SIZE 1048576000 cannot be set to more than MEMORY_TARGET 834666496. 查看启用哪个参数文件NAME TYPE VALUE------------------------------------ ----------- ------------------------------spfile string /u01/app/oracle/product/11.2/d b_1/dbs/spfilefsdb.oraVALUE有路径信息说明用的是spfilefsdb.ora作为启动时的参数文件,因此调整启动文件SQL> startup pfile='/u01/app/oracle/product/11.2/db_1/dbs/initfsdb.ora'ORACLE instance started.启动成功 create spfile from pfile --->将正确的参数文件覆盖旧的spileSID.ora文件 方法二、手动创建initfsdb.ora文件 $ strings spfilefsdb.ora > initfsdb.ora vim initfsdb.ora 修改 把 SGA_MAX_SIZE=700M,保存退出;启动失败SQL> startupORA-01078: failure in processing system parametersLRM-00109:could not open parameter file '/u01/app/oracle/product/11.2/db_1/dbs/initfsdb.ora'vim initfsdb.ora内容如下:发现有一个参数不对*.control_files='/oradata/fsdb/control01.ctl','/oradata/fsdb/control02.c后面格式不对,修改结果如下*.control_files='/oradata/fsdb/control01.ctl','/oradata/fsdb/control02.ctl’启动成功; 注:MEMORY_TARGET 参数是sga和pga的总合,因此数值不能超过MEMORY_TARGET 实验二、多路复用(1)fs库第一步 设置参数altersystem set control_files='/oradata/fsdb/control01.ctl','/oradata/fsdb/control02.ctl','/oradata/fsdb/control03.ctl' scope=spfile;第二步 关库 SQL>shutdown immediate第三步 将control01.ctrl 复制成control03.ctrl $ cp control01.ctl control03.ctl(2)asm库第一步设置参数SQL> alter database set control_files='+DATADG/asmdb/controlfile/current.256.1051316167','/tmp/control03.ctl' scope=spfile;第二步 关库第三步切换grid用户su - gridASMCMD> cp Current.256.1051316167 /tmp/control03.ctlcopying +DATADG/ASMDB/CONTROLFILE/Current.256.1051316167 -> /tmp/control03.ctl SQL> alter database mount;alter database mount*ERROR at line 1:ORA-00221: error on write to control fileORA-00206: error in writing (block 1, # blocks 1) of control fileORA-00202: control file: '/tmp/control03.ctl'ORA-27041: unable to open fileLinux-x86_64 Error: 13: Permission deniedAdditional information: 3没有改权限chown oracle /tmp/control03.ctl
页:
[1]