Oracle Active Data Guard搭建

一:安装

1.基础环境配置

1.1.开启强制日志记录

  • DG日志发送方式中ARCH进程和LGWR进程的ASYNC模式都是基于日志同步的,所以我们必须强制将数据库的所有操作记录到日志中

RAC2:关闭库

  SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.

RAC1:开启强制日志记录

  SQL> alter database force logging;   

  Database altered.

ALL Node:开启rac2,并验证日志记录模式

  RAC1
SQL> select log_mode,force_logging from v$database; LOG_MODE FOR
------------ ---
ARCHIVELOG YES RAC2
SQL> startup
ORACLE instance started. Total System Global Area 2020970496 bytes
Fixed Size 2214776 bytes
Variable Size 1224737928 bytes
Database Buffers 788529152 bytes
Redo Buffers 5488640 bytes
Database mounted.
Database opened.
SQL> select log_mode,force_logging from v$database; LOG_MODE FOR
------------ ---
ARCHIVELOG YES

1.2.主库备份

  • 创建rman备份目录
  [root@racnode1 u01]# mkdir rmanbak
[root@racnode1 u01]# ls
app rmanbak
[root@racnode1 u01]# chown oracle:oinstall rmanbak
  • 使用rman对database和archive log进行备份
  [oracle@racnode1 ~]$ rman target /

  Recovery Manager: Release 11.2.0.1.0 - Production on Wed Aug 9 10:26:21 2017

  Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  connected to target database: ORCL (DBID=1479188731)

  RMAN> run {
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
backup database format '/u01/rmanbak/FULL_%U.bak';
backup archivelog all format '/u01/rmanbak/ARC_%U.bak';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
} using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=148 instance=orcl1 device type=DISK allocated channel: c2
channel c2: SID=29 instance=orcl1 device type=DISK allocated channel: c3
channel c3: SID=156 instance=orcl1 device type=DISK allocated channel: c4
channel c4: SID=32 instance=orcl1 device type=DISK Starting backup at 09-AUG-2017 10:26:44
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/orcl/datafile/system.256.951407925
channel c1: starting piece 1 at 09-AUG-2017 10:26:44
channel c2: starting full datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.257.951407925
input datafile file number=00004 name=+DATA/orcl/datafile/users.259.951407925
channel c2: starting piece 1 at 09-AUG-2017 10:26:44
channel c3: starting full datafile backup set
channel c3: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.258.951407925
input datafile file number=00005 name=+DATA/orcl/datafile/undotbs2.264.951408055
channel c3: starting piece 1 at 09-AUG-2017 10:26:45
channel c4: starting full datafile backup set
channel c4: specifying datafile(s) in backup set
including current control file in backup set
channel c4: starting piece 1 at 09-AUG-2017 10:26:52
channel c3: finished piece 1 at 09-AUG-2017 10:26:56
piece handle=/u01/rmanbak/FULL_03sbfaj4_1_1.bak tag=TAG20170809T102644 comment=NONE
channel c3: backup set complete, elapsed time: 00:00:11
channel c3: starting full datafile backup set
channel c3: specifying datafile(s) in backup set
including current SPFILE in backup set
channel c3: starting piece 1 at 09-AUG-2017 10:26:57
channel c4: finished piece 1 at 09-AUG-2017 10:26:57
piece handle=/u01/rmanbak/FULL_04sbfaj5_1_1.bak tag=TAG20170809T102644 comment=NONE
channel c4: backup set complete, elapsed time: 00:00:05
channel c1: finished piece 1 at 09-AUG-2017 10:26:57
piece handle=/u01/rmanbak/FULL_01sbfaj4_1_1.bak tag=TAG20170809T102644 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:13
channel c2: finished piece 1 at 09-AUG-2017 10:26:58
piece handle=/u01/rmanbak/FULL_02sbfaj4_1_1.bak tag=TAG20170809T102644 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:14
channel c3: finished piece 1 at 09-AUG-2017 10:26:58
piece handle=/u01/rmanbak/FULL_05sbfajh_1_1.bak tag=TAG20170809T102644 comment=NONE
channel c3: backup set complete, elapsed time: 00:00:01
Finished backup at 09-AUG-2017 10:26:58 Starting backup at 09-AUG-2017 10:26:59
current log archived
channel c1: starting archived log backup set
channel c1: specifying archived log(s) in backup set
input archived log thread=1 sequence=5 RECID=1 STAMP=951408120
input archived log thread=2 sequence=1 RECID=2 STAMP=951408150
input archived log thread=1 sequence=6 RECID=5 STAMP=951447623
channel c1: starting piece 1 at 09-AUG-2017 10:26:59
channel c2: starting archived log backup set
channel c2: specifying archived log(s) in backup set
input archived log thread=2 sequence=2 RECID=3 STAMP=951408156
input archived log thread=2 sequence=3 RECID=4 STAMP=951447623
input archived log thread=2 sequence=4 RECID=8 STAMP=951555111
channel c2: starting piece 1 at 09-AUG-2017 10:26:59
channel c3: starting archived log backup set
channel c3: specifying archived log(s) in backup set
input archived log thread=1 sequence=7 RECID=6 STAMP=951516208
input archived log thread=1 sequence=8 RECID=7 STAMP=951555108
channel c3: starting piece 1 at 09-AUG-2017 10:26:59
channel c4: starting archived log backup set
channel c4: specifying archived log(s) in backup set
input archived log thread=1 sequence=9 RECID=11 STAMP=951560819
input archived log thread=2 sequence=5 RECID=9 STAMP=951558975
input archived log thread=2 sequence=6 RECID=10 STAMP=951560429
channel c4: starting piece 1 at 09-AUG-2017 10:26:59
channel c1: finished piece 1 at 09-AUG-2017 10:27:00
piece handle=/u01/rmanbak/ARC_06sbfajj_1_1.bak tag=TAG20170809T102659 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
channel c2: finished piece 1 at 09-AUG-2017 10:27:00
piece handle=/u01/rmanbak/ARC_07sbfajj_1_1.bak tag=TAG20170809T102659 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:01
channel c3: finished piece 1 at 09-AUG-2017 10:27:00
piece handle=/u01/rmanbak/ARC_08sbfajj_1_1.bak tag=TAG20170809T102659 comment=NONE
channel c3: backup set complete, elapsed time: 00:00:01
channel c4: finished piece 1 at 09-AUG-2017 10:27:00
piece handle=/u01/rmanbak/ARC_09sbfajj_1_1.bak tag=TAG20170809T102659 comment=NONE
channel c4: backup set complete, elapsed time: 00:00:01
Finished backup at 09-AUG-2017 10:27:00 released channel: c1 released channel: c2 released channel: c3 released channel: c4
  • 验证备份
  [oracle@racnode1 ~]$ ll -th /u01/rmanbak/
