Databases Lesson 5.

Slides:



Advertisements
Similar presentations
Storage Management Lecture 7.
Advertisements

Oracle Architecture. Instances and Databases (1/2)
Moving Data Lesson 23. Skills Matrix Moving Data When populating tables by inserting data, you will discover that data can come from various sources.
Module 4 Working with Databases. Module Overview Overview of SQL Server Databases Working with Files and Filegroups Moving Database Files.
REDUNDANT ARRAY OF INEXPENSIVE DISCS RAID. What is RAID ? RAID is an acronym for Redundant Array of Independent Drives (or Disks), also known as Redundant.
Tables Lesson 6. Skills Matrix Tables Tables store data. Tables are relational –They store data organized as row and columns. –Data can be retrieved.
File Management Systems
Database Management: Getting Data Together Chapter 14.
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
Harvard University Oracle Database Administration Session 5 Data Storage.
Chapter 12 File Management Systems
Hands-On Microsoft Windows Server 2003 Administration Chapter 6 Managing Printers, Publishing, Auditing, and Desk Resources.
Backing Up and Restoring Databases Lesson 16. Skills Matrix.
Module 5 Understanding SQL Server 2008 R2 Recovery Models.
Chapter 1 Introduction to Databases
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
Servers Redundant Array of Inexpensive Disks (RAID) –A group of hard disks is called a disk array FIGURE Server with redundant NICs.
Session 3 Windows Platform Dina Alkhoudari. Learning Objectives Understanding Server Storage Technologies Direct Attached Storage DAS Network-Attached.
Database Configuration and Maintenance Database Configuration and Maintenance Exam / 30.
Session 7 Creating and Managing Databases. RDBMS and Data Management/ Session 7/2 of 27 Session Objectives Describe the system and user-defined databases.
Chapter 2 Administrating DB Engine. Database Engine  The Database Engine is the core service for storing, processing, and securing data.  It provides.
SQL Server 2008 Implementation and Maintenance Chapter 7: Performing Backups and Restores.
Configuring File Services Lesson 6. Skills Matrix Technology SkillObjective DomainObjective # Configuring a File ServerConfigure a file server4.1 Using.
Chapter 10 : Designing a SQL Server 2005 Solution for High Availability MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design.
Storage and NT File System INFO333 – Lecture Mariusz Nowostawski Noria Foukia.
Exam QUESTION CertKiller.com has hired you as a database administrator for their network. Your duties include administering the SQL Server 2008.
High-Availability Methods Lesson 25. Skills Matrix.
1 Chapter Overview Creating a User Database Setting Database Options Managing User Database Size Placing Database Files on Multiple Disks.
Chapter 4 SQL. SQL server Microsoft SQL Server is a client/server database management system. Microsoft SQL Server is a client/server database management.
Chapter 2: Designing Physical Storage MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design Study Guide (70-443)
Database Administration TableSpace & Data File Management
1 Chapter 12 File Management Systems. 2 Systems Architecture Chapter 12.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Module 3: Managing Database Files. Overview Introduction to Data Structures Creating Databases Managing Databases Placing Database Files and Logs Optimizing.
Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies.
Database Technical Session By: Prof. Adarsh Patel.
CSE 781 – DATABASE MANAGEMENT SYSTEMS Introduction To Oracle 10g Rajika Tandon.
Agenda for Today Chapter 5 –Skip Lesson 2 Review questions Midterm Chapter 6 Review questions.
Architecture Rajesh. Components of Database Engine.
4.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 4: Organizing a Disk for Data.
MCTS Guide to Microsoft Windows Vista Chapter 4 Managing Disks.
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
1 Chapter Overview Preparing to Upgrade Performing a Version Upgrade from Microsoft SQL Server 7.0 Performing an Online Database Upgrade from SQL Server.
Stratus Continuous Process System COSC513 Presentation By Ying Li & Kunyu Zheng.
Database structure and space Management. Database Structure An ORACLE database has both a physical and logical structure. By separating physical and logical.
Data resource management
Week 7 : Chapter 7 Agenda SQL 710 Maintenance Plan:
By Rashid Khan Lesson 6-Building a Directory Service.
The concept of RAID in Databases By Junaid Ali Siddiqui.
Oracle Architecture - Structure. Oracle Architecture - Structure The Oracle Server architecture 1. Structures are well-defined objects that store the.
1 CEG 2400 Fall 2012 Network Servers. 2 Network Servers Critical Network servers – Contain redundant components Power supplies Fans Memory CPU Hard Drives.
Hands-On Microsoft Windows Server 2008 Chapter 7 Configuring and Managing Data Storage.
Praveen Srivatsa Director| AstrhaSoft Consulting blogs.asthrasoft.com/praveens |
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
Backing Up and Restoring Databases Advanced Database Dr. AlaaEddin Almabhouh.
SQL Basics Review Reviewing what we’ve learned so far…….
Network-Attached Storage. Network-attached storage devices Attached to a local area network, generally an Ethernet-based network environment.
Agenda for Today  DATABASE Definition What is DBMS? Types Of Database Most Popular Primary Database  SQL Definition What is SQL Server? Versions Of SQL.
Understanding Core Database Concepts Lesson 1. Objectives.
Answer to Summary Questions
Configuring File Services
Database Administration
Managing Multi-User Databases
Chapter Overview Understanding the Database Architecture
RAID RAID Mukesh N Tekwani
Chapter 11 Managing Databases with SQL Server 2000
RAID RAID Mukesh N Tekwani April 23, 2019
Storage Management Lecture 7.
Understanding Core Database Concepts
Presentation transcript:

