sun cluseter双机热备怎么临时关闭数据库?
双机热备的时候, 一定数据库down,或者listener stoped都会发生switch,
要想临时关闭数据库,比如打patch,做恢复等
我们该怎么做?
if database is running on node1
1. scswitch -S -h node2
2. shutdown database at node1
3. do things
4. startup database again
5 scswitch -S -h node2
can this be works?
| kerlion 回复于:2002-12-21 14:04:15 |
| up |
| kerlion 回复于:2002-12-21 14:05:18 |
| 我顶 |
| alaler 回复于:2002-12-21 23:56:12 |
| hareg -n oracle |
| iricyan 回复于:2002-12-22 12:36:47 |
| 双机已经配好了吧! 手工切换做要做的事情就是了! |
| procrus 回复于:2002-12-22 13:00:18 |
| 共享一下经验吧 |
| byuq 回复于:2002-12-22 15:02:49 |
| 如果你cluster中配置了数据库,当服务都在node1上时,用scswitch -s -h node2就会先关闭node1的数据库,然后才在node2上起数据库,用scswitch -S -h node2是把node2暂时脱离cluster,用scswitch -s -h ""是关闭cluster起的服务! |
| ORA-600 回复于:2002-12-22 17:44:24 |
| 先让某个节点(不运行数据库)offline,然后再在另一个节点上关闭数据库。我用vcs是这么做的。 |
| lisuit 回复于:2002-12-22 18:52:22 |
| 用的是sc3.0吧?hareg是2.2中的命令了。 scswitch -n -j your_oracle_resource 可以把oracle offline下来,然后你就可以工作了。 做完后用scswitch -e -j your_oracle_resource使之online. |
| kerlion 回复于:2002-12-23 09:55:41 |
| [quote][b]下面引用由[u]lisuit[/u]在 [i]2002/12/22 06:52pm[/i] 发表的内容:[/b] 用的是sc3.0吧?hareg是2.2中的命令了。 scswitch -n -j your_oracle_resource 可以把oracle offline下来,然后你就可以工作了。 做完后用scswitch -e -j your_oracle_resource使之online. [/quote] lisuit,你好。我的主要思想也是让node2 offline.你的命令实验过吗?我的是正式环境呀?上次我看sun的工程师用了一大对命令。 还有用scswitch -S -h node2是不是可以达到同样的效果,而且简单呀 |
| lisuit 回复于:2002-12-24 10:52:21 |
| -S不可以做到。因为-S会释放所有资源,如果对方节点活着的话,会在对方节点上启动资源。 man scswitch |
| 老猫 回复于:2002-12-24 19:46:05 |
| scswitch -F -g rgname 就可以了 |
| lisuit 回复于:2002-12-25 10:01:33 |
| -F -g rgname会把整个rg都offline下来。如果绑定了device group,device group也offline 了。 还有,logicalhost也会offline,listener就起不来了。 |
| 老猫 回复于:2002-12-25 15:25:03 |
| 他要打patch吗,这些当然都要停下来才安全吗! |
| lisuit 回复于:2002-12-25 20:51:41 |
| 如果要都挺的话那为什么还要启动到cluster呢? 如果是做数据库恢复呢?而且不是所有的patch都需要把数据库宕下来的。 |
| 老猫 回复于:2002-12-27 13:11:27 |
| 其实最好的,最安全的办法是reboot -- -x |
| kerlion 回复于:2002-12-27 17:56:51 |
| 这样就可以了, scwitch -n -M -j ora_server scwitch -n -M -j ora_listener shutdown database, and backup or recover scwitch -e -M -j ora_server scwitch -e -M -j ora_listener |
| mkwf 回复于:2002-12-29 20:34:00 |
| 如果不希望Cluster监控资源,可以 scswitch -n -M -j oracle_res, 但是resouce还是会随着资源组online/offline。 也可以先将资源disable,scswitch -n -j oracle_res,resouce group将不再管理这个resouce了; 一般要删除Resouce,都先做这个的。 不建议停止整个资源组,因为逻辑主机和磁盘组都会offline的,那样的话什么也作不了了。 如果对SunCluster的命令不熟悉,建议使用web界面的管理工具SunPlexManager,非常简便。 https://node-1:3000/即可。 |
| zpdpd 回复于:2002-12-30 10:45:13 |
| 不错 |
| YT 回复于:2003-01-08 15:27:20 |
| 又学到一招 |