Some Notes, Some Scripts

These are the noted taken for searching solutions and some scripts to identify the problem

Categories:

SELECT parent_node_id ,COUNT(*) as [Schedulers] ,SUM(current_tasks_count) as [Current] ,SUM(runnable_tasks_count) as [Runnable] FROM sys.dm_os_schedulers WHERE status = ‘VISIBLE ONLINE’ GROUP BY parent_node_id;

Categories:

There are four different types of checkpoints: Internal checkpointsInternal checkpoints occur during some SQL Server operations, such as starting database backup or creating a database snapshot.Manual checkpointsManual checkpoint occur manually, as the name indicates, when users trigger them […]

Categories:

Running DBCC CHECKDB and get out of TEMPDB errors although having enough disk space. CHKDSK commands also cannot find any bad sector but I cannot perform SELECT some of my tables and I cannot perform BACKUP. So you […]

Categories:

You realized that your database has grown and you want to check who perform data load or run heavy queries: DECLARE @current_tracefilename VARCHAR(500);DECLARE @0_tracefilename VARCHAR(500);DECLARE @indx INT;SELECT @current_tracefilename = pathFROM sys.tracesWHERE is_default = 1;SET @current_tracefilename = REVERSE(@current_tracefilename);SELECT @indx […]

Categories:

You want to backup or restore a database but you cannot see the Drive letter even you had mapped fromo operating system. you should follow these steps: MAP YOUR DRIVE OPEN YOUR XP_CMDSHELL OPTION DEFINE YOUR MAPPED DRIVE […]