Premium Essay

Sql Server and Fragmentation

In:

Submitted By tpw4dp1
Words 409
Pages 2
SQL Server and fragmentation

Just wanted to share a quick tip on querying on sql server fragmentation and fixing things if needed.

On our production server, which was setup by our sysadmin with all defaults as per configuration.
I was also told that there is a weekly job setup for rebuilding indexes if there is a fragmentation. I did accepted everything told at a face value. But now its time for some treasure hunting.

I had to do some sql BOL searching as it was not clear to me how/where I could find such stats. Finally came across sys.db_dm_index_physical_stats function which needs several arguments and based on it it will return details about an object's fragmentation.

Lets look at this function first.

sys.dm_db_index_physical_stats ( DB_ID, OBJECT_ID, INDEX_ID, PARTITION_NO, MODE);

Here db_id, and object_id can take [ null | 0 | default ] as a value and all mean same. To narrow down the results, you need to supply actual value.

Index_id could be [ null | -1 | default ], and all mean same, alternatively you can provide 0 if object is a heap, or actual id of an index if object is an index.

Partition_no is the partition id of index or heap. Alternatively it can be one of [ null | 0 | default ] as a value and all mean same.

Mode is a scan level used to gather the information.
It can be any of [ default | null | limited | sampled | detailed ], where default (null ) is limited.

So to begin with I took one of our biggest table and made the query as follows:

select * from sys.dm_db_index_physical_stats(DB_ID(),OBJECT_ID('dbo.Survey'),1,0,'DETAILED');

avg_fragmentation_in_percent fragment_count page_count
98.2717326087911 203005 205,003

As you can see, above results make anybody worry. It seems like either the job is not in place / is disabled or simply not working,

I tried to do initial defrag:

alter table

Similar Documents

Free Essay

Sql Defrag

...WHITEPAPER By Juan Rogers With an Introduction to SQL defrag manager SQL SERVER FRAGMENTATION EXPLAINED TM SUMMARY approach to identifying and resolving index fragmentation in SQL Server Warning: This white paper will get a bit technical as it is intended for DBAs who want to truly understand the details and key components of fragmentation in SQL Server. » How to judge the improvements gained by defragmenting your server » » The pros and cons of various approaches to managing fragmentation » The mechanics behind performance robbing data voids » How fragmentation affects performance » The difference between disk and SQL Server internal and external fragmentation The following is a summary of the key topics covered in this paper: monitoring and managing index fragmentation. This technical white paper will help you understand SQL Server fragmentation OVERVIEW As the data in Microsoft SQL Server tables changes their indexes change. Over time these indexes become fragmented. This fragmentation will adversely affect performance. This technical white paper provides information to help you understand the detailed mechanics behind fragmentation. It will also help you understand the methods and approaches for performing defragmentation so you can improve your SQL Server’s performance. SUMMARY WEB TWITTER FACEBOOK LINKEDIN EMEA APAC MEXICO BRAZIL US www.idera.com www.twitter.com/Idera_Software www.facebook...

Words: 3053 - Pages: 13

Free Essay

Siteprotector Database Tuning Guide

...Database Tuning and Administration Guide for SP6.1 February 22, 2007 IBM Internet Security Systems, Inc. 6303 Barfield Road Atlanta, Georgia 30328-4233 United States (404) 236-2600 http://www.iss.net © IBM Internet Security Systems, Inc. 1994-2006. All rights reserved worldwide. Customers may make reasonable numbers of copies of this publication for internal use only. This publication may not otherwise be copied or reproduced, in whole or in part, by any other person or entity without the express prior written consent of Internet Security Systems, Inc. Patent pending. Internet Security Systems, System Scanner, Wireless Scanner, SiteProtector, Proventia, Proventia Web Filter, Proventia Mail Filter, Proventia Filter Reporter ADDME, AlertCon, ActiveAlert, FireCell, FlexCheck, Secure Steps, SecurePartner, SecureU, and X-Press Update are trademarks and service marks, and the Internet Security Systems logo, X-Force, SAFEsuite, Internet Scanner, Database Scanner, Online Scanner, and RealSecure registered trademarks, of Internet Security Systems, Inc. Network ICE, the Network ICE logo, and ICEpac are trademarks, BlackICE a licensed trademark, and ICEcap a registered trademark, of Network ICE Corporation, a wholly owned subsidiary of Internet Security Systems, Inc. SilentRunner is a registered trademark of Raytheon Company. Acrobat and Adobe are registered trademarks of Adobe Systems Incorporated. Certicom is a trademark and Security Builder is a registered trademark of Certicom...

Words: 5367 - Pages: 22

Free Essay

Is3220 Paper

