User1253338400 posted
I am trying to get login names via the following:
use testdb;
If not exists(Select * from sys.database_principals where name = 'testuser')
and not Exists(SELECT * from master.sys.sql_logins where name = 'testuser')
but it gives error:
Reference to database and/or server name in 'master.sys.sql_logins' is not supported in this version of SQL Server.
How can i get these users from the testdb bty referencing the master ?