e-guide sql server dba responsibilities & implications … · sql serer dba resposibilities...

15
E-Guide SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS OF INTEGRATION SearchSQLServer

Upload: others

Post on 30-Aug-2019

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: E-Guide SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS … · SQL SERER DBA RESPOSIBILITIES IMPLIATIOS OF ITEGRATIO. VERIFY SUCCESS OF DATABASE BACKUPS. One of a DBA’s key management

E-Guide

SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS OF INTEGRATION

SearchSQLServer

Page 2: E-Guide SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS … · SQL SERER DBA RESPOSIBILITIES IMPLIATIOS OF ITEGRATIO. VERIFY SUCCESS OF DATABASE BACKUPS. One of a DBA’s key management

PA G E 2 O F 1 5 S P O N S O R E D B Y

Home

Defining Half a Dozen Daily SQL Server DBA Responsibilities

In-Memory SQL Server: The Implica-tions of Integration

SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS OF INTEGRATION

atabase management” may sound like one responsibility to the uninitiated, but those who are more familiar know it’s just an umbrella term. Read on to explore six du-

ties that are the building blocks of effective SQL Server administration.

“D

Page 3: E-Guide SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS … · SQL SERER DBA RESPOSIBILITIES IMPLIATIOS OF ITEGRATIO. VERIFY SUCCESS OF DATABASE BACKUPS. One of a DBA’s key management

PA G E 3 O F 1 5 S P O N S O R E D B Y

Home

Defining Half a Dozen Daily SQL Server DBA Responsibilities

In-Memory SQL Server: The Implica-tions of Integration

SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS OF INTEGRATION

DEFINING HALF A DOZEN DAILY SQL SERVER DBA RESPONSIBILITIESBasit Farooq

SQL Server database administration can be a complex and stressful job. Database administrators’ responsibilities cover the performance, integrity and security of business data and SQL Server databases. To fulfill their duties and to make business data available to its users, database administrators have to perform routine DBA checks on their SQL Servers to monitor their status.

So, what critical aspects of SQL Server should all DBAs include in their daily checklist? Here are six daily DBA responsibilities that every SQL Server manager should perform.

Page 4: E-Guide SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS … · SQL SERER DBA RESPOSIBILITIES IMPLIATIOS OF ITEGRATIO. VERIFY SUCCESS OF DATABASE BACKUPS. One of a DBA’s key management

PA G E 4 O F 1 5 S P O N S O R E D B Y

Home

Defining Half a Dozen Daily SQL Server DBA Responsibilities

In-Memory SQL Server: The Implica-tions of Integration

SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS OF INTEGRATION

VERIFY ALL SQL SERVER INSTANCES ARE UP

Check the connectivity of each SQL Server on the network, and make sure all SQL Server instances are up. Ensure that all databases hosted on SQL Server instances are online. In addition to this, validate the storage of database data on the hard disk, which can be done by running the Database Consistency Checker (DBCC) CHECKDBcommand against each database on every SQL Server instance. Using DBCC CHECKDB with PHYSICAL_ONLY runs faster, which is useful when it’s running against very large databases (VLDBs) and when the server is not powerful.

INSPECT SQL SERVER ERROR LOGS FOR UNUSUAL EVENTS

No matter how well you have designed and tested a database, errors will occur. Because SQL Server stores all information, warnings and error messages in the operating system and application log files, reviewing error logs daily helps quickly and easily identify unexpected errors and security problems that have occurred in the SQL Server environment. By default, SQL Server keeps one current log and six archive logs. You can use either SQL Server Management Studio Log Viewer or the sp_readerrorlog undocumented stored procedure to view SQL Server error logs.

Page 5: E-Guide SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS … · SQL SERER DBA RESPOSIBILITIES IMPLIATIOS OF ITEGRATIO. VERIFY SUCCESS OF DATABASE BACKUPS. One of a DBA’s key management

PA G E 5 O F 1 5 S P O N S O R E D B Y

Home

Defining Half a Dozen Daily SQL Server DBA Responsibilities

In-Memory SQL Server: The Implica-tions of Integration

SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS OF INTEGRATION

VERIFY THAT ALL SCHEDULED JOBS HAVE RUN SUCCESSFULLY

Managing SQL Server Agent jobs is a key DBA responsibility, as they are crucial to any SQL Server environment. They are created and scheduled to perform critical business and operational tasks. Therefore, it is important to keep track of all scheduled jobs that have not run successfully.

SQL Server Agent stores history information for jobs, alerts and operators. History information is stored in the sysjobhistory table of the msdbdatabase. You view the history of jobs and job steps using the Job Activity Monitor. Or, alternatively, you can query sysjobhistory for failed jobs. For example, see the following query that keeps track of failed jobs over the previous 24 hours:

Page 6: E-Guide SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS … · SQL SERER DBA RESPOSIBILITIES IMPLIATIOS OF ITEGRATIO. VERIFY SUCCESS OF DATABASE BACKUPS. One of a DBA’s key management

PA G E 6 O F 1 5 S P O N S O R E D B Y

Home

Defining Half a Dozen Daily SQL Server DBA Responsibilities

In-Memory SQL Server: The Implica-tions of Integration

SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS OF INTEGRATION

Page 7: E-Guide SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS … · SQL SERER DBA RESPOSIBILITIES IMPLIATIOS OF ITEGRATIO. VERIFY SUCCESS OF DATABASE BACKUPS. One of a DBA’s key management

PA G E 7 O F 1 5 S P O N S O R E D B Y

Home

Defining Half a Dozen Daily SQL Server DBA Responsibilities

In-Memory SQL Server: The Implica-tions of Integration

SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS OF INTEGRATION

VERIFY SUCCESS OF DATABASE BACKUPS

One of a DBA’s key management tasks is backing up databases on a regular basis. This is because reliable backups are the most important tool in ensuring data recovery. Therefore, it is important for the DBA to check for database backups and validate that they have been successfully created and saved in a secure location.

SQL Server keeps information about each successful backup in the msdbdatabase. Information about each successful backup operation is stored in the backupset table, and information about each backup physical file in thebackupmediafamily table. For example, I wrote the following query, which can be used to check all databases’ backup status for any given SQL Server instance:

Page 8: E-Guide SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS … · SQL SERER DBA RESPOSIBILITIES IMPLIATIOS OF ITEGRATIO. VERIFY SUCCESS OF DATABASE BACKUPS. One of a DBA’s key management

PA G E 8 O F 1 5 S P O N S O R E D B Y

Home

Defining Half a Dozen Daily SQL Server DBA Responsibilities

In-Memory SQL Server: The Implica-tions of Integration

SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS OF INTEGRATION

Page 9: E-Guide SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS … · SQL SERER DBA RESPOSIBILITIES IMPLIATIOS OF ITEGRATIO. VERIFY SUCCESS OF DATABASE BACKUPS. One of a DBA’s key management

PA G E 9 O F 1 5 S P O N S O R E D B Y

Home

Defining Half a Dozen Daily SQL Server DBA Responsibilities

In-Memory SQL Server: The Implica-tions of Integration

SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS OF INTEGRATION

MONITOR DISK SPACE

Check the amount of free space available on each SQL Server and make sure you are not low on disk space. For best performance, it is recommended that all disks should have at least 15% or more free space available. You should also investigate the cause of disk free space fluctuation, if there is significant variation in the disk space from the previous day. Often the abnormal growth of the transaction log can cause of significant variation in the disk space.

To monitor disk space, you can use the undocumented stored procedurexp_fixeddrives. However, the limitation of xp_fixeddrives is that it can only be used to return information about fixed drives, not mount points. To monitor free space on operating system volumes, including the mount points, you can use the sys.dm_os_volume_stats dynamic management function. This dynamic management function returns information about the operation system volume on which databases files are located. For example, you can query this dynamic management function as follows, to get drive free-space information on any given SQL Server instance:

Page 10: E-Guide SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS … · SQL SERER DBA RESPOSIBILITIES IMPLIATIOS OF ITEGRATIO. VERIFY SUCCESS OF DATABASE BACKUPS. One of a DBA’s key management