...Middle Attacks / Spoofing • Buffer Overflow • Fragmentation Attacks • Session Hijacking • Social Engineering • SQL Injection / Injection attacks • Eavesdropping • Replay Attacks There are many more attacks possible but these are the attack we focused on. With each threat, we analyzed how these attacks could be used against us and what counter measures would be used to prevent or mitigate such events from happening. DOS/DDOS Attacks- In general, Denial of Service attacks are used to flood an infrastructure with requests to the point where systems cannot keep up with the volume and crash as a result. As a business that relies on bidding and some public access, this can be troublesome as it would crash the website and stop business at critical times. In order to prevent such attacks, a NIDS or Network Intrusion Detection System can and should be implemented to “weed out” false requests from IP addresses that are flooding the system. For further protection the use of a “Honeypot” or trap for hackers can be used to direct any incoming attacks towards a lesser valuable target. Man in the Middle attacks- Man in the middle attacks are exactly what they sound like. The danger in these attacks lay with the hacker who lies between the connection of the client and server and either intercepts information between the two, or sometimes poses as the server to grab information from the client like passwords, or other...

Words: 1272 - Pages: 6

Premium Essay

Distributed Database

...hardware. Today’s world involves a diversity of different machines like Sun machines, PCs, IBM machines, HP machines, and workstations of various kinds. In distributed DBMS all these machines are able to incorporate the data on all of those systems. The plan is to be able to run the same DBMS on a different hardware platform. Operating system independence distribute DBMS is independent of the underlying operating system like UNIX, Linux, Sun Solaris or Windows. All the databases in this model are compatible with different OS versions. DBMS independence means this model different types of databases are integrated with each other to create distributed architecture and performs distributed transaction easily. These databases may be Oracle, SQL Server or DB2. The software and hardware components of a distributed database would consist of Computer workstation at all location sites called as nodes. Network...

Words: 944 - Pages: 4

Premium Essay

Lot Task 3

... Training Password Policies Operational Guidelines ◦ Physical Security Policies Classification of Information ◦ Access Privileges ◦ Background Checks of Employees and Proper Termination Processes  Proper Incident Response System ◦ Policies and Procedures  Establishing a Security Policy ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ Account Setup Password change policy Help desk procedures Access privileges Violations Employee identification Privacy policy Paper documents Physical access restriction Virus control      Misconfigurations in operating systems or networks Bugs in operating systems and Web applications Gaps created by server problems in applications Unpatched security problems in applications Gaps in security policies, procedures, or maintenance           Cross-site scripting SQL injection Command injection Cookie/session poisoning Parameter/form tampering Buffer overflow Directory traversal/forceful browsing Cryptographic interception Authentication hijacking Log tampering          Error...

Words: 558 - Pages: 3

Free Essay

Database Comparison

...Comparison between Oracle 12c and Microsoft SQL Server 2012 Students Name Institutional Affiliation Contents Introduction 3 History. 3 Processes 3 Transaction control. 3 Downtime processes. 4 Data guard and AlwaysOn comparison. 5 Memory 6 Network 8 Application 9 Conclusion 11 References. 12 Introduction In the modern world, businesses depend largely on databases and therefore in a case whereby such databases became unavailable then it would be an indication the businesses will also fail. As a result, there are lots of different databases in the market with different characteristics in term of memory planning, processes, and physical appearance. It is the obligation of an organization to understand the features of such databases to make the correct choice regarding which one to purchase. Therefore, an outline of the comparisons between the Oracle 12c and the Microsoft SQL Server 2012 has been given. History. The Microsoft SQl Server was initially released in the year 1989, and major improvements have been done o it since then. On the hand, the Oracle database was released in the year 1980. Both databases use the c++ language to carry out their operations which in turn makes them compatible with a lot of computing devices. However, Oracle uses C language as well. Microsoft SQL is widely used in Windows operating systems while on the other hand, Oracle is used in...

Words: 2480 - Pages: 10

Premium Essay

Its410 Portfolio

...is my recommendation that the company move to a more secure, robust, centralized database server company wide. The database system recommended is Microsoft SQL Server 2005 for its ability to be a central database to handle, customer information, widget inventory, company payroll, and other sensitive data. Our current process requires users to open separate databases to retrieve information or call other users to obtain information out of another database. This current setup is not only inefficient it is also not secure and provides not backup for disaster recovery. I have created a comprehensive plan that will outline all of the requirements for upgrading our systems to Microsoft SQL Server 2005. The following will be addressed: * Installation requirements for SQL Server 2005 * Databases being used * Data types needed * Database Objects * Mail * Security * Database Protection * Availability * Maintenance and monitoring The first step in transitioning over to a Microsoft SQL Server 2005 system will be to prepare our server systems and make sure they meet the minimum requirements for installing. The minimum requirements for Microsoft SQL Server 2005 are listed below: Hardware and Software Requirements (32-Bit and 64-Bit) * Pentium III Processor 600mhz or faster * 512mb of ram, 1gb of ram is recommended * Monitor * SQL Server graphical tools require VGA or higher resolution: at least 1,024x768 pixel resolution. ...

