1.rman完全恢复的前提条件:历史的datafile,controlfile和spfile备份,加上完整的archivelog和完好的redolog。

2.rman备份脚本:

  a.RMAN 0级备份命令:

run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup incremental level tag 'level0' format "E:\recovery_area\rfdb\rfdb\AUTOBACKUP\rman_dir\RFDB_level_0_%u_%s_%p" as compressed backupset
database;
sql "alter system archive log current";
backup filesperset format "E:\recovery_area\rfdb\rfdb\AUTOBACKUP\rman_dir\arch_%u_%s_%p_%c"
archivelog all delete input; #备份归档可选,可以单独定期备份
release channel c1;
release channel c2;
release channel c3;
}

rman_level_0

  b.RMAN 1级备份命令:

run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup incremental level tag 'level1' format 'E:\recovery_area\rfdb\rfdb\AUTOBACKUP\rman_dir\RFDB_level_1_%u_%s_%p' as compressed backupset
database;
sql 'alter system archive log current';
backup filesperset format 'E:\recovery_area\rfdb\rfdb\AUTOBACKUP\rman_dir\arch_%u_%s_%p'
archivelog all delete input; #备份归档可选,可以单独定期备份
release channel c1;
release channel c2;
release channel c3;
}

rman_level_1

  c.rman删除备份命令(在保留最近一天备份的情况下,删除其他备份):

DELETE NOPROMPT OBSOLETE RECOVERY WINDOW OF  DAYS;   

  d.操作系统层面运行rman备份或删除命令(windows/linux):

rman target sys/rf4rfvbgt56yhn@rfdb nocatalog CMDFILE 'D:\app\rman\rman_file\level_0.txt' log=E:\recovery_area\rfdb\rfdb\AUTOBACKUP\rman_dir\log\rman_level_0.log
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2./db1
export ORACLE_SID=atest
export PATH=$ORACLE_HOME/bin:$PATH rman target sys/@atest nocatalog CMDFILE '/u01/rman/rman.sh' log=/u01/rman/rman.log
  * *   bash /u01/rman_file/run_rman_0.sh

  * *   bash /u01/rman_file/run_rman_0.sh

  * *   bash /u01/rman_file/run_rman_0.sh

  * * *  bash /u01/rman_file/run_delete.sh

  * * *  bash /u01/rman_file/run_rman_0.sh

  e.rman参数设置:

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
RMAN> CONFIGURE DEFAULT DEVICE TYPE TO DISK;
RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE disk TO ;
RMAN> CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE disk TO ;

3.rman恢复

a.拷贝datafile,controlfile和spfile的rman备份,以及完整的archivelog和完好的redolog文件到新的数据库。

b.切换至oracle用户,进入rman(先设置sid):

export ORACLE_SID=rfdb
rlwrap  rman target /

c.启动一个伪实例:

RMAN> startup nomount

connected to target database (not started)
startup failed: ORA-: failure in processing system parameters
LRM-: could not open parameter file '/u01/app/oracle/product/11.2.0/db1/dbs/initrfdb.ora' starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started Total System Global Area bytes Fixed Size bytes
Variable Size bytes
Database Buffers bytes
Redo Buffers bytes

d.在伪实例下恢复spfile文件(必须要指定rman的备份片):

RMAN> restore spfile from "/u01/ora_bak/ora_bak/autobackup/2015_12_07/o1_mf_s_897845728_c6bnq1rq_.bkp";

Starting restore at -DEC-
using channel ORA_DISK_1 channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u01/ora_bak/ora_bak/autobackup/2015_12_07/o1_mf_s_897845728_c6bnq1rq_.bkp
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at -DEC-

e.关闭伪实例,用spfile文件启动至nomount状态:

RMAN> shutdown abort

Oracle instance shut down

RMAN> startup nomount

connected to target database (not started)
Oracle instance started Total System Global Area bytes Fixed Size bytes
Variable Size bytes
Database Buffers bytes
Redo Buffers bytes

