Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Server_Config_Script_2012

By Patrick Akhamie,

Here's a quick query you can run across all your servers (2012) to find a wealth of information like service pack, edition, number of CPUs and RAM.
Even more information is available if you want to add additional SERVERPROPERTY attributes or fields from one of the DMVs.
Thanks to all who have helped improve this script and this updated version is credited to 
 and
Here are the things addressed;
A few nagging problems:
1. Exclude OFF-LINE databases (good to exclude the READ-ONLY databases as well as u cannot alter them)
2. Expand the following fields as below:
[Shrink File (Truncate free space)] VARCHAR(2000) NULL,
[Shrink file To 20percent freespace] VARCHAR(2000) NULL,
[Increase File Size by 20percent] VARCHAR(2000) NULL
3. Exclude the FILESTREAM file types from the scope (as the script is hitting the division by zero)
by planting the the WHERE clause to a qouted dynamic statement as follows:
WHERE sys.database_files.type_desc not in (''FILESTREAM'')

Total article views: 2357 | Views in the last 30 days: 50
 
Related Articles
FORUM

Exclude Word List to filter SELECT results

How can I exclude results containing certain words?

FORUM

Excluding Job Execution On Holidays

Excluding Job Execution On Holidays

FORUM

How to SELECT only '123' and exclude 'ABC' ?

How to SELECT only '123' and exclude 'ABC' ?

FORUM

varchar issue

varchar issue

FORUM

Tricky ...VARCHAR

VARCHAR logics

Tags
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones