Azure SQL Database Automatic Tuning Feature


What is Azure Automatic Tuning Feature

Microsoft Azure SQL Database Automatic tuning one of the monitoring and tuning features we can use it on Azure SQL for more information about other monitoring and tuning services check this Article, Automatic tuning is a fully managed intelligent performance service used for collecting the Azure SQL Database Workload and monitor queries executed on a database continuously, and it is working based on AI Artificial intelligence and ML Machine Learning technologies, with Automatic tuning Azure SQL will automatically capture all of the performance issues and analyze it then will create a new index or drop index  based on the performance case, even one of the capabilities of this services after applying the performance solution it will be under validating based on the AI and ML technologies and if the Azure Automatic tuning found this solution not fixed the issue, it will rollback it automatically, all of this actions will be recorded in the logs to be able to track it

Continue reading “Azure SQL Database Automatic Tuning Feature”

What is New in SQL Server 2016 Management Studio


Hello my followers today i will speak in very good Point in SQL Server 2016 all we are working on SSMS (SQL Server Mangment Studio) and we should now the options in this tools and what is the new on it so today we will show the new features in SQL Server 2016 Management Studio then later will explain deeply this features if it needed

  • In the installation you find new tape for Tempdb Configuration 
  • Check for Update : ( Now we can update the SQL Server Management Studio alone you will find it under tools )
  • 1- SSMS Update
  • Save Open Queries in SQL Server Management Studio (Tools > options > Query Execution > Prompt to save unsaved T-SQL Query Windows on Close)

Save unsaved T-SQL

Continue reading “What is New in SQL Server 2016 Management Studio”

Customized Database-Server Alert Part#2


Hi my followers today i will complete on the series of the SQL Server Customized Database-Server Alert as i started the first post Part#1 and i explained on it on of the most important Database alert (SQL Server Database alert) and i do one Stored procedure to monitor the database status and to send Immediate alert and today i will add two new alerts :

Part#1 

Read_only Database Report : 

USE msdb
GO
SET QUOTED_IDENTIFIER ON
SET ANSI_NULLS ON
GO

— =============================================
— Author: Mustafa EL.Masry
— Create date: 16/09/2015 01:52 PM
— Description: Report by all Database are in read_only Mode
— We are Exceulded the Drive Name E
— =============================================
Create Proc [dbo].[ReadOnlyDatabasesReport]
@profile_name_P Nvarchar(500) =’DBMailProfile’,@recipients_P Nvarchar(500) =’SQLGULF@MostafaElmasry.com’
AS
begin
Set NOCount on
declare @p_subject Nvarchar(500)
SET @p_subject = N’Databases in Read_Only Mode on DB Cluster ‘ + ( CAST((SELECT SERVERPROPERTY(‘ServerName’)) AS nvarchar))

—Send the mail as table Formate
if(select count(*) from sys.databases where is_read_only <> 0 )>0
Begin
DECLARE @table NVARCHAR(MAX) ;
SET @table =
N'<H2 style=” color: red; ” >Read_only Mode Databases Report</H2>’ +
N’ <span style=” font-size: 16px;” >Urgnet this list by Databases are in the Read_only mode please take immediate action to fix it or Exclude it from the Alert </span>’ +
N'<table border=”1″>’ +
N'<tr><th>Database Name</th><th>Database Status</th></tr>’ +
CAST ( ( Select td=name, ”,td=is_read_only from sys.databases where is_read_only <> 0
FOR XML PATH(‘tr’), TYPE
) AS NVARCHAR(MAX) ) +
N'</table>’ ;
EXEC msdb.dbo.sp_send_dbmail
@profile_name=@profile_name_P, –Change to your Profile Name
@recipients=@recipients_P, –Put the email address of those who want to receive the e-mail
@subject = @p_subject ,
@body = @table,
@body_format = ‘HTML’ ;

END
Else Print ‘All Databases are in Read_Write Mode’

END

Continue reading “Customized Database-Server Alert Part#2”

Customized Database-Server Alert Part#1


 

Problem 

AlertHello my Followers as we are working as Database administrators (DBA) we can’t stay on our office 24 hour we should enjoy and by the other things in the life but we still responsible about the stability of Production databases should be accessible in any time with the optimal performance so at this time we should leave something working 24 Hour in our servers to monitors the servers and send to us what is happening immoderately. the market have a lot of Product and lot of tools for Monitoring SQL Server from IO , CPU , backup , Security and Database Performance but not all the organization have the capital to provide you all of this tools at this time you should depend on your self because you are still the Responsible person In front of all the management so in this post and other posts i will publish very important and impressive Customized Database Alert depended on T-SQL (DMV Alert ) also i write in the SQL Server alert type or category and How we can configure it .

 

Part#1  , Part#2

SQL Server Database alert Type :

  1. Warning Alert
  2. Critical Alert
  3. OS Alert
  4. Customized Database alert (DMV_Alert) this point i will start with it because it is not easy like the previous points it is need some one have good Experience in T-SQL (handmade alert)

Customized database alert list :

this is List by the Database alerts i will explain it one by one and we will go deeply for each one to know the mechanizm of the Stored procedure and How it work and How we can update on it based on our work environment

  • Database status Report
  • Read_Only Database Report
  • Backup Running Now
  • Check backup History
  • Check_ServicesStatus_Reporting
  • Disabled SQL Server Jobs
  • Disk Space Alert
  • SQLServerRestartAlert_1
  • SQLServerRestartAlert_2
  • sp_check_log_shipping_monitor_alert
  • Trg_TrackLoginManagement (Secuirty Trigger)
  • Keep Your DB in Safe Mode (Database Drop/Edit Trigger)
  • Database DDL Alert
  • Job Status Alert (Job Status Trigger to catch any action happened on the jobs status)

I am not remember all the list i will update it ASAP now let us start by the first DMV Alert but before this we should know

Continue reading “Customized Database-Server Alert Part#1”

Cannot add new node in SQL Server 2014


Problem 

Hi my followers today i have task to build two new SQL Server Clusters when i am working i go to for adding new Node at this time i revived very new issue for me Rule “SQL Server Database Services feature state” failed

—————————
Rule Check Result
—————————
Rule “SQL Server Database Services feature state” failed. The SQL Server Database Services feature failed when it was initially installed. The feature must be removed before the current scenario can proceed.
—————————
OK
—————————

This error meaning When you are adding the first node the cluster installed with some issues and this relay what is happened with me when i installed the First node i faced some issues so based on that adding second node is blocked

How i can fix this issue :

  • To fix this issue at the first you should check the Cluster error log in the first node and try to do prepare for this node

If this step not success with you to fix this issue you can try the second solution :

  1. Go for the Run
  2. Write Regedit
  3. Go for this path (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQLServer\MSSQL12.MSSQLSERVER2014\ConfigurationState )
  4. Check all the value for all the Component if you found the value is 2 this meaning you have failures in this Component change it to 1

Component name :

MPT_AGENT_CORE_CNI, SQL_Engine_Core_Inst, SQL_FullText_Adv, SQL_Replication_Core_Inst

Note : to find the correct place in the registry you  after this path (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQLServer\) we have to know Our SQL Server Version and SQL Server instance name

  • SQL Server 2008     : MSSQL10.      (InstanceName)
  • SQL Server 2008R2 : MSSQL10_50. (InstanceName)
  • SQL Server 2012     : MSSQL11 .     (InstanceName)
  • SQL Server 2014     : MSSQL12.      (InstanceName)

I hope the issue and How to fix the issue is clear

Follow Us :

LinkedIn Slideshare ,Youtube Channel.MSDN POSTS , WHO WE ARE