PA G E 1 0 O F 1 5 S P O N S O R E D B Y

Home

Defining Half a Dozen Daily SQL Server DBA Responsibilities

In-Memory SQL Server: The Implica-tions of Integration

SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS OF INTEGRATION

Alternatively, you can write a PowerShell script or common language runtime, or CLR, procedure to monitor disk and mount-point free space.

REVIEW DATABASE SIZES AND GROWTH SETTINGS

The size of the databases on an SQL Server instance is a measurable quantity that should be tracked on each individual SQL Server instance. This should be done because if the database and transaction file runs out of space, then all transactions running against it will fail. Therefore, it is critical to monitor and manage the growth of the database.

You can use sys.master_files system view to monitor database growth settings and file sizes. This system view returns the status of all files for all databases, including those that are offline. For example, the following query returns the filename, size, location and growth settings of each database file for each database.

Page 11: E-Guide SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS … · SQL SERER DBA RESPOSIBILITIES IMPLIATIOS OF ITEGRATIO. VERIFY SUCCESS OF DATABASE BACKUPS. One of a DBA’s key management

PA G E 1 1 O F 1 5 S P O N S O R E D B Y

Home

Defining Half a Dozen Daily SQL Server DBA Responsibilities

In-Memory SQL Server: The Implica-tions of Integration

SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS OF INTEGRATION

IN-MEMORY SQL SERVER: THE IMPLICATIONS OF INTEGRATIONSerdar Yegulalp

It’s easy to be misled by terminology. When I first heard the term “in-memory database” applied to SQL Server, I made the same mistake many other people have. I thought, “How’s that different from an instance of SQL Server with tons of RAM and the buffer pooling for the program turned up to 11?” But in-memory SQL Server -- a major change, codenamed Hekaton and planned for the next iteration of the product -- isn’t like that. And why it isn’t like that has implications for how such an instance of SQL Server would fit in with the rest of your setup.

First, the basics. The label conveys the fundamental idea behind an in-memory database pretty accurately: It’s a database system where both the engine and as much of the data as possible are stored directly in RAM. Of course, this dramatically increases the speed of transactions, but this is only possible in a couple circumstances:

Page 12: E-Guide SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS … · SQL SERER DBA RESPOSIBILITIES IMPLIATIOS OF ITEGRATIO. VERIFY SUCCESS OF DATABASE BACKUPS. One of a DBA’s key management

PA G E 1 2 O F 1 5 S P O N S O R E D B Y

Home

Defining Half a Dozen Daily SQL Server DBA Responsibilities

In-Memory SQL Server: The Implica-tions of Integration

SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS OF INTEGRATION

1. The database and engine are small enough to fit into RAM by default2. The system contains enough RAM to hold both database and engine

With memory getting cheaper all the time and the average server sporting more of it, scenario #2 has been happening a lot more often than scenario #1 ever did. The sheer size of almost any professional SQL Server deployment all but guarantees the former rarely happens.

But it isn’t just memory that’s grown cheaper, faster and more plentiful. CPUs have also become dramatically faster and more parallel, and in order to keep that silicon from just sitting around doing nothing, more of what the database does is being moved into memory whenever possible.

Because of these issues, the forthcoming in-memory enhancements to SQL Server are being engineered to take advantage of all these trends. In a TechNet blog post entitled “The coming in-memory database tipping point,” David Campbell lays out some of these changes, including how the database itself is stored differently in memory (via a columnar, rather than a row-based, model).

Microsoft has in fact already adopted some of these methods for the PowerPivot add-on for Microsoft Excel. “In SQL Server 2012,” Campbell explains, “this ships as the xVelocity in-memory analytics engine as part of SQL

Page 13: E-Guide SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS … · SQL SERER DBA RESPOSIBILITIES IMPLIATIOS OF ITEGRATIO. VERIFY SUCCESS OF DATABASE BACKUPS. One of a DBA’s key management

PA G E 1 3 O F 1 5 S P O N S O R E D B Y

Home

Defining Half a Dozen Daily SQL Server DBA Responsibilities

