Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Sybase ASE 12.5.4

As per the title, I'l looking for a way where creating a login or changing it's password on dataserver A also happens on dataserver B, and vice-versa.

Would it be possible to replace master..syslogins on B with a proxy_table pointing to A? I've tried it but could not drop local syslogins (would probably cause havoc anyway).

Any other suggestions?

share|improve this question

3 Answers 3

up vote 0 down vote accepted

One way to keep syslogins syncronised is just to bcp it between dataservers, but you'd have to do that every time a password is changed. Running it regularly from cron may be sufficient.

If you configure authentication via an LDAP server then this would keep passwords in sync, but I haven't used this feature so I'm not sure exactly how password changes are handled.

share|improve this answer
    
Looks like I'll be going old-school and BCPing syslogins (with various checks and logic) as a scheduled job. LDAP is out, as we don't want users to be able to access via SQL command line client. –  user16579 Jan 15 '10 at 4:31

BCP works, you have to set config option "allow updates to system tables" to 1. It's also safest to leave alone the first few suids (sa, probe etc).

A more advanced technique is to rewrite sp_addlogin and sp_password to do this synchronisation for you. But these are system procedures, so you may be better writing a wrapper and calling that, it can in turn call the system sprocs on each server. I guess it depends how your users change password.

This is an age old problem in sybase replication (particularly warm standby) so there are plenty of options out there.

If this is for a warm standby solution then you need to ensure that the suid for a particular login name is always the same on each server, as that is the only link to the actual user account in the database. The database permissions in turn are linked to the user account. So get mixed up suids and you can have different permissions on server A and B.

share|improve this answer
    
Actually I tried using sp_extrapwdchecks, which Sybase automatically calls when sp_password is called. I tried to make it call out to the other dataserver and do the password change there too, but it would not connect (even though I can connect OK using connect to). –  user16579 Jan 15 '10 at 4:28

Here are the steps. 1) Take B...master..syslogins data out. (Safer side). 2) BCP out the A..master..syslogins from Server A(Except sa login). 3) Delete the B..master..syslogins data (except sa login) and BCp in the data by enabling the allow updates option. Once BCP in done you can disable it. It will work if you can write and test a script.

Thanks Naveen.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.