Question : test login/user

without manually connecting and testing, is it possible for a sa to test if the login/user has connect privileges fine (if password works ok etc) through t-sql code? basically something equivalent to 'test' button in ssis..

thanks

Answer : test login/user

Ok, Hope you want to check from sa login right. In that case, then you can run the script below

select * from sys.syslogins
where hasaccess = 1
and sid = SUSER_ID ('name')

If a row is returned, then the login has connect privileges else it is not.
Random Solutions  
 
programming4us programming4us