user - login - alias mismatch

Hi,
After loading a database I found that
SELECT * FROM sysusers returns
       suid  uid  gid  name
       ----  ---  ---  ----
before    1    1    0  dbo
 after   14    1    0  dbo
suid 1 is sa while suid 14 is a login with sso and sa priviledges.
All our database users are aliased to dbo.
This move(load) seems that have broken something.
Is there a way to change the suid for dbo?
thanks

1
Guy
6/15/2001 6:13:12 PM
📁 sybase.ase.general
📃 8655 articles.
⭐ 0 followers.

💬 3 Replies
👁️‍🗨️ 3452 Views


gbourdon@dinmar.com wrote...
> Hi,
> 
> After loading a database I found that
> 
> SELECT * FROM sysusers returns
> 
>        suid  uid  gid  name
>        ----  ---  ---  ----
> before    1    1    0  dbo
>  after   14    1    0  dbo
> 
> suid 1 is sa while suid 14 is a login with sso and sa priviledges.
> All our database users are aliased to dbo.
> This move(load) seems that have broken something.
> Is there a way to change the suid for dbo?
> 
> thanks
You need to turn on "allow update to system tables" and then run an update that makes the 
suid values in the database match those that are in the syslogins table in the master 
database.  I used to have a script to do this but it has been too long since I needed.
-- 
Jim Egan [TeamSybase]
Senior Consultant
Sybase Professional Services
Sybase TechWave 2001 http://www.sybase.com/events/techwave2001
August 12th - 16th, San Diego
0
Jim
6/16/2001 4:30:19 AM
You can try the stored procedure
"sp_chanegdbowner, sa, true".  The true will transfer the aliases to the 
new database owner.  If the database was loaded from another server, the 
suid of users may change.  You may need to drop and re-add aliases to 
insure correct access. 
Use "select suser_name(suid) Uname, suser_name(altsuid) AliasTo
from sysalternates"  to list current aliases.
0
wkraatz
6/18/2001 3:30:12 PM
Give this a try.  It works for us.
sp_configure "allow updates",1
go
use <yourdatabase>
go
UPDATE sysusers
SET sysusers.suid = syslogins.suid
FROM DBSglep.dbo.sysusers sysusers, master.dbo.syslogins syslogins
WHERE sysusers.name = syslogins.name
go
sp_configure "allow updates",0
go
HTH, Scott

"Guy Bourdon" <gbourdon@dinmar.com> wrote in message
news:lmoHJpc9AHA.261@forums.sybase.com...
> Hi,
>
> After loading a database I found that
>
> SELECT * FROM sysusers returns
>
>        suid  uid  gid  name
>        ----  ---  ---  ----
> before    1    1    0  dbo
>  after   14    1    0  dbo
>
> suid 1 is sa while suid 14 is a login with sso and sa priviledges.
> All our database users are aliased to dbo.
> This move(load) seems that have broken something.
> Is there a way to change the suid for dbo?
>
> thanks
>
>
>

0
Scott
6/20/2001 5:10:30 PM
Reply: