一、数据库服务器关机步骤:
Oracle:
1.以root登录每台虚拟机服务器linux操作系统,切换到oracle用户su – oracle2.正常停止监听和数据库lsnrctl statuslsnrctl stopsqlplus / as sysdbaSQL>shutdown immediate;3.如果oracle采用asm自动存储管理(列出asm进程)方式,登录asm实例后关闭asm实例ps -ef|grep asmsu - gridsqlplus / as sysasmSQL>shutdown immediate;4.最后再关闭操作系统(OS)shutdown -h nowMysql:1.以root登录,列出mysql进程ps -ef|grep mysql2.关闭mysqlsu – mysqlmysqladmin -uroot -p shutdown或service mysql stop3.再次检查mysql进程是否关闭ps -ef|grep mysql4.最后再关闭操作系统(OS)shutdown -h now二、数据库服务器开机步骤:
1.启动oracle数据库
su - gridps -ef|grep asm如asm实例没有自动启动,则手工启动: su - grid
srvctl start asm
sqlplus / as sysasm
SQL>startup
exitsu - oracleps -ef|grep ora如oracle实例没有自动启动,则手工启动:sqlplus / as sysdbaSQL>startup;exitlsnrctl status --检查监听状态,如未启则手工启动--lsnrctl start2.启动mysql数据库mysql --help|grep my.cnf --查看读取多个my.cnf顺序mysqld_safe --defaults-file=/mysqldata/3306/my.cnf &或service mysql start检查mysql进程:ps -ef|grep mysql