SQL Server Memory Optimization Advisor, SQL Server 2014

Dear Friends,

I hope you enjoyed my last week’s blog post on In-Memory OLTP. Very recently, Microsoft released SQL Server 2014 CTP2 with some cool set of new features. SQL Server Memory Optimization Advisor tool is introduced to implement In-memory technology as part the release which I believe is one of the coolest features to have in place.  Today I’ll explore this tool and find out how we can implement memory optimized tables using the same. For demo, I’ve created a database MemOptAdvisor and a standard table tblEmpoyee which will be converted to memory optimized one with the help of this tool.

You just need to right click on the table here in my case it is tblEmpoyee to launch this tool;

1_SQL_Server_Memory_Optimization_Advisor_SQL_Server_2014

Once you click on Memory Optimization Advisor, tool will launch with detailed description on what it capable of doing;

2_SQL_Server_Memory_Optimization_Advisor_SQL_Server_2014

Clicking next takes you to the next screen with an analysis on the selected object. In case of anything which prevents you in converting the object to a memory optimized table, tool is capable enough to report the same, make sure you analyze them very carefully. In my case it is green;

3_SQL_Server_Memory_Optimization_Advisor_SQL_Server_2014

When you click next, tool shows up the migration warnings which you may want to FIX up which again very nice to have and I did FIX warning shown in my case by selecting different collation later part of this post;

4_SQL_Server_Memory_Optimization_Advisor_SQL_Server_2014

Next step force you to select options for your memory optimized objects i.e. filegroup name, logical name, file path. You also have the option to rename original table, copy data to new memory optimized object and a checkbox which enables you to specify if the table needs to be moved as no data durability, by default it is both schema/data durability. It also displays estimated current memory cost in MB.

   

5_SQL_Server_Memory_Optimization_Advisor_SQL_Server_2014

Next screen lets you decide on name for primary key, type of index, HASH bucket, change column level collation etc. (I fixed my warning here however you may decide based on your environment);

6_SQL_Server_Memory_Optimization_Advisor_SQL_Server_2014

Summary screen is quite self-explanatory of what your selection is when you click next. You can generate script here if you want to;

7_SQL_Server_Memory_Optimization_Advisor_SQL_Server_2014

You are done when you click Migrate button but this process may take a while to finish based on size of object and number of records;

8_SQL_Server_Memory_Optimization_Advisor_SQL_Server_2014

Now, when you expand Tables node on respective database, see that you have two tables, one with suffix _old and new one that we created as part of the demo;

9_SQL_Server_Memory_Optimization_Advisor_SQL_Server_2014

I’ve tried this using SQL Server 2014 CTP2 and final release of the product may introduce us with more advanced options. Overall, this tool is very user friendly with explanations, warnings on what it is capable of and definitely help users to FIX issues before implementing In-Memory technology.

 

Regards

Kanchan Bhattacharyya

Like us on FaceBook Follow us on Twitter | Join the fastest growing SQL Server group on FaceBook

Follow me on TwitterFollow me on FaceBook

   

About Kanchan Bhattacharyya

Kanchan is an astute IT professional, a seasoned SQL Database Administrator with 13+ years of industry experience. A calculated risk taker with deep technical knowledge and has gained proficiency in database consulting and solutions across different environments. Kanchan holds MBA degree in IT and an International Executive MBA in Project Management. He is very passionate about SQL Server and holds MCSE (Data Platform), MCSA – SQL 2012, MCITP – SQL 2008 certifications. Currently he is focusing on cloud and latest releases of SQL Server. When not working, Kanchan likes to spend his time reading on new technical developments specifically on SQL Server and other related technologies.

View all posts by Kanchan Bhattacharyya →

Leave a Reply

Your email address will not be published.