Database Reference
In-Depth Information
It is possible to convert these statements to natively compiled stored procedures. The
following code creates a natively compiled stored procedure that selects data from
the t1 table based on the users:
CREATE PROCEDURE dbo.usp_selt1 @userid int
WITH NATIVE_COMPILATION, SCHEMABINDING, EXECUTE AS OWNER
AS
BEGIN ATOMIC
WITH (TRANSACTION ISOLATION LEVEL = SNAPSHOT, LANGUAGE = N'us_
english')
select t1id, userid, createddate, totalprice from dbo.t1
where t1.t1id = @userid
order by t1id
END
GO
EXEC usp_selt1 1
GO
The DLLs for the natively compiled stored procedures can be found in the following
location for a default instance of SQL Server 2014:
C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Binn\
Xtp
The following code will give you a list of all the In-Memory OLTP objects that have
been natively compiled:
SELECT name, description FROM sys.dm_os_loaded_modules
where description = 'XTP Native DLL'
This code returns the name and location of the DLLs currently loaded into memory
as can be seen in the following screenshot:
The name of the DLL is prefixed with xtp and then a t or p depending on whether
it is a stored procedure or table. In-Memory OLTP tables get compiled too and then
derived from database_id and object_id .
 
Search WWH ::




Custom Search