|
本帖最后由 botang 于 2016-5-9 23:10 编辑
课程第17次(2016-05-04星期三):体系结构毕业季
【上完1Z0-052的第1章】:体系结构
【1Z0-051】:共10章
【1Z0-052】:共7章
关于体系结构,请DML一个大表,跟踪alert,做读一致性,然后kill实例。启动实例,密切跟踪alert
把以上过程对自己解释一遍。
把以上过程对别人(Oracle同行)讲解一遍。
- [root@station90 桌面]# su - oracle
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Wed May 4 20:03:22 2016
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> select checkpoint_change# from v$database ;
- CHECKPOINT_CHANGE#
- ------------------
- 2230481
- SQL> select checkpoint_change# from v$datafile ;
- CHECKPOINT_CHANGE#
- ------------------
- 2230481
- 2230481
- 2230481
- 2230481
- 2230481
- SQL> shutdown abort
- ORACLE instance shut down.
- SQL> startup mount
- ORACLE instance started.
- Total System Global Area 6680915968 bytes
- Fixed Size 2213936 bytes
- Variable Size 3758098384 bytes
- Database Buffers 2885681152 bytes
- Redo Buffers 34922496 bytes
- Database mounted.
- SQL> select checkpoint_change# from v$datafile ;
- CHECKPOINT_CHANGE#
- ------------------
- 2230481
- 2230481
- 2230481
- 2230481
- 2230481
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2230481 0
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2230481 0
- SQL> alter database open ;
- Database altered.
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2251903
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2252011
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2252035
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2252036
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2252037
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2252042
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2252045
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2252048
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2252049
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2252051
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2252052
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2252053
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2252054
- SQL>
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2252055
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2252057
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2252058
- SQL> select checkpoint_change# , current_scn from v$database;
- CHECKPOINT_CHANGE# CURRENT_SCN
- ------------------ -----------
- 2251738 2252083
- SQL> conn hr/oracle_4U
- Connected.
- SQL> select buffer_pool from user_tables where table_name='EMPLOYEES';
- BUFFER_
- -------
- DEFAULT
- SQL>
- SQL>
- SQL>
- SQL>
- SQL> alter table EMPLOYEES storage ( buffer_pool keep ) ;
- Table altered.
- SQL> select buffer_pool from user_tables where table_name='EMPLOYEES';
- BUFFER_
- -------
- KEEP
- SQL> conn / as sysdba
- Connected.
- SQL> show sga
- Total System Global Area 6680915968 bytes
- Fixed Size 2213936 bytes
- Variable Size 3758098384 bytes
- Database Buffers 2885681152 bytes
- Redo Buffers 34922496 bytes
- SQL> show parameter db_8k
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- db_8k_cache_size big integer 0
- SQL> alter system set db_8k_cache_size=32M ;
- alter system set db_8k_cache_size=32M
- *
- ERROR at line 1:
- ORA-32017: failure in updating SPFILE
- ORA-00380: cannot specify db_8k_cache_size since 8K is the standard block size
- SQL> show parameter db_Cache
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- db_cache_advice string ON
- db_cache_size big integer 0
- SQL> show parameter db_keep_Cache
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- db_keep_cache_size big integer 0
- SQL> show parameter db_recycle_Cache
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- db_recycle_cache_size big integer 0
- SQL> show parameter db_file
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- db_file_multiblock_read_count integer 128
- db_file_name_convert string
- db_files integer 200
- SQL> exit
- Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
- With the Partitioning, Automatic Storage Management, OLAP, Data Mining
- and Real Application Testing options
- [oracle@station90 ~]$ . oraenv
- ORACLE_SID = [orcl] ? rcat
- The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Wed May 4 21:32:29 2016
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected to an idle instance.
- SQL> startup
- ORACLE instance started.
- Total System Global Area 1603411968 bytes
- Fixed Size 2213776 bytes
- Variable Size 452986992 bytes
- Database Buffers 1140850688 bytes
- Redo Buffers 7360512 bytes
- Database mounted.
- Database opened.
- SQL> select log_mode from v$database;
- LOG_MODE
- ------------
- NOARCHIVELOG
- SQL> archive log list
- Database log mode No Archive Mode
- Automatic archival Disabled
- Archive destination USE_DB_RECOVERY_FILE_DEST
- Oldest online log sequence 9
- Current log sequence 11
- SQL> show parameter writer
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- db_writer_processes integer 1
- SQL> alter system set db_writer_processes=2;
- alter system set db_writer_processes=2
- *
- ERROR at line 1:
- ORA-02095: specified initialization parameter cannot be modified
- SQL> alter system set db_writer_processes=2 scope=spfile;
- System altered.
- SQL> shutdown immediate
- Database closed.
- Database dismounted.
- ORACLE instance shut down.
- SQL> startup
- ORACLE instance started.
- Total System Global Area 1603411968 bytes
- Fixed Size 2213776 bytes
- Variable Size 452986992 bytes
- Database Buffers 1140850688 bytes
- Redo Buffers 7360512 bytes
- Database mounted.
- Database opened.
- SQL> exit
- Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Wed May 4 21:44:02 2016
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> select name from v$datafile;
- NAME
- --------------------------------------------------------------------------------
- /u01/app/oracle/oradata/rcat/system01.dbf
- /u01/app/oracle/oradata/rcat/sysaux01.dbf
- /u01/app/oracle/oradata/rcat/undotbs01.dbf
- /u01/app/oracle/oradata/rcat/users01.dbf
- /u01/app/oracle/oradata/rcat/example01.dbf
- /u01/app/oracle/oradata/rcat/rcat01.dbf
- 6 rows selected.
- SQL> select name from v$logfile;
- select name from v$logfile
- *
- ERROR at line 1:
- ORA-00904: "NAME": invalid identifier
- SQL> select member from v$logfile;
- MEMBER
- --------------------------------------------------------------------------------
- /u01/app/oracle/oradata/rcat/redo03.log
- /u01/app/oracle/oradata/rcat/redo02.log
- /u01/app/oracle/oradata/rcat/redo01.log
- SQL> select * from v$controlfile;
- STATUS
- -------
- NAME
- --------------------------------------------------------------------------------
- IS_ BLOCK_SIZE FILE_SIZE_BLKS
- --- ---------- --------------
- /u01/app/oracle/oradata/rcat/control01.ctl
- NO 16384 594
- /u01/app/oracle/flash_recovery_area/rcat/control02.ctl
- NO 16384 594
- STATUS
- -------
- NAME
- --------------------------------------------------------------------------------
- IS_ BLOCK_SIZE FILE_SIZE_BLKS
- --- ---------- --------------
- SQL> show parameter spfile
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- spfile string /u01/app/oracle/product/11.2.0
- /dbhome_1/dbs/spfilercat.ora
- SQL>
- SQL> show parameter log_Archive
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- log_archive_config string
- log_archive_dest string
- log_archive_dest_1 string
- log_archive_dest_10 string
- log_archive_dest_11 string
- log_archive_dest_12 string
- log_archive_dest_13 string
- log_archive_dest_14 string
- log_archive_dest_15 string
- log_archive_dest_16 string
- log_archive_dest_17 string
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- log_archive_dest_18 string
- log_archive_dest_19 string
- log_archive_dest_2 string
- log_archive_dest_20 string
- log_archive_dest_21 string
- log_archive_dest_22 string
- log_archive_dest_23 string
- log_archive_dest_24 string
- log_archive_dest_25 string
- log_archive_dest_26 string
- log_archive_dest_27 string
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- log_archive_dest_28 string
- log_archive_dest_29 string
- log_archive_dest_3 string
- log_archive_dest_30 string
- log_archive_dest_31 string
- log_archive_dest_4 string
- log_archive_dest_5 string
- log_archive_dest_6 string
- log_archive_dest_7 string
- log_archive_dest_8 string
- log_archive_dest_9 string
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- log_archive_dest_state_1 string enable
- log_archive_dest_state_10 string enable
- log_archive_dest_state_11 string enable
- log_archive_dest_state_12 string enable
- log_archive_dest_state_13 string enable
- log_archive_dest_state_14 string enable
- log_archive_dest_state_15 string enable
- log_archive_dest_state_16 string enable
- log_archive_dest_state_17 string enable
- log_archive_dest_state_18 string enable
- log_archive_dest_state_19 string enable
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- log_archive_dest_state_2 string enable
- log_archive_dest_state_20 string enable
- log_archive_dest_state_21 string enable
- log_archive_dest_state_22 string enable
- log_archive_dest_state_23 string enable
- log_archive_dest_state_24 string enable
- log_archive_dest_state_25 string enable
- log_archive_dest_state_26 string enable
- log_archive_dest_state_27 string enable
- log_archive_dest_state_28 string enable
- log_archive_dest_state_29 string enable
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- log_archive_dest_state_3 string enable
- log_archive_dest_state_30 string enable
- log_archive_dest_state_31 string enable
- log_archive_dest_state_4 string enable
- log_archive_dest_state_5 string enable
- log_archive_dest_state_6 string enable
- log_archive_dest_state_7 string enable
- log_archive_dest_state_8 string enable
- log_archive_dest_state_9 string enable
- log_archive_duplex_dest string
- log_archive_format string %t_%s_%r.dbf
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- log_archive_local_first boolean TRUE
- log_archive_max_processes integer 4
- log_archive_min_succeed_dest integer 1
- log_archive_start boolean FALSE
- log_archive_trace integer 0
- SQL>
- SQL>
复制代码
|
|