双机数据源配置格式:
jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=yes)(FAILOVER=no)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.176.216.92)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.176.216.91)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=mdscsdb)))
单机数据源配置格式:jdbc:oracle:thin:@10.176.216.91:1521:mdscsdb1
修改BPM数据源涉及的配置文件:一:
/home/Oracle/user_projects/domains/bpm_domain/applications/default.war/WEB-INF/_srv/config/MultisysRemoteBSPDataSource.properties
二:网页控制台新增数据源
weblogic 报错:LOOKUP BPS service failed!(记得先备份)
解决方案:将${WEBLOGIC_HOME}/modules/目录下的commonj.sdo_1.0.0.0_1-0.jar删除;
并将org.eclipse.persistence_1.1.0.0_2-1.jar中的commonj包删除 在重启
Linux运维清空正在运行的应用日志文件内容:
第一种方法:
file.log
第二种方法:
echo “” > file.log
第三种方法:
cat /dev/null > file.log
通过PID查询java进程
ps -ef -o stat,pid,cmd |grep java | awk ‘{print $2}’ | xargs pwdx
ps -ef |grep java |awk ‘{print $2}’ |xargs pwdx
修改数据库端口(RAC及单机)
Oralce11g RAC集群数据库修改监听端口号(grid用户)
srvctl modify listener -l LISTENER -p “TCP:11521”
srvctl modify scan_listener -p 11521
查询备份
show parameter local_listener;
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=10.176.216.96)(PORT=1521)) --私网IP
show parameter remote_listener;(到数据库中去验证remote_listener的端口参数是否被修改成功,如果没有则在PL/SQL中进行修改,即使用oracle用户进行验证)
remote_listener string scan-cluster:1521
修改参数
sqlplus / as sysdba
alter system set local_listener=‘(ADDRESS=(PROTOCOL=TCP)(HOST=10.176.216.96)(PORT=11521))’ scope=both sid=‘mdscsdb1’;
alter system set local_listener=‘(ADDRESS=(PROTOCOL=TCP)(HOST=10.176.216.97)(PORT=11521))’ scope=both sid=‘mdscsdb2’;
alter system set remote_listener=‘scan-cluster:11521’ scope=both;
在第一个节点重启本地监听
srvctl stop listener -l LISTENER -n mdscsdb1
修改第一个节点的$ORACLE_HOME/network/admin/endpoints_listener.ora文件,将1521改为11521
srvctl start listener -l LISTENER -n mdscsdb1
在第二个节点重启本地监听
srvctl stop listener -l LISTENER -n mdscsdb2
修改第二个节点的$ORACLE_HOME/network/admin/endpoints_listener.ora文件,将1521改为11521
srvctl start listener -l LISTENER -n mdscsdb2
重启集群监听
srvctl stop scan_listener
srvctl start scan_listener
重启数据库
Oralce11g 单机数据库修改监听端口号(grid用户)
1.查看监听状态:
$lsnrctl status;
2.停止监听:
$lsnrctl stop;
3.修改配置文件:
$vi $ORACLE_HOME/network/admin/listener.ora
将1521端口进行更换
4.登录并查看local_listener参数
$sqlplus / as sysdba
show parameter local_listener;
(此时的VALUE值应为空)
5.修改local_listener参数
alter system set local_listener=“(address = (protocol=tcp)(host=10.176.216.194)(port=9999))” #host后面加主机名或者IP
6.查看local_listener参数
show parameter local_listener
7.启动监听
$lsnrctl start
8.查看状态
$netstat -antup | grep 9999
$lsnrctl status
如果启用了防火墙,记得开放端口
$su - root
/sbin/iptables -l INPUT -p tcp --DPORT 9999 -j ACCEPT
/etc/rc.d/init.d/iptables save
到此oracle的监听端口就已经由原来的1521变成9999
Oralce10g RAC集群数据库修改监听端口号(oracle用户)
1、$cd $ORACLE_HOME/network/admin
2、修配配置文件listener.ora
3、查看local_listener:
SQL>show parameter local;
SQL>show parameter remote_listener;
4、修改配置文件tnsnames.ora
5、两个节点上启动新的端口:
lsnrctl status命令查询)
$ lsnrctl status
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.5.0 - Production on 26-2月 -2018 16:23:04
Copyright © 1991, 2010, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
Alias LISTENER_CMSPDB1
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.5.0 - Production
Start Date 22-2月 -2018 17:37:27
Uptime 3 days 22 hr. 45 min. 38 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /oracle/products/10.2/db/network/admin/listener.ora
Listener Log File /oracle/products/10.2/db/network/log/listener_cmspdb1.log
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.176.216.195)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.176.216.194)(PORT=1521)))
Services Summary…
Service “PLSExtProc” has 1 instance(s).
Instance “PLSExtProc”, status UNKNOWN, has 1 handler(s) for this service…
Service “pmcpdp” has 2 instance(s).
Instance “pmcpdp1”, status READY, has 2 handler(s) for this service…
Instance “pmcpdp2”, status READY, has 1 handler(s) for this service…
Service “pmcpdpXDB” has 2 instance(s).
Instance “pmcpdp1”, status READY, has 3 handler(s) for this service…
Instance “pmcpdp2”, status READY, has 3 handler(s) for this service…
Service “pmcpdp_XPT” has 2 instance(s).
Instance “pmcpdp1”, status READY, has 2 handler(s) for this service…
Instance “pmcpdp2”, status READY, has 1 handler(s) for this service…
The command completed successfully
6、在另一个节点可以用set current_listener LISTENER_O10N2命令启动
LSNRCTL>start
$lsnrctl status 当前正在监听的节点的名称(LISTENER_CMSPDB1)
注意,此时新端口已经启动好了,并且可以连接了,但是原端口还是可以连接的,可通过lsnrctl status命令查询
如果需要关掉原来的端口,可以通过lsnrctl stop关掉,但是不能用srvctl关掉。这样会关掉新端口的监听,不会关掉原端口的监听
$srvctl stop listener -l LISTENER -n CMSPDB1