Databases Lesson 5

Skills Matrix

Using SQL Server You can use SQL Server to perform transaction processing, store and analyze data, and prepare reports. The SQL Server family of products and technologies meets the data storage needs of online transaction processing (OLTP) and online analytical processing (OLAP) environments. OLTP specializes in getting the data into the database, while OLAP focuses on getting the information out of the database.

The SQL Server Relational Database Management System (RDBMS) Manages data storage for transactions and analysis. Stores data in a wide array of data types, including text, numeric, XML, and large objects (CLOBS, character large objects, and BLOBS, binary large objects). Responds to requests from client applications. Uses Transact-SQL, XML, or other SQL commands to send requests between the client application and SQL Server.

RDBMS Components Maintains the relationships among data in a database. Ensures that data are stored correctly and the rules defining the relationships among data are not violated. Recovers data to a point of known consistency in the event of an infrastructure failure.

Planning your Database SQL Server uses two types of files to store your database information: One or more database files. One or more transaction log files.

Database Files Everything in the Model database shows up in your newly created database. Once the copy of the database has been made, it expands to the requested size. When you create a database in SQL Server, you must specify at least one file to store the data and hold your system tables and another file to hold the transaction log.

Database Files Databases can comprise up to three file types. Primary data files have a default extension of .mdf. If you create a database that spans multiple data files, then secondary data files are used, which have a default filename extension of .ndf. The transaction log is stored in one or more files, each with a default .ldf extension.

Database Files

Database Files You should remember several important facts about your data and log files: Create the data and log files on a storage area network (SAN), iSCSI-based network, or locally attached drive. You may have but one database per data file although a single database can span multiple data files. Transaction logs must reside in their own file; they can also span multiple log files; and should reside on their own, dedicated spindle.

Database Files SQL Server fills the database files in a filegroup proportionally. Transaction log files are not filled proportionally; instead, each fills to capacity before continuing to the next log file. When you create a database and don’t specify a transaction log size, the transaction log will be resized to 25 percent of the size of your data file request.

Database Files Place your transaction logs on separate physical hard drives (also known as spindles). If you have selected the full recovery model, you may recover your data up to the moment of failure in the event of data loss.

Filegroups You can logically group database files into a filegroup. Using filegroups, you can explicitly place database objects into a particular set of database files. Another advantage of filegroups is the ability to back up only a single filegroup at a time. Yet another advantage includes the ability to mark the filegroup and all data in the files that are part of it as either read-only or read-write.

There are really only two disadvantages to using filegroups. The administrative effort involved in keeping track of the files in the filegroup and the database objects that are placed in them. If you are working with a smaller database and have RAID-5 implemented, you may not be improving performance.