Words: 4256 - Pages: 18

Premium Essay

Srs for Airline Registration

...Table of Contents 1.         Introduction 1.1       Purpose 1.2       Document Conventions 1.3       Intended Audience and Reading Suggestions 1.4       Project Scope 1.5       References 2.         Overall Description 2.1       Product Perspective 2.2       Product Features 2.3       User Classes and Characteristics 2.4       Operating Environment 2.5       Design and Implementation Constraints 2.6       Assumptions and Dependencies 3.         System Features 4.         External Interface Requirements 4.1       User Interfaces 4.2       Hardware Interfaces 4.3       Software Interfaces 4.4       Communications Interfaces 5.         Other Nonfunctional Requirements 5.1       Performance Requirements 5.2       Safety Requirements 5.3       Security Requirements 5.4       Software Quality Attributes 1. INTRODUCTION 1.1              PURPOSE The purpose of this document is to provide the software requirement specification report for the  airline database. 1.2  DOCUMENT CONVENTIONS |DB |Data base | |DDB |Distributed Data base | |ER |Entity relationship | 1.3  INTENDED AUDIENCE AND READING SUGGESTIONS ...

Words: 1563 - Pages: 7

Free Essay

With the Development of Technology, More and More Robots Are Used in Various Fields,

...University of Mumbai B.E Information Technology Scheme of Instruction and Evaluation Third Year -Semester VI Scheme of Instructions Sr. Subjects Lect/ No 1 Information and Network Security Middleware and Enterprise Integration Technologies Software Engineering Data Base Technologies Programming for Mobile and Remote Computers Information Technology for Management of Enterprise TOTAL Week 4 Scheme of Examinations Theory T/W Practical Oral Total Hours Marks Marks Marks Marks Marks 3 100 25 -25 150 Pract/ Week 2 Tut/ Week -- 2 4 2 -- 3 100 25 -- 25 150 3 4 5 4 4 4 2 2 2 ---- 3 3 3 100 100 100 25 25 25 --25 25 25 -- 150 150 150 6 4 24 10 1 1 3 -- 100 600 25 150 -25 25 125 150 900 INFORMATION AND NETWORK SECURITY CLASS T.E. ( INFORMATION TECHNOLOGY) HOURS PER LECTURES : WEEK TUTORIALS : PRACTICALS EVALUATION SYSTEM: THEORY PRACTICAL ORAL TERM WORK : SEMESTER VI 04 -02 HOURS 3 ---- MARKS 100 25 25 1. Introduction What is Information Security? Security Goals. 2. Cryptography Crypto Basic, Classic Cryptography, Symmetric Key Cryptography: Stream Ciphers, A5/1, RC4, Block Ciphers, Feistel Cipher, DES, Triple DES, AES, Public Key Cryptography: Kanpsack, RSA, Defiie-Hellman, use of public key crypto- Signature and Non-repudiation, Confidentiality and Non-repudiation, Public Key Infrastructure, Hash Function: The Birthday Problem, MD5, SHA-1, Tiger Hash, Use of Hash Function. 3. Access...

Words: 3868 - Pages: 16

Premium Essay

Database Management System

...DATABASE S YSTEMS DESIGN, IMPLEMENTATION, AND MANAGEMENT CARLOS CORONEL • STEVEN MORRIS • PETER ROB Australia • Brazil • Japan • Korea • Mexico • Singapore • Spain • United Kingdom • United States Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Database Systems: Design, Implementation, and Management, Ninth Edition Carlos Coronel, Steven Morris, and Peter Rob Vice President of Editorial, Business: Jack W. Calhoun Publisher: Joe Sabatino Senior Acquisitions Editor: Charles McCormick, Jr. Senior Product Manager: Kate Mason Development Editor: Deb Kaufmann Editorial Assistant: Nora Heink Senior Marketing Communications Manager: Libby Shipp Marketing Coordinator: Suellen Ruttkay Content Product Manager: Matthew Hutchinson Senior Art Director: Stacy Jenkins Shirley Cover Designer: Itzhack Shelomi Cover Image: iStock Images Media Editor: Chris Valentine Manufacturing Coordinator: Julio Esperas Copyeditor: Andrea Schein Proofreader: Foxxe Editorial Indexer: Elizabeth Cunningham Composition: GEX Publishing Services © 2011 Cengage Learning ALL RIGHTS RESERVED. No part of this work covered by the copyright herein may be reproduced, transmitted, stored or used in any form or by any means graphic, electronic, or mechanical, including but not limited to photocopying, recording, scanning, digitizing, taping, Web distribution, information networks, or information storage and retrieval systems, except as permitted...

