Some Notes, Some Scripts

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

Categories:

It’s always better to manage file space manually

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:

Sysadmin can run any scripts on SQL Server. What if S/he runs scripts with bad results. Can you detect it? Yes, Just Alter your Audit specification: ALTER SERVER AUDIT [Audit-xxxxxx] WHERE ([object_name]=’sysadmin’)

Categories:

Your database's LDF file, that is, the LOG file, has grown, you are trying to SHRINK, but if it doesn't work: First of all, if the Recovery Mode of your database is FULL, you need to do it […]

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:

Do not spread clustered indexes, and nonclustered indexes, or large object (LOB) data across multiple filegroups. This rarely helps with performance and may introduce issues in cases of database corruption.

Categories:

Create multiple data files in filegroups with volatile data. Make sure that all data files have the same sizeand auto-growth parameters specified in MB; enable the AUTOGROW_ALL_FILES option.

Categories:

SQL Server splits transaction logs into chunks called Virtual Log Files (VLF) and manages them as single units. For example, SQL Server cannot truncate and reuse a VLF if it contains just a single active log record. Pay […]

Categories:

When this option is enabled, SQL Server periodically shrinks the database and releases unused free space from the files to the OS. But in case of first INSERT database tries to extend depending on growth size you had […]