oracle 10g ´´½¨ DATA GUARD
Æäʵ´´½¨dgÍøÂçÉϵÄÎĵµºÜ¶à£¬ÎÒÊÇ¿´Ð¡²¼ÀÏʦÊÇÊÓƵѧϰµÄ
ÓÃÐéÄâ»ú×ö²âÊÔ£¬ÅªÁ˺ü¸Ì죬ÏÂÃæ¼Ç¼һÏÂÔø¾×ö¹ýÓ¡Ïó±È½ÏÉîµÄµØ·½
1.½«Primary·þÎñÆ÷´¦Óڹ鵵ģʽºÍForce Loggingģʽ
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT;
SQL> ALTER DATABASE ARCHIVELOG;
SQL> ALTER DATABASE OPEN;
SQL>archive log list
SQL>alter database force logging
2.ÐÞ¸ÄPrimary·þÎñÆ÷µÄ²ÎÊýÎļþ
SQL>create pfile from spfile; #
ÐÞ¸´Éú³ÉµÄpfileÎļþÌí¼ÓÒÔÏÂÄÚÈÝ£¨³É¹¦µÄÀý×Ó£©
DB_UNIQUE_NAME=uqn_node1
LOG_ARCHIVE_CONFIG='DG_CONFIG=(uqn_node1,uqn_node2)'
LOG_ARCHIVE_DEST_2='SERVICE=lsnode2 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=uqn_node2'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
FAL_SERVER=lsnode2
FAL_CLIENT=lsnode1
DB_FILE_NAME_CONVERT='172.16.2.200:/u01/app/oracle/oradata/ict','172.16.2.201:/u01/app/oracle/oradata/ict'
LOG_FILE_NAME_CONVERT='172.16.2.200:/u01/app/oracle/oradata/ict','172.16.2.201:/u01/app/oracle/oradata/ict'
STANDBY_FILE_MANAGEMENT=AUTO
È»ºó±£´æ£¬
3.Éú³ÉеÄPrimary·þÎñÆ÷²ÎÊýÎļþ
SQL>stutdown immediate
SQL>create spfile form pfile='/u01/app/oracle/procuct/102/dbs/initict.ora' #Ö´ÐÐǰɾ³ýspfileÎļþ
4.´´½¨standby·þÎñÆ÷µÄ¿ØÖÆÎļþ
SQL>startup
SQL>alter database create standby controfile as '/u01/app/oracle/standby.ctl'
5.¹Ø±ÕÊý¾Ý¿â£¬¸´ÖÆÊý¾ÝÎļþ ´´½¨µÄstandby·þÎñÆ÷µÄ¿ØÖÆÎļþ PrimaryµÄ²ÎÊýÎļþ£¨ÓÃÀ´´´½¨StandbyµÄ³õʼ»¯²ÎÊýÎļþ£© ¿ÚÁîÎļþ£¨ÓÃdbca´´½¨µÄÊý¾Ý¿â»á×Ô¶¯Éú³É¿ÚÁîÎļþÈ磺orapwict £¬ÔÚ/u01/app/oracle/product/102/dbsĿ¼Ï£©µ½¶ÔÓ¦µÄĿ¼
6.ÔÚPrimary·þÎñÆ÷ºÍStandby·þÎñÆ÷ͬʱÅäÖüàÌýºÍÍøÂç·þÎñÃû
/u01/app/oracle/product/102/network/admin/listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/102/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(
Ïà¹ØÎĵµ£º
ÖÚËùÖÜÖªµÄ¼¸¸ö½á¹û¼¯¼¯ºÏ²Ù×÷ÃüÁ½ñÌìÏêϸµØ²âÊÔÁËһϣ¬·¢ÏÖһЩÎÊÌ⣬¼Ç¼±¸¿¼¡£
¡¡¡¡¼ÙÉèÎÒÃÇÓÐÒ»¸ö±íStudent£¬°üÀ¨ÒÔÏÂ×Ö¶ÎÓëÊý¾Ý£º
¡¡¡¡drop table student;
¡¡¡¡create table student
¡¡¡¡(
¡¡¡¡id int primary key,
¡¡¡¡name nvarchar2(50) not null,
¡¡¡¡score number not null
¡¡¡¡);
¡¡¡¡insert into ......
½ñÌìͬÊÂraiseÒ»¸öСÎÊÌ⣬ÔõôÔÚALL_VIEWSÊý¾Ý×Öµätext×ֶβéÕÒlrf×Ö·û´®£º
etl@DWTEST> select owner,view_name from all_views where instr(text,'lrf') > 0;
select owner,view_name from all_views where instr(text,'lrf') > 0
  ......
SVRMGR> select * from dba_jobs;
³õʼ»¯Ïà¹Ø²ÎÊýjob_queue_processes
alter system set job_queue_processes=39 scope=spfile;//×î´óÖµ²»Äܳ¬¹ý1000 ;job_queue_interval = 10 //µ÷¶È×÷ҵˢÐÂƵÂÊÃëΪµ¥Î»
DBA_JOBS describes all jobs in the database.
USER_JOBS describes all jobs owned by the c ......
alter session set nls_sort='schinese_pinyin_m';
select * from dept order by
nlssort(name,'NLS_SORT=SCHINESE_PINYIN_M');
Oracle9i֮ǰ£¬ÖÐÎÄÊÇ°´ÕÕ¶þ½øÖƱàÂë½øÐÐÅÅÐòµÄ¡£
ÔÚoracle9iÖÐÐÂÔöÁË°´ÕÕÆ´Òô¡¢²¿Êס¢±Ê»
ÅÅÐò¹¦ÄÜ¡£ÉèÖÃNLS_SORTÖµ
SCHINESE_RADICAL_M °´ÕÕ²¿Ê×£¨µÚһ˳Ðò£©¡¢±Ê»®£¨µÚ¶þ˳Ðò£©Å ......
OracleÊý¾Ýµ¼Èëµ¼³öimp/exp¾ÍÏ൱ÓÚoracleÊý¾Ý»¹ÔÓ뱸·Ý¡£expÃüÁî¿ÉÒÔ°ÑÊý¾Ý´ÓÔ¶³ÌÊý¾Ý¿â·þÎñÆ÷µ¼³öµ½±¾µØµÄdmpÎļþ£¬impÃüÁî¿ÉÒÔ°ÑdmpÎļþ´Ó±¾µØµ¼Èëµ½Ô¶´¦µÄÊý¾Ý¿â·þÎñÆ÷ÖС£ ÀûÓÃÕâ¸ö¹¦ÄÜ¿ÉÒÔ¹¹½¨Á½¸öÏàͬµÄÊý¾Ý¿â£¬Ò»¸öÓÃÀ´²âÊÔ£¬Ò»¸öÓÃÀ´ÕýʽʹÓá£
Ö´Ðл·¾³£º¿ÉÒÔÔÚSQLPLUS.EXE»òÕßDOS£¨ÃüÁîÐУ©ÖÐÖ´ÐУ¬
......