Page 1 SQL Server Myths XV ENCONTRO DA COMUNIDADE SQLPORT Rui Ribeiro MCITP 2011/08/16.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 8-1 The Web Wizards Guide to PHP by David Lash.
Advertisements

PHP II Interacting with Database Data. The whole idea of a database-driven website is to enable the content of the site to reside in a database, and to.
CC SQL Utilities.
Help! My table is getting too big! How to divide and conquer SQL Relay 2014.
SQL Server Best Practices Keep Your Database In Top Performance Shape and Maintain Effective Backups September, 2007 Richard Kokoski.
Video Rental Store M.S. Access Module CAS 133 Basic Computer Skills/MS Office Russ Erdman.
A Guide to SQL, Seventh Edition. Objectives Create a new table from an existing table Change data using the UPDATE command Add new data using the INSERT.
1 - Oracle Server Architecture Overview
SQL Data Definition II Stanislava Armstrong 1SQL Data Definition II.
Harvard University Oracle Database Administration Session 5 Data Storage.
DT211 Stage 2 Databases Lab 1. Get to know SQL Server SQL server has 2 parts: –A client, running on your machine, in the lab. You access the database.
Backup and Recovery Part 1.
Transaction log grows unexpectedly
SQL Server 2008 Implementation and Maintenance Chapter 7: Performing Backups and Restores.
Databases with PHP A quick introduction. Y’all know SQL and Databases  You put data in  You get data out  You can do processing on it very easily 
CHP - 9 File Structures. INTRODUCTION In some of the previous chapters, we have discussed representations of and operations on data structures. These.
1 Demystifying the Transaction Log. 2 Rob Canzonire Advisory Database Administrator at Blue Cross Blue Shield of Louisiana Microsoft Certified Solutions.
What is Sure BDCs? BDC stands for Batch Data Communication and is also known as Batch Input. It is a technique for mass input of data into SAP by simulating.
Chapter 11: Designing a Data Recovery Solution for a Database MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design Study.
Module 3: Managing Database Files. Overview Introduction to Data Structures Creating Databases Managing Databases Placing Database Files and Logs Optimizing.
Allowing Multi-user Access Grant – GRANT ON TO – |WITH GRANT OPTION / WITH ADMIN OPTION| – can be PUBLIC or a role – can be all Revoke – REVOKE ON FROM.
Copyrighted material John Tullis 10/6/2015 page 1 Performance: WebSphere Commerce John Tullis DePaul Instructor
TEMPDB Capacity Planning. Indexing Advantages – Increases performance – SQL server do not have to search all the rows. – Performance, Concurrency, Required.
Architecture Rajesh. Components of Database Engine.
An Oracle server:  Is a database management system that provides an open, comprehensive, integrated approach to information management.  Consists.
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
Roy Ernest Manager of DBA Dept Pinnacle Sports Worldwide
Rui Ribeiro MCITP 2010/10/19 Index optimization … …on low peak periods V ENCONTRO DA COMUNIDADE SQLPORT.
Module 16: Performing Ongoing Database Maintenance
Today’s Topics Backup Recap Restoration and Recovery T-SQL Commands –INSERT –UPDATE –DELETE –BEGIN TRAN –COMMIT TRAN –ROLLBACK TRAN.
Views Lesson 7.
Database structure and space Management. Database Structure An ORACLE database has both a physical and logical structure. By separating physical and logical.
Database structure and space Management. Segments The level of logical database storage above an extent is called a segment. A segment is a set of extents.
1. When things go wrong: how to find SQL error Sveta Smirnova Principle Technical Support Engineer, Oracle.
Storing and Retrieving Data
1 Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 15: Reliability and Security in Database Servers Instructor’s.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Hash-Based Indexes Chapter 11 Modified by Donghui Zhang Jan 30, 2006.
SQL/Lesson 7/Slide 1 of 32 Implementing Indexes Objectives In this lesson, you will learn to: * Create a clustered index * Create a nonclustered index.
Chapter 4 Indexes. Index Architecture  By default data is inserted on a first-come, first-serve basis  Indexes bring order to this chaos  Once you.
Connect with life Vinod Kumar Technology Evangelist - Microsoft
A Guide to SQL, Eighth Edition Chapter Six Updating Data.
1 CS 430 Database Theory Winter 2005 Lecture 13: SQL DML - Modifying Data.
Unit-8 Introduction Of MySql. Types of table in PHP MySQL supports various of table types or storage engines to allow you to optimize your database. The.
CS4432: Database Systems II
1 Ch 11. Backup your data. 2 Backup Device An object contain location of backup device Location can be a file or a tape device.
October 15-18, 2013 Charlotte, NC Accelerating Database Performance Using Compression Joseph D’Antoni, Solutions Architect Anexinet.
Indexes Part 2 What type of Indexes are there? Make sure you have the pages 2 & 3 of the Lab for Indexes in front of you before playing this presentation.
Delete Data Database Administration Fundamentals LESSON 3.4.
1 Files and databases Suppose a school stores information about its students on record cards. Each student has their own card; this is their record. Record.
What is Flashback? Technology that allows you to revert the database to a point in time in the past Several versions of flashback available Different types.
Oracle 11g: SQL Chapter 5 Data Manipulation and Transaction Control.
Database Administration for the Non-DBA Denny Cherry twitter.com/mrdenny.
( ) 1 Chapter # 8 How Data is stored DATABASE.
WHEN DATABASE CORRUPTION STRIKES Presented by Steve Stedman Founder/Owner of Stedman Solution, LLC.
Database Administration
The Basics of Data Manipulation
Database structure and space Management
Database application MySQL Database and PhpMyAdmin
Finding more space for your tight environment
Designing Database Solutions for SQL Server
Introduction to SQL Server Management for the Non-DBA
SQL 101.
The Basics of Data Manipulation
Turbo-Charged Transaction Logs
HAVING,INDEX,COMMIT & ROLLBACK
Indexing For Optimal Performance
Transaction Log Internals and Performance David M Maxwell
Transactions and Concurrency
Backup & Recovery.
Presentation transcript:

