sysusers table status column problem in SQL2005 | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

sysusers table status column problem in SQL2005

Hi everyone I have a problem about sysusers table in sql2005.
if you run the query in SQL2000 select * from sysusers where status = 2
and you can see the users which are created as sqlauthentication.
But in sql2005 status column equals 0 for sql authenticated users.
Is this a bug or the sturucture of the sysusers table is changed???
And how can i query the sql authenticated users in sql2005.
In sql server 2000 to get the SQL User… i am not sure your method is correct… what the documentation says is STATUS is only for internal use… There are other column using which you can get this… issqluser=1 is the most appropriate one.. I don’t think its a bug…
in 2005 use catelog views
select *from sys.database_principals where type=’s’
select *from sys.sysusers where issqluser=1
select *from sysusers where issqluser=1 Madhu
thanks for your reply. i now that it was internal use but it was giving me the right answer.
without username ‘public’.
You can check it in SQL2000. I think they change the structure. now i will use
select *from sysusers where issqluser=1 and uid > 4 thanks again…

You are correct… in sql 2000 it was giving you what you want but at the same time MS recomend us not use this info becuase it changes version to version…. So you can’t claim it is giving icorrect or inaccurate information…. MohammedU.
By the I forgot to mention….
You can use "issqluser" to check the user is SQL or WINDOWS… MohammedU.
thank you very much