In-Memory SQL Server: The Implica-tions of Integration

SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS OF INTEGRATION

Server Analysis Services.” In the long run, these components are going to be used in other parts of SQL Server, so that the power unleashed by in-memory databases can be used outside of the highly vertical solutions that currently exploit it most, such as data warehousing or analysis.

This brings up the first question I’ve been building towards: Would all of your SQL Server installations need to be upgraded to take full advantage of in-memory processing? The short answer is probably, but with three caveats:

1. IN-MEMORY DATABASE SOLUTIONS DO REQUIRE SOME RE-ARCHITECTING OF

YOUR EXISTING DATABASE

The columnar, rather than row-based, layout in-memory databases use will require some work on your part to set up. In one of the case studiesMicrosoft released to talk about SQL Server 2012’s existing in-memory features, they noted that while some changes to the database were needed, they required little more than “chang[ing] some metadata values.” Depending on the way your data is already set up, the amount of work may be minimal, but don’t assume it’s going to be zero.

Page 14: E-Guide SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS … · SQL SERER DBA RESPOSIBILITIES IMPLIATIOS OF ITEGRATIO. VERIFY SUCCESS OF DATABASE BACKUPS. One of a DBA’s key management

PA G E 1 4 O F 1 5 S P O N S O R E D B Y

Home

Defining Half a Dozen Daily SQL Server DBA Responsibilities

In-Memory SQL Server: The Implica-tions of Integration

SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS OF INTEGRATION

2. THE LARGER THE DATABASE, AND THE MORE IT FITS THE SCENARIO, THE

BIGGER THE PAYOFF

You’re likely to see the biggest improvements -- the ones most worth the effort of retooling everything to use in-memory processing -- from the largest workloads that are analysis- and data-warehouse-centric. Campbell notes that the columnar structure of in-memory databases “are not optimal for transaction processing workloads,” the conventional CRUD (create, read, update, delete) workloads that most of us learned about in DBMS 102. He does note that in time, in-memory technology will be expanded to include these more conventional scenarios, but it won’t happen right away.

3. CONSEQUENTLY, NOT EVERYTHING CAN OR MAY NEED TO BE MOVED TO AN

IN-MEMORY SOLUTION AT ONCE

The biggest and most processor-intensive workloads like data analytics are the first place to start. Moving them to an in-memory arrangement should get priority. Even if you haven’t started formally planning a migration to another version of SQL Server, it helps to get up to speed now on how the technology works and start planning for how to re-architect your future SQL Server system migrations.

Page 15: E-Guide SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS … · SQL SERER DBA RESPOSIBILITIES IMPLIATIOS OF ITEGRATIO. VERIFY SUCCESS OF DATABASE BACKUPS. One of a DBA’s key management

PA G E 1 5 O F 1 5 S P O N S O R E D B Y

Home

Defining Half a Dozen Daily SQL Server DBA Responsibilities

In-Memory SQL Server: The Implica-tions of Integration

SQL SERVER DBA RESPONSIBILITIES & IMPLICATIONS OF INTEGRATION

FREE RESOURCES FOR TECHNOLOGY PROFESSIONALSTechTarget publishes targeted technology media that address your need for information and resources for researching products, developing strategy and making cost-effective purchase decisions. Our network of technology-specific Web sites gives you access to industry experts, independent content and analysis and the Web’s largest library of vendor-provided white papers, webcasts, podcasts, videos, virtual trade shows,

research reports and more —drawing on the rich R&D resources of technology providers to address market trends, challenges and solutions. Our live events and virtual seminars give you access to vendor neutral, expert commentary and advice on the issues and challenges you face daily. Our social community IT Knowledge Exchange allows you to share real world information in real time with peers and experts.

WHAT MAKES TECHTARGET UNIQUE?TechTarget is squarely focused on the enterprise IT space. Our team of editors and network of industry experts provide the richest, most relevant content to IT professionals and management. We leverage the immediacy of the Web, the networking and face-to-face opportunities of events and virtual events, and the ability to interact with peers—all to create compelling and actionable information for enterprise IT professionals across all industries and markets.