I am Microsoft database consultant working as a Database administrator for more than +10 Years I have very good knowledge about Database Migration, Consolidation, Performance Tuning, Automation Using T-SQL, and PowerShell and so many other tasks I do it in multiple customers here in KSA and as of now, I am working in Bank Albilad managing the core banking system that is hosted in SQL Server Database 8 TB. Also, I am Microsoft certified 2008 and 2016 in SQL Server (2x MCTS, 2x MCTIP, MCSA, MCSE) and I am Microsoft Certified Trainer (MCT) also I am azure Certified (AZ-900, AZ-103) also I was awarded by Microsoft Azure Heroes 3 times as (Azure Content hero, Azure Community hero and Azure Mentor) For more information check my page
https://mostafaelmasry.com/about-me/
The DBCC command can be run on a database to correct inaccuracies of all objects in that database or you can also correct the inaccuracies of a single table by including that table name. If you would like to run the command for a particular database, then you can run the following command
DBCC UPDATEUSAGE (‘DATABASENAME’)
You can also run the below command to correct the inaccuracies for the current database
Today I will explain how to configure database mail in SQL Server 2005,2008,2012 , No difference between this version in the database mail configuration , database Mail is good Option in SQL Server because very easy in the Configuration and its very helpful I think ALL DBA use this option because this option he can Follow up his database . if you want to configure Database Mail you have to ways one is the Wizard ant the Way no Two is Coding and i like this way more than the wizard so let me sow to you how can you Configure Database Mail in SQL Server 2012 by Coding *** I say SQL Server 2012 because when I write this Article i make this Example in my SQL Server 2012 ****
Configure Database mail In SQL Server Steps
Step No one [Enable database Mail option]
use master
go
sp_configure ‘show advanced options’,1
go
reconfigure with override
go
sp_configure ‘Database Mail XPs’,1 —— Enable database Mail
–go
–sp_configure ‘SQL Mail XPs’,0 ——- Disable database mail
go
reconfigure
go
Step No Two [Create database mail Account]
EXECUTE msdb.dbo.sysmail_add_account_sp
@account_name = ‘safeerp’,
@description = ‘Mail account for Database Mail For safeerp Company Created By Mr/ Mostafa Elmasry’,
@description = ‘Profile used for database mail safeerp Company Created By Mr /Mostafa Elmasry’
Step No Four [Add the database mail account on the profile]
EXECUTE msdb.dbo.sysmail_add_profileaccount_sp
@profile_name = ‘safe’,
@account_name = ‘safeerp’,
@sequence_number = 1
Step No Five [Database mail profile Secuirty]
EXECUTE msdb.dbo.sysmail_add_principalprofile_sp
@profile_name = ‘safe’,
@principal_name = ‘public’, ——- you can write here Puplic or Private (Puplic) any User in SQL Server have permision to use the database mail but (private) the User Create he only can use the database mail.
@is_default = 1 ;
Final Step No Sex [Send Email by DataBase Mail SQL Server]
declare @body1 varchar(100)
set @body1 = ‘Server :’+@@servername+ ‘ My First Database Email ‘
,@body=’My Friend Kemo now i try to send new Email from my Databse mail Account’
,@query = ‘SELECT * FROM msdb..sysmail_allitems WHERE sent_status =”sent” ‘
/*
When you want to send mail like step no 6 you must learn the pramter to send it to the procedure [msdb.dbo.sp_send_dbmail] so lets check this pramter in this link http://msdn.microsoft.com/en-us/library/ms190307.aspx
*/
Now after you send the database mail sure you want to check the status for this mail so run tis script to check the mail status
SELECT * FROM msdb.dbo.sysmail_event_log
order by log_date
use msdb
exec sysmail_start_sp
GO
SELECT * FROM msdb..sysmail_allitems WHERE sent_status = ‘sent’
Server Core is a minimal server installation option for computers running on the Windows Server 2008 operating system or later. Server Core provides a low-maintenance server environment with limited functionality.
Server Core Requirements?
Windows server 2008 or later version .
Roles cans server core run .
Active Directory domain services (AD DS) (including Read only domain controllers RODS)
Active directory lightweight directory services (AD LDS)