SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

Featured Script

The Voice of the DBA

Monitoring and Alerting

Monitoring your systems is important. It's not just me that thinks so, as plenty of experienced DBAs and developers know the value of monitoring. Heck, most people have learned to build some sort of metric collection into their software. Azure makes it easy to instrument your application and gather lots of data on how well things are working. Perhaps too easy to gather too much data and then you pay for it, or can't find time to analyze it. High performing software development shops use monitoring in their Continuous Integration (CI) and Continuous Delivery (CD) pipelines to better understand the health of their code and speed of their workflow, in addition to instrumenting the actual application.

For those of us that need to ensure our database servers are running well, we not only need monitoring, but also alerting. I ran across a couple articles that have thoughts about monitoring and the difference between monitoring and alerting. While I don't completely agree with all the items in the second piece, I do think that it's important that you get alerting working well.

I've had more than my share of un-actionable alerts, or even unnecessary alerts in my career. These days I've learned to better classify those items that matter to me. Most of the time what I find myself doing is downgrading most alerts because very few are actually mission critical. Far too often I've worried about 100% CPU or slow log writes or even zero sales in an hour or some other metric that "seems" critical. However, since few of these alerts stop business from flowing, I've learned to lower their priority or just remove them as alerts and allowing monitoring to track the values. I do need to watch the monitoring and fix issues, but I don't need to get up at 3am.

The other thing I've worked to do is automate responses to problems. If I know there are ways a computer can respond, let it. Don't get a human involved if the system can manage itself. Certainly the automated solutions don't always work, but have some escalation built in that only alerts a human after the system has exhausted its own responses. After all, we don't want to exhaust humans if we don't need to do so.

Steve Jones from SQLServerCentral.com

Join the debate, and respond to today's editorial on the forums


The Voice of the DBA Podcast

Listen to the MP3 Audio ( 2.4MB) podcast or subscribe to the feed at iTunes and LibSyn. feed

The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music.

Everyday Jones

Follow Steve Jones on Twitter to find links and database related items and announcements.

ADVERTISEMENT
SQL Monitor

How to fix SQL Server disk I/O bottlenecks (without a hammer)

In this new article, Simple-Talk editor Tony Davis explains step-by-step how to find and fix the root causes of disk I/O bottlenecks, including gathering data, avoiding knee-jerk fixes, and how monitoring tools can help. Read now.

SQL Compare

Industry standard tools for comparing SQL Server schema and data

Save time comparing and deploying SQL Server database schema, create error free deployment scripts in minutes, and fix errors caused by differences between databases. Try SQL Compare for free! Find out how.

SQL Source Control

How to track every change to your SQL Server database

See who’s changing your database, alongside affected objects, date, time, and reason for the change with SQL Source Control. Get a full change history in your source control system. Learn more.

Featured Contents

 

Execute a data-driven SSRS subscription from SSIS to archive a report

Stan Kulp from SQLServerCentral.com

This article demonstrates how to generate and save an SSRS report to a network folder when an SSIS package is executed. More »


 

Using SSIS to Load Data Into Azure SQL Data Warehouse

Additional Articles from SimpleTalk

It is a good time to get familiar with Azure SQL Data Warehouse. The first objective must be to get data into it. SSIS is a good way to start, and it’s certainly worth gaining confidence with the ETL processes supported by SSIS before setting off in other directions. Rob Sheldon provides a simple guide to getting up and running. More »


 

From the SQLServerCentral Blogs - Problems When Running DBCC SHRINKFILE On SQL Server Database

Hemantgiri S. Goswami from SQLServerCentral Blogs

Overview of the Situation While accessing data files in SQL Server, many issues may occur that may lead to frustrating situation... More »


 

From the SQLServerCentral Blogs - Is Resource Monitor (resmon) all I need to troubleshoot storage?

daniel 68103 from SQLServerCentral Blogs

I was recently doing some work on my Windows 10 desktop and placed a drive on one of the slower... More »

Question of the Day

Today's Question (by Steve Jones):

I have a query I want to execute that looks like this:

 INSERT EventLogger VALUES (@m, @d, @u)

However, I want to run this with sp_executesql and decide to do this:

 DECLARE @cmd NVARCHAR(MAX) DECLARE @p NVARCHAR(500); 
DECLARE @msg VARCHAR(200) = 'A problem'
DECLARE @dt DATETIME = GETDATE()
DECLARE @user VARCHAR(10) = 'Steve'

SELECT @cmd = N'INSERT EventLogger VALUES (@m, @d, @u)' -- select @p = -- exec sp_executesql xxx

Now, how should my parameter list, @p, be declared? Assume the values for @m, @d, @u will be taken from local variables and their sizes are correct.

Think you know the answer? Click here, and find out if you are right.


We keep track of your score to give you bragging rights against your peers.
This question is worth 2 points in this category: sp_executesql.

