Use the script in this article to collect common SQL Server configuration and environment details that are frequently needed for troubleshooting. The output can help confirm network protocol settings, identify SQL Server and database configuration details, and highlight resource-related settings that may contribute to issues.
The script collects:
- Enabled SQL Server network protocols and listening port information
- SQL Server version
- Database compatibility levels
- CPU and memory details
- Disk space for SQL volumes
- Memory-related SQL Server configuration values
- Collation settings for Snow databases
- Open SQL Server Management Studio (SSMS).
- Connect to the SQL Server instance hosting your databases.
- Run the script below.
- Save or export the results if requested for troubleshooting.
-- Network protocol status
SELECT 'Named Pipes' AS [Protocol], iif(value_data = 1, 'Yes', 'No') AS isEnabled
FROM sys.dm_server_registry
WHERE registry_key LIKE '%np' AND value_name = 'Enabled'
UNION
SELECT 'Shared Memory', iif(value_data = 1, 'Yes', 'No')
FROM sys.dm_server_registry
WHERE registry_key LIKE '%sm' AND value_name = 'Enabled'
UNION
SELECT 'TCP/IP', iif(value_data = 1, 'Yes', 'No')
FROM sys.dm_server_registry
WHERE registry_key LIKE '%tcp' AND value_name = 'Enabled';
-- Listening ports
USE master;
GO
xp_readerrorlog 0, 1, N'Server is listening on', N'any', NULL, NULL, N'asc';
GO
-- SQL version
SELECT @@version;
-- Database compatibility levels
SELECT name, compatibility_level FROM sys.databases;
-- CPU information
SELECT
cpu_count AS TotalLogicalProcessors,
hyperthread_ratio AS HyperthreadRatio,
cpu_count / hyperthread_ratio AS PhysicalProcessors
FROM sys.dm_os_sys_info;
-- Memory usage
SELECT
(physical_memory_kb / 1024) AS TotalPhysicalMemoryMB,
(committed_target_kb / 1024) AS CommittedMemoryMB,
(committed_kb / 1024) AS SQLServerProcessCommittedMemoryMB
FROM sys.dm_os_sys_info;
-- Disk space
SELECT
vs.volume_mount_point AS Drive,
vs.total_bytes / 1048576 AS TotalSizeMB,
vs.available_bytes / 1048576 AS FreeSpaceMB
FROM sys.master_files AS mf
CROSS APPLY sys.dm_os_volume_stats(mf.database_id, mf.file_id) AS vs
GROUP BY vs.volume_mount_point, vs.total_bytes, vs.available_bytes
ORDER BY vs.volume_mount_point;
-- Memory-related configuration
SELECT
name AS [Name],
value AS [Value]
FROM sys.configurations
WHERE name LIKE '%memory%';
-- Collation checks (Snow databases)
SELECT
name AS [Database Name],
collation_name AS [Collation],
CASE
WHEN collation_name LIKE '%CS' THEN 'Case-Sensitive'
ELSE 'Case-Insensitive'
END AS [Case Sensitivity]
FROM sys.databases
WHERE name IN ('SnowLicenseManager', 'SnowInventory');
-- List databases and highlight Snow databases
SELECT
name AS [Database Name],
CASE
WHEN name IN ('SnowLicenseManager', 'SnowInventory') THEN 'Snow'
ELSE 'Other'
END AS [Category],
collation_name AS [Collation],
compatibility_level AS [CompatibilityLevel]
FROM sys.databases
ORDER BY [Category], [Database Name];
Example output
Additional output
Understanding compatibility levels
The compatibility level determines which SQL Server version behavior a database follows. The value is stored per database and can differ from the SQL Server engine version.
| Product | Database Engine Version | Default Compatibility Level | Supported Compatibility Levels |
|---|---|---|---|
| SQL Server 2022 (16.x) | 16 | 160 | 160, 150, 140, 130, 120, 110, 100 |
| SQL Server 2019 (15.x) | 15 | 150 | 150, 140, 130, 120, 110, 100 |
| SQL Server 2017 (14.x) | 14 | 140 | 140, 130, 120, 110, 100 |
| SQL Server 2016 (13.x) | 13 | 130 | 130, 120, 110, 100 |
| SQL Server 2014 (12.x) | 12 | 120 | 120, 110, 100 |
| SQL Server 2012 (11.x) | 11 | 110 | 110, 100, 90 |
| SQL Server 2008 R2 (10.5) | 10.5 | 100 | 100, 90, 80 |
| SQL Server 2008 (10) | 10 | 100 | 100, 90, 80 |
| SQL Server 2005 (9.x) | 9 | 90 | 90, 80 |
| SQL Server 2000 (8.x) | 8 | 80 | 80 |
Related Articles
SQL Server edition not recognized if SQL Server WMI provider is inaccessible 123Number of Views Increase CPU, memory, or disk size for a stateful node on Azure 4Number of Views BMC Discovery import may fail with error if SQL Server database compatibility level is below 130: "Invalid object name 'ST… 7Number of Views Recommended License Changes page may load slowly and cause large memory consumption on backend SQL Server instance 9Number of Views "ApplicationsByFileEvidence" or "Create temp table ApplicationsByFileEvidence" steps may run slowly on SQL Server 2019 unl… 5Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago