Issue – Login failed for user ‘xxx’. Reason: Server is in single user mode. Only one administrator can connect at this time. Cause – Ensure SQL Server is not running in Single user mode by checking start-up parameter. if you see -m; it mean your SQL is running with single user mode. -m : Starts an… Read More Login failed for user ‘xxx’. Reason: Server is in single user mode. Only one administrator can connect at this time.
My Development team contacted me and said they are not able to access database “The server principal “XYZ\USER” is not able to access the database “YourDBName” under the current security context” when I looked into server server I found – Login was there and access was granted. When I looked into database I found user… Read More The server principal “XYZ\USER” is not able to access the database “YourDBName” under the current security context
If you ever encounter restart computer error message while performing SQL Server patching and you don’t have opportunity\permission to restart your machine. You can bypass this situation by deleting value from PendingFileRenameOperations key. Here are the steps which you need to follow –> To Open Registry Editor. Click Start ( win + R ) –> Run,… Read More How to bypass restart computer error message while installing SQL Patch
SQL Server 2012 Upgrade from Standard Edition to Enterprise edition Step 1- Identify SQL executable file , Right click and run as admin Step 2 – click on Maintenance tab on left hand side. Step 3- Click on Edition Upgrade Step 4 – Click Okay Step 5- Click Next Step 6 – Click… Read More SQL Server 2012 Upgrade from Standard Edition to Enterprise edition
Scenario – In my SSRS report I have calculate Age field of Tickets like in 1 Day 2 Hours 20 min format and we are getting values in minute . Solution – I have created filed called Age(Minutes) in my SP or query IN SQL – datediff(minute,date_created, getdate()) as ‘Age (Minute)’ IN SSRS write expression = (… Read More SSRS – How to convert in Day/Hour/Minute format in SSRS report
How Get SQL Server Job Name with help of program name SQLAgent – TSQL JobStep (Job 0x0854F6E4F9E5AE48B164966C0553C8B0 : Step 4) Step -1 Create Below function SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE FUNCTION [dbo].[GetJobIdFromProgramName] ( @program_name nvarchar(128) ) RETURNS uniqueidentifier AS BEGIN DECLARE @start_of_job_id int SET @start_of_job_id = CHARINDEX(‘(Job 0x’, @program_name) + 7… Read More How Get SQL Server Job Name with help of program name
Being SQL DBA it’s one of Important task to have real time blocking alert on server. This example demonstrate how to configure blocking alert and capture blocking Step 1 – Create SP to check blocking log – This SP will help to identify blocking on server with specific time ( in this example it’s for 2… Read More How to create Blocking alert and generate e-mail alert.