2018年3月30日 星期五

sql server firewall

@echo =========  SQL Server Ports  ===================
@echo Enabling SQLServer default instance port 1433
netsh firewall set portopening TCP 1433 "SQLServer"
@echo Enabling Dedicated Admin Connection port 1434
netsh firewall set portopening TCP 1434 "SQL Admin Connection"
@echo Enabling conventional SQL Server Service Broker port 4022 
netsh firewall set portopening TCP 4022 "SQL Service Broker"
@echo Enabling Transact-SQL Debugger/RPC port 135
netsh firewall set portopening TCP 135 "SQL Debugger/RPC"
@echo =========  Analysis Services Ports  ==============
@echo Enabling SSAS Default Instance port 2383
netsh firewall set portopening TCP 2383 "Analysis Services"
@echo Enabling SQL Server Browser Service port 2382
netsh firewall set portopening TCP 2382 "SQL Browser"
@echo =========  Misc Applications  ==============
@echo Enabling HTTP port 80
netsh firewall set portopening TCP 80 "HTTP"
@echo Enabling SSL port 443
netsh firewall set portopening TCP 443 "SSL"
@echo Enabling port for SQL Server Browser Service's 'Browse' Button
netsh firewall set portopening UDP 1434 "SQL Browser"
@echo Allowing multicast broadcast response on UDP (Browser Service Enumerations OK)
netsh firewall set multicastbroadcastresponse ENABLE


https://dotblogs.com.tw/rockchang/2014/04/14/144730

2018年3月9日 星期五

CentOS7 Oracle11 try 2




hostnamectl set-hostname oracle11
hostname oracle11

vim /etc/hosts
127.0.0.1   oracle11 localhost localhost.localdomain localhost4 localhost4.localdomain4

/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper

/usr/sbin/useradd -u 502 -g oinstall -G dba,oper oracle


/etc/sysctl.conf
kernel.shmmni = 4096
kernel.shmmax = 4398046511104
kernel.shmall = 1073741824
kernel.sem = 250 32000 100 128
fs.aio-max-nr = 1048576
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586


/etc/security/limits.conf
oracle   soft   nproc    131072
oracle   hard   nproc    131072
oracle   soft   nofile   131072
oracle   hard   nofile   131072
oracle   soft   core     unlimited
oracle   hard   core     unlimited
oracle   soft   memlock  50000000
oracle   hard   memlock  50000000




#oracle .bash_profile
# ORACLE_HOME 跟 ORACLE_BASE 相同的話會擋下
export TMP=/worktmp
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/11g
export ORACLE_SID=hissp1
PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
alias cdob='cd $ORACLE_BASE'
alias cdoh='cd $ORACLE_HOME'
alias tns='cd $ORACLE_HOME/network/admin'
alias envo='env | grep ORACLE'

umask 022


-----------------------------------------------------------
yum install binutils -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
yum install zlib-devel -y
yum install elfutils-libelf-devel -y


yum install unzip -y
yum install telnet -y
yum install  nfs-utils.x86_64 -y
yum install xorg-x11-utils-7.5-22.el7.x86_64 -y
yum install mksh.x86_64 -y
yum install epel-release.noarch -y
yum install rlwrap.x86_64 -y
-----------------------------------------------------------
rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n' binutils \
elfutils-libelf \
elfutils-libelf-devel \
gcc \
gcc-c++ \
glibc \
glibc-common \
glibc-devel \
glibc-headers \
ksh \
libaio \
libaio-devel \
libgcc \
libstdc++ \
libstdc++-devel \
make \
sysstat \
unixODBC \
unixODBC-devel
------------------------------------------------------------
  197  mkdir -p /oracle11
  199  chown oracle:oinstall /oracle11
  200  chmod 775 /oracle11

/etc/selinux/config
SELINUX=permissive

--------------------------------------------------------------
mkdir /oraInventory
chown -R oracle /oraInventory

----------------------------------------------------------------
安装oracle时报错memcpy@GLIBC_2.14未找到:

INFO: /lib64/libstdc++.so.5: undefined reference to `memcpy@GLIBC_2.14'
collect2: error: ld returned 1 exit status
INFO: make: *** [ctxhx] Error 1
INFO: End output from spawned process.
解决办法,先查看 /usr/lib64/libc.a是否存在:

ls /usr/lib64 | grep libc.a

如果查找不到先安装:glibc-static,如果有则略过此步

yum -y install glibc-static

修改oracle安装目录下 $ORACLE_HOME/ctx/lib/ins_ctx.mk
将

    ctxhx: $(CTXHXOBJ)
        $(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK)
修改为:

    ctxhx: $(CTXHXOBJ)
        -static $(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK) /usr/lib64/libc.a
然后点击retry通过

安装oracle时报错Error in invoking target 'agent nmhs':

Error in invoking target 'agent nmhs' of makefile '/data2/oracle/app/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk'
解决办法:修改 $ORACLE_HOME/sysman/lib/ins_emagent.mk
将

$(MK_EMAGENT_NMECTL)

修改为

$(MK_EMAGENT_NMECTL) -lnnz11

然后点击retry通过

https://www.jianshu.com/p/2fda26a7edf1
----------------------------------------------------------------
/oraInventory/orainstRoot.sh
/oracle/11g/root.sh
---------------------------------------------------------------
vim /oracle/11203/sysman/lib/ins_emagent.mk
---------------------------------------------------------------
/oracle/11203/root.sh
--------------------------------------------------------------