Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Proc Migration issue from 2000 to 2005

Author  Topic 

sponguru_dba
Yak Posting Veteran

93 Posts

Posted - 2009-08-06 : 01:51:26
Hi all


we have procedure in SQL Server 2000 which has having below code(somePart:


Code:
select * from master.dbo.sysXlogins where (xstatus & 16) > 0 AND srvid IS NULL

comments of this code is saying "to get users who having sysadmin fixed roles"

we migrated that procedure in to SQL server 2005,I modified the part of the query as below

Code:
select * from syslogins where sysadmin=1

we are aiming the procedure suppose to run on both SQL Server 2000 and 2005
is my modification make seance or I need to do some thing else.

Please advice me

Thanks in Advance


SNIVAS

ahmad.osama
Posting Yak Master

183 Posts

Posted - 2009-08-06 : 06:33:40
quote:
Originally posted by sponguru_dba

Hi all


we have procedure in SQL Server 2000 which has having below code(somePart:


Code:
select * from master.dbo.sysXlogins where (xstatus & 16) > 0 AND srvid IS NULL

comments of this code is saying "to get users who having sysadmin fixed roles"

we migrated that procedure in to SQL server 2005,I modified the part of the query as below

Code:
select * from syslogins where sysadmin=1

we are aiming the procedure suppose to run on both SQL Server 2000 and 2005
is my modification make seance or I need to do some thing else.

Please advice me

Thanks in Advance


SNIVAS



u need to try something else as the above thing will not run on 2005
and this will not work on 2000


select * from sys.syslogins where sysadmin=1
Go to Top of Page

sponguru_dba
Yak Posting Veteran

93 Posts

Posted - 2009-08-06 : 06:38:04
Oh Greate
thanks for rpl,is this ok

"select * from master.dbo.syslogins where sysadmin=1"

SNIVAS
Go to Top of Page

ahmad.osama
Posting Yak Master

183 Posts

Posted - 2009-08-06 : 06:47:15
quote:
Originally posted by sponguru_dba

Oh Greate
thanks for rpl,is this ok

"select * from master.dbo.syslogins where sysadmin=1"

SNIVAS



yes.. if it's working it's certainly Ok.... :)
Go to Top of Page
   

- Advertisement -