f.恢复控制文件(必须要指定rman的备份片,备份片应该和spfile的恢复片是同一个):

RMAN> restore controlfile from "/u01/ora_bak/ora_bak/autobackup/2015_12_07/o1_mf_s_897845728_c6bnq1rq_.bkp";

Starting restore at -DEC-
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID= device type=DISK channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: ::
output file name=/u01/app/oracle/oradata/ATEST/controlfile/o1_mf_c5fr9b0h_.ctl
output file name=/u01/app/oracle/fast_recovery_area/ATEST/controlfile/o1_mf_c5fr9b6n_.ctl
Finished restore at -DEC-

g.启动数据库至mount状态:

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

h.把拷贝到新机器的备份文件注册到(刚恢复的)控制文件中(redolog不能被注册,所以最后有报错,没有关系):

RMAN> catalog start with "/u01/ora_bak";

Starting implicit crosscheck backup at -DEC-
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID= device type=DISK
Crosschecked objects
Finished implicit crosscheck backup at -DEC- Starting implicit crosscheck copy at -DEC-
using channel ORA_DISK_1
Finished implicit crosscheck copy at -DEC- searching for all files in the recovery area
cataloging files...
cataloging done List of Cataloged Files
=======================
File Name: /u01/app/oracle/fast_recovery_area/ATEST/backupset/2015_12_09/o1_mf_nnndf_TAG20151209T161546_c6hrslnq_.bkp
File Name: /u01/app/oracle/fast_recovery_area/ATEST/autobackup/2015_12_09/o1_mf_s_898014415_c6hsghgm_.bkp
File Name: /u01/app/oracle/fast_recovery_area/ATEST/autobackup/2015_12_09/o1_mf_s_898013812_c6hrvo18_.bkp searching for all files that match the pattern /u01/ora_bak List of Files Unknown to the Database
=====================================
File Name: /u01/ora_bak/O1_MF_S_895896351_C4KSF2YN_.BKP
File Name: /u01/ora_bak/ora_bak/arch/1_11_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_23_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_19_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_33_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_8_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_9_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_17_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_21_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_20_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_12_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_6_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_14_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_26_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_24_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_30_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_16_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_22_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_7_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_27_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_31_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_25_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_29_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_28_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_13_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_18_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_10_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_15_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_32_896812716.dbf
File Name: /u01/ora_bak/ora_bak/controlfile/o1_mf_c5fr9b6n_.ctl
File Name: /u01/ora_bak/ora_bak/onlinelog_f/o1_mf_2_c5fr9h1f_.log
File Name: /u01/ora_bak/ora_bak/onlinelog_f/o1_mf_3_c5fr9kfo_.log
File Name: /u01/ora_bak/ora_bak/onlinelog_f/o1_mf_1_c5fr9ds4_.log
File Name: /u01/ora_bak/ora_bak/onlinelog/o1_mf_3_c5fr9k9d_.log
File Name: /u01/ora_bak/ora_bak/onlinelog/o1_mf_2_c5fr9gy5_.log
File Name: /u01/ora_bak/ora_bak/onlinelog/o1_mf_1_c5fr9dmk_.log
File Name: /u01/ora_bak/ora_bak/backupset/2015_12_07/o1_mf_nnndf_TAG20151207T173421_c6bnnxsl_.bkp
File Name: /u01/ora_bak/ora_bak/autobackup/2015_12_07/o1_mf_s_897845728_c6bnq1rq_.bkp
File Name: /u01/ora_bak/O1_MF_S_895896118_C4KS5S1R_.BKP Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done List of Cataloged Files
=======================
File Name: /u01/ora_bak/ora_bak/arch/1_11_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_23_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_19_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_33_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_8_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_9_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_17_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_21_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_20_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_12_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_6_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_14_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_26_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_24_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_30_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_16_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_22_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_7_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_27_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_31_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_25_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_29_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_28_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_13_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_18_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_10_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_15_896812716.dbf
File Name: /u01/ora_bak/ora_bak/arch/1_32_896812716.dbf
File Name: /u01/ora_bak/ora_bak/backupset/2015_12_07/o1_mf_nnndf_TAG20151207T173421_c6bnnxsl_.bkp
File Name: /u01/ora_bak/ora_bak/autobackup/2015_12_07/o1_mf_s_897845728_c6bnq1rq_.bkp List of Files Which Where Not Cataloged
=======================================
File Name: /u01/ora_bak/O1_MF_S_895896351_C4KSF2YN_.BKP
RMAN-: Reason: Foreign database file DBID: Database Name: RFDB
File Name: /u01/ora_bak/ora_bak/controlfile/o1_mf_c5fr9b6n_.ctl
RMAN-: Reason: Error while cataloging. See alert.log.
File Name: /u01/ora_bak/ora_bak/onlinelog_f/o1_mf_2_c5fr9h1f_.log
RMAN-: Reason: catalog is not supported for this file type
File Name: /u01/ora_bak/ora_bak/onlinelog_f/o1_mf_3_c5fr9kfo_.log
RMAN-: Reason: catalog is not supported for this file type
File Name: /u01/ora_bak/ora_bak/onlinelog_f/o1_mf_1_c5fr9ds4_.log
RMAN-: Reason: catalog is not supported for this file type
File Name: /u01/ora_bak/ora_bak/onlinelog/o1_mf_3_c5fr9k9d_.log
RMAN-: Reason: catalog is not supported for this file type
File Name: /u01/ora_bak/ora_bak/onlinelog/o1_mf_2_c5fr9gy5_.log
RMAN-: Reason: catalog is not supported for this file type
File Name: /u01/ora_bak/ora_bak/onlinelog/o1_mf_1_c5fr9dmk_.log
RMAN-: Reason: catalog is not supported for this file type
File Name: /u01/ora_bak/O1_MF_S_895896118_C4KS5S1R_.BKP
RMAN-: Reason: Foreign database file DBID: Database Name: RFDB

