SQL Database Administration. Overview



Similar documents
Microsoft SQL Server Scheduling

AuditWizard v8. SQL Maintenance

GO!NotifyLink. Database Maintenance. GO!NotifyLink Database Maintenance 1

Moving the Web Security Log Database

PCSchool SQL Backup Tech Tip. SQL Backup Tech Tip. Created in version /9

AUTODESK DATA MANAGEMENT SERVER Advanced Configuration Guide for Autodesk Data Management Server 2008

Migrating helpdesk to a new server

Chancery SMS Database Split

How to restore a Microsoft SQL Server Master Database with Backup Exec for Windows Servers (Automate Master Database Restore)

Installing Windows Server Update Services (WSUS) on Windows Server 2012 R2 Essentials

These notes are for upgrading the Linko Version 9.3 MS Access database to a SQL Express 2008 R2, 64 bit installations:

MTA Course: Windows Operating System Fundamentals Topic: Understand backup and recovery methods File name: 10753_WindowsOS_SA_6.

How to Copy A SQL Database SQL Server Express (Making a History Company)

InformationNOW SQL 2005 Database Backup and Restoration

SonicWALL CDP 5.0 Microsoft Exchange InfoStore Backup and Restore

AUTODESK DATA MANAGEMENT SERVER. Advanced Configuration Guide for Autodesk data management server

Moving the TRITON Reporting Databases

HELP DOCUMENTATION E-SSOM BACKUP AND RESTORE GUIDE

QUANTIFY INSTALLATION GUIDE

Instructions. Introduction

Database Administration Guide

Larger, active workgroups (or workgroups with large databases) must use one of the full editions of SQL Server.

How to Back Up and Restore an ACT! Database Answer ID 19211

Automating Administration with SQL Agent

Maintenance Plans for MS SQL Database Servers in a ZENworks Environment

Installation Manual Version 8.5 (w/sql Server 2005)

InformationNOW SQL 2008 Database Backup and Restoration

Video Administration Backup and Restore Procedures

Microsoft SQL Server 2005 How to Create and Restore Database (GRANTH3) Manually

Linko Software Express Edition Typical Installation Guide

Install SQL Server 2014 Express Edition

Database Fundamentals

Installing LearningBay Enterprise Part 2

Upgrading LytecMD from to 9.4 on Windows Server Best Practices. Revision Date: 7/29/2010 PLEASE READ:

Migrating MSDE to Microsoft SQL 2008 R2 Express

How To Create An Easybelle History Database On A Microsoft Powerbook (Windows)

USING FILERELICATIONPRO TO REPLICATE SQL SERVER

Jolly Server Getting Started Guide

Technical Bulletin. SQL Express Backup Utility

Database Administration Guide

SYSTEM SETUP FOR SPE PLATFORMS

BusinessObjects Enterprise XI Release 2

MIGRATING TO AVALANCHE 5.0 WITH MS SQL SERVER

ImageNow for Microsoft SQL Server

Restoring Sage Data Sage 200

5.6.3 Lab: Registry Backup and Recovery in Windows XP

3 Setting up Databases on a Microsoft SQL 7.0 Server

Use of Commercial Backup Software with Juris (Juris 2.x w/msde)

If you have questions or need assistance, contact PCS Technical Services using the contact information on page 10.

Moving a CIMPLICITY SQL Database using Detach/Attach Proficy HMI/SCADA CIMPLICITY

Microsoft SQL Server Staging

How To Install Database Oasis On A Computer Or Computer (For Free)

How To Upgrade Your Microsoft SQL Server for Accounting CS Version

KEYWORDS InteractX, database, SQL Server, SQL Server Express, backup, maintenance.

Mixed Authentication Setup

SQL Server 2005 Advanced settings

1. CONFIGURING REMOTE ACCESS TO SQL SERVER EXPRESS

Upgrade ProTracker Advantage Access database to a SQL database

TECHNICAL NOTE. The following information is provided as a service to our users, customers, and distributors.

Before you may use any database in Limnor, you need to create a database connection for it. Select Project menu, select Databases:

SonicWALL CDP Local Archiving

How to protect, restore and recover SQL 2005 and SQL 2008 Databases

