Professional Documents
Culture Documents
• EXECUTE statement
• Used to execute stored procedures and other objects
such as dynamic SQL statements stored in a string
• Use two- or three-part naming when executing
stored procedures to avoid SQL Server having to
carry out unnecessary searches
Altering a Stored Procedure
• Security tokens
• Login token
• User token
• Enables impersonation
• Provides access to modules through
impersonation
• Impersonate server-level principals or logins by
using EXECUTE AS LOGIN
• Impersonate database-level principals or users by
using EXECUTE AS USER
Viewing Execution Context
Logon Information
Virtual machine: 20762C-MIA-SQL
User name: ADVENTUREWORKS\Student
Password: Pa55w.rd
• Best Practice