Oracle 10GR2 DataGuard ʵÀý
server A: 10.85.10.44 SID=orcl
target server B: 10.85.10.43
oracle version:10.2.0.1
OS platform : windows XP
Data GuardĬÈÏÊÇmaximize performance£¬ ¿ÉÒÔÓÃÒÔÏÂÓï¾äÀ´½øÐÐģʽ¼äµÄÇл»¡£
ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE {PROTECTION | AVAILABILITY | PERFORMANCE};
ÐÞ¸ÄÖ÷Êý¾Ý¿â±£»¤Ä£Ê½ÐèÒªÖØÆôÊý¾Ý¿â²ÅÄÜÉúЧ¡£
select protection_mode,protection_level from v$database;
PrimaryÉèÖãº
1. ÉèÖÃÖ÷Êý¾Ý¿âΪforce logging ģʽ
SQL>sqlplus "/as sysdba"
SQL>alter database force logging;
2. ÉèÖÃÖ÷Êý¾Ý¿âΪ¹éµµÄ£Ê½
SQL> archive log list
SQL> shutdown immediate
SQL> startup mount
SQL> alter database archivelog;
SQL> archive log list
3. Ìí¼Ó"±¸ÓÃÁª»úÈÕÖ¾Îļþ"
ÏȲ鿴ÈÕÖ¾ÎļþλÖãº
SQL>select * from v$logfile;
ÔÚÌí¼Ó£º
SQL> alter database add standby logfile group 4 ('D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\redo04.log') size 50m;
SQL> alter database add standby logfile group 5 ('D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\redo05.log') size 50m;
SQL> alter database add standby logfile group 6 ('D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\redo06.log') size 50m;
SQL> alter database add standby logfile group 7 ('D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\redo07.log') size 50m;
4. ´´½¨Ö÷¿âµÄ³õʼ»¯²ÎÊý¸ø±¸¿âÓÃ
SQL>Create pfile from spfile;
²úÉúµÄÎļþÃûΪinitorcl.ora ´æ·ÅĿ¼ĬÈÏ·ÅÔÚ$ORACLE_HOME/databaseÏÂ
5. ÔÚÖ÷¿â´´½¨±¸¿âµÄ¿ØÖÆÎļþ ºÍÃÜÂëÎļþ
SQL>Alter database create standby controlfile as 'D:\oracle\product\10.2.0\control01.ctl';
D:>orapwd file=D:\PWDorcl.ora password=admin entries=5;
6. ÔÚÖ÷¿â´´½¨¼àÌýºÍÅäÖÃtnsnams.ora
listener.oraÅäÖÃÈçÏÂ:
# listener.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\listener.ora
# Generat
Ïà¹ØÎĵµ£º
¹Ø¼ü×Ö: oracle
Oracle°²×°ÖеÄDHCPÎÊÌâ
1.Linux
ÐÞ¸ÄhostsÎļþ ½«ipµØÖ·ÓëlocalhostÉ趨¾Í¿ÉÒÔÁË£¬ÈçÏÂ
vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
192.168.193.129 www.myzhtc.com
192.168.193.129 localhost myzhtc.com
......
Èç¹ûtemp_t1²»´æÔÚ£¬
oracle:
create table temp_t1
as
select * from t1
sql server:
select * into temp_t1 from t1
Èç¹ûtemp_t1´æÔÚ£¬
oracle:
insert into table temp_t1
select * from t1
sql server:
insert into table temp_t1
select * from t1 ......
ʹÓÃEXP
EXPÃüÁîÐÐÑ¡Ïî
1,BUFFER
¸ÃÑ¡ÏîÓÃÓÚÖ¸¶¨ÌáÈ¡ÐÐÊý¾ÝʱµÄ»º³åÇø³ß´ç.ͨ¹ýÉèÖøÃÑ¡Ïî,¿ÉÒÔÈ·¶¨µ¼³öʱÊý¾ÝÌáÆð³ß´ç.¸ÃÑ¡ÏîÖ»ÊÊÓÃÓÚ³£¹æÑ¡Ïî.
Exp scott/tiger tables=dept,emp file=a.dmp buffer=81920
2,COMPRESS
¸ÃÑ¡ÏîÓÃÓÚÖ¸¶¨µ¼Èë¹ÜÀí³õʼÇø(INITIAL)µÄ·½·¨.ĬÈÏֵΪY.µ±ÉèÖøÃÑ¡ÏîΪYʱ,oracle»á½ ......
OracleÊý¾Ý¿â×Ö·û¼¯ÎÊÌâ½âÎö(±¾ÎÄϵÕûÀíËûÈËÌû×ÓÐγÉ)
¾³£¿´µ½Ò»Ð©ÅóÓÑÎÊORACLE×Ö·û¼¯·½ÃæµÄÎÊÌ⣬ÎÒÏëÒÔµü´úµÄ·½Ê½À´½éÉÜһϡ£
µÚÒ»´Îµü´ú£ºÕÆÎÕ×Ö·û¼¯·½ÃæµÄ»ù±¾¸ÅÄî
ÓÐЩÅóÓÑ¿ÉÄÜ»áÈÏΪÕâÊǶà´ËÒ»¾Ù£¬µ«Êµ¼ÊÉÏÕýÊÇÓÉÓÚ¶ÔÏà¹Ø»ù±¾¸ÅÄî°ÑÎÕ²»Ç壬²Åµ¼ÖÂÁËÖî¶àÎÊÌâºÍÒÉÎÊ¡£
Ê×ÏÈÊÇ×Ö·û¼¯µÄ¸ÅÄî¡£
ÎÒÃÇÖªµÀ£¬ ......
step1
ÔÚÁª»úʱ×ö±¸·Ý(»ùÓÚ»Ö¸´Ä¿Â¼µÄ±¸·Ý£¬×öÁË¿ØÖÆÎļþµÄ×Ô¶¯±¸·Ý)£¬°üÀ¨ËùÓÐÊý¾ÝÎļþ¼°¹éµµµÄÈÕÖ¾Îļþ£º
rman>run{
backup format 'c:\bak\test_full_%u' database;
sql 'alter system archive log current';
backup format 'c:\bak\test_log_%u' archivelog all delete input;
}
step2
sql>insert into l ......