Thursday, August 18, 2011

How to find SPID in SQL Server

SELECT @@SPID AS 'ID', SYSTEM_USER AS
      'Login Name', USER AS 'User Name'

Also ,
SELECT @@SPID

No comments:

Post a Comment

https://blog.sqlauthority.com/2009/06/27/sql-server-fix-error-17892-logon-failed-for-login-due-to-trigger-execution-changed-database-context...