总用量 1.3G
-rw-r----- 1 oracle asmadmin 89M 8月 9 10:27 ARC_08sbfajj_1_1.bak
-rw-r----- 1 oracle asmadmin 81M 8月 9 10:27 ARC_07sbfajj_1_1.bak
-rw-r----- 1 oracle asmadmin 4.5M 8月 9 10:26 ARC_09sbfajj_1_1.bak
-rw-r----- 1 oracle asmadmin 30M 8月 9 10:26 ARC_06sbfajj_1_1.bak
-rw-r----- 1 oracle asmadmin 424M 8月 9 10:26 FULL_02sbfaj4_1_1.bak
-rw-r----- 1 oracle asmadmin 96K 8月 9 10:26 FULL_05sbfajh_1_1.bak
-rw-r----- 1 oracle asmadmin 588M 8月 9 10:26 FULL_01sbfaj4_1_1.bak
-rw-r----- 1 oracle asmadmin 18M 8月 9 10:26 FULL_04sbfaj5_1_1.bak
-rw-r----- 1 oracle asmadmin 3.6M 8月 9 10:26 FULL_03sbfaj4_1_1.bak

1.3.在Primary上创建Standby Database的控制文件

SQL> alter database create standby controlfile as'/u01/rmanbak/standby.ctl';