Page 1 SQL Server Myths XV ENCONTRO DA COMUNIDADE SQLPORT Rui Ribeiro MCITP 2011/08/16

Page 2 SQL Server Myths An index FILLFACTOR is NOT used by regular DML operations –True or False ?

Page 3 SQL Server Myths An index FILLFACTOR is NOT used by regular DML operations - True ! From Books Online: “Important: The fill-factor setting applies only when the index is created, or rebuilt. The SQL Server Database Engine does not dynamically keep the specified percentage of empty space in the pages. Trying to maintain the extra space on the data pages would defeat the purpose of fill factor because the Database Engine would have to perform page splits to maintain the percentage of free space specified by the fill factor on each page as data is entered.”

Page 4 SQL Server Myths Once a backup completes, YOU CAN safely delete the previous one ! –True or False ?

Page 5 SQL Server Myths Once a backup completes, YOU CAN safely delete the previous one ! –False ! “If you go to restore, and you find your full backup is corrupt, what do you do? Well, if you don't have an older full backup, you most likely start updating your resume. You need to keep a rolling-window of backups around in case a disaster occurs and you need to restore from an older set of backups.”

Page 6 SQL Server Myths Log backups ALWAYS clear the log ! –True or False ?

Page 7 SQL Server Myths Log backups ALWAYS clear the log ! –False ! “If there's no concurrent data backup running, a log backup will always try to clear the log, and only succeed in clearing the inactive portion of the log - the log that's only considered 'required' by SQL Server because it hasn't yet been backed up. If anything else is holding the log 'required', it cannot be cleared, even though it has been backed up. Subsequent log backups will check again and again until the time comes when that portion of the log can be cleared.”

Page 8 SQL Server Myths Data type of a table IS NOT a key criteria while doing query tuning ! –True or False ?

Page 9 SQL Server Myths Data type of a table IS NOT a key criteria while doing query tuning ! –False ! “Data types decide how many rows can fit into a page. A wrong data type may consume 1000’s of excess data pages. This will directly affect IO. A simple char(100) can do this. Be cautious in choosing data types.”

Page 10 SQL Server Myths NULL won’t occupy space in SQL Server ! –True or False ?

Page 11 SQL Server Myths NULL won’t occupy space in SQL Server ! - Depends... (True & False...) “Yes for Variable length columns and No for Fixed length columns You can create a table with nullable fixed & variable length columns and check PAGE content.”

Page 12 SQL Server Myths Log backups WILL BE the size of the log ! –True or False ?

Page 13 SQL Server Myths Log backups WILL BE the size of the log ! –False ? “The log has to accommodate the space necessary to roll back active transactions, the amount of space returned by DBCC SQLPERF (LOGSPACE) on a busy system doesn't accurately reflect the amount of log records in the log. (…) And apart from that, a log backup is just all the log generated since the last log backup - not the whole log file usually - and if it happens to be, the first part of the explanation comes into play.”

Page 14 SQL Server Myths If the backup works, the restore WILL too! –True or False ?

Page 15 SQL Server Myths If the backup works, the restore WILL too! –False ! “Please don't fall into this trap. You must regularly validate your backups to give yourself a high level of confidence that they will work if a disaster occurs.”

Page 16 SQL Server Myths Truncate CANNOT be rolled back because it’s not a fully logged and only page deallocations is recorded ! –True or False ?

Page 17 SQL Server Myths Truncate CANNOT be rolled back because it’s not a fully logged and only page deallocations is recorded ! –False ! “You can rollback data from TRUNCATE IF surrounded by a transaction and session is not closed.”

Page 18 SQL Server Myths QUESTIONS ?

Page 19 SQL Server Myths References: – ngforsqlserver/archive/2011/06/28/my- favourite-sql-server-myths-and- realities.aspx – onSQLServerMyths.pdf

Page 20 SQL Server Myths