i.开始restore数据文件:

RMAN> restore database;

Starting restore at -DEC-
using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile to /u01/app/oracle/oradata/ATEST/datafile/o1_mf_system_c5fr6s3v_.dbf
channel ORA_DISK_1: restoring datafile to /u01/app/oracle/oradata/ATEST/datafile/o1_mf_sysaux_c5fr6s6d_.dbf
channel ORA_DISK_1: restoring datafile to /u01/app/oracle/oradata/ATEST/datafile/o1_mf_undotbs1_c5fr6s7n_.dbf
channel ORA_DISK_1: restoring datafile to /u01/app/oracle/oradata/ATEST/datafile/o1_mf_users_c5fr6s88_.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ATEST/backupset/2015_12_09/o1_mf_nnndf_TAG20151209T161546_c6hrslnq_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ATEST/backupset/2015_12_09/o1_mf_nnndf_TAG20151209T161546_c6hrslnq_.bkp tag=TAG20151209T161546
channel ORA_DISK_1: restored backup piece
channel ORA_DISK_1: restore complete, elapsed time: ::
Finished restore at -DEC-

j.开始recover数据(在此之前,需要先拷贝redolog到控制文件默认的路径下):

redolog默认路径:

SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_3_c5fr9k9d_.log
/u01/app/oracle/fast_recovery_area/ATEST/onlinelog/o1_mf_3_c5fr9kfo_.log
/u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_2_c5fr9gy5_.log
/u01/app/oracle/fast_recovery_area/ATEST/onlinelog/o1_mf_2_c5fr9h1f_.log
/u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_1_c5fr9dmk_.log
/u01/app/oracle/fast_recovery_area/ATEST/onlinelog/o1_mf_1_c5fr9ds4_.log rows selected.

开始recover数据库:

RMAN> recover database;

