Course Notes for ORACLE Advanced Training

Source: Internet
Author: User

The page number in the notes for ORACLE Advanced Training Course 2nd learning notebook corresponds to Oracle9i Database Management Basics II ed 1.1 vol.1.pdf

Guide: http://blog.csdn.net/magus_yang/archive/2006/10/10/1328283.aspx Author: jackyang (JackYang.sh@gmail.com) Time: 2006-10-10 three statuses of database startup: 1. 3 steps of opening nomount2. mount3. Open Database: 1. enter the nomount status, open the parameter file; 2. enter the Mount status and open the control file. 3. open the data file. p223 redo log history is used to restore the archived redo log file. P224noarchivelog mode (non-archive mode), online redo logs are constantly washed out; archivelog mode (archive mode), online redo logs are saved into archive log files; p228 modifies archive Mode 1. SQL> shutdownoracle three Safe Shutdown modes: normal/immediate/transactionaloracle one unsafe shutdown mode: Abort 2. SQL> startup Mount starts but does not open the database 3. SQL> alter database archivelog: Set the redo log file group to archivelog mode or use SQL> alter database noarchivelog to set the redo log file group to noarchivelog mode (non-archive mode) 4. SQL> alter database open 5. back up the database completely and change the archive mode of the database to archivelo. Specific operations of G mode (archive mode): 1. to start a database in Windows, you must first start the corresponding service, such as oracleservicedb2 2. d:/lab10g> set oracle_sid = DB2 // set the environment variable 3. d:/lab10g> sqlplus/nolog 4. SQL> connect sys/ora123 as sysdba 5. SQL> archive log list checks the status of the arcn process; 6. SQL> shutdown immediate: the fastest secure shutdown Method 7. SQL> startup mount: only mount the database, not open the database 8. SQL> alter database archivelog 9. SQL> achive log list archive destination archiving Target 10. SQL> alter database Open Database P 239 steps for manual archiving: 1. SQL> alter system archive log current; archive files are generated immediately under the archive directory; you can also use alter system archive log active; and alter system archive log inactive; 2. SQL> select * from V $ log; If yes is displayed in the displayed result, it indicates that it has been archived; 3. SQL> DESC v $ archive_log can find what has been archived and what has not been archived; 4. SQL> column name format A35; only the first 35 characters of the Name field are displayed. 5. SQL> select name from V $ archived_log; p231 automatic and manual archiving after the Oracle10g archiving mode is changed to the automatic archiving mode, automatic archiving is performed by default, so you do not need to set it. SQL> archive log list checks the status of the arcn process. p234 can start multiple archiving processes to improve efficiency because the archiving speed is slow due to disk I/O impact. Up to 10 instances can be started. P235 dynamic parameter log_archive_max_processes = 2 starts two archiving processes. Alter system set log_archive_max_processes = 3; enable one more archiving process. P237 enable automatic archiving SQL> alter system archive log start after the routine is started; do not enable automatic archiving for 10 Gb; 9i need to do so; disable automatic archiving SQL> alter system archive log stop; note that stopping the arcn process (archive process) does not set the database to noarchivelog mode (non-archive mode ). If all redo log groups are used but not archived, databases in archivelog mode will stop. P239 manual archiving p242 specifies that a maximum of 10 archiving targets can be specified. In p243, location indicates that the local archiving target service indicates the remote archiving target, which is related to the Oracle network service name. P244 the log archiving target can be specified as mandatory (mandatory). If the archive fails, Oracle waits. Optional (Optional). You can restart the archiving without completing the reopen attribute. this parameter is generally not set, the default unit is seconds. For OS-related p245log_archive_min_succeed_dest = 2, it indicates that at least two targets are reapplied to the online redo log group (online redo log files). The basic conditions are as follows: 1. archived to all forced locations; 2. the number of local locations that have been archived is greater than or equal to the value of the log_archive_min_succeed_dest parameter. p247 uses the dynamic initialization parameter log_archive_dest_state_n to disable (defer)/enable the archiving target. SQL> alter system set log_archive_dest_state_2 = defer; SQL> alter system set log_archive_dest_state_2 = Enable; differences between dynamic initialization parameters and static initialization parameters: Dynamic initialization parameters, which can be modified when the database is opened. For static initialization parameters, you must first shut down the database and then start the database after modification. P248 use log_archive_format to specify the file name format. The file name options include: % s or % s, including the log serial number, as part of the file name. % T or % T: includes the thread number as part of the file name. P249 can use the following dynamic view to obtain archived log information (information about archived log files ): V $ archived_logv $ archive_destv $ log_historyv $ databasev $ archive_processes p251sql> archive log list this command provides DBA with information about the log mode and archive status of the database; an important file in the lab10g directory provided by the Instructor: initdb1.20.redb10g. sqlcrectl. SQL reconstruction control file sqlnet. oralistener. oratnsnames. orasp_1_2.lstsp_21_31.lst

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.