Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Wednesday, 12 October 2011

Identify memory pressure (SQL 2008)

-- SQL Server 2008 and R2 Memory Related Queries
-- By Glenn Berry Oct 2010


http://glennberrysqlperformance.spaces.live.com/
-- Twitter: GlennAlanBerry

Monday, 12 September 2011

Identify top 20 most expensive queries

-- Identify top 20 most expensive queries
-- By Satya

Monday, 5 September 2011

Get date when DB was last accessed

-- Database last accessed date (read and write)
-- By
Aaron Bertrand


Monday, 18 July 2011

Increase number of ERRORLOGs

-- Increase number of ERRORLOGS to 20, change last value if needed
-- From
http://support.microsoft.com/kb/196909

Sunday, 10 April 2011

Get logcal and physical DB names

--Get logical and physical DB names for restore purposes
--Last update MsMiller 10/04/11


--SELECT LOGICAL AND PHYSICAL NAMES 2005
SELECT DB_NAME(database_id) AS DatabaseName, name AS LogicalFileName, physical_name AS PhysicalFileName
FROM sys.master_files


--SELECT LOGICAL AND PHYSICAL NAMES 2000
SELECT DB_NAME(dbid) AS DatabaseName, name AS LogicalFileName, filename AS PhysicalFileName
FROM master..sysaltfiles


Tuesday, 12 October 2010

Current Users, Session Counts & Authentication Type

--Current Users, Session Counts & Authentication Type
--From SQLserverCentral.com

Get index usage stats with fragmentation in spec DB

-- Run agaist DB you want to retrieve Index Usage Stats with the fragmentation level
-- Last update by : MsMiller 12-10-10

Tuesday, 27 October 2009

Change all DBs to FULL recover model

--Change all DBs to FULL recover model
--Last update by MsMiller 27-10-09

Sunday, 9 August 2009

Get size of all DBs (MB)

-- Get size of all DBs in MB
-- Last update: MsMiller 09/08/09