Starting recover at -DEC-
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID= device type=DISK starting media recovery archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_15_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_16_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_17_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_18_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_19_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_20_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_21_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_22_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_23_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_24_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_25_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_26_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_27_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_28_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_29_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_30_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/ora_bak/ora_bak/arch/1_31_896812716.dbf
archived log for thread with sequence is already on disk as file /u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_2_c5fr9gy5_.log
archived log for thread with sequence is already on disk as file /u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_3_c5fr9k9d_.log
archived log for thread with sequence is already on disk as file /u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_1_c5fr9dmk_.log
archived log file name=/u01/ora_bak/ora_bak/arch/1_15_896812716.dbf thread= sequence=
archived log file name=/u01/ora_bak/ora_bak/arch/1_16_896812716.dbf thread= sequence=
archived log file name=/u01/ora_bak/ora_bak/arch/1_17_896812716.dbf thread= sequence=
archived log file name=/u01/ora_bak/ora_bak/arch/1_18_896812716.dbf thread= sequence=
archived log file name=/u01/ora_bak/ora_bak/arch/1_19_896812716.dbf thread= sequence=
archived log file name=/u01/ora_bak/ora_bak/arch/1_20_896812716.dbf thread= sequence=
archived log file name=/u01/ora_bak/ora_bak/arch/1_21_896812716.dbf thread= sequence=
archived log file name=/u01/ora_bak/ora_bak/arch/1_22_896812716.dbf thread= sequence=
archived log file name=/u01/ora_bak/ora_bak/arch/1_23_896812716.dbf thread= sequence=
archived log file name=/u01/ora_bak/ora_bak/arch/1_24_896812716.dbf thread= sequence=
archived log file name=/u01/ora_bak/ora_bak/arch/1_25_896812716.dbf thread= sequence=
archived log file name=/u01/ora_bak/ora_bak/arch/1_26_896812716.dbf thread= sequence=
archived log file name=/u01/ora_bak/ora_bak/arch/1_27_896812716.dbf thread= sequence=
archived log file name=/u01/ora_bak/ora_bak/arch/1_28_896812716.dbf thread= sequence=
archived log file name=/u01/ora_bak/ora_bak/arch/1_29_896812716.dbf thread= sequence=
archived log file name=/u01/ora_bak/ora_bak/arch/1_30_896812716.dbf thread= sequence=
archived log file name=/u01/ora_bak/ora_bak/arch/1_31_896812716.dbf thread= sequence=
archived log file name=/u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_2_c5fr9gy5_.log thread= sequence=
archived log file name=/u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_3_c5fr9k9d_.log thread= sequence=
archived log file name=/u01/app/oracle/oradata/ATEST/onlinelog/o1_mf_1_c5fr9dmk_.log thread= sequence=
media recovery complete, elapsed time: ::
Finished recover at -DEC-

k.以resetlogs打开数据库(在此之前,先删除原来的redolog,因为数据库会重新创建一组redolog):

删除原来的redo:

