MES 数据库相关操作步骤
来源:互联网 发布:移动用户体验测试软件 编辑:程序博客网 时间:2024/06/05 19:10
一,关机.
1,先停止AP1 & AP2的IIS服务,不要让其它操作人员有连接数据库的情况。
2,先关闭DB1主机. #sync;sync;sync;halt -p
观察DB2是否“夺权”,将DM& MES 数据库控制权都要过来。
#ps –ef |grepora
3,再关闭DB2主机,#sync;sync;sync;halt –p
二,开机,
1, 同时按下DB1 & DB2的电源按钮,使两台SERVER同时开机即可。
2, DB1 & DB2 进入系统后,查看资料库是否正常启动,正常启动后才能进入步骤3
正常情况下,Oracle DB的启动情况:
[root@szcimesdb1log]# ps -ef|grep ora
orames 989 1 0 15:39 ? 00:00:00/oracle_mes/u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr LISTENER -inherit
orames 3209 1 0 16:27 ? 00:00:00 oraclemes (LOCAL=NO)
root 4175 4130 0 15:01 ? 00:00:00 hald-addon-storage: polling/dev/hda
orames 6045 1 0 15:02 ? 00:00:00 ora_pmon_mes
orames 6049 1 0 15:02 ? 00:00:00 ora_psp0_mes
orames 6053 1 0 15:02 ? 00:00:00 ora_mman_mes
orames 6056 1 0 15:02 ? 00:00:00 ora_dbw0_mes
orames 6058 1 0 15:02 ? 00:00:00 ora_lgwr_mes
orames 6062 1 0 15:02 ? 00:00:00 ora_ckpt_mes
orames 6064 1 0 15:02 ? 00:00:00 ora_smon_mes
orames 6066 1 0 15:02 ? 00:00:00 ora_reco_mes
orames 6069 1 0 15:02 ? 00:00:00 ora_cjq0_mes
orames 6071 1 0 15:02 ? 00:00:00 ora_mmon_mes
orames 6073 1 0 15:02 ? 00:00:00 ora_mmnl_mes
orames 6075 1 0 15:02 ? 00:00:00 ora_d000_mes
orames 6077 1 0 15:02 ? 00:00:00 ora_s000_mes
orames 6092 1 0 15:02 ? 00:00:00 ora_qmnc_mes
orames 6104 1 0 15:02 ? 00:00:01 ora_j000_mes
orames 6473 1 015:02 ? 00:00:00 ora_q000_mes
orames 6475 1 0 15:02 ? 00:00:00 ora_q001_mes
orames 19322 1 2 16:50 ? 00:00:06 oraclemes (LOCAL=NO)
root 23446 22143 0 16:56 pts/1 00:00:00 grep ora
orames 32647 1 0 16:23 ? 00:00:00 oraclemes (LOCAL=NO)
[root@szcimesdb1log]# cd /home/orames
[root@szcimesdb1orames]# ls
dbshutdown.sh dbstartup.sh Desktop oracle_mes_install.htm Screenshot-1.png Screenshot-2.png Screenshot-3.png Screenshot.png sqlnet.log
[root@szcimesdb1orames]# more dbstartup.sh
#!/bin/bash
su - orames
oracle
lsnrctl start
sqlplus /nolog<<EOF
connect /assysdba
startup
quit
EOF
/* 正常情况 ,一台DB为DM,另一台为MES,如果szcimesdb1夺权为mes数据库才可以使用此用户及命令查询,否则无法执行 */
[root@szcimesdb1 orames]# su – orames
[orames@szcimesdb1 ~]$ lsnrctl status
LSNRCTL forLinux: Version 10.2.0.4.0 - Production on 23-AUG-2010 17:00:16
Copyright (c)1991, 2007, Oracle. All rights reserved.
Connecting to(ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of theLISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version10.2.0.4.0 - Production
Start Date 23-AUG-2010 15:39:21
Uptime 0 days 1 hr. 20 min. 54 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
ListenerParameter File /oracle_mes/u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener LogFile /oracle_mes/u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
ListeningEndpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=szcimesdb1.umec.com.tw)(PORT=1521)))
ServicesSummary...
Service"mes" has 1 instance(s).
Instance "mes", status READY, has 1handler(s) for this service...
Service"mesXDB" has 1 instance(s).
Instance "mes", status READY, has 1handler(s) for this service...
Service"mes_XPT" has 1 instance(s).
Instance "mes", status READY, has 1handler(s) for this service...
The commandcompleted successfully
[orames@szcimesdb1~]$
[oradm@szcimesdb2 init.d]$ ps -ef |grep ora
oradm 2251 1 0 16:16 ? 00:00:08 ora_j000_dm
root 4153 4122 0 15:34 ? 00:00:00 hald-addon-storage: polling/dev/hda
root 5220 4778 0 17:06 pts/2 00:00:00 su - oradm
oradm 5221 5220 0 17:06 pts/2 00:00:00 -bash
oradm 5754 1 0 15:34 ? 00:00:00/oracle_dm/u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr LISTENER -inherit
oradm 5762 1 0 15:34 ? 00:00:00 ora_pmon_dm
oradm 5764 1 0 15:34 ? 00:00:00 ora_psp0_dm
oradm 5766 1 0 15:34 ? 00:00:00 ora_mman_dm
oradm 5768 1 0 15:34 ? 00:00:00 ora_dbw0_dm
oradm 5770 1 0 15:34 ? 00:00:00 ora_lgwr_dm
oradm 5772 1 0 15:34 ? 00:00:00 ora_ckpt_dm
oradm 5774 1 0 15:34 ? 00:00:00 ora_smon_dm
oradm 5776 1 0 15:34 ? 00:00:00 ora_reco_dm
oradm 5778 1 0 15:34 ? 00:00:00 ora_cjq0_dm
oradm 5780 1 0 15:34 ? 00:00:00 ora_mmon_dm
oradm 5782 1 0 15:34 ? 00:00:00 ora_mmnl_dm
oradm 5784 1 0 15:34 ? 00:00:00 ora_d000_dm
oradm 5786 1 0 15:34 ? 00:00:00 ora_s000_dm
oradm 5795 1 0 15:35 ? 00:00:00 ora_qmnc_dm
oradm 5994 1 0 15:35 ? 00:00:00 ora_q000_dm
oradm 5996 1 0 15:35 ? 00:00:00 ora_q001_dm
oradm 19289 5221 0 17:26 pts/2 00:00:00 ps -ef
oradm 19290 5221 0 17:26 pts/2 00:00:00 grep ora
[oradm@szcimesdb2init.d]$cd /home
[root@szcimesdb2 home]# cd oradm
[root@szcimesdb2oradm]# ls
dbshutdown.sh Desktop oracle_dm_install1.htm Screenshot-1.png Screenshot-3.png sqlnet.log
dbstartup.sh oracle_dm_install19.htm oracle_dm_install.htm Screenshot-2.png Screenshot.png
_dm_install.htm Screenshot-2.png Screenshot.png
[root@szcimesdb2oradm]# more dbstartup.sh
#!/bin/bash
su - oradm
oracle
lsnrctl start
sqlplus /nolog<<EOF
connect /assysdba
startup
quit
EOF
[root@szcimesdb2 oradm]# su - oradm
[oradm@szcimesdb2 ~]$ lsnrctl status
LSNRCTL forLinux: Version 10.2.0.4.0 - Production on 23-AUG-2010 17:28:17
Copyright (c)1991, 2007, Oracle. All rights reserved.
Connecting to(ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version10.2.0.4.0 - Production
Start Date 23-AUG-2010 15:34:53
Uptime 0 days 1 hr. 53 min. 24 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
ListenerParameter File /oracle_dm/u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener LogFile /oracle_dm/u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
ListeningEndpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=szcimesdb2.umec.com.tw)(PORT=1521)))
ServicesSummary...
Service"dm" has 1 instance(s).
Instance "dm", status READY, has 1handler(s) for this service...
Service"dmXDB" has 1 instance(s).
Instance "dm", status READY, has 1handler(s) for this service...
Service"dm_XPT" has 1 instance(s).
Instance "dm", status READY, has 1handler(s) for this service...
The commandcompleted successfully
[oradm@szcimesdb2~]$
3, 再开启AP1 & AP2的IIS服务。
Oracle 包括Linster和DB两部分,如果 Lister没有启动起来,晚一点操作即可。
/* 如果有资料库不能启动的情况,手工启动资料库 */
[orames@szcimesdb1 ~]$cd /etc/rc.d/init.d
[orames@szcimesdb1 init.d]$ ls
acpid conman dnsmasq ip6tables luci netplugd oracledb_mes.bak readahead_early sendmail winbind
anacron cpuspeed dund ipmi lvm2-monitor network oracledb_mes.sh readahead_later setroubleshoot wpa_supplicant
atd crond firstboot iptables mcstrans NetworkManager oracledb_mes.sh~ restorecond single xfs
auditd cups functions ipvsadm mdmonitor nfs pand rgmanager smartd xinetd
autofs cups-config-daemon gfs irda mdmpd nfslock pcscd rhnsd snmpd ypbind
avahi-daemon dbdm.bak gfs2 irqbalance messagebus nscd piranha-gui ricci snmptrapd yum-updatesd
avahi-dnsconfd dbdm.sh gpm kdump microcode_ctl ntpd portmap rpcgssd sshd
bluetooth dbdm.sh~ haldaemon killall modclusterd oddjobd psacct rpcidmapd syslog
clvmd dbmes.bak halt krb524 multipathd openais pulse rpcsvcgssd tog-pegasus
cman dbmes.sh hidd kudzu netconsole oracledb_dm.bak qdiskd saslauthd vncserver
cmirror dbmes.sh~ httpd lm_sensors netfs oracledb_dm.sh rdisc scsi_reserve wdaemon
[orames@szcimesdb1 init.d]$ more dbdm.sh
!/bin/sh
ORAHOME=/oracle_dm/u01/app/oracle/product/10.2.0/db_1
ORAUSER=oradm
ORAUSER_HOME=/home/oradm
case "$1" in
'start')
#Start the Oracle databases:
echo -n "Starting Oracle Database: "
echo "`date +%Y-%m-%d_%H%M%S` dm Start" >>/var/log/messages
#
# Your service startup command goes here.
#
su - $ORAUSER -c "$ORAUSER_HOME/dbstartup.sh"
touch /var/lock/subsys/dm
echo
;;
'stop')
# Stop the Oracle databases:
echo -n "Shutting down Oracle Database: "
echo "`date +%Y-%m-%d_%H%M%S` dm Stop" >>/var/log/messages
#
# Your service shutdown command goes here.
#
su - $ORAUSER -c "$ORAUSER_HOME/dbshutdown.sh"
rm -f /var/lock/subsys/dm
echo
;;
'status')
#Stop the Oracle databases:
ps -ef | grep -v grep | grep -q ora_smon_dm
if [ $? = 0 ]
then exit 0
fi
;;
'restart')
# Restart the Oracle databases:
echo -n "Retarting Oracle Database: "
$0 stop
$0 start
echo
;;
*)
echo "Usage: oradm { start | stop | restart }"
exit 1
;;
esac
exit 0
[orames@szcimesdb1 init.d]$ more dbmes.sh
#!/bin/sh
ORAHOME=/oracle_mes/u01/app/oracle/product/10.2.0/db_1
ORAUSER=orames
ORAUSER_HOME=/home/orames
case "$1" in
'start')
#Start the Oracle databases:
echo -n "Starting Oracle Database: "
echo "`date+%Y-%m-%d_%H%M%S` MES Start" >> /var/log/messages
#
# Your service startup command goes here.
#
su - $ORAUSER -c "$ORAUSER_HOME/dbstartup.sh"
touch /var/lock/subsys/mes
echo
;;
'stop')
#Stop the Oracle databases:
echo -n "Shutting down Oracle Database: "
echo "`date +%Y-%m-%d_%H%M%S` MES Stop" >>/var/log/messages
#
# Your service shutdown command goes here.
#
su - $ORAUSER -c "$ORAUSER_HOME/dbshutdown.sh"
rm -f /var/lock/subsys/mes
echo
;;
'status')
#Stop the Oracle databases:
ps -ef | grep -v grep | grep -q ora_smon_mes
if [ $? = 0 ]
then exit 0
fi
;;
'restart')
#Restart the Oracle databases:
echo -n "Retarting Oracle Database: "
$0 stop
$0 start
echo
;;
*)
echo "Usage: orames { start | stop | restart }"
exit 1
;;
esac
exit 0
[orames@szcimesdb1 init.d]$
上一篇:Red Hat Cluster Suite集群 Oracle数据库
下一篇:[ZT]基于RHEL5 Soft RAID+LVM构建
- Oracle日常性能查看
- 使用 RMAN 同步数据库
- LoadRunner 测试Oracle数据库...
- Oracle工程系统与安全高可用...
- oracle中substr函数的用法...
- IBM DS3400 盘阵怎么查看是单...
- 启动auditd时,报错如下,怎么...
- CGSL系统中root密码正确,但无...
- 在CGSL系统中,如何为不同的用...
- CGSL系统如何设置交换分区的大...
- MES 数据库相关操作步骤
- 删除数据库操作步骤
- 数据库的操作步骤
- JDBC 操作数据库步骤
- MyBatis操作数据库步骤
- 空间数据库相关步骤
- Labview数据库基本操作及相关一些步骤和疑问解决方法
- 数据库的相关操作
- 数据库的相关操作
- .Net数据库相关操作
- SQl 数据库相关操作
- 数据库相关操作封装
- 数据库相关的操作
- 数据库相关操作工具
- mysql 数据库相关操作
- YII 数据库相关操作
- Sqlite数据库相关操作
- uchome数据库相关操作
- Cisco 3750交换机密码初始化
- [ZT]Cisco 3750交换机配置DHCP服务器实例
- ORA-12541:TNS:没有监听器 详细解决
- Oracle10g RAC 关闭及启动步骤
- Red Hat Cluster Suite集群 Oracle数据库
- MES 数据库相关操作步骤
- [ZT]基于RHEL5 Soft RAID+LVM构建
- [ZT]毕业5年决定你的命运 --------值得所有不甘平庸的人看看
- Oracle纯SQL实现多行并一行
- 交换机 Trunk(端口汇聚)的概念与设置
- 交换机端口untaged、taged、trunk、access 的区别
- cisco交换机配置vlan的资料
- [ZT]CISCO交换机配置操作学习
- Cisco交换机配置新手篇之端口配置