Tag Info

Hot answers tagged

6

Multiple ways to get this information: SELECT APP_NAME(); SELECT PROGRAM_NAME(); SELECT [program_name] FROM sys.dm_exec_sessions WHERE session_id = @@SPID; Just keep in mind that it can be spoofed in the connection string or in Management Studio's connection properties. If I connect using the following parameter, all three of the above will return ...


1

You can find the logins on an instance by querying sys.server_principals and checking the is_disabled column to know if they are still useable. SELECT name, type_desc, is_disabled FROM sys.server_principals WHERE type IN ('U','S') The other notes you have in your question though indicate that this request is based on an application table. You state things ...



Only top voted, non community-wiki answers of a minimum length are eligible