Bo's Oracle Station

查看: 2678|回复: 0

课程第12/13次(2017-07-24星期一和2017-07-26星期三)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2017-7-24 19:45:17 | 显示全部楼层 |阅读模式
上完1Z0-052第14章,开始 1Z0-052第6章网络
1Z0-05219章(上完5章),1Z0-05321章(上完2章)和1Z0-063多租户部分共9章(上完0章)
总共上完全部49章中的7


配置可恢复性,磁盘组添加新控制文件:
  1. [oracle@station90 ~]$ sqlplus /nolog

  2. SQL*Plus: Release 11.2.0.1.0 Production on Mon Jul 24 19:28:46 2017

  3. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  4. SQL> conn / as sysdba
  5. Connected.
  6. SQL> show parameter control_files

  7. NAME                                     TYPE         VALUE
  8. ------------------------------------ ----------- ------------------------------
  9. control_files                             string         +DATA/orcl/controlfile/current
  10.                                                  .260.816169631, +FRA/orcl/cont
  11.                                                  rolfile/current.256.816169633
  12. SQL> alter system set coontrol_files='+DATA/orcl/controlfile/current.260.816169631','+FRA/orcl/controlfile/current.256.816169633','/home/oracle/controlfile/control03.ctl' ;
  13. alter system set coontrol_files='+DATA/orcl/controlfile/current.260.816169631','+FRA/orcl/controlfile/current.256.816169633','/home/oracle/controlfile/control03.ctl'
  14.                  *
  15. ERROR at line 1:
  16. ORA-02065: illegal option for ALTER SYSTEM


  17. SQL> alter system set control_files='+DATA/orcl/controlfile/current.260.816169631','+FRA/orcl/controlfile/current.256.816169633','/home/oracle/controlfile/control03.ctl' ;
  18. alter system set control_files='+DATA/orcl/controlfile/current.260.816169631','+FRA/orcl/controlfile/current.256.816169633','/home/oracle/controlfile/control03.ctl'
  19.                  *
  20. ERROR at line 1:
  21. ORA-02095: specified initialization parameter cannot be modified


  22. SQL> alter system set control_files='+DATA/orcl/controlfile/current.260.816169631','+FRA/orcl/controlfile/current.256.816169633','/home/oracle/controlfile/control03.ctl'  scope=spfile;

  23. System altered.

  24. SQL> shutdown immediate

  25. Database closed.
  26. Database dismounted.
  27. ORACLE instance shut down.
  28. SQL> SQL>
  29. SQL>
  30. SQL> startup
  31. ORA-00443: background process "PMON" did not start

  32. SQL> startup
  33. ORACLE instance started.

  34. Total System Global Area 6680915968 bytes
  35. Fixed Size                    2213936 bytes
  36. Variable Size                 3556771792 bytes
  37. Database Buffers         3087007744 bytes
  38. Redo Buffers                   34922496 bytes
  39. ORA-00205: error in identifying control file, check alert log for more info


  40. SQL> alter database mount;

  41. Database altered.

  42. SQL> alter database open ;

  43. Database altered.

  44. SQL> show parameter control_files

  45. NAME                                     TYPE         VALUE
  46. ------------------------------------ ----------- ------------------------------
  47. control_files                             string         +DATA/orcl/controlfile/current
  48.                                                  .260.816169631, +FRA/orcl/cont
  49.                                                  rolfile/current.256.816169633,
  50.                                                   /home/oracle/controlfile/cont
  51.                                                  rol03.ctl
  52. SQL>
复制代码
  1. ASMCMD> cp Current.260.816169631  /home/oracle/controlfile/control03.ctl
  2. copying +DATA/ORCL/CONTROLFILE/Current.260.816169631 -> /home/oracle/controlfile/control03.ctl
复制代码

配置可恢复性,磁盘组添加新日志成员和日志组:
  1. select  * from v$thread;

  2. select  * from v$log;

  3. select  * from v$logfile;

  4. alter database add logfile group 4 size  52428800;

  5. alter system switch logfile;

  6. alter database drop logfile group 2;

  7. alter system checkpoint;

  8. alter database drop logfile group 4;

  9. alter database add logfile member '/home/oracle/redologfile/redo01.log' to group 1;

  10. alter system switch logfile;

  11. alter system switch logfile;

  12. alter system switch logfile;

  13. alter database drop logfile member '/home/oracle/redologfile/redo01.log';

  14. alter system switch logfile;

  15. alter database drop logfile member '/home/oracle/redologfile/redo01.log';

  16. ------
