Bo's Oracle Station

查看: 1465|回复: 0

课程第17次(2016-05-04星期三):体系结构毕业季

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2016-5-5 09:56:18 | 显示全部楼层 |阅读模式
本帖最后由 botang 于 2016-5-9 23:10 编辑

课程第17次(2016-05-04星期三):体系结构毕业季
【上完1Z0-052的第1章】:体系结构
【1Z0-051】:共10章
【1Z0-052】:共7章

关于体系结构,请DML一个大表,跟踪alert,做读一致性,然后kill实例。
启动实例,密切跟踪alert
把以上过程对自己解释一遍。
把以上过程对别人(Oracle同行)讲解一遍。


  1. [root@station90 桌面]# su - oracle
  2. [oracle@station90 ~]$ sqlplus /nolog

  3. SQL*Plus: Release 11.2.0.1.0 Production on Wed May 4 20:03:22 2016

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

  5. SQL> conn / as sysdba
  6. Connected.
  7. SQL> select checkpoint_change#    from v$database ;

  8. CHECKPOINT_CHANGE#
  9. ------------------
  10.            2230481

  11. SQL> select  checkpoint_change# from v$datafile ;

  12. CHECKPOINT_CHANGE#
  13. ------------------
  14.            2230481
  15.            2230481
  16.            2230481
  17.            2230481
  18.            2230481

  19. SQL> shutdown abort
  20. ORACLE instance shut down.
  21. SQL> startup mount
  22. ORACLE instance started.

  23. Total System Global Area 6680915968 bytes
  24. Fixed Size                    2213936 bytes
  25. Variable Size                 3758098384 bytes
  26. Database Buffers         2885681152 bytes
  27. Redo Buffers                   34922496 bytes
  28. Database mounted.
  29. SQL> select  checkpoint_change# from v$datafile ;

  30. CHECKPOINT_CHANGE#
  31. ------------------
  32.            2230481
  33.            2230481
  34.            2230481
  35.            2230481
  36.            2230481

  37. SQL> select checkpoint_change# , current_scn from v$database;

  38. CHECKPOINT_CHANGE# CURRENT_SCN
  39. ------------------ -----------
  40.            2230481             0

  41. SQL> select checkpoint_change# , current_scn from v$database;

  42. CHECKPOINT_CHANGE# CURRENT_SCN
  43. ------------------ -----------
  44.            2230481             0

  45. SQL> alter database open ;

  46. Database altered.

  47. SQL> select checkpoint_change# , current_scn from v$database;

  48. CHECKPOINT_CHANGE# CURRENT_SCN
  49. ------------------ -----------
  50.            2251738     2251903

  51. SQL> select checkpoint_change# , current_scn from v$database;

  52. CHECKPOINT_CHANGE# CURRENT_SCN
  53. ------------------ -----------
  54.            2251738     2252011

  55. SQL> select checkpoint_change# , current_scn from v$database;

  56. CHECKPOINT_CHANGE# CURRENT_SCN
  57. ------------------ -----------
  58.            2251738     2252035

  59. SQL> select checkpoint_change# , current_scn from v$database;

  60. CHECKPOINT_CHANGE# CURRENT_SCN
  61. ------------------ -----------
  62.            2251738     2252036

  63. SQL> select checkpoint_change# , current_scn from v$database;

  64. CHECKPOINT_CHANGE# CURRENT_SCN
  65. ------------------ -----------
  66.            2251738     2252037

  67. SQL> select checkpoint_change# , current_scn from v$database;

  68. CHECKPOINT_CHANGE# CURRENT_SCN
  69. ------------------ -----------
  70.            2251738     2252042

  71. SQL> select checkpoint_change# , current_scn from v$database;

  72. CHECKPOINT_CHANGE# CURRENT_SCN
  73. ------------------ -----------
  74.            2251738     2252045

  75. SQL> select checkpoint_change# , current_scn from v$database;

  76. CHECKPOINT_CHANGE# CURRENT_SCN
  77. ------------------ -----------
  78.            2251738     2252048

  79. SQL> select checkpoint_change# , current_scn from v$database;

  80. CHECKPOINT_CHANGE# CURRENT_SCN
  81. ------------------ -----------
  82.            2251738     2252049

  83. SQL> select checkpoint_change# , current_scn from v$database;

  84. CHECKPOINT_CHANGE# CURRENT_SCN
  85. ------------------ -----------
  86.            2251738     2252051

  87. SQL> select checkpoint_change# , current_scn from v$database;

  88. CHECKPOINT_CHANGE# CURRENT_SCN
  89. ------------------ -----------
  90.            2251738     2252052

  91. SQL> select checkpoint_change# , current_scn from v$database;

  92. CHECKPOINT_CHANGE# CURRENT_SCN
  93. ------------------ -----------
  94.            2251738     2252053

  95. SQL> select checkpoint_change# , current_scn from v$database;

  96. CHECKPOINT_CHANGE# CURRENT_SCN
  97. ------------------ -----------
  98.            2251738     2252054

  99. SQL>
  100. SQL> select checkpoint_change# , current_scn from v$database;

  101. CHECKPOINT_CHANGE# CURRENT_SCN
  102. ------------------ -----------
  103.            2251738     2252055

  104. SQL> select checkpoint_change# , current_scn from v$database;

  105. CHECKPOINT_CHANGE# CURRENT_SCN
  106. ------------------ -----------
  107.            2251738     2252057

  108. SQL> select checkpoint_change# , current_scn from v$database;

  109. CHECKPOINT_CHANGE# CURRENT_SCN
  110. ------------------ -----------
  111.            2251738     2252058

  112. SQL> select checkpoint_change# , current_scn from v$database;

  113. CHECKPOINT_CHANGE# CURRENT_SCN
  114. ------------------ -----------
  115.            2251738     2252083

  116. SQL> conn hr/oracle_4U
  117. Connected.
  118. SQL> select  buffer_pool from user_tables where table_name='EMPLOYEES';

  119. BUFFER_
  120. -------
  121. DEFAULT

  122. SQL>
  123. SQL>
  124. SQL>
  125. SQL>
  126. SQL> alter table EMPLOYEES  storage ( buffer_pool keep ) ;

  127. Table altered.

  128. SQL> select  buffer_pool from user_tables where table_name='EMPLOYEES';

  129. BUFFER_
  130. -------
  131. KEEP

  132. SQL> conn / as sysdba
  133. Connected.
  134. SQL> show  sga

  135. Total System Global Area 6680915968 bytes
  136. Fixed Size                    2213936 bytes
  137. Variable Size                 3758098384 bytes
  138. Database Buffers         2885681152 bytes
  139. Redo Buffers                   34922496 bytes
  140. SQL> show parameter db_8k

  141. NAME                                     TYPE         VALUE
  142. ------------------------------------ ----------- ------------------------------
  143. db_8k_cache_size                     big integer 0
  144. SQL> alter system set db_8k_cache_size=32M ;
  145. alter system set db_8k_cache_size=32M
  146. *
  147. ERROR at line 1:
  148. ORA-32017: failure in updating SPFILE
  149. ORA-00380: cannot specify db_8k_cache_size since 8K is the standard block size


  150. SQL> show parameter db_Cache

  151. NAME                                     TYPE         VALUE
  152. ------------------------------------ ----------- ------------------------------
  153. db_cache_advice                      string         ON
  154. db_cache_size                             big integer 0
  155. SQL> show parameter db_keep_Cache

  156. NAME                                     TYPE         VALUE
  157. ------------------------------------ ----------- ------------------------------
  158. db_keep_cache_size                     big integer 0
  159. SQL> show parameter db_recycle_Cache

  160. NAME                                     TYPE         VALUE
  161. ------------------------------------ ----------- ------------------------------
  162. db_recycle_cache_size                     big integer 0
  163. SQL> show parameter db_file

  164. NAME                                     TYPE         VALUE
  165. ------------------------------------ ----------- ------------------------------
  166. db_file_multiblock_read_count             integer         128
  167. db_file_name_convert                     string
  168. db_files                             integer         200
  169. SQL> exit
  170. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  171. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  172. and Real Application Testing options
  173. [oracle@station90 ~]$ . oraenv
  174. ORACLE_SID = [orcl] ? rcat
  175. The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
  176. [oracle@station90 ~]$ sqlplus /nolog

  177. SQL*Plus: Release 11.2.0.1.0 Production on Wed May 4 21:32:29 2016

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

  179. SQL> conn / as sysdba
  180. Connected to an idle instance.
  181. SQL> startup
  182. ORACLE instance started.

  183. Total System Global Area 1603411968 bytes
  184. Fixed Size                    2213776 bytes
  185. Variable Size                  452986992 bytes
  186. Database Buffers         1140850688 bytes
  187. Redo Buffers                    7360512 bytes
  188. Database mounted.
  189. Database opened.
  190. SQL> select  log_mode from v$database;

  191. LOG_MODE
  192. ------------
  193. NOARCHIVELOG

  194. SQL> archive log list
  195. Database log mode               No Archive Mode
  196. Automatic archival               Disabled
  197. Archive destination               USE_DB_RECOVERY_FILE_DEST
  198. Oldest online log sequence     9
  199. Current log sequence               11
  200. SQL> show parameter writer

  201. NAME                                     TYPE         VALUE
  202. ------------------------------------ ----------- ------------------------------
  203. db_writer_processes                     integer         1
  204. SQL> alter system set db_writer_processes=2;
  205. alter system set db_writer_processes=2
  206.                  *
  207. ERROR at line 1:
  208. ORA-02095: specified initialization parameter cannot be modified


  209. SQL> alter system set db_writer_processes=2 scope=spfile;

  210. System altered.

  211. SQL> shutdown immediate
  212. Database closed.
  213. Database dismounted.
  214. ORACLE instance shut down.
  215. SQL> startup
  216. ORACLE instance started.

  217. Total System Global Area 1603411968 bytes
  218. Fixed Size                    2213776 bytes
  219. Variable Size                  452986992 bytes
  220. Database Buffers         1140850688 bytes
  221. Redo Buffers                    7360512 bytes
  222. Database mounted.
  223. Database opened.
  224. SQL> exit
  225. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  226. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  227. [oracle@station90 ~]$ sqlplus /nolog

  228. SQL*Plus: Release 11.2.0.1.0 Production on Wed May 4 21:44:02 2016

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

  230. SQL> conn / as sysdba
  231. Connected.
  232. SQL> select name from v$datafile;

  233. NAME
  234. --------------------------------------------------------------------------------
  235. /u01/app/oracle/oradata/rcat/system01.dbf
  236. /u01/app/oracle/oradata/rcat/sysaux01.dbf
  237. /u01/app/oracle/oradata/rcat/undotbs01.dbf
  238. /u01/app/oracle/oradata/rcat/users01.dbf
  239. /u01/app/oracle/oradata/rcat/example01.dbf
  240. /u01/app/oracle/oradata/rcat/rcat01.dbf

  241. 6 rows selected.

  242. SQL> select name from v$logfile;
  243. select name from v$logfile
  244.        *
  245. ERROR at line 1:
  246. ORA-00904: "NAME": invalid identifier


  247. SQL> select member  from v$logfile;

  248. MEMBER
  249. --------------------------------------------------------------------------------
  250. /u01/app/oracle/oradata/rcat/redo03.log
  251. /u01/app/oracle/oradata/rcat/redo02.log
  252. /u01/app/oracle/oradata/rcat/redo01.log

  253. SQL> select  *  from v$controlfile;

  254. STATUS
  255. -------
  256. NAME
  257. --------------------------------------------------------------------------------
  258. IS_ BLOCK_SIZE FILE_SIZE_BLKS
  259. --- ---------- --------------

  260. /u01/app/oracle/oradata/rcat/control01.ctl
  261. NO         16384                  594


  262. /u01/app/oracle/flash_recovery_area/rcat/control02.ctl
  263. NO         16384                  594

  264. STATUS
  265. -------
  266. NAME
  267. --------------------------------------------------------------------------------
  268. IS_ BLOCK_SIZE FILE_SIZE_BLKS
  269. --- ---------- --------------


  270. SQL> show parameter spfile

  271. NAME                                     TYPE         VALUE
  272. ------------------------------------ ----------- ------------------------------
  273. spfile                                     string         /u01/app/oracle/product/11.2.0
  274.                                                  /dbhome_1/dbs/spfilercat.ora
  275. SQL>
  276. SQL> show parameter log_Archive

  277. NAME                                     TYPE         VALUE
  278. ------------------------------------ ----------- ------------------------------
  279. log_archive_config                     string
  280. log_archive_dest                     string
  281. log_archive_dest_1                     string
  282. log_archive_dest_10                     string
  283. log_archive_dest_11                     string
  284. log_archive_dest_12                     string
  285. log_archive_dest_13                     string
  286. log_archive_dest_14                     string
  287. log_archive_dest_15                     string
  288. log_archive_dest_16                     string
  289. log_archive_dest_17                     string

  290. NAME                                     TYPE         VALUE
  291. ------------------------------------ ----------- ------------------------------
  292. log_archive_dest_18                     string
  293. log_archive_dest_19                     string
  294. log_archive_dest_2                     string
  295. log_archive_dest_20                     string
  296. log_archive_dest_21                     string
  297. log_archive_dest_22                     string
  298. log_archive_dest_23                     string
  299. log_archive_dest_24                     string
  300. log_archive_dest_25                     string
  301. log_archive_dest_26                     string
  302. log_archive_dest_27                     string

  303. NAME                                     TYPE         VALUE
  304. ------------------------------------ ----------- ------------------------------
  305. log_archive_dest_28                     string
  306. log_archive_dest_29                     string
  307. log_archive_dest_3                     string
  308. log_archive_dest_30                     string
  309. log_archive_dest_31                     string
  310. log_archive_dest_4                     string
  311. log_archive_dest_5                     string
  312. log_archive_dest_6                     string
  313. log_archive_dest_7                     string
  314. log_archive_dest_8                     string
  315. log_archive_dest_9                     string

  316. NAME                                     TYPE         VALUE
  317. ------------------------------------ ----------- ------------------------------
  318. log_archive_dest_state_1             string         enable
  319. log_archive_dest_state_10             string         enable
  320. log_archive_dest_state_11             string         enable
  321. log_archive_dest_state_12             string         enable
  322. log_archive_dest_state_13             string         enable
  323. log_archive_dest_state_14             string         enable
  324. log_archive_dest_state_15             string         enable
  325. log_archive_dest_state_16             string         enable
  326. log_archive_dest_state_17             string         enable
  327. log_archive_dest_state_18             string         enable
  328. log_archive_dest_state_19             string         enable

  329. NAME                                     TYPE         VALUE
  330. ------------------------------------ ----------- ------------------------------
  331. log_archive_dest_state_2             string         enable
  332. log_archive_dest_state_20             string         enable
  333. log_archive_dest_state_21             string         enable
  334. log_archive_dest_state_22             string         enable
  335. log_archive_dest_state_23             string         enable
  336. log_archive_dest_state_24             string         enable
  337. log_archive_dest_state_25             string         enable
  338. log_archive_dest_state_26             string         enable
  339. log_archive_dest_state_27             string         enable
  340. log_archive_dest_state_28             string         enable
  341. log_archive_dest_state_29             string         enable

  342. NAME                                     TYPE         VALUE
  343. ------------------------------------ ----------- ------------------------------
  344. log_archive_dest_state_3             string         enable
  345. log_archive_dest_state_30             string         enable
  346. log_archive_dest_state_31             string         enable
  347. log_archive_dest_state_4             string         enable
  348. log_archive_dest_state_5             string         enable
  349. log_archive_dest_state_6             string         enable
  350. log_archive_dest_state_7             string         enable
  351. log_archive_dest_state_8             string         enable
  352. log_archive_dest_state_9             string         enable
  353. log_archive_duplex_dest              string
  354. log_archive_format                     string         %t_%s_%r.dbf

  355. NAME                                     TYPE         VALUE
  356. ------------------------------------ ----------- ------------------------------
  357. log_archive_local_first              boolean         TRUE
  358. log_archive_max_processes             integer         4
  359. log_archive_min_succeed_dest             integer         1
  360. log_archive_start                     boolean         FALSE
  361. log_archive_trace                     integer         0
  362. SQL>






  363. SQL>







































复制代码


回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-4-18 10:19 , Processed in 0.036917 second(s), 24 queries .

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