Words: 189848 - Pages: 760

Premium Essay

Computer Tricks

...EC-Council Press | The Experts: EC-Council EC-Council’s mission is to address the need for well educated and certified information security and e-business practitioners. EC-Council is a global, member based organization comprised of hundreds of industry and subject matter experts all working together to set the standards and raise the bar in Information Security certification and education. EC-Council certifications are viewed as the essential certifications needed where standard configuration and security policy courses fall short. Providing a true, hands-on, tactical approach to security, individuals armed with the knowledge disseminated by EC-Council programs are securing networks around the world and beating the hackers at their own game. The Solution: EC-Council Press The EC-Council | Press marks an innovation in academic text books and courses of study in information security, computer forensics, disaster recovery, and end-user security. By repurposing the essential content of EC-Council’s world class professional certification programs to fit academic programs, the EC-Council | Press was formed. With 8 Full Series, comprised of 27 different books, the EC-Council | Press is set to revolutionize global information security programs and ultimately create a new breed of practitioners capable of combating this growing epidemic of cybercrime and the rising threat of cyber war. This Certification: C|EH – Certified Ethical Hacker Certified Ethical Hacker is a certification...

Words: 61838 - Pages: 248

Premium Essay

Microsoft

...Functional Divestiture 18 2. Full Division Remedy 19 3. One-Time Licensing Auction 21 VIII. The Hybrid Structural Remedy 22 A. The Minimum Scope of the Windows Company 23 B. The Applications Company 24 C. Addition of Products into the Windows Companies 25 D. Other Operational Issues 26 1. Shareholders 26 2. Intellectual Property 27 3. Employees 27 4. Contracts 28 5. Pecuniary Assets and Investments 28 E. Measures to Preserve the Hybrid Structural Remedy 28 IX. BENEFITS OF THE HYBRID REMEDY 31 A. Operating Systems Competition 31 B. Competition in the Applications Market 32 C. Competition in Hardware Platforms 32 D. Browser Competition 33 X. THE OPERATING SYSTEM FRAGMENTATION ISSUE 34 A. Short-Run Compatibility 34...

Words: 15664 - Pages: 63

Free Essay

Srs for Tax Information Management System Project

...[pic] INDEX 1. Introduction: Abstract Company Profile 2. Synopsis 3. Requirement Analysis Document(RAD) 3.1 Introduction 3.1.1 Purpose Of The System 3.1.2 Scope Of The System 3.1.3 Acronyms And Abbreviations 3.2 Current 3.3 Proposed System 3.3.1 Overview 3.3.2 Functional Requirements 3.3.3 Nonfunctional Requirements 3.3.4 Pseudo Requirements 3.4 Functional Model 3.4.1 Scenarios 3.4.2 Use case Model 3.5 Object Model 3.5.1 Data Dictionary 3.5.2 Class Diagrams 3.6 Dynamic Model 3.6.1 Sequence Diagrams 4. System Design Documentation(SDD) 4.1 Subsystem Decomposition 4.2 Persistent Data Management 5. Forms 5.1 Input Forms 5.2 Output Forms 6. Coding 7. Testing 7.1 Module Testing 8. Conclusion 9. Bibliography [pic] ABSTRACT The main aim of our project is to prepare a Tax summary or Tax Returns of a client. In Tax Information system System, a client registers himself enters all the...

Words: 13048 - Pages: 53

Premium Essay

Decentralized Network Case Study

...QUESTION 1 Peer-to-peer also known as decentralized network A peer-to-peer network is quite small, simple and less expensive network structure that connects about 10 computers. All computers have both client and server functionality. This means all can send and receive at the same time. There is no central server on this type of a network. All computers on this network have the same capability to use the resources such as hardware, software and data files available on the network. This network is insecure in such a way that any files from any computer can be accessible by unauthorized people. Administration is hard compared to client server where a server is a central computer to control all clients on the network. On Bittorrent, peer-to-peer...

Words: 1677 - Pages: 7

Free Essay

Cmit 321 Final Exam

... a. odbcping b. ASPRunner c. FlexTracer d. DbEncrypt View Feedback Question 5 1 / 1 point In the TCP/IP stack, the __________ layer is where applications and protocols, such as HTTP and Telnet, operate. a. Internet b. network c. transport d. application View Feedback Question 6 1 / 1 point Attackers can use a simple test to find out if an application is vulnerable to an OLE DB error. They can fill in the username and password fields with __________. a. a pound sign b. two dashes c. a single quotation mark d. double quotes View Feedback Question 7 1 / 1 point __________ allow attackers to pass malicious code to different systems via a web application. a. SQL injection attacks b. XSS vulnerabilities c. Authentication hijacking attacks d. Command injection flaws View...

Words: 4865 - Pages: 20