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