You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)](and later) and [!INCLUDE[ssSDS](../../includes/sssds-md.md)] you can perform ALTER operations on natively compiled stored procedures and other natively compiled T-SQL modules such as scalar UDFs and triggers using the ALTER statement.
25
+
In [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] ([!INCLUDE[ssSQL15](../../includes/sssql15-md.md)]through [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)]) and [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)], you can perform `ALTER` operations on natively compiled stored procedures and other natively compiled [!INCLUDE[tsql](../../includes/tsql-md.md)] modules such as scalar UDFs and triggers using the `ALTER` statement.
26
26
27
-
When executing ALTER on a natively compiled T-SQL module, the module is recompiled using a new definition. While recompilation is in progress, the old version of the module continues to be available for execution. Once compilation completes, module executions are drained, and the new version of the module is installed. When you alter a natively compiled T-SQL module, you can modify the following options.
27
+
When executing `ALTER` on a natively compiled [!INCLUDE[tsql](../../includes/tsql-md.md)] module, the module is recompiled using a new definition. While recompilation is in progress, the old version of the module continues to be available for execution. Once compilation completes, module executions are drained, and the new version of the module is installed. When you alter a natively compiled [!INCLUDE[tsql](../../includes/tsql-md.md)] module, you can modify the following options.
28
28
29
29
- Parameters
30
-
31
30
- EXECUTE AS
32
-
33
31
- TRANSACTION ISOLATION LEVEL
34
-
35
32
- LANGUAGE
36
-
37
33
- DATEFIRST
38
-
39
34
- DATEFORMAT
40
-
41
35
- DELAYED_DURABILITY
42
36
43
37
> [!NOTE]
44
-
> Natively compiled T-SQL modules cannot be converted to non-natively compiled modules. Non-natively compiled T-SQL modules cannot be converted to natively compiled modules.
38
+
> Natively compiled [!INCLUDE[tsql](../../includes/tsql-md.md)] modules cannot be converted to non-natively compiled modules. Non-natively compiled T-SQL modules cannot be converted to natively compiled modules.
45
39
46
-
For more information on ALTER PROCEDURE functionality and syntax, see [ALTER PROCEDURE (Transact-SQL)](../../t-sql/statements/alter-procedure-transact-sql.md)
40
+
For more information on `ALTER PROCEDURE` functionality and syntax, see [ALTER PROCEDURE (Transact-SQL)](../../t-sql/statements/alter-procedure-transact-sql.md).
47
41
48
-
You can execute sp_recompile on a natively compiled T-SQL modules, which causes the module to recompile on the next execution.
42
+
You can execute [sp_recompile](../../relational-databases/system-stored-procedures/sp-recompile-transact-sql.md) on a natively compiled [!INCLUDE[tsql](../../includes/tsql-md.md)] modules, which causes the module to recompile on the next execution.
49
43
50
44
## Example
51
-
The following example creates a memory-optimized table (T1), and a natively compiled stored procedure (SP1) that selects all the T1 columns. Then, SP1 is altered to remove the EXECUTE AS clause, change the LANGUAGE, and select only one column (C1) from T1.
)WITH ( MEMORY_OPTIMIZED = ON , DURABILITY = SCHEMA_AND_DATA )
45
+
The following example creates a memory-optimized table (T1), and a natively compiled stored procedure (usp_1) that selects all the T1 columns. Then, usp_1 is altered to remove the `EXECUTE AS` clause, change the `LANGUAGE`, and select only one column (C1) from T1.
0 commit comments