Monday, July 05, 2010

Difference between sysxlogins and syslogins in SQL 2000 and 2005

In SQL 2005
System table sysxlogins(master database) is removed from SQL 2005.
and SysObjects and SysUsers are changed from System table to View



-- In SQL 2000
use master
go
select * from sysobjects where name in ('sysxlogins' ,'syslogins') order by xtype
select * from sysobjects where name in ('sysobjects','sysusers') order by xtype


sp_help sysxlogins --system table
go
sp_help syslogins-- view

sp_help sysobjects --system table
go
sp_help sysusers --system table
----------------------------------------------------------

-- In SQL 2005
use master
go
select * from sysobjects where name in ('sysxlogins' ,'syslogins') order by xtype
select * from sysobjects where name in ('sysobjects','sysusers') order by xtype


sp_help sysxlogins --system table is REMOVED no longer exists
go
sp_help syslogins-- view


sp_help sysobjects --VIEW
go
sp_help sysusers --VIEW