Bo's Oracle Station

查看: 1222|回复: 0

(52-13)第18次:2015-11-11星期三

[复制链接]

75

主题

115

帖子

2722

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
2722
发表于 2015-11-12 11:02:01 | 显示全部楼层 |阅读模式
上完1Z0-053第15章,52-13


  1. [root@station90 ~]# ssh station9
  2. The authenticity of host 'station9 (192.168.0.9)' can't be established.
  3. RSA key fingerprint is c0:92:07:a8:c4:91:fd:2f:4a:77:4d:5a:5b:b1:b8:6a.
  4. Are you sure you want to continue connecting (yes/no)? yes
  5. Warning: Permanently added 'station9,192.168.0.9' (RSA) to the list of known hosts.
  6. Last login: Sat Oct 31 16:07:38 2015
  7. [root@station9 ~]# su - oracle
  8. [oracle@station9 ~]$ crs_stat -t
  9. CRS-0184: Cannot communicate with the CRS daemon.

  10. [oracle@station9 ~]$ exit
  11. logout

  12. [root@station9 ~]# cd /etc/
  13. [root@station9 etc]# rm -rf oracle/
  14. [root@station9 etc]# /u01/app/oracle/product/11.2.0/grid/root.sh
  15. Running Oracle 11g root.sh script...

  16. The following environment variables are set as:
  17.     ORACLE_OWNER= oracle
  18.     ORACLE_HOME=  /u01/app/oracle/product/11.2.0/grid

  19. Enter the full pathname of the local bin directory: [/usr/local/bin]:
  20. The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
  21. [n]: y
  22.    Copying dbhome to /usr/local/bin ...
  23. The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
  24. [n]: y
  25.    Copying oraenv to /usr/local/bin ...
  26. The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
  27. [n]: y
  28.    Copying coraenv to /usr/local/bin ...

  29. Entries will be added to the /etc/oratab file as needed by
  30. Database Configuration Assistant when a database is created
  31. Finished running generic part of root.sh script.
  32. Now product-specific root actions will be performed.
  33. 2015-01-06 21:05:34: Checking for super user privileges
  34. 2015-01-06 21:05:34: User has super user privileges
  35. 2015-01-06 21:05:34: Parsing the host name
  36. Using configuration parameter file: /u01/app/oracle/product/11.2.0/grid/crs/install/crsconfig_params
  37. LOCAL ADD MODE
  38. Creating OCR keys for user 'oracle', privgrp 'oinstall'..
  39. Operation successful.
  40. CRS-4664: Node station9 successfully pinned.
  41. Adding daemon to inittab
  42. CRS-4123: Oracle High Availability Services has been started.
  43. ohasd is starting

  44. station9     2015/01/06 21:06:10     /u01/app/oracle/product/11.2.0/grid/cdata/station9/backup_20150106_210610.olr
  45. Successfully configured Oracle Grid Infrastructure for a Standalone Server
  46. Updating inventory properties for clusterware
  47. Starting Oracle Universal Installer...

  48. Checking swap space: must be greater than 500 MB.   Actual 1027 MB    Passed
  49. The inventory pointer is located at /etc/oraInst.loc
  50. The inventory is located at /u01/app/oraInventory
  51. [root@station9 etc]#
  52. [root@station9 etc]#
  53. [root@station9 etc]# su - oracle
  54. [oracle@station9 ~]$ crs_stat -t
  55. Name           Type           Target    State     Host        
  56. ------------------------------------------------------------
  57. ora.cssd       ora.cssd.type  OFFLINE   OFFLINE               
  58. ora.diskmon    ora....on.type OFFLINE   OFFLINE               
  59. [oracle@station9 ~]$ crs_stat -t
  60. Name           Type           Target    State     Host        
  61. ------------------------------------------------------------
  62. ora.cssd       ora.cssd.type  OFFLINE   OFFLINE               
  63. ora.diskmon    ora....on.type OFFLINE   OFFLINE               
  64. [oracle@station9 ~]$ crs_stat -t
  65. Name           Type           Target    State     Host        
  66. ------------------------------------------------------------
  67. ora.cssd       ora.cssd.type  OFFLINE   OFFLINE               
  68. ora.diskmon    ora....on.type OFFLINE   OFFLINE               
  69. [oracle@station9 ~]$ crs_stat -t
  70. Name           Type           Target    State     Host        
  71. ------------------------------------------------------------
  72. ora.cssd       ora.cssd.type  OFFLINE   OFFLINE               
  73. ora.diskmon    ora....on.type OFFLINE   OFFLINE               
  74. [oracle@station9 ~]$ crs_stat -t
  75. Name           Type           Target    State     Host        
  76. ------------------------------------------------------------
  77. ora.cssd       ora.cssd.type  OFFLINE   OFFLINE               
  78. ora.diskmon    ora....on.type OFFLINE   OFFLINE               
  79. [oracle@station9 ~]$ crs_stat -t
  80. Name           Type           Target    State     Host        
  81. ------------------------------------------------------------
  82. ora.cssd       ora.cssd.type  OFFLINE   OFFLINE               
  83. ora.diskmon    ora....on.type OFFLINE   OFFLINE               
  84. [oracle@station9 ~]$ crs_stat -t
  85. Name           Type           Target    State     Host        
  86. ------------------------------------------------------------
  87. ora.cssd       ora.cssd.type  OFFLINE   OFFLINE               
  88. ora.diskmon    ora....on.type OFFLINE   OFFLINE               
  89. [oracle@station9 ~]$ crs_stat -t
  90. Name           Type           Target    State     Host        
  91. ------------------------------------------------------------
  92. ora.cssd       ora.cssd.type  OFFLINE   OFFLINE               
  93. ora.diskmon    ora....on.type OFFLINE   OFFLINE               
  94. [oracle@station9 ~]$ crs_stat -t
  95. Name           Type           Target    State     Host        
  96. ------------------------------------------------------------
  97. ora.cssd       ora.cssd.type  OFFLINE   OFFLINE               
  98. ora.diskmon    ora....on.type OFFLINE   OFFLINE               
  99. [oracle@station9 ~]$ crsctl start res ora.cssd
  100. CRS-2672: Attempting to start 'ora.cssd' on 'station9'
  101. CRS-2672: Attempting to start 'ora.diskmon' on 'station9'
  102. CRS-2676: Start of 'ora.diskmon' on 'station9' succeeded
  103. CRS-2676: Start of 'ora.cssd' on 'station9' succeeded
  104. [oracle@station9 ~]$ crs_stat -t
  105. Name           Type           Target    State     Host        
  106. ------------------------------------------------------------
  107. ora.cssd       ora.cssd.type  ONLINE    ONLINE    station9   
  108. ora.diskmon    ora....on.type ONLINE    ONLINE    station9   
  109. [oracle@station9 ~]$ srvctl add asm
  110. [oracle@station9 ~]$ crs_stat -t
  111. Name           Type           Target    State     Host        
  112. ------------------------------------------------------------
  113. ora.asm        ora.asm.type   OFFLINE   OFFLINE               
  114. ora.cssd       ora.cssd.type  ONLINE    ONLINE    station9   
  115. ora.diskmon    ora....on.type ONLINE    ONLINE    station9   
  116. [oracle@station9 ~]$ crsctl start res ora.asm
  117. CRS-2672: Attempting to start 'ora.asm' on 'station9'
  118. CRS-2676: Start of 'ora.asm' on 'station9' succeeded
  119. [oracle@station9 ~]$ crs_stat -t
  120. Name           Type           Target    State     Host        
  121. ------------------------------------------------------------
  122. ora.asm        ora.asm.type   ONLINE    ONLINE    station9   
  123. ora.cssd       ora.cssd.type  ONLINE    ONLINE    station9   
  124. ora.diskmon    ora....on.type ONLINE    ONLINE    station9   
  125. [oracle@station9 ~]$ sqlplus /nolog

  126. SQL*Plus: Release 11.2.0.1.0 Production on Tue Jan 6 21:07:50 2015

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

  128. SQL> exit
  129. [oracle@station9 ~]$ vim /usr/bin/as
  130. as             as86           aseqdump       aseqnet        aserver        asm.sh         aspell         aspell-import
  131. [oracle@station9 ~]$ vim /usr/bin/asm.sh
  132. [oracle@station9 ~]$ asm.sh

  133. SQL*Plus: Release 11.2.0.1.0 Production on Tue Jan 6 21:08:39 2015

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

  135. SQL> Connected.
  136. SQL>
  137. System altered.

  138. SQL>
  139. System altered.

  140. SQL>
  141. Diskgroup altered.

  142. SQL>
  143. Diskgroup altered.

  144. SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
  145. With the Automatic Storage Management option
  146. [oracle@station9 ~]$ crs_stat -t
  147. Name           Type           Target    State     Host        
  148. ------------------------------------------------------------
  149. ora.DATA.dg    ora....up.type ONLINE    ONLINE    station9   
  150. ora.FRA.dg     ora....up.type ONLINE    ONLINE    station9   
  151. ora.asm        ora.asm.type   ONLINE    ONLINE    station9   
  152. ora.cssd       ora.cssd.type  ONLINE    ONLINE    station9   
  153. ora.diskmon    ora....on.type ONLINE    ONLINE    station9   
  154. [oracle@station9 ~]$ srvctl add listener
  155. [oracle@station9 ~]$ crs_stat -t
  156. Name           Type           Target    State     Host        
  157. ------------------------------------------------------------
  158. ora.DATA.dg    ora....up.type ONLINE    ONLINE    station9   
  159. ora.FRA.dg     ora....up.type ONLINE    ONLINE    station9   
  160. ora....ER.lsnr ora....er.type OFFLINE   OFFLINE               
  161. ora.asm        ora.asm.type   ONLINE    ONLINE    station9   
  162. ora.cssd       ora.cssd.type  ONLINE    ONLINE    station9   
  163. ora.diskmon    ora....on.type ONLINE    ONLINE    station9   
  164. [oracle@station9 ~]$ crs_stat -p | grep lsnr
  165. NAME=ora.LISTENER.lsnr
  166. [oracle@station9 ~]$ crsctl stat res ora.LISTENER.lsnr
  167. NAME=ora.LISTENER.lsnr
  168. TYPE=ora.listener.type
  169. TARGET=OFFLINE
  170. STATE=OFFLINE

  171. [oracle@station9 ~]$ crsctl start res ora.LISTENER.lsnr
  172. CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'station9'
  173. CRS-2676: Start of 'ora.LISTENER.lsnr' on 'station9' succeeded
  174. [oracle@station9 ~]$ crs_stat -t
  175. Name           Type           Target    State     Host        
  176. ------------------------------------------------------------
  177. ora.DATA.dg    ora....up.type ONLINE    ONLINE    station9   
  178. ora.FRA.dg     ora....up.type ONLINE    ONLINE    station9   
  179. ora....ER.lsnr ora....er.type ONLINE    ONLINE    station9   
  180. ora.asm        ora.asm.type   ONLINE    ONLINE    station9   
  181. ora.cssd       ora.cssd.type  ONLINE    ONLINE    station9   
  182. ora.diskmon    ora....on.type ONLINE    ONLINE    station9   
  183. [oracle@station9 ~]$ srvctl add database -d orcl -o /u01/app/oracle/product/11.2.0/dbhome_1
  184. [oracle@station9 ~]$ crs_stat -t
  185. Name           Type           Target    State     Host        
  186. ------------------------------------------------------------
  187. ora.DATA.dg    ora....up.type ONLINE    ONLINE    station9   
  188. ora.FRA.dg     ora....up.type ONLINE    ONLINE    station9   
  189. ora....ER.lsnr ora....er.type ONLINE    ONLINE    station9   
  190. ora.asm        ora.asm.type   ONLINE    ONLINE    station9   
  191. ora.cssd       ora.cssd.type  ONLINE    ONLINE    station9   
  192. ora.diskmon    ora....on.type ONLINE    ONLINE    station9   
  193. ora.orcl.db    ora....se.type OFFLINE   OFFLINE               
  194. [oracle@station9 ~]$ crsctl start res ora.orcl.db
  195. CRS-2672: Attempting to start 'ora.orcl.db' on 'station9'
  196. CRS-2676: Start of 'ora.orcl.db' on 'station9' succeeded
  197. [oracle@station9 ~]$ crs_stat -t
  198. Name           Type           Target    State     Host        
  199. ------------------------------------------------------------
  200. ora.DATA.dg    ora....up.type ONLINE    ONLINE    station9   
  201. ora.FRA.dg     ora....up.type ONLINE    ONLINE    station9   
  202. ora....ER.lsnr ora....er.type ONLINE    ONLINE    station9   
  203. ora.asm        ora.asm.type   ONLINE    ONLINE    station9   
  204. ora.cssd       ora.cssd.type  ONLINE    ONLINE    station9   
  205. ora.diskmon    ora....on.type ONLINE    ONLINE    station9   
  206. ora.orcl.db    ora....se.type ONLINE    ONLINE    station9   
  207. [oracle@station9 ~]$
复制代码
  1. select  * from v$block_change_tracking;

  2. select * from dba_Tables t where t.table_name='T05305';

  3. SELECT file#, avg(datafile_blocks),          avg(blocks_read),          avg(blocks_read/datafile_blocks)
  4.             * 100 AS PCT_READ_FOR_BACKUP,          avg(blocks)
  5.    FROM   v$backup_datafile
  6.    WHERE  used_change_tracking = 'YES'
  7. AND    incremental_level > 0  and file#=1
  8.    GROUP  BY file#;
复制代码



回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-4-29 19:44 , Processed in 0.036575 second(s), 24 queries .

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