0x6f INSTALL CX_ORACLE ON CENTOS 7

  1. Download and install oracle client from Oracle
yum install libaio
rpm -Uvh oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
rpm -Uvh oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
rpm -Uvh oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_64.rpm
  1. Add Oracle client to library path
echo "/usr/lib/oracle/12.1/client64/lib" >/etc/ld.so.conf.d/oracle.conf
ldconfig
  1. install epel repo via yum extra
yum install epel-release
  1. Install additional
yum install gcc python-pip.noarch python-devel
  1. Install cx_Oracle via pip
pip install cx_Oracle
linux oracle python centos

 

0x66 ORACLE - MASS UPDATE IP NET C/B

update net C

UPDATE IPWC_TEST SET
IP='_NEW.NET.C_.'||TO_NUMBER(REGEXP_SUBSTR(IP, '[0-9]+', 1, 4))
WHERE
TO_NUMBER(REGEXP_SUBSTR(IP, '[0-9]+', 1, 1))||'.'||TO_NUMBER(REGEXP_SUBSTR(IP, '[0-9]+', 1, 2))||'.'||TO_NUMBER(REGEXP_SUBSTR(IP, '[0-9]+', 1, 3))='_OLD.NET.C_'

update net B

UPDATE ipwarmer_config SET
IP='_NEW.NET_B_.'||TO_NUMBER(REGEXP_SUBSTR(IP, '[0-9]+', 1, 3))||'.'||TO_NUMBER(REGEXP_SUBSTR(IP, '[0-9]+', 1, 4))
WHERE
TO_NUMBER(REGEXP_SUBSTR(IP, '[0-9]+', 1, 1))||'.'||TO_NUMBER(REGEXP_SUBSTR(IP, '[0-9]+', 1, 2))='_OLD.NET_B_'
oracle