About 40,700 results
Open links in new tab
  1. EXECUTE (Transact-SQL) - SQL Server | Microsoft Learn

    Nov 18, 2025 · The EXEC or EXECUTE statement can be used to send pass-through commands to linked servers. Additionally, the context in which a string or command is executed can be …

  2. sp_executesql (Transact-SQL) - SQL Server | Microsoft Learn

    Nov 18, 2025 · sp_executesql executes a Transact-SQL statement or batch that can be reused many times, or one that is built dynamically.

  3. Execute a Stored Procedure - SQL Server | Microsoft Learn

    Nov 18, 2025 · This article describes how to execute a stored procedure in SQL Server by using SQL Server Management Studio or Transact-SQL. There are different ways to execute a …

  4. Specify Parameters in a Stored Procedure - SQL Server

    Nov 18, 2025 · For example, if the procedure my_proc expects three parameters named @first, @second, and @third, the values passed to the procedure can be assigned to the parameter …

  5. EXECUTE AS (Transact-SQL) - SQL Server | Microsoft Learn

    Dec 17, 2024 · When an EXECUTE AS statement is run, the execution context of the session is switched to the specified login or user name. After the context switch, permissions are …

  6. sp_start_job (Transact-SQL) - SQL Server | Microsoft Learn

    Jun 23, 2025 · You can grant EXECUTE permissions on this procedure, but these permissions might be overridden during a SQL Server upgrade. Other users must be granted one of the …

  7. sys.dm_exec_sessions (Transact-SQL) - SQL Server

    Nov 18, 2025 · Use sys.dm_exec_sessions to first view the current system load and to identify a session of interest, and then learn more information about that session by using other dynamic …

  8. Return Data From a Stored Procedure - SQL Server

    Nov 18, 2025 · Next, execute a batch that declares a local cursor variable, executes the procedure to assign the cursor to the local variable, and then fetches the rows from the cursor.

  9. Grant Permissions on a Stored Procedure - SQL Server

    Nov 18, 2025 · Copy and paste the following example into the query window and select Execute. This example grants EXECUTE permission to all stored procedures that exist, or will exist, in …

  10. sys.dm_exec_requests (Transact-SQL) - SQL Server

    Nov 18, 2025 · To execute code that is outside SQL Server (for example, extended stored procedures and distributed queries), a thread has to execute outside the control of the non …