Database altered.

1.4.在Primary上创建Standby Database初始化参数文件

SQL> create pfile='/u01/rmanbak/initphyracdb.ora' from spfile;

File created.

1.5.拷贝密码文件

[oracle@racnode1 dbs]$ pwd
/u01/app/oracle/product/11.2.0/db_1/dbs
[oracle@racnode1 dbs]$ cp orapworcl1 /u01/rmanbak/

1.6.拷贝/rmanbak下的所有备份文件到备库

[oracle@racnode1 rmanbak]$ scp * oracle@192.168.30.134:/u01/rmanbak/
The authenticity of host '192.168.30.134 (192.168.30.134)' can't be established.
RSA key fingerprint is 43:e6:68:ce:37:01:1f:12:46:19:27:39:a5:ba:02:7d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.30.134' (RSA) to the list of known hosts.
oracle@192.168.30.134's password:
ARC_06sbfajj_1_1.bak 100% 29MB 29.4MB/s 00:00
ARC_07sbfajj_1_1.bak 100% 81MB 80.8MB/s 00:00
ARC_08sbfajj_1_1.bak 100% 88MB 88.0MB/s 00:01
ARC_09sbfajj_1_1.bak 100% 4598KB 4.5MB/s 00:00
FULL_01sbfaj4_1_1.bak 100% 587MB 117.4MB/s 00:05
FULL_02sbfaj4_1_1.bak 100% 424MB 84.8MB/s 00:05
FULL_03sbfaj4_1_1.bak 100% 3680KB 3.6MB/s 00:00
FULL_04sbfaj5_1_1.bak 100% 18MB 17.7MB/s 00:01
FULL_05sbfajh_1_1.bak 100% 96KB 96.0KB/s 00:00
initphyracdb.ora 100% 1390 1.4KB/s 00:00
orapworcl1 100% 1536 1.5KB/s 00:00
standby.ctl 100% 18MB 17.6MB/s 00:00

1.7.将拷贝到备库上的初始化文件,并修改

orcl.__db_cache_size=771751936
orcl.__java_pool_size=16777216
orcl.__large_pool_size=16777216
orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
orcl.__pga_aggregate_target=822083584
orcl.__sga_target=1207959552
orcl.__shared_io_pool_size=0
orcl.__shared_pool_size=385875968
orcl.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.audit_trail='db'
*.cluster_database=false
*.compatible='11.2.0.0.0'
# 指定控制文件路径
*.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/oradata/orcl/control02.ctl'
*.db_block_size=8192
*.db_create_file_dest='/u01/app/oracle/oradata/orcl'
*.db_domain=''
*.db_name='orcl'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=10737418240
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
orcl.instance_number=1
# 归档配置
*.log_archive_config='dg_config=(orcl,rac)'
# 本地归档
*.log_archive_dest_1='LOCATION=/u01/archive_log VALID_FOR=(ALL_LOGFILES,ALL_ROLES)'
# 远程归档
*.log_archive_dest_2='SERVICE=rac LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=rac'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='%t_%s_%r.dbf'
*.log_archive_max_processes=5
*.memory_target=2030043136
*.open_cursors=300
*.processes=150
# 启用本地密码,默认即可
*.remote_login_passwordfile='exclusive'
orcl.thread=1
*.service_names='racdg'
*.standby_file_management='auto'
orcl.undo_tablespace='UNDOTBS1'
# dbf文件路径转换
*.db_file_name_convert='+DATA/ORCL/DATAFILE','/u01/app/oracle/oradata/orcl'
*.db_unique_name='orcl'
# 当前节点【对应监听文件】
*.fal_client='orcl'
# 主节点【对应监听文件】
*.fal_server='rac1','rac2'
# 日志文件路径转换
*.log_file_name_convert='+REDO/ORCL','/u01/archive_log','+DATA/orcl','/u01/group_log'

1.8.使用修改后的初始化文件启动备库到nomount状态

SQL> startup pfile='/u01/app/oracle/product/11.2.0/db_1/dbs/initphyracdb.ora' nomount;
ORACLE instance started. Total System Global Area 2020970496 bytes
Fixed Size 2254664 bytes
Variable Size 1224739000 bytes
Database Buffers 788529152 bytes
Redo Buffers 5447680 bytes