Migrating MSDE to Microsoft SQL 2005 Express SP4

Database Maintenance Guide

Backup/Restore Microsoft SQL Server 7.0 / 2000 / 2005 / 2008

AUTODESK VAULT SERVER. Advanced Configuration Guide for Autodesk Vault Server 2013

Magaya Software Installation Guide

Moving a database from MS Access to MS SQL server. Introduction. Selecting the database. Creating a Data Source

SOFTWARE INSTALLATION INSTRUCTIONS CLIENT/SERVER EDITION AND WEB COMPONENT VERSION 10

mylittleadmin for MS SQL Server Quick Start Guide

SQL Server 2008 R2 Express Edition Installation Guide

GETTING STARTED WITH SQL SERVER

Tool Tip. SyAM Management Utilities and Non-Admin Domain Users

The basic steps involved in installing FLEETMATE Enterprise Edition and preparing it for initial use are as follows:

VirtualCenter Database Maintenance VirtualCenter 2.0.x and Microsoft SQL Server

Virtual Office Remote Installation Guide

Protecting SQL Server Databases Software Pursuits, Inc.

0651 Installing PointCentral 8.0 For the First Time

STIDistrict SQL 2000 Database Management Plans

Author: Ryan J Adams. Overview. Policy Based Management. Terminology

Upgrading from MSDE to SQL Server 2005 Express Edition with Advanced Services SP2

How to Backup and FTP your SQL database using E2.

SAS 9.3 Foundation for Microsoft Windows

DigiVault Online Backup Manager. Microsoft SQL Server Backup/Restore Guide

ProSystem fx Document

Upgrade Guide BES12. Version 12.1

Tech Note 1035 Moving the Historian Runtime Database to Another Machine Using SQL Server 2012

WIM Image Upgrade Instructions

1 of 10 1/31/2014 4:08 PM

Lab: Data Backup and Recovery in Windows XP

BUILDER 3.0 Installation Guide with Microsoft SQL Server 2005 Express Edition January 2008

Junk Settings. Options

HELP DOCUMENTATION E-SSOM BACKUP AND RESTORE GUIDE

Colorfly Tablet Upgrade Guide

Creating Home Directories for Windows and Macintosh Computers

Optional Lab: Data Backup and Recovery in Windows 7

Project Server 2003 Install on SBS 2003 Courtesy of Chris Jones All rights reserved by the Author

Backups and Maintenance

Transcription:

SQL Database Administration SQL Database Administration...1 Backing Up Your Data...2 Controlling Database Growth...7 Maintaining Optimum Performance...10 Automatic Updates for Windows...12 Overview This document is designed to guide the person responsible for the administration of the Linko database. More specifically this document is concerned with areas such as backups, preventative maintenance settings and performance enhancements. The operations and procedures described in this document should only be done when no one is in Linko.

Backing Up Your Data Linko recommends that you back up your database often: daily, if possible. SQL Express doesn t have job scheduling capability so database backups are a manual operation. For System Administrators familiar with MS Full Version of SQL Server, you are already familiar with database backups. You can use the same backup processes and procedures with SQL Express databases. See the following procedure. SQL Express 2008 has new functionality in it that makes backing up the database a lot simpler than in the past. As long as no one is using the software, you can simply copy the database files to a secure location. The location of the databases (based upon a Typical Installation) are the following folders on the Database Service Computer: C:\LinkoCTS\SQLData You want to copy both of these files: CTS_Data_data.mdf CTS_Data_log.ldf Set up a copy in a scheduled task for whenever everyone is out of Linko. Then your databases will be backed up automatically everyday. We include the following procedure as an alternative way to do backups. It requires manual use of the SQL Management Studio and can not be automated in SQL Express 2008 as it does not include SQL Agent. 1. Open SQL Management Studio and connect to the Linko database (CTS_Data).

2. Right-click on CTS_Data, choose Tasks, then Back Up...

3. The Database Back Up dialog. Backup type should be Full. You may also want to change the default location of where the backup file will be located. In the Destination section click the Remove button. This will remove the default path line specified in the box. Click the Add button.

After clicking the Add button you will be presented with the dialog box below. Click the browse button to navigate to another location. Browse to your Backup folder and be sure to enter a file name.

