Banner

Archive for the ‘Microsoft SQL’ Category

MS SQL Script to dump all databases to a .bak file

Icon Written by Frank Contreras on January 30, 2012 – 12:14 am

Modify the script below as needed. DECLARE @name VARCHAR(50) — database name DECLARE @path VARCHAR(256) — path for backup files DECLARE @fileName VARCHAR(256) — filename for backup DECLARE @fileDate VARCHAR(20) — used for file name SET @path = ‘D:\SQLBackups\’ SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112) DECLARE db_cursor CURSOR FOR SELECT name FROM master.dbo.sysdatabases WHERE name NOT IN [...]



Optimizing SQL

Icon Written by Frank Contreras on May 1, 2011 – 1:43 am

Creating a maintenance plan in SQL Server 2005 or 2008 to optimize database performance Article: HOWTO8589 Question How can I create a maintenance plan in SQL Server 2005 or 2008 to optimize database performance? Answer A SQL maintenance plan for rebuilding indexes and setting the index free space percentage to 10% within the Symantec/Altiris databases should be scheduled [...]

Tags: , , , , , , , , , ,