1.9.备库恢复控制文件

restore controlfile from '/u01/rmanbak/standby.ctl';

1.10.切换备库到mount状态

SQL> alter database mount;

Database altered.

SQL> select  status from v$instance;

STATUS
------------------------------------
MOUNTED

1.20.使用rman将主库数据恢复到备库

会自动识别当前目录下的备份文件

RMAN> run {
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
restore database ;
release channel c1;
release channel c2;
release channel c3;
release channel c4;
} released channel: ORA_DISK_1
allocated channel: c1
channel c1: SID=129 device type=DISK allocated channel: c2
channel c2: SID=193 device type=DISK allocated channel: c3
channel c3: SID=7 device type=DISK allocated channel: c4
channel c4: SID=69 device type=DISK Starting restore at 09-AUG-17
Starting implicit crosscheck backup at 09-AUG-17
Crosschecked 9 objects
Finished implicit crosscheck backup at 09-AUG-17 Starting implicit crosscheck copy at 09-AUG-17
Finished implicit crosscheck copy at 09-AUG-17 searching for all files in the recovery area
cataloging files...
no files cataloged channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00003 to /u01/app/oracle/oradata/orcl//undotbs1.258.951407925
channel c1: restoring datafile 00005 to /u01/app/oracle/oradata/orcl//undotbs2.264.951408055
channel c1: reading from backup piece /u01/rmanbak/FULL_03sbfaj4_1_1.bak
channel c2: starting datafile backup set restore
channel c2: specifying datafile(s) to restore from backup set
channel c2: restoring datafile 00001 to /u01/app/oracle/oradata/orcl//system.256.951407925
channel c2: reading from backup piece /u01/rmanbak/FULL_01sbfaj4_1_1.bak
channel c3: starting datafile backup set restore
channel c3: specifying datafile(s) to restore from backup set
channel c3: restoring datafile 00002 to /u01/app/oracle/oradata/orcl//sysaux.257.951407925
channel c3: restoring datafile 00004 to /u01/app/oracle/oradata/orcl//users.259.951407925
channel c3: reading from backup piece /u01/rmanbak/FULL_02sbfaj4_1_1.bak
channel c1: piece handle=/u01/rmanbak/FULL_03sbfaj4_1_1.bak tag=TAG20170809T102644
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:01
channel c3: piece handle=/u01/rmanbak/FULL_02sbfaj4_1_1.bak tag=TAG20170809T102644
channel c3: restored backup piece 1
channel c3: restore complete, elapsed time: 00:00:07
channel c2: piece handle=/u01/rmanbak/FULL_01sbfaj4_1_1.bak tag=TAG20170809T102644
channel c2: restored backup piece 1
channel c2: restore complete, elapsed time: 00:00:15
Finished restore at 09-AUG-17 released channel: c1 released channel: c2 released channel: c3 released channel: c4

1.11.添加备库的日志组

SQL> alter database add standby logfile thread 1 group 5 size 50M,group 6 size 50M,group 7 size 50M;

Database altered.

SQL> alter database add standby logfile thread 2 group 8 size 50M,group 9 size 50M,group 10 size 50M;

Database altered.

1.12.主库参数调整

# 设置本地归档路径
SQL> alter system set log_archive_dest_1='LOCATION=+REDO VALID_FOR=(ALL_LOGFILES,ALL_ROLES)'; System altered. # 设置远程归档路径
SQL> alter system set log_archive_dest_2='SERVICE=orcl LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl'; System altered. # 验证归档设置
SQL> show parameter log_archive # 开启远程归档传输
SQL> alter system set log_archive_dest_state_2=enable; System altered.

1.13.开启备库应用日志

SQL> alter database recover managed standby database using current logfile disconnect from session;

Database altered.

​ 执行上条命令后,Standby database应为是延迟传输,只有在归档时,才会发生应用,所以在查询日志应用情况时,会发现在当前日志会显示IN MEMORY。