rm -rf /u01/app/oracle/oradata/ATEST/onlinelog/*

以resetlogs打开数据库:

RMAN> alter database open resetlogs;

using target database control file instead of recovery catalog
database opened

至此,数据库恢复全部完成!

---恢复内容结束---

oracle数据库rman备份计划及恢复的更多相关文章

  1. oracle数据库rman备份与还原

    我是oracle 界的小白,由于公司领导要求,不得不硬着头皮在网上找rman备份还原的方法,废话不多说,具体看例子(window) 运行CMD: rman target 管理员账号/密码@orcl 备 ...

  2. Oracle数据库的备份方法

    1.引言 Oracle数据库的备份方法很多,无论使用那种备份方法,备份的目的都是为了在出现故障后能够以尽可能小的时间和代价恢复系统.比如使用export实用程序导出数据库对象.使用Oracle备份数据 ...

  3. DG环境数据库RMAN备份策略制定

    DG环境数据库RMAN备份策略制定: 主库(Primary) 全库备份 归档备份 删除历史文件夹 备库(Standby) 删除归档 引用说明 主库(Primary) $ crontab -l 0 1 ...

  4. ORACLE数据库不同故障下的恢复总结

    ORACLE数据库不同故障下的恢复总结1. 非归档模式下丢失或损坏的文件--1.1 数据文件--启动数据库的状态到MOUNT--恢复方法:通过之前创建的数据库完整备份,修复整个数据库,不过备份之后发生 ...

  5. 说明Oracle数据库逻辑备份和物理备份的方式。

    说明Oracle数据库逻辑备份和物理备份的方式. 解答:Oracle备份包括逻辑备份和物理备份. 1).逻辑备份 数据库的逻辑备份包含读一个数据库记录集和将记录集写入文件. a.输出(Export)输 ...

  6. oracle 数据库数据备份

    oracle 数据库数据备份 1.使用oracle用户应该就可以进行数据备份(不需要root用户):su oracle 查oracle实例名:echo $ORACLE_SID       例如查出来的 ...

  7. Windows下Oracle数据库自动备份批处理脚本

    expdb命令版本 @echo off REM ########################################################### REM # Windows Se ...

  8. Oracle之RMAN备份恢复1-基础篇

    1,rman的作用与体系架构 1.1 什么是rman rman(recovery manager)是oracle8i以后dba的一重要工具一般位于$oracle_home/bin目录下,主要用来备份, ...

  9. oracle数据库rman异地恢复

    自己想做两组rac之间的data guard,由于datafile,controlfile,甚至是archivelog都是存放在asm上的,直接复制数据有点不现实,asm磁盘总归都是要用的,所以想从a ...

随机推荐

  1. C# GZip对字符串压缩和解压

    /// <summary> /// 压缩方法 /// </summary> public static string CompressString(string str) { ...

  2. Game中的状态机

    我相信大多数博友都会玩游戏. 玩游戏,牵涉到状态包含 登陆,正常,死亡,复活,下线, 在上面状态的基础上.同时包含 站立,走动,跑动,不可移动施法状态, 战斗状态, 通常这是三个不同的分组.也就说可以 ...

  3. 开始编写CSS

    本文由大漠根据Krasimir Tsonev的<Starting to Write CSS>所译,整个译文带有我们自己的理解与思想,如果译得不好或不对之处还请同行朋友指点.如需转载此译文, ...

  4. Entity FrameWork 6帮助类

    public class BaseDAL { string strConn = ""; public BaseDAL(string connString) { strConn = ...

  5. 簡單工廠模式-之-什麼是產品線 And 抽象工廠模式-之-什麼是產品族

    簡單工廠模式-之-什麼是產品線 簡單工廠模式中,有一個概念就是使用了多層次的產品結構,那麼什麼是產品結構或者說什麼是產品線? 假定我們有一個基準的產品標準Product,那麼所有繼承該基類或者傳遞基類 ...

  6. [moka同学笔记]关于api-ms-win-crt-runtimel1-1-0.dll缺失

    在搞mongodb时候,碰到了这个坑.[api-ms-win-crt-runtimel1-1-0.dll缺失],懵逼不知道怎么改,从同事电脑里拷贝了这个文件,也按照网上的办法改了,改了半天还是不行.最 ...

  7. adb命令

    一下是记录一些日常经常用的adb command, adb root: adb shell -> su -> return -> adb root(首先让安卓设备获得root权限,然 ...

  8. 设计模式学习之路——Facade 外观模式(结构型模式)

    动机: 组件的客户和组件中各种复杂的子系统有了过多的耦合,随着外部客户程序和各子系统的演化,这种过多的耦合面临很多变化的挑战.如何简化外部客户程序和系统间的交互接口?如何将外部客户程序的演化和内部子系 ...

  9. (转)SQL 优化原则

    一.问题的提出 在应用系统开发初期,由于开发数据库数据比较少,对于查询SQL语句,复杂视图的的编写等体会不出SQL语句各种写法的性能优劣,但是如果将应用 系统提交实际应用后,随着数据库中数据的增加,系 ...

  10. border-radius结合transition的一个小应用(动画)

    <head lang="en"> <meta charset="UTF-8"> <title></title> ...