ddyyhh 发表于 2007-1-20 00:22:05

请求配置双机系统SYBASE切换脚本

<p>ASE_12_5安装在REDHAT LINUX AS 4系统,ROSEHA 6双机软件,数据库安装在/opt/sybase目录,请问在ROSEHA中怎样配置SYBASEA切换启动和停止脚本......急,</p><p>请大家帮帮忙</p><p></p><p></p><p>谢谢</p><p>邓云海</p><p>EMAIL:<a href="mailto:dengyunhai@126.com">dengyunhai@126.com</a></p>

ehxz 发表于 2007-1-20 21:46:25

<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt;"><span lang="EN-US"><font face="Times New Roman">1</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">.</span><font face="Times New Roman">
                </font><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">安装</span><span lang="EN-US"><font face="Times New Roman">REP1</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">,是</span><span lang="EN-US"><font face="Times New Roman">ID&nbsp;server</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">,</span><span lang="EN-US"><font face="Times New Roman">RSSD</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">需要复制(</span><span lang="EN-US"><font face="Times New Roman">Rep&nbsp;Agent</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">)</span><span lang="EN-US"><font face="Times New Roman">DBTEST1</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">要复制(</span><span lang="EN-US"><font face="Times New Roman">Rep&nbsp;Agent</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">)</span><span lang="EN-US"><font face="Times New Roman">
                                <br/>2</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">.</span><font face="Times New Roman">
                </font><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">安装</span><span lang="EN-US"><font face="Times New Roman">REP2</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">,不是</span><span lang="EN-US"><font face="Times New Roman">ID&nbsp;server</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">,有</span><span lang="EN-US"><font face="Times New Roman">RSSD</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">不要复制。</span><span lang="EN-US"><font face="Times New Roman">
                                <br/>3</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">.</span><font face="Times New Roman">
                </font><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">建</span><span lang="EN-US"><font face="Times New Roman">REP1—&gt;REP2</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">的单项路由,在</span><span lang="EN-US"><font face="Times New Roman">REP1</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">上建;</span><span lang="EN-US"><font face="Times New Roman">
                                <br/>isql&nbsp;–Usa&nbsp;–Ppass&nbsp;–SREP1 <br/>&gt;create&nbsp;route&nbsp;to&nbsp;REP2 <br/>&gt;set&nbsp;username&nbsp;REP2_rsi <br/>&gt;set&nbsp;password&nbsp;REP2_rsi_ps <br/>&gt;go <br/>4 </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">在</span><span lang="EN-US"><font face="Times New Roman">TEST1(</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">主点数据服务器</span><span lang="EN-US"><font face="Times New Roman">)</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">建一个复制用户:</span><span lang="EN-US"><font face="Times New Roman">
                                <br/>isql&nbsp;–Usa&nbsp;–Ppass&nbsp;–STEST1 <br/>&gt;sp_addlogin&nbsp;repsys,repsys_ps <br/>&gt;go&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(repsys&nbsp;</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">密码</span><span lang="EN-US"><font face="Times New Roman">repsys_ps) <br/>&gt;use&nbsp;dbtest1 <br/>&gt;go <br/>&gt;sp_adduser&nbsp;repsys <br/>&gt;go <br/>&gt;grant&nbsp;all&nbsp;on&nbsp;rep_table&nbsp;to&nbsp;repsys <br/>&gt;go&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">对要复制的表</span><span lang="EN-US"><font face="Times New Roman">rep_table</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">授权</span><span lang="EN-US"><font face="Times New Roman">) <br/>5 </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">将复制用户</span><span lang="EN-US"><font face="Times New Roman">repsys</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">加到</span><span lang="EN-US"><font face="Times New Roman">REP1</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">(主点复制服务器)</span><span lang="EN-US"><font face="Times New Roman">REP2</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">(复制点复制服务器)上,并将</span><span lang="EN-US"><font face="Times New Roman">create&nbsp;object&nbsp;</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">权限授予该用户。(注意,此</span><span lang="EN-US"><font face="Times New Roman">”repsys”</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">用户在</span><span lang="EN-US"><font face="Times New Roman">REP1</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">和</span><span lang="EN-US"><font face="Times New Roman">REP2</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">及</span><span lang="EN-US"><font face="Times New Roman">TEST1</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">上必须用相同的登录名和口令)</span><span lang="EN-US"><font face="Times New Roman">
                                <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isql&nbsp;–Usa&nbsp;–Ppass&nbsp;–SREP1 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;create&nbsp;user&nbsp;repsys <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;set&nbsp;password&nbsp;repsys_ps <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;go <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;grant&nbsp;create&nbsp;object&nbsp;to&nbsp;repsys <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;go <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isql&nbsp;–Usa&nbsp;–Ppass&nbsp;–SREP2 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;create&nbsp;user&nbsp;repsys <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;set&nbsp;password&nbsp;repsys_ps <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;go <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;grant&nbsp;create&nbsp;object&nbsp;to&nbsp;repsys <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;go <br/>6 </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">在</span><span lang="EN-US"><font face="Times New Roman">REP1</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">上创建复制定义(注意用户)</span><span lang="EN-US"><font face="Times New Roman">
                                <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isql&nbsp;–Urepsys&nbsp;–Prepsys_ps&nbsp;–UREP1 <br/>&gt;create&nbsp;replication&nbsp;definition&nbsp;dbtest1_repdef <br/>&gt;with&nbsp;primary&nbsp;at&nbsp;TEST1.dbtest1 <br/>&gt;with&nbsp;all&nbsp;tables&nbsp;named&nbsp;‘rep_table’ <br/>&gt;(num1&nbsp;datatype,num2&nbsp;datatype,…….) <br/>&gt;primary&nbsp;key(num) <br/>&gt;searchtable&nbsp;columns(num1,num2,……) <br/>&gt;go <br/>7 </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">将</span><span lang="EN-US"><font face="Times New Roman">DBTEST1</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">中</span><span lang="EN-US"><font face="Times New Roman">dbtest1</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">要复制的表设为可复制</span><span lang="EN-US"><font face="Times New Roman">
                                <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isql&nbsp;–Usa&nbsp;–Ppass&nbsp;–STEST1 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;use&nbsp;dbtest1 <br/>&gt;go <br/>&gt;sp_setreptable&nbsp;rep_table,true <br/>&gt;go <br/>8 </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">给</span><span lang="EN-US"><font face="Times New Roman">TEST2</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">中</span><span lang="EN-US"><font face="Times New Roman">dbtest2</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">中要复制的表授权</span><span lang="EN-US"><font face="Times New Roman">
                                <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isql&nbsp;–Usa&nbsp;–Ppass&nbsp;–STEST2 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;use&nbsp;dbtest2 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;go <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;grant&nbsp;all&nbsp;on&nbsp;rep_table&nbsp;to&nbsp;dbtest2_maint <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;go <br/>9 </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">在</span><span lang="EN-US"><font face="Times New Roman">REP2</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">上建预定</span><span lang="EN-US"><font face="Times New Roman">
                                <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isql&nbsp;–Urepsys&nbsp;–Prepsys_ps&nbsp;–SREP2 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;create&nbsp;subscription&nbsp;dbtest1_sub <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;for&nbsp;dbtest1_repdef <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;with&nbsp;replicate&nbsp;at&nbsp;TEST2.dbtest2 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;subscribe&nbsp;to&nbsp;truncate&nbsp;table <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;with&nbsp;materialization&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">初始化</span><span lang="EN-US"><font face="Times New Roman">) <br/>10 </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">验证在</span><span lang="EN-US"><font face="Times New Roman">REP1</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">和</span><span lang="EN-US"><font face="Times New Roman">REP2</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: &quot;Times New Roman&quot;; mso-hansi-font-family: &quot;Times New Roman&quot;;">上</span><span lang="EN-US"><font face="Times New Roman">
                                <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isql&nbsp;–Usa&nbsp;–Ppass&nbsp;–SREP1 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;admin_health <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;go <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;admin_who <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;go <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;admin_who_is_down <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;go <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isql&nbsp;–Usa&nbsp;–Ppass&nbsp;–SREP2 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;admin&nbsp;health <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;go <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;admin&nbsp;who <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;go <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;admin&nbsp;who_is_down <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;go </font><br style="mso-special-character: line-break;"/><br style="mso-special-character: line-break;"/>没弄过,上面是别的地方看来的。</span></p>
页: [1]
查看完整版本: 请求配置双机系统SYBASE切换脚本

免责声明:
本站所发布的一切破解补丁、注册机和注册信息及软件的解密分析文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如有侵权请邮件与我们联系处理。

Mail To:Admin@SybaseBbs.com