We'd love to give you credit for your own question and answer.
To submit a QOTD, simply log in to the Contribution Center.

ADVERTISEMENT

SQL Server AlwaysOn Revealed

Get a fast start to using AlwaysOn, the SQL Server solution to high-availability and disaster recovery. Read this short, 150-page book that is adapted from Peter Carter’s Pro SQL Server Administration to gain a solid and accurate understanding of how to implement systems requiring consistent and continuous uptime. Get Your Copy Today

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

I have enabled the Stretch Database feature for my sales database. However, I have a variety of datatypes in the tables used for tracking customers. Which of these datatypes is not allowed for tables that I'd like to stretch to Azure? (choose 3)

Answer:

  • text and image
  • XML
  • hierarchyid

Explanation:

There are a few restrictions on Stretch database tables for datatypes. The text/ntext/image types are not allowed. Neither are XML columns. The other big restriction is on CLR types, which include hierarchyid and spatial types.

Ref: Stretch Database Limitations - https://msdn.microsoft.com/en-us/library/mt605114.aspx


» Discuss this question and answer on the forums

Featured Script

Job Step Log Output file path

S M from SQLServerCentral.com

1. Copy the script.

2. Create the procedure

3. Run the script.

--------------------------------------------------------------------

exec usp_JOBSTEPLOG_CHECK

              @dbmail_profile= ' ', 
              @dbmail_recipient = ' ';
--------------------------------------------------------------------

More »

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.

SQL Server 2014 : Administration - SQL Server 2014

How can I configure SQL server Replication - I need to configure sql server peer to peer replication between local computer and remote server. I can't do it....

Unable to install SP1 or SP1 CU5 - I have SQL Server 2014 installed along with .NET 3.5 and 4.5 When I try to install SQL 2014 SP1 I...

Reports Migration - We are using the sql serveSqr 2008r2. We have SSRS reports. We are migrating to Sql 2014. But the database...


SQL Server 2014 : Development - SQL Server 2014

CTE Script Needed for delete statement - Hi, we are using below script for delete records.but it is taking time USE AdventureWorks2008R2; GO DELETE * FROM Purchasing.PurchaseOrderDetail WHERE DueDate = '20020701'; GO is there any possibility...

Changing a function to work with multiple records - I have a function that I use to compute the number of days that a patient is unavailable in order...

SSIS packages dont work all of a sudden through SQL agent Jobs - Hello there I have an issue with my SSIS packages they run fine on Studio 2013 but when you try...

Best way to filter columns - Hi, I have an application where we gather RSS news feed from around the world into this staging table. From that staging...

problem converting date on procedure. - hello, i have have a procedure that receives a date and a name and takes data from a table, but when...


SQL Server 2012 : SQL Server 2012 - T-SQL

Merge statement with conditions - Hello, I am trying to merge a temp table (@TempTable) into a table(@MasterTable). I have 6 fields I need to compare...


SQL Server 2008 : SQL Server 2008 - General

rows to columns - Hi Friends, I am trying pivot the rows but I am struggling to get the query. Here is the sample...

Return string between 2 characters from the end of the string - I have data in a field that looks like this: 'INV CRT IS15000467 1', 'INV CSH 144934 1', 'INV CSH...

UDF slow even when used as a persisted computed column - Hi, Today a view of ours slowed down to a crawl. It selects rows from a single table where column exported...


SQL Server 2008 : T-SQL (SS2K8)

Update 1 of 3 tables based on parameter - Hello, I am trying to dynamically update a table (as much as possible) based on a parameter. However, because I'm trying...

Need algorithm for Complex looping logic - Dear All, Hope all are good. I am Sql developer but i was in support ,now in developement, i am...


SQL Server 2008 : SQL Server Newbies

UNION with CASE statement - Hi Experts, I am getting error in running this query, It has to do with data type conflict. But I am...


Reporting Services : Reporting Services

Jasper Smith's SSRS Scripter - Anyone happen to have this tool handy? I used in the past to successfully migrate a 2005 SSRS instance to...


Data Warehousing : Integration Services

SQL in SSIS - I have an SSIS package where I gather servernames within execute sql task. Then I have a for each loop which...


Data Warehousing : Analysis Services

date Hierarchy (simple hopefully) - Hi I'm new to SSAS. I have a dimension table with multiple date fields and I would like to add a hierarchy...


SQL Server 7,2000 : T-SQL

function for highest value across columns - Hi, I have a table with 4 integer columns and need to know whether there is a function that will return...

SET NOCOUNT ON isn't working - I have two different SQL Server 2000 servers. Both are running the same version of SQL Server. I have the...

This email has been sent to newsletter@newslettercollector.com. To be removed from this list, please click here.
If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com.
This newsletter was sent to you because you signed up at SQLServerCentral.com.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.
This transmission is ©2015 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com