December 13, 2018

Employ This SQL Stored Procedure to Rename a Column

You can not use the ALTER TABLE statement in SQL Server to rename a column in a table. You can however use the sp_rename stored procedure if you do not want to drop and recreate the table again. Here is an example of the sp_rename syntax: sp_rename ‘TABLE.OLD_COLUMN_NAME’, ‘NEW_COLUMN_NAME’, ‘COLUMN’;

How to troubleshoot CPU problems?

Diagnosing and troubleshooting CPU problems in production that too in cloud environment can become tricky and tedious. Your application might have millions of lines of code, trying to identify exact line of code that is causing the CPU to spike up, might be equivalent of finding needle in the haystack. In this article let???s learn how to find that needle (i.e. CPU spiking line of code) in matter of seconds/minutes. To help readers better understand this troubleshooting technique, we built a sample application and deployed it in to AWS EC2 instance. Once this application was launched it caused CPU consumption to spike up to 199.1%. Now let???s walk you through the steps that we followed to troubleshoot this problem.