4. Backup Options screen. Linko recommends that the Verify backup when finished option is checked. Click OK when you re ready to start the backup operation. When finished you ll be presented with the message box below. FOR USERS OF THE LINKO SQL EXPRESS EDITION: Note that the above procedures is a backup of the Linko Database but it still resides on the Hard Drive where the Database Service is installed (Assuming a Typical Installation). The file needs to be moved to a network location for secure storage. The entire folder C:\LinkoCTS on the computer where the Database Service resides needs to be backed up to a network location on a regular basis. The above backup process only addresses the database itself, and none of the support files in the Shared Folders.

Controlling Database Growth Linko recommends the following settings for both the SQL Express and the Full SQL Versions. These settings are defaulted to the values listed so there s no need to change any of them unless they re different. Database Properties Options page Right-click on CTS_Data and then click Properties Automatic Auto-close Auto-create statistics Auto-shrink Auto-update statistics False True False True Statistics Query statistics are managed automatically by SQL Server when auto-create statistics and auto-update statistics are set to Yes. This is recommended. Recovery Page Verify Torn page detection File Size/Growth: CTS_Data_Data: o Initial Size: 50 MB o Automatically grow file o By 10% o 1 gig max file growth CTS_Data_Log: (if Full recovery model implemented) o Initial Size: 10 MB o Automatically grow file o By 20% o 2 gig max file growth

Recovery Model: Simple (recommended, with nightly scheduled backups) Full (Optional) Optional Full Recovery Model If you choose to implement the Full Recovery model, Linko recommends Incremental transaction log backups should be performed at least twice daily (11:00am and 2:00pm) After performing your nightly Full database backup, perform a Full transaction log backup. (SQL will automatically truncate the transaction log after the log is backed up. It will not reduce the size of the physical log) After a complete database backup is performed, the transaction log backup series can be restarted. (It is not necessary to keep the transaction log backups created prior to the last full database backup.) Never manually truncate a log file until the log file has been backed up. To reduce the physical size of the CTS_Data_log file, use DBCC SHRINKFILE DBCC SHRINKFILE (cts_data_log) GO

Server Properties Security page Right-click on the top level of the Hierarchy which is the ServerName\SQL Instance and then click Properties. SQL Server and Windows Authentication mode should be checked.

Maintaining Optimum Performance Rebuilding Indexes and Shrinking data files Indexes should periodically be rebuilt to reorganize pages, remove physical fragmentation and recalculate statistics. Shrinking the database improves performance. Linko recommends doing this monthly. Use the script below to rebuild indexes and shrink the data files. As with all the procedures outlined in this document this procedure should only be done while no one is in Linko. USE CTS_Data DECLARE @TableName varchar(255) DECLARE TableCursor CURSOR FOR SELECT table_name FROM information_schema.tables WHERE table_type = 'base table' OPEN TableCursor FETCH NEXT FROM TableCursor INTO @TableName WHILE @@FETCH_STATUS = 0 BEGIN DBCC DBREINDEX(@TableName,' ',0) FETCH NEXT FROM TableCursor INTO @TableName END CLOSE TableCursor DEALLOCATE TableCursor GO DBCC SHRINKDATABASE (CTS_Data, 10) GO Notes on Indexes: 1. As a possible additional maintenance step, Linko suggests that Indexes should occasionally be rebuilt (monthly) using DROP_EXISTING and FILLFACTOR with recommended fill factors to reorganize pages, remove physical fragmentation and recalculate statistics. Linko has a specially designed script to do this for each Linko Upgrade called the CTS_Data_Rebuild_Indexes.sql script. 2. FILLFACTOR will reduce page splitting and allocate additional space to tables that frequently have new data added to them. 3. Only run the CTS_Data_Rebuild_Indexes.sql script for the proper version of the CTS_Data database you have installed. Please contact Linko Support with any questions.

Click the New Query button in your Management Studio main view. Paste the script above into the New Query window. Click the Execute button.

Automatic Updates for Windows This setting will cause your Server to automatically download and install the latest updates from Microsoft. Linko recommends setting Automatic Updates as illustrated below. From your desktop right-click on My Computer and click Properties. Make sure that Automatic is checked and the time is set for an early morning hour.