复制代码

监听器静态注册:
  1. # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/grid/network/admin/listener.ora
  2. # Generated by Oracle configuration tools.

  3. SID_LIST_LISTENER =
  4.   (SID_LIST =
  5.     (SID_DESC =
  6.       (GLOBAL_DBNAME = orcl.example.com)
  7.       (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
  8.       (SID_NAME = orcl)
  9.     )
  10.   )

  11. LISTENER =
  12.   (DESCRIPTION =
  13.     (ADDRESS = (PROTOCOL = TCP)(HOST = station90.example.com)(PORT = 1521))
  14.   )

  15. ADR_BASE_LISTENER = /u01/app/oracle

  16. ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON
复制代码

Screenshot.png


  1. # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/grid/network/admin/listener.ora
  2. # Generated by Oracle configuration tools.

  3. SID_LIST_L2 =
  4.   (SID_LIST =
  5.     (SID_DESC =
  6.       (GLOBAL_DBNAME = orcl.example.com)
  7.       (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
  8.       (SID_NAME = orcl)
  9.     )
  10.     (SID_DESC =
  11.       (GLOBAL_DBNAME = rcat.example.com)
  12.       (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
  13.       (SID_NAME = rcat)
  14.     )
  15.   )







  16. L2 =
  17.   (DESCRIPTION_LIST =
  18.     (DESCRIPTION =
  19.       (ADDRESS = (PROTOCOL = TCP)(HOST = station90.example.com)(PORT = 1526))
  20.     )
  21.   )

  22. ADR_BASE_L2 = /u01/app/oracle

  23. SID_LIST_LISTENER =
  24.   (SID_LIST =
  25.     (SID_DESC =
  26.       (GLOBAL_DBNAME = orcl.example.com)
  27.       (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
  28.       (SID_NAME = orcl)
  29.     )
  30.     (SID_DESC =
  31.       (GLOBAL_DBNAME = rcat.example.com)
  32.       (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
  33.       (SID_NAME = rcat)
  34.     )
  35.   )

  36. LISTENER =
  37.   (DESCRIPTION =
  38.     (ADDRESS = (PROTOCOL = TCP)(HOST = station90.example.com)(PORT = 1521))
  39.   )

  40. ADR_BASE_LISTENER = /u01/app/oracle

  41. ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON
复制代码
  1. # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/grid/network/admin/tnsnames.ora
  2. # Generated by Oracle configuration tools.

  3. APPLE =
  4.   (DESCRIPTION =
  5.     (ADDRESS_LIST =
  6.       (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.90)(PORT = 1521))
  7.       (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.90)(PORT = 1526))
  8.       (LOAD_BALANCE = yes)
  9.     )
  10.     (CONNECT_DATA =
  11.       (SERVICE_NAME = orcl.example.com)
  12.     )
  13.   )

  14. RCAT =
  15.   (DESCRIPTION =
  16.     (ADDRESS = (PROTOCOL = TCP)(HOST = station90.example.com)(PORT = 1521))
  17.     (CONNECT_DATA =
  18.       (SERVER = DEDICATED)
  19.       (SERVICE_NAME = rcat.example.com)
  20.     )
  21.   )

  22. FOR1526 =
  23.   (DESCRIPTION =
  24.     (ADDRESS_LIST =
  25.       (ADDRESS = (PROTOCOL = TCP)(HOST = station90.example.com)(PORT = 1521))
  26.       (ADDRESS = (PROTOCOL = TCP)(HOST = station90.example.com)(PORT = 1526))
  27.     )
  28.   )

  29. ORCL =
  30.   (DESCRIPTION =
  31.     (ADDRESS = (PROTOCOL = TCP)(HOST = station90.example.com)(PORT = 1521))
  32.     (CONNECT_DATA =
  33.       (SERVER = DEDICATED)
  34.       (SERVICE_NAME = orcl.example.com)
  35.     )
  36.   )
复制代码



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-3-28 22:58 , Processed in 0.049272 second(s), 27 queries .

快速回复 返回顶部 返回列表