SQL Server Data Storage - Epicor

35
Activant Prophet 21 SQL Server Data Storage SQL Server Administration suite: course 2 of 4

Transcript of SQL Server Data Storage - Epicor

Page 1: SQL Server Data Storage - Epicor

Activant Prophet 21SQL Server Data Storage

SQL Server Administration suite: course 2 of 4

Page 2: SQL Server Data Storage - Epicor

This class is designed for…

Beginner SQL/Prophet 21 (CC) users who are responsible for SQL Administration as it relates to Prophet 21 (CC)

completed the first class in this suite, “Introduction to SQL Server 2000: Installation and Implementation”

Page 3: SQL Server Data Storage - Epicor

Objectives

• Recognize the elements of a SQL Database

• Identify the purpose of and options in Database and Transaction logs

• Classify the two types of backup devices • Introduce types of indexes

Page 4: SQL Server Data Storage - Epicor

This course will NOT cover…

Windows NavigationInstallation of SQL ServerSQL Backup and Restore MaintenanceData Manipulation

Page 5: SQL Server Data Storage - Epicor

Data Storage

UnitsPage – 8k of dataExtent – 8 pages

Page 6: SQL Server Data Storage - Epicor

Data Storage

Installed databases

Master Controlling databaseMsdb Stores info about tasks and alerts

Model Snapshot image from which all new databases are created

Tempdb Used as a workspaceNorthWind Practice databasePubs Practice database

Page 7: SQL Server Data Storage - Epicor

Database Objects

System tables

Contains info regarding objects in database

User tables

Structures that contain Prophet 21 (CC) data

Indexes Structures used for the timely retrieval of data

View View of single table or multiple tablesTrigger Procedure fired by SQL Server in

response to a data changeStored Procedure

Defined and executed in database

Page 8: SQL Server Data Storage - Epicor

Transaction Log

Running record of all changes to a databaseaka Write-ahead logCheckpointEnsures data integrity

Page 9: SQL Server Data Storage - Epicor

Files

Primary data file .mdf

Contains system catalog as well as pointers to all other files in the database. Every database has ONE primary data file

Log file .ldf Holds all transaction log info used for database recovery

Secondary data file .ndf

Any files other than the primary data file

Page 10: SQL Server Data Storage - Epicor

Filegroups

Primarily used in very large or highly-transacted databases where object separation yields performance advantages

Page 11: SQL Server Data Storage - Epicor

Rules for Files and Filegroups

Files or filegroups cannot be used by more than one databaseFiles can only be a member of one filegroupLog files are never part of a filegroupFiles fill proportionately across all files in a group

Page 12: SQL Server Data Storage - Epicor

Database and Transaction Logs

Server-end of Prophet 21 (CC) application is SQL Server databaseEvery database has a transaction log

Transaction log tracks all data modification transactionsMakes automatic recovery possible

Page 13: SQL Server Data Storage - Epicor

Creating a New Database

Specifylocation of data and transaction filesInitial size and growth parameters

RememberDatabase or transaction log runs out of space, no changes can be made – System LockNew database is copy of model

Page 14: SQL Server Data Storage - Epicor

New Database

Enterprise ManagerExpand server you want to create database inRight click DatabasesChoose New Database…

Page 15: SQL Server Data Storage - Epicor

New Database

Page 16: SQL Server Data Storage - Epicor

New Database

Page 17: SQL Server Data Storage - Epicor

New Database – Data Files

Page 18: SQL Server Data Storage - Epicor

New Database – Transaction Log

Page 19: SQL Server Data Storage - Epicor

Database Properties

Page 20: SQL Server Data Storage - Epicor

General

Page 21: SQL Server Data Storage - Epicor

Filegroups

Page 22: SQL Server Data Storage - Epicor

Options

AccessRecoverySettings

ANSI NULL defaultRecursive triggersAuto update statsTorn page detectionAuto closeAuto shrinkAuto create statsUse quoted identifiers

Compatibility

Page 23: SQL Server Data Storage - Epicor

Permissions

Page 24: SQL Server Data Storage - Epicor

Backup Devices

DiskPhysical operating system file that contains a backup

TapeSQL Server pointed to the tape drive in the database server

Page 25: SQL Server Data Storage - Epicor

Backup Database

Page 26: SQL Server Data Storage - Epicor

Backup Database

Page 27: SQL Server Data Storage - Epicor

Backup Database

Page 28: SQL Server Data Storage - Epicor

Backup Database

Page 29: SQL Server Data Storage - Epicor

Indexes

Structures used by SQL server for faster data extractionStored in pages or extentsBuilt around a column or columns in a tableTypes

ClusteredNon-clustered

Page 30: SQL Server Data Storage - Epicor

Clustered Indexes

Page 31: SQL Server Data Storage - Epicor

Non-Clustered Indexes

Page 32: SQL Server Data Storage - Epicor

Summary

Recognize the elements of a SQL DatabaseIdentify the purpose of and options in Database and Transaction logsClassify the two types of backup devicesIntroduce types of indexes

Page 33: SQL Server Data Storage - Epicor

For More Information…Visit Activant on the web: distribution.activant.com

Browse Documentation

Search the Solutions database

View Educational Services’ training course offerings

SQL Server Administration suite

Microsoft SQL Server: 3-day classroom training

Submit a web case

Email Professional Services Sales: pss@ activant.com

Page 34: SQL Server Data Storage - Epicor

SQL Server Management

Performing backupsBackup and restore statementsBackup verificationManaging database logins and permissions

SQL Server Administration suite: course 3 of 4

Page 35: SQL Server Data Storage - Epicor

Basic Data Manipulation

SQL statementsRunning stored procedures

SQL Server Administration suite: course 4 of 4