Database Reference
In-Depth Information
The first procedure includes a NOLOCK hint that can't be run against in-memory tables. The second procedure is
just a repeat of the procedure you've been working with throughout this chapter. After executing the script to create
both procedures, I can access the Native Compilation Advisor by right-clicking the stored procedure dbo.FailWizard
and selecting Native Compilation Advisor from the context menu. After getting past the wizard start screen, the first
step identifies a problem with the procedure, as shown in Figure 23-17 .
Figure 23-17. The Native Compilation Advisor has identified inappropriate T-SQL syntax
Pay special attention to the note at the top of Figure 23-17 . It states that all tables must be memory-optimized
tables in order to natively compile the procedure. But, that check is not part of the Native Compilation Advisor checks.
Clicking Next as prompted, you can then see the problem that was identified by the wizard, as shown in
Figure 23-18 .
Figure 23-18. The problem with the code is identified by the Native Compilation Advisor
The wizard shows the problematic T-SQL, and it shows the line on which that T-SQL occurs. That's all that's
provided by this wizard. If I run the same check against the other procedure, dbo.WizardPass , it just reports that there
are not any improper T-SQL statements. There is no additional action to compile the procedure for me. To get the
procedure to compile, it will be necessary to add the additional functionality as defined earlier in this chapter. Except
for this syntax check, there is no other help for natively compiling stored procedures.
Search WWH ::




Custom Search