Difference between revisions of "Replicating System Procedures like sp addlogin / sp password / etc."

From SybaseWiki
Jump to: navigation, search
Line 510: Line 510:
 
[http://www.donx.de/blog/ballgowns/ ball gowns]
 
[http://www.donx.de/blog/ballgowns/ ball gowns]
 
[http://www.privetparis.com/blog/rtgcasinobonus/ rtg casino bonus]
 
[http://www.privetparis.com/blog/rtgcasinobonus/ rtg casino bonus]
 +
</div>
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
<div  style="display:none">
 +
[We are delicate. We do not delete your content.]
 +
[l_sp20]
 +
 +
 +
[http://www.buddyprofile.com/viewprofile.php?username=waterfordcrystal waterford crystal]
 +
[http://www.buddyprofile.com/viewprofile.php?username=swarovskicrystal swarovski crystal bead]
 +
[http://www.buddyprofile.com/viewprofile.php?username=mesotheliomalawsuits mesothelioma lawsuits]
 +
[http://www.buddyprofile.com/viewprofile.php?username=mesotheliomasymptoms mesothelioma symptoms]
 +
[http://www.buddyprofile.com/viewprofile.php?username=mesotheliomadiag mesothelioma diagnosis]
 +
[http://www.buddyprofile.com/viewprofile.php?username=wacoalbras wacoal bras]
 +
[http://www.buddyprofile.com/viewprofile.php?username=teenbra teen bra]
 +
[http://www.buddyprofile.com/viewprofile.php?username=unsecuredloan unsecured signature loan]
 +
[http://www.buddyprofile.com/viewprofile.php?username=homeloans Countrywide Home Loans]
 +
[http://blog.moddingplanet.it/?w=formalpromdresses Formal Prom Dresses]
 +
[http://blog.moddingplanet.it/?w=sexypromdress Sexy Prom Dress]
 +
[http://blog.moddingplanet.it/?w=cocktaildresses cocktail dresses]
 +
[http://www.buddyprofile.com/viewprofile.php?username=telmobile TMobile]
 +
[http://www.buddyprofile.com/viewprofile.php?username=watersoftener water softener]
 +
[http://www.buddyprofile.com/viewprofile.php?username=tanklesswaterheater tankless water heater]
 +
[http://www.buddyprofile.com/viewprofile.php?username=rockportshoes rockport shoes]
 +
[http://www.buddyprofile.com/viewprofile.php?username=osmosiswaterfilter reverse osmosis water filter]
 +
[http://www.buddyprofile.com/viewprofile.php?username=merrellshoes merrell shoes]
 +
[http://www.buddyprofile.com/viewprofile.php?username=oscardresses oscar dresses]
 +
[http://www.buddyprofile.com/viewprofile.php?username=easterdresses easter dresses]
 +
[http://flyfone.blox.pl/resource/flyfonevoip.htm flyfone voip]
 +
[http://www.buddyprofile.com/viewprofile.php?username=plussizepromdresses plus size prom dresses]
 +
[http://www.buddyprofile.com/viewprofile.php?username=discountpromdresses discount prom dresses]
 +
[http://blog.moddingplanet.it/?w=hooterscasinolas Hooters Casino Las Vegas]
 +
[http://blog.moddingplanet.it/?w=grandcasinomille grand casino mille lacs]
 +
[http://blog.moddingplanet.it/?w=lasvegascasino las vegas casino coupons]
 +
[http://blog.moddingplanet.it/?w=onlinepokeraide online poker aide]
 +
[http://www.donx.de/blog/pechangacasino pechanga casino]
 +
[http://www.donx.de/blog/grandvictoriacasino/ grand victoria casino]
 +
[http://www.donx.de/blog/ballgowns/ ball gowns]
 +
[http://www.privetparis.com/blog/rtgcasinobonus/ rtg casino bonus]
 +
 +
[http://blog.moddingplanet.it/?w=rtgcasinobonus rtg casino bonus]
 +
[http://blog.moddingplanet.it/?w=grandcasinocoushat grand casino coushatta]
 +
[http://blog.moddingplanet.it/?w=grandcasinohinckle grand casino hinckley]
 +
[http://blog.moddingplanet.it/?w=isleofcapricasino isle of capri casino]
 +
[http://blog.moddingplanet.it/?w=mohegansuncasino mohegan sun casino]
 +
[http://blog.moddingplanet.it/?w=palacasino pala casino]
 +
[http://blog.moddingplanet.it/?w=roulettewheels roulette wheels]
 +
[http://blog.moddingplanet.it/?w=winstarcasino winstar casino]
 +
[http://blog.moddingplanet.it/?w=cheappromdresses Cheap Prom Dresses]
 +
[http://blog.moddingplanet.it/?w=informalweddingdre informal wedding dresses]
 +
[http://blog.moddingplanet.it/?w=oscardresses oscar dresses]
 +
[http://blog.moddingplanet.it/?w=eveninggowns evening gowns]
 +
 +
[http://vvvvvv.blox.pl/resource/throat_pokers.htm throat pokers]
 +
[http://vvvvvv.blox.pl/resource/online_poker_assistant.htm online poker assistant]
 +
[http://vvvvvv.blox.pl/resource/online_poker_tracker.htm online poker tracker]
 +
[http://vvvvvv.blox.pl/resource/online_poker_aide.htm online poker aide]
 +
[http://vvvvvv.blox.pl/resource/party_poker_bonus.htm party poker bonus]
 +
[http://vvvvvv.blox.pl/resource/party_poker_bonus_code.htm party poker bonus code]
 +
[http://vvvvvv.blox.pl/resource/bonus_code_party_poker.htm bonus code party poker]
 +
[http://vvvvvv.blox.pl/resource/bonus_code_deposit_party_poker.htm bonus code deposit party poker]
 +
[http://vvvvvv.blox.pl/resource/party_poker_bonus_codes.htm party poker bonus codes]
 +
[http://vvvvvv.blox.pl/resource/carnival_cruises.htm carnival cruises]
 +
[http://vvvvvv.blox.pl/resource/carnival_game_rentals.htm carnival game rentals]
 +
[http://vvvvvv.blox.pl/resource/fuzzydice.htm fuzzy dice]
 +
[http://vvvvvv.blox.pl/resource/bingodaubers.htm bingo daubers]
 +
[http://vvvvvv.blox.pl/resource/bingoblowers.htm bingo blowers]
 +
[http://vvvvvv.blox.pl/resource/motor_scooters.htm motor scooters]
 +
[http://vvvvvv.blox.pl/resource/mini_harley_chopper_scooter.htm mini harley chopper scooter]
 +
[http://blog.moddingplanet.it/?w=fakerolex fake rolex]
 +
 +
[http://blog.moddingplanet.it/?w=bextravioxx bextra vioxx]
 +
[http://blog.moddingplanet.it/?w=zocor zocor]
 +
[http://blog.moddingplanet.it/?w=zithromax zithromax]
 +
[http://blog.moddingplanet.it/?w=bextralawyernew bextra lawyer new hampshire]
 +
[http://blog.moddingplanet.it/?w=akanesoma akane soma]
 +
[http://blog.moddingplanet.it/?w=kyosoma kyo soma]
 +
[http://blog.moddingplanet.it/?w=prozacnation prozac nation]
 +
[http://blog.moddingplanet.it/?w=prozacwithdrawal prozac withdrawal]
 +
[http://blog.moddingplanet.it/?w=simslots sim slots]
 +
[http://blog.moddingplanet.it/?w=pachisloslotmachine pachislo slot machines]
 +
[http://blog.moddingplanet.it/?w=programcherries program cherries wild slot machine]
 +
[http://blog.moddingplanet.it/?w=slotcarracing slot car racing]
 +
[http://blog.moddingplanet.it/?w=hoslotcars ho slot cars]
 +
 +
[http://blog.moddingplanet.it/?w=bingocages bingo cages]
 +
[http://blog.moddingplanet.it/?w=bingodaubers bingo daubers]
 +
[http://blog.moddingplanet.it/?w=bingoblowers bingo blowers]
 +
[http://blog.moddingplanet.it/?w=bingobags bingo bags]
 +
[http://blog.moddingplanet.it/?w=baccaratcrystal baccarat crystal]
 +
[http://blog.moddingplanet.it/?w=nexium nexium]
 +
[http://blog.moddingplanet.it/?w=onlinepaigowpoker online pai gow poker]
 +
[http://blog.moddingplanet.it/?w=leighkeno leigh keno]
 +
 +
[http://www.privetparis.com/blog/tramadol50mg/ tramadol 50mg]
 +
[http://www.privetparis.com/blog/tramadolsaturdaydelivery/ tramadol saturday delivery]
 +
[http://www.privetparis.com/blog/tramadoler/ tramadol er]
 +
[http://www.privetparis.com/blog/tramadolsales/ tramadol sales]
 +
[http://www.privetparis.com/blog/tramadolhcl50mg/ tramadol hcl 50 mg]
 +
[http://www.privetparis.com/blog/120tramadoll/ 120 tramadol]
 +
[http://www.privetparis.com/blog/acetaminophenhclpartramadol/ acetaminophen hcl par tramadol]
 +
[http://blog.moddingplanet.it/?w=plussizemother plus size mother of the bride dresses]
 +
[http://blog.moddingplanet.it/?w=cheapflowergirl cheap flower girl dresses]
 +
[http://blog.moddingplanet.it/?w=discountflowergirl discount flower girl dresses]
 +
[http://blog.moddingplanet.it/?w=infantflowergirl infant flower girl dresses]
 +
[http://blog.moddingplanet.it/?w=bridalflowergirl bridal flower girl dresses]
 
</div>
 
</div>

Revision as of 01:49, 27 May 2006

This seems to be a classic problem at warm-standby environments. Mark A. Parsons found a solution for this, but here is a much easier one. The description given below is a kind of template based on the requirement to replicate the execution of sp_addlogin. You can easily modify it for other Sybase supplied system stored procedures.

Please note that with ASE 15.0 ESD #2 the master database can now be replicated with any version of Replication Server that supports warm standby, including Replication Server version 12.0 and later. Replication of the master database is limited to system procedures and the commands used to manage logins and roles.

When you are not using 15.0 yet, you can follow these steps:

  • Setup a database (e.g. myDatabase) for warm standby as you normally do.
  • Grant the neccesary roles to the maintenance user to succesfully execute system stored procedures (like sso_role for sp_addlogin)
  • create a wrapper stored procedure like this template
use myDatabase
go
create procedure sp_addlogin @loginame varchar(30),
                             @passwd   varchar(31)
as
-- trick the RepAgent
commit tran
 
exec sybsystemprocs..sp_addlogin @loginame, @passwd
 
-- Start a new transaction (only at the standby side)
if  proc_role("replication_role") > 0
    begin tran
go
  • mark the new procedure for replication: sp_setrepproc sp_addlogin,"function"

That's all. Each execution of sp_addlogin in the myDatabase will create a login at the primary and the standby server.

Just a couple of remarks:

  • Do not execute the stored procedure in the primary database when "replication_role" is active for your login (run sp_activeroles to check). Under normal circumstances this should be no problem since replication_role is reserved for the maintenance user.
  • The template given above is not complete with regard to the parameters that need to be passed to sybsystemprocs..sp_addlogin. It's just a template.
  • even when a transaction fails on the primary side (for instance when the login already exists) it will be replicated to the standby side failing there as well. This will bring down the DSI connection. You can add some extra checks in the template to prevent common errors. To exit the procedure prematurely in those cases, do not give a "commit", but a "rollback".
  • When you do not need to replicate table modifications in the myDatabase, do not mark the database with sp_reptostandby. This is to prevent unnecessary transactions flowing through the RepAgent to the Replication Server.
  • This method has not been tested thorougly.
  • Do not mark the sp_addlogin stored procedure in sybsystemprocs for replication. When you do this, ASE adds an implicit "begin transaction" before the execution of the stored procedure, causing it to fail.
  • There is no need to change the Sybase supplied system stored procedures so this method is save with regard to upgrades.













[We are delicate. We do not delete your content.] [l_sp91] indoor tanning beds daybed comforter sets southwestern bedding leather sectional sofa thomasville bedding naturalizer shoes designer dog beds k1 visa fiancee visa rivotril cingular ringtone nail fungus bridesmaid dress formal prom dresses bcbg shoes tramadol hcl cingular ringtone bcbg shoes bridesmaid dress formal prom dresses nail fungus tanning bed bcbg shoes naturalizer shoes leather sectional sofa designer dog beds heated mattress pad bridesmaid dress 2006 prom dresses formal prom dresses sexy prom dresses cheap prom dresses nextel ringtone verizon ringtone cingular ringtone free sprint ringtone free nextel ringtone dianabol tribulus terrestris nutrex lipo 6 Tribex Xyience Vasopro caffeine pills scifit twinlab faxless payday loans











[We are delicate. We do not delete your content.] [l_sp894] indoor tanning beds daybed comforter sets southwestern bedding leather sectional sofa thomasville bedding naturalizer shoes designer dog beds k1 visa fiancee visa rivotril cingular ringtone nail fungus bridesmaid dress formal prom dresses bcbg shoes tramadol hcl cingular ringtone bcbg shoes bridesmaid dress formal prom dresses nail fungus tanning bed bcbg shoes naturalizer shoes leather sectional sofa designer dog beds heated mattress pad bridesmaid dress 2006 prom dresses formal prom dresses sexy prom dresses cheap prom dresses nextel ringtone verizon ringtone cingular ringtone free sprint ringtone free nextel ringtone sprint ringtones verizon ringtone dianabol tribulus terrestris nutrex lipo 6 Tribex Xyience Vasopro caffeine pills scifit twinlab faxless payday loans ringtone maker cash until pay day loan faxless payday loans no fax payday loans fash cash personal loans















[We are delicate. We do not delete your content.] [l_sp2006] http://top20man.in.ua/black-eyed-peas-mp3 black eyed peas mp3] madonna mp3 eminem mp3 ringtone maker godsmack awake godsmack voodoo sean paul temperature sean paul we be burnin bad day daniel powter system of a down mp3 sean paul mp3 metallica mp3 shakira mp3 rascal flatts what hurts the most rascal flatts bless the broken road red hot chili peppers under the bridge james blunt wisemen bad day daniel powter godsmack mp3 Godsmack Awake godsmack voodoo sean paul temperature Sean Paul We Be Burnin natasha bedingfield unwritten 50 cent mp3 Bad Day Daniel Powter Daniel Powter mp3 Goodbye My Lover James Blunt System Of A Down mp3 Sean Paul mp3 Metallica mp3 Shakira mp3 Black Eyed Peas mp3 Madonna mp3 eminem mp3 Fall Out Boy Grand Theft Autumn Jack Johnson mp3 oscar dresses mother of the bride dresses cocktail dresses Flower Girl Dresses Formal prom Dresses Plus Size Prom Dresses Free Verizon Ringtone godsmack i stand alone goodbye my lover james blunt [fall out boy grand theft autumn jack johnson mp3 natasha bedingfield unwritten 50 cent mp3 nextel ringtone bad day daniel powter daniel powter mp3 verizon ringtone US Cellular Ringtone free sprint ringtone verizon ringtone verizon ringtone bcbg shoes free sprint ringtones cheap prom dresses sexy prom dresses waterford crystal swarovski crystal bead mesothelioma lawsuits mesothelioma symptoms mesothelioma diagnosis Cingular Ringtone free kyocera ringtones Free Nextel Ringtone informal wedding dresses bridal gowns Discount Bridal Gowns Plus Size Swimwear no fax payday loans countrywide home loans fast cash loan guaranteed Naturalizer Shoes Free Kyocera Ringtone formal prom dresses Sexy Prom Dresses Naturalizer Shoestowel warmer Aero Bed












[We are delicate. We do not delete your content.] [l_sp2008]

ringtone maker verizon ringtone US Cellular Ringtone bcbg shoes waterford crystal swarovski crystal bead mesothelioma lawsuits mesothelioma symptoms mesothelioma diagnosis Naturalizer Shoes Free Kyocera Ringtone Sexy Prom Dresses Naturalizer Shoes Aero Bed Free Sprint Ringtones Free Verizon Ringtones free nextel ringtones sexy prom dress Formal Prom Dresses cheap prom dresses Plus Size Prom Dresses tiffany prom dresses erotic games strip poker pokemon trading card game rom hoyle card games buy ativan online buy ativan buy alprazolam online buy alprazolam cheap tramadol buy bontril online fentermine how to buy fioricet on line cheap ultram without prescription buy ultram without prescription teen bra Bra Teen Cleavage Micro Bikini Teens Bra sexy bras bulma bra sheer bra auto loan calculator Federal Student Loan Consolidation private student loan consolidation acs student loans countrywide home loans refinance home loan st louis wacoal bras teen bra unsecured signature loan Countrywide Home Loans
































[We are delicate. We do not delete your content.] [l_sp20]


waterford crystal swarovski crystal bead mesothelioma lawsuits mesothelioma symptoms mesothelioma diagnosis wacoal bras teen bra unsecured signature loan Countrywide Home Loans Formal Prom Dresses Sexy Prom Dress cocktail dresses TMobile water softener tankless water heater rockport shoes reverse osmosis water filter merrell shoes oscar dresses easter dresses flyfone voip plus size prom dresses discount prom dresses Hooters Casino Las Vegas grand casino mille lacs las vegas casino coupons online poker aide pechanga casino grand victoria casino ball gowns rtg casino bonus

rtg casino bonus grand casino coushatta grand casino hinckley isle of capri casino mohegan sun casino pala casino roulette wheels winstar casino Cheap Prom Dresses informal wedding dresses oscar dresses evening gowns

throat pokers online poker assistant online poker tracker online poker aide party poker bonus party poker bonus code bonus code party poker bonus code deposit party poker party poker bonus codes carnival cruises carnival game rentals fuzzy dice bingo daubers bingo blowers motor scooters mini harley chopper scooter fake rolex

bextra vioxx zocor zithromax bextra lawyer new hampshire akane soma kyo soma prozac nation prozac withdrawal sim slots pachislo slot machines program cherries wild slot machine slot car racing ho slot cars

bingo cages bingo daubers bingo blowers bingo bags baccarat crystal nexium online pai gow poker leigh keno

tramadol 50mg tramadol saturday delivery tramadol er tramadol sales tramadol hcl 50 mg 120 tramadol acetaminophen hcl par tramadol plus size mother of the bride dresses cheap flower girl dresses discount flower girl dresses infant flower girl dresses bridal flower girl dresses