SQL> select thread#, sequence#, applied from v$archived_log;
THREAD# SEQUENCE# APPLIED
---------- ---------- ---------
1 132 YES
2 126 YES
1 133 YES
1 134 IN-MEMORY

1.14.开启ADG

ADG:11G的新特性,在备库上已open状态,打开日志应用进程,默认会 READ ONLY WITH APPLY状态模式,在应用日志的同时也可以读standby database进行查询。11G之间,应用日志时,只能以mount模式打开。

Standby Database

  • 取消日志应用
  SQL> alter database recover managed standby database cancel;

  Database altered.
  • 以open模式打开数据库
  SQL> alter database open;

  Database altered.
  • 开启日志应用
  SQL> alter database recover managed standby database using current logfile disconnect from session;

  Database altered.
  • 查询数据库模式是否正常
  SQL> select dbid,name,open_mode,current_scn,protection_mode,database_role,force_logging,open_mode,switchover_status from v$database;

        DBID NAME      OPEN_MODE		  CURRENT_SCN PROTECTION_MODE
---------- --------- -------------------- ----------- --------------------
DATABASE_ROLE FOR OPEN_MODE SWITCHOVER_STATUS
---------------- --- -------------------- --------------------
1479188731 ORCL READ ONLY WITH APPLY 3638179 MAXIMUM PERFORMANCE
PHYSICAL STANDBY YES READ ONLY WITH APPLY NOT ALLOWED

2.验证DG状态是否正常

2.1.查看archive log序列是否一致

Primary Database

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +REDO
Oldest online log sequence 21
Next log sequence to archive 22
Current log sequence 22

Standby Database

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/arch
Oldest online log sequence 21
Next log sequence to archive 0
Current log sequence 22

2.2.查看DG状态

Primary Database

SQL> select dbid,name,open_mode,current_scn,protection_mode,database_role,force_logging,open_mode,switchover_status from v$database;

      DBID NAME      OPEN_MODE		  CURRENT_SCN PROTECTION_MODE
---------- --------- -------------------- ----------- --------------------
DATABASE_ROLE FOR OPEN_MODE SWITCHOVER_STATUS
---------------- --- -------------------- --------------------
1479188731 ORCL READ WRITE 1407507 MAXIMUM PERFORMANCE
PRIMARY YES READ WRITE TO STANDBY
  • PROTECTION_MODE:MAXIMUM PERFORMANCE 默认最大性能模式
  • DATABASE_ROLE:PRIMARY 角色
  • SWITCHOVER_STATUS:切换状态(可以查看出当前DG状态)
    • NOT ALLOWED 当前库无备库
    • TO STANDBY 当前库可以切换成备库
    • RESOLVABLE GAP 主库和备库之间有GAP间隙

Standby Database

2.3.验证日志应用

select thread#, sequence#, applied from v$archived_log;

2.4.查看相应进程是否起来

select process from v$managed_standby;

