Senaste inläggen 

Taggar 

connect     2000     constraint     undocumented procedures     CTE     2011     SSIS     page splits     SSAS     history     CU3     sql browser     login error     SQL Denali     0xC0010014     DTA     DECIMAL     feedback     CU1     create index     clean up     #am_get_querystats     CTP1     SSRS 2008     2005     AcquireConnection     transactions     sp1     SQL2008     parameters     2008     Extended Event     Logins     HEAP     Reports     dbmail     error     BOL     improve     parallelism     function     performance     Techdays     sql 2008     CMS     Page life expectancy     concatenation     reorganize index     access denied     0xC0202009     SQL server codename Denali     security     resource governor     sp_MSForEachDB     data warehouse     platsannons SQL utvecklare     XP_cmdshell     bugs     Business Intelligence     features     temp table     SSRS     package load     filter     SQL Server 2012     central management server     Trace Flag     Microsoft     Cluster     gratis verktyg     sql 2005     rebuild     virtuell     SQL Server     T-SQL     Activity Monitor     Datawarehouse     Säkerhet     connection     HADR     profile

SQL Server mystery: Hekaton tables and Hekaton Procedures

Skrivet den 12 juni 2012 i T-SQL, SQL Server 2008, SQL Server 2008R2, SQL Server 2012, Level 500, SQL Server maintenance, Steinar Andersen, sv, en

Have you ever heard of Hekaton Tables and Hekaton Procedures in SQL Server? Neither had I until recently. And it seems neither have Google. I happened to stumble upon the mention of these mysterious object, and tried to find out more, but had no luck. But I wanted to share what I have seen of is so far, and ask you, the readers of our blog, if you might have some light to shed on this? If so, please comment on this blogpost.

To find the mention of Hekaton on your own SQL Server instance, run the following code:

select * from syscomments where text like '%hekaton%'

That should generate an output that indicates that sp_updatestats, sp_createstats and sp_recompile contains the word Hekaton.

The relevant lines of code are as follows:

from "sp_helptext sp_createstats":

   -- filter out local temp tables, Hekaton tables, and tables for which current user has no permissions

   -- Note that OBJECTPROPERTY returns NULL on type="IT" tables, thus we only call it on type='U' tables

   if (

      (@@fetch_status <> -2) and

      (substring(@tablename, 1, 1) <> '#') and -- temp tables

      ((@table_type<>'U') or (0 = OBJECTPROPERTY(@table_id, 'TableIsInMemory'))) and -- Hekaton table

from "sp_helptext sp_updatestats"

   -- filter out local temp tables and Hekaton tables

   -- Note that OBJECTPROPERTY returns NULL on type="IT" tables, thus we only call it on type='U' tables

   if ((@@fetch_status <> -2) and

      (substring(@table_name, 1, 1) <> '#') and  -- temp tables

      ((@table_type<>'U') or (0 = OBJECTPROPERTY(@table_id, 'TableIsInMemory')))) -- Hekaton tables

from "sp_helptext sp_recompile"

   -- Hekaton procedure cannot be recompiled

   -- Make them go through schema version bumping branch, which will fail

       ObjectProperty(@objid, 'ExecIsCompiledProc') = 0)

None of that really tells us exactly what Hekaton tables and Hekaton procedures are, but might give some clues. The undocumented OBJECTPROPERTY(@table_id, 'TableIsInMemory') call (another mystery...) seems to indicate that it could possibly be connected to memory, caching or even the old and removed feature of DBCC PINTABLE? That would be a real surprise in that case.

The comments tells us the following: Hekaton Procedures cannot be recompiled using sp_recompile Hekaton tables can not update or create stats using sp_updatestats and sp_createstats

I know that this is not much, but if you have more information about this little mystery, please comment it on this blogpost or mail me at firstname.lastname@sqlservice.se

 

Skriv en kommentar

  • Lookup SQL Server 2014 In Memory OLTP. Hekaton is the codemanme for this incarnation of in memory SQL database that is coming with SQL Server 2014

    By tester