-- SQL Server 2008 and R2 Memory Related Queries
-- By Glenn Berry Oct 2010
http://glennberrysqlperformance.spaces.live.com/
-- Twitter: GlennAlanBerry
Scripts for Windows Admins with focus on: SQL, SCOM, VMWare and general Windows OS tasks
Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts
Wednesday, 12 October 2011
Monday, 12 September 2011
Monday, 5 September 2011
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
-- From http://support.microsoft.com/kb/196909
Labels:
SQL
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
--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
Labels:
SQL
Tuesday, 12 October 2010
Current Users, Session Counts & Authentication Type
--Current Users, Session Counts & Authentication Type
--From SQLserverCentral.com
--From SQLserverCentral.com
Labels:
SQL
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
-- Last update by : MsMiller 12-10-10
Labels:
SQL
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
--Last update by MsMiller 27-10-09
Labels:
SQL
Sunday, 9 August 2009
Subscribe to:
Posts (Atom)