Oracle ADG搭建的更多相关文章

  1. Oracle ADG环境搭建

    部署 环境介绍 1,软件安装前基础部署 (两台做同样操作) 1.1,关闭selinux和防火墙 因为centos7里面没有/etc/sysconfig/iptables这个配置文件所以我们首先用yum ...

  2. CentOS 7 下oracle 11G R2 ADG 搭建

    本文记录ADG搭建操作步骤,首先在虚拟机CentOS中安装并配置好oracle 11g R2(具体安装步骤在我的另一篇博客中),然后拷贝一份虚拟机,修改新虚拟机的主机名和ip配置,这时候主库和备库是一 ...

  3. 数据库周刊31丨openGauss 正式开源;7月数据库排行榜发布;浙江移动国产数据库AntDB迁移;oracle ADG跨版本搭建;PG解决社保问题;mysqlbinlog解析……

    摘要:墨天轮数据库周刊第31期发布啦,每周1次推送本周数据库相关热门资讯.精选文章.干货文档. 热门资讯 1.openGauss 正式开源,华为公开发布源代码[摘要]6月1日,华为正式宣布开源数据库能 ...

  4. oracle DG搭建

    Oracle DG 搭建1. 环境 OS IP hostname db_name DB_UNIQUE_NAME主库 RHEL 5.4 192.168.12.20 edgzrip1.oracle.com ...

  5. nginx整合php+lua+oracle环境搭建

    nginx整合php+lua+oracle环境搭建 标签: nginxluaoraclephplinux -- : 1473人阅读 评论() 收藏 举报 分类: 技术() 版权声明:本文为博主原创文章 ...

  6. Oracle 12c 搭建学习

    Oracle 12c 搭建学习 Vm workstaton10 安装linux 6.4 安装oracle12c Oracle 12c只支持64位系统 1 环境检查 [root@rac1 ~]# gre ...

  7. oracle ADG启动顺序

    一.oracle ADG启动顺序 1.启动主备库监听 [oracle@dgdb1 ~]$ lsnrctl start [oracle@dgdb2 ~]$ lsnrctl start   2.启动备库 ...

  8. Oracle 11g RAC to RAC ADG搭建(一)采用rman备份恢复方式

    (一)基础环境   主库 备库 操作系统 RedHat6.7 RedHat6.7 服务器名称 primarydb1primarydb2 standbydb1standbydb2 IP地址规划 192. ...

  9. Oracle DataGuard搭建(一)

    第一次搭建oracle dataguard.学oracle很长时间,却没有完整的搭过dg,说起来让人笑.总得有第一次,而且第一次总是很痛苦的. 数据库版本: Oracle Database 11g E ...

随机推荐

  1. MVC文件夹及文件说明

    一个典型的 ASP.NET MVC Web 应用程序的文件夹内容如下所示: 所有的 MVC 应用程序的文件夹名称都是相同的.MVC 框架是基于默认的命名.控制器写在 Controllers 文件夹中, ...

  2. 基于MySQL + Node.js + Leaflet的离线地图展示,支持百度、谷歌、高德、腾讯地图

    1. 基本说明 本项目实现了离线展示百度.谷歌.高德.腾讯地图.主要功能如下: 实现了地图瓦片图下载.存储.目前支持存储至MySQL Node.js服务调用MySQL中的瓦片图 Leaflet展示地图 ...

  3. 机器学习算法 - 支持向量机SVM

    在上两节中,我们讲解了机器学习的决策树和k-近邻算法,本节我们讲解另外一种分类算法:支持向量机SVM. SVM是迄今为止最好使用的分类器之一,它可以不加修改即可直接使用,从而得到低错误率的结果. [案 ...

  4. KVM克隆 快照

    原创博文安装配置KVM http://www.cnblogs.com/elvi/p/7718574.htmlweb管理kvm http://www.cnblogs.com/elvi/p/7718582 ...

  5. ORACLE SQL 整理

    1.查询字段中含有小写字母的数据 SELECT MATERIALCODE FROM RFXITEMATTENDCODE WHERE REGEXP_LIKE(MATERIALCODE,'([a-z])' ...

  6. Ansible - 简介和应用自动化基础实践

    installAnsible简介和应用自动化基础实践 一.引入: 1.1  如官方定义,Ansible is The simplest way to automate apps and IT infr ...

  7. 三十天学不会TCP,UDP/IP网络编程-ARP -- 连接MAC和IP

    继续来做(da)推(guang)介(gao)我自己的!由于这两年接触到了比较多的这方面的知识,不想忘了,我决定把他们记录下来,所以决定在GitBook用半年时间上面写下来,这是目前写的一节,目前已完成 ...

  8. python 爬取国家粮食局东北地区玉米收购价格监测信息

    #!/usr/bin/python# -*- coding: UTF-8 -*-import reimport sysimport timeimport urllibimport urllib.req ...

  9. Object-Relational Structural Patterns

    Single Table Inheritance Represents an inheritance hierarchy of classes as a single table that has c ...

  10. lua 中pairs 和 ipairs差别

    ipairs 和pairs在lua中都是遍历tbale的函数可是两者有差别 1.pairs遍历table中的全部的key-vale 而ipairs会依据key的数值从1開始加1递增遍历相应的table ...