Database File Placement Should be placed on some form of RAID. RAID is short for Redundant Array of Independent Disks. RAID exists in many configurations. Microsoft Server editions support: RAID 0 (striping) RAID 1 (mirroring) RAID 5 (parity) RAID-10 (sometimes referred to as RAID 1+0)

Extents An extent is a block of eight pages totaling 64 KB in size. Because the extent is the basic unit of allocation for tables and indexes, and all objects are saved in a table of some kind, all objects are stored in extents. SQL Server has two types of extents: Uniform: In uniform extents, all eight pages are used by the same object. Mixed: Mixed extents are used by objects that are too small to take up eight pages, so more than one object can be stored in the extent.

Pages At the most fundamental level, SQL Server stores everything on an 8 KB page. The page becomes the one common denominator for all objects in SQL Server. Many types of pages exist, but every page has some factors in common. Pages are always 8 KB in size and always have a header, leaving about 8,060 bytes of usable space on every page.

SQL Server has eight primary types of pages: Data pages Index pages Text/Image pages Global Allocation Map pages Index Allocation Map pages Page Free Space pages Bulk Changed Map pages Differential Changed Map pages

You can create a database in SQL Server in two ways: Creating a Database You can create a database in SQL Server in two ways: CREATE DATABASE statement in a Transact-SQL (T-SQL) query. Use the graphical tools in Management Studio.

Gathering Information About Your Database Using SQL Server Management Studio, you can gather a wealth of information about your database. This includes the size of the database, its current capacity, any options currently set, and so on. When you select a database in Management Studio, right-click and choose Reports. You see a variety of reports that you can use to gather information.

Gathering Information About Your Database You can also use system stored procedures to gather information about your database. The sp_helpdb stored procedure used by itself gives you information about all databases in your SQL Server. You can gather information about a particular database by using the database name as a parameter.

Setting Database Options Database options allow you to specify how your database behaves in given situations. You can view and modify database options using Management Studio or the ALTER DATABASE statement. Start Management Studio and move down through the console tree until you see your database. Right-click <your database> and choose Properties. From the Database Properties sheet, click the Options page.

Setting Database Options Collation Recovery Model Compatibility Level

Recovery Model Simple Bulk-logged Full

Other Options: Automatic Setting Auto Close Auto Create Statistics Auto Shrink Auto Update Statistics Auto Update Statistics Asynchronously

Summary The SQL Server data storage structure involves more than just a file or a collection of files. This internal architecture exists for one purpose alone: to input, store and retrieve your data as quickly and efficiently as possible. This lesson covered many aspects of data storage.

Databases, and the files they are made of, include the following: Summary Databases, and the files they are made of, include the following: The primary data file has an .mdf extension used to hold data. Secondary data files have an .ndf extension and are used to hold data. Log files have an .ldf extension and are used to store transactions before they are written to the database so that the database can be recovered in the event of an emergency.

Summary You were introduced to the various RAID levels you can use for fault tolerance and performance: Use RAID-1 primarily for transaction logs. RAID-5 should be used for your data files, if required. RAID-5 does slow throughput. RAID-10 (also called RAID 1+0) can be used for either data or logs, but costs more and is available only as a third-party hardware solution.

Summary You learned about pages and extents which allow SQL server to store or retrieve just 64 kilibytes at a time no matter how large the data file using an indexed sequential access method.

Summary You learned in Lesson 4 how to estimate the size of a data file before creating it. You learned how to create databases using Management Studio and Transact-SQL and set database options to meet your specific needs. You learned about the recovery models, what they do, and when to use each one.

Summary for Certification Examination Know how to create databases. SQL Server focuses on storing and retrieving data in databases. Understand your files. Know how big to make your files and where those files should be placed. Know your recovery models. Know how each recovery model functions and what they allow you to restore.

Summary for Certification Examination Know how filegroups let you backup and restore just portions of your database; that file groups can be distributed to different servers in your farm; and that filegroups allow you to place different portions of your database on different spindles. Know how to set database options using sp_configure.