Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Oracle log files

Oracle log files : An introduction
 
The Oracle server maintains the redo Oracle log files to minimize the loss of data in the Database in case of an uncontrolled shutdown.
Online redo Oracle log files are filled with redo records. A redo record, also called a redo entry, is made up of a group of change vectors, each of which is a description of a change made to a single block in the database.
For example, if you change a salary value in an employee table, you generate a redo record containing change vectors that describe changes to the data segment block for the table, the rollback segment data block, and the transaction table of the rollback segments.
The question here is how are the Oracle log files maintained, and what information do we have?
A couple of interesting Oracle views:
a)To view information on log files:
SELECT * from v$log;
b)To view information on log file history:
SELECT thread#, first_change#,
TO_CHAR(first_time,'MM-DD-YY HH12:MIPM'),
next_change#
from v$log_history;
The above shows you what log state your system is in. Read more about ARCHIVELOG in the article on Oracle Backup.
Consider the parameters that can limit the number of online redo Oracle log files before setting up or altering the configuration of an instance's online redo log.
The following parameters limit the number of online redo Oracle log files that you can add to a database:
The MAXLOGFILES parameter used in the CREATE DATABASE statement determines the maximum number of groups of online redo Oracle log files for each database.
Group values can range from 1 to MAXLOGFILES.
The only way to override this upper limit is to re-create the database or its control file. Thus, it is important to consider this limit before creating a database.
If MAXLOGFILES is not specified for the CREATE DATABASE statement, Oracle uses an operating system specific default value. The MAXLOGMEMBERS parameter used in the CREATE DATABASE statement determines the maxim


Ïà¹ØÎĵµ£º

Oracle¶àÐмǼºÏ²¢/Á¬½Ó/¾ÛºÏ×Ö·û´®µÄ¼¸ÖÖ·½·¨

ʲôÊǺϲ¢¶àÐÐ×Ö·û´®£¨Á¬½Ó×Ö·û´®£©ÄØ£¬ÀýÈ磺
SQL> desc test;
Name     Type          Nullable Default Comments
------- ------------ -------- ------- --------
COUNTRY VARCHAR2(20) Y       &nb ......

ÍæתOracle£¨7£©

||-------  pl/sql »ù´¡ -------||
pl/procedural language ¹ý³ÌÓïÑÔ
//´´½¨±í
SQL> create table mytest(
  2  name varchar2(30),
  3  pwd varchar2(30));
//´´½¨¹ý³Ì
create procedure sp_pro1 is
create or replace procedure sp_pro1 is --Èç¹û´æÔÚ¼´ ......

ʵÀý½²½âOracleÊý¾Ý¿âÉèÖÃĬÈϱí¿Õ¼äÎÊÌâ

DBAÃǾ­³£»áÓöµ½Ò»¸öÕâÑùÁîÈËÍ·ÌÛµÄÎÊÌ⣺²»ÖªµÀË­ÔÚOracleÉÏ´´½¨ÁËÒ»¸öÓû§£¬´´½¨Ê±£¬Ã»ÓиøÕâ¸öÓû§Ö¸¶¨Ä¬Èϱí¿Õ¼ä£¬ËùÒÔÕâ¸öÓû§¾Í»á²ÉÓÃĬÈϵıí¿Õ¼ä——system±í¿Õ¼ä¡£µ¼ÖÂϵͳ±í¿Õ¼äѸËÙ±»Óû§Êý¾ÝÕ¼Âú£¬Ö±ÖÁå´»ú¡£
ÔÚ10GÖУ¬DBAÓа취±ÜÃâÕâÖÖÎÊÌâÁË——ÔÚÏßÖ¸¶¨ÏµÍ³Ä¬Èϱí¿Õ¼ä£º
ALTER DAT ......

oracleÖÐsubstrºÍinstrµÄÓ÷¨

ÍøÉÏËѼ¯µÄ£¬ÕûÀíÏÂ
1¡¢substr(string string, int a, int b)
²ÎÊý1:string Òª´¦ÀíµÄ×Ö·û´®
²ÎÊý2£ºa ½ØÈ¡×Ö·û´®µÄ¿ªÊ¼Î»Öã¨ÆðʼλÖÃÊÇ0£©
²ÎÊý3£ºb ½ØÈ¡µÄ×Ö·û´®µÄ³¤¶È(¶ø²»ÊÇ×Ö·û´®µÄ½áÊøλÖÃ)
ÀýÈ磺
substr("ABCDEFG", 0); //·µ»Ø£ºABCDEFG£¬½ØÈ¡ËùÓÐ×Ö·û
substr("ABCDEFG", 2); //·µ»Ø£ºCDEFG£¬½ØÈ¡´ÓC¿ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