Archive for the ‘On-Line Resources’ Category

New Toad for SQL Server Beta

Monday, May 21st, 2012

A new beta build of Toad for SQL Server (v5.7.0.527) is available at:

http://toadforsqlserver.com/beta.jspa

It’s free and, afaik, doesn’t have a short expiration date.  It contains popular features such as compare & sync (for database schemas, servers, and data), a full transaction log reader and DML undo feature, debugger, intellisense, auto-complete, code formatter, and a lot more.  Check it out!  (There’s also a version of Toad for Cloud Databases, which gives you SQL-like capabilities against a bunch of NoSQL databases).

This drop contains a couple of fixes in the areas: Database Object Editors, Job Management, Editor and Code Completion, Schema and Data Compare. The dev team is looking forward for your feedback/posts on the forum!  Tell ‘em I sent you.  ^_^

Thanks!

-Kev

Follow me on Twitter!

How is Microsoft IT using the Cloud?

Wednesday, May 2nd, 2012

Steve Balmer very publicly pronounced that Microsoft was “all in” for cloud computing and Windows Azure.  So that means Microsoft is using cloud for its internal IT as well as building products to utilize the cloud.  If you want to learn how Microsoft IT is using Windows Azure to move existing applications to the cloud and creating new applications for the cloud, click here: IT Showcase on Windows Azure.

 

Let me know what you think.  Accurate and informative? Or marketing fluff?

Thanks,

-Kevin

Follow me on Twitter!

SQLMag = SQL Server Pro. Goes all-digital!

Friday, April 27th, 2012

I was recently chatting with Megan Keller, my long-time editor for the Tool Time column and Executive Editor at SQL Server Pro, DevProConnectionsand SharePoint Pro.

I’ve subscribed to SQLMag ever since it was first put to print back in the late 1990′s.  (That’s a pic of me, on the right, in the shirt given my by SQLMag’s first publisher way back in the day).  I have many bookshelves in my office, but SQLMag consumes more than half of the shelf closest to my desk.  It’s that good.  Some of my personal favorites and perpetual must-read content are the columns SQL Server Questions Answered by Paul Randal & Kimberly Tripp as well as the always excellent columns Puzzled by T-SQL by Itzik Ben-Gan and all of the great content by Kalen Delaney.

Megan recently told me about the exciting changes afoot there.  For starts, SQL Server Magazine’s has new name—SQL Server Pro.  This name, as you can tell from its sister publications listed at the top of the blog post, puts all of the Penton Media properties on an equal and consistent footing.

Please take some time to check out hands-on, how-to content from SQL Server experts at sqlmag.com. The on-line magazine features the same great expert advice and writers as before.  And you can access my articles on sqlmag.com just as you have in the past.

Suggestions for the Tool Time Column?

And while we’re at it, let me know if there are any SQL Server related tools you’d like to see in the Tool Time column!  My requirements are that the tool must be free, must be supported, and of course must be relevant to SQL Server professionals.

 

Enjoy,

 

-Kev

Follow me on Twitter!

New White Paper: SQL Server Extended Events and Notifications

Wednesday, April 25th, 2012

Download the new white paper: How to Use SQL Server’s Extended Events and Notifications to Proactively Resolve Performance Issues

SQL Server comes with a wide array of tools for monitoring your environment. There are logs and traces that provide information when errors occur, but these are often used passively to react to events that have already occurred.  There’s PerfMon, and Profiler, and loads of Dynamic Management Views to check.  But where to look?

As database administrators (DBA), we need to monitor our environments proactively and create solutions as issues arise. In this white paper, we will look at a couple technologies – event notifications and extended events – that can help you achieve these goals. With these two features, we’ll look at the error log and deadlocks, and demonstrate how you can get relevant information delivered as it occurs. We’ll also look at ways that run-time errors can be captured and used to help reduce the amount of time required to investigate issues.

This white paper, written by SQL Server MVP Jason Strate (blog | twitter), is a free download but does require a registration.

And, as always, I enjoy your feedback.  Thanks!

-Kev

Follow me on Twitter!

ITPro, Re-architect Your Life

Thursday, April 12th, 2012

Have you ever found yourself wanting to make a major shift – in skills, in roles, in relationships? One of my good friends, Jimmy May (Blog | Twitter), accomplished a set of major career and lifestyle revisions including relocating to Redmond, taking on a huge new level of job responsibility as part of the Microsoft SQL Customer Advisory Team, and achieving the noted accreditation of Microsoft Certified Master.

Jimmy and I were chatting about undertaking major life changes like these and, as is often the case, his thoughts were too good not to share. Be sure to explore these excellent career development resources.  So here were some great pointers from Jimmy:

 

I’ve referred you before to J.D. Meier. Incredibly powerful guy. Here are some brief yet powerful posts:
What’s the Challenge?
http://sourcesofinsight.com/2011/06/24/whats-the-challenge
101 Ways to Motivate Yourself and Others
http://sourcesofinsight.com/101-ways-to-motivate-yourself-and-others/

Want more?
30 Days of Getting Results
http://sourcesofinsight.com/30-days-of-getting-results
Take a Tour of Sources of Insight
http://sourcesofinsight.com/2011/06/21/take-a-tour-of-sources-of-insight
Still not enough? Here are his three blogs:
www.sourcesofinsight.com
www.gettingresults.com
http://blogs.msdn.com/jmeier

Let me know what other resources you enjoy for professional and career development!

And if you’re really interested in developing your IT leadership and management skills, I encourage you to attend my Leadership Skills for IT Professionals seminar.  I’m presenting this full-day seminar in Dallas at the SQLRally on May 8, and in Louisville at SQL Saturday 122 on June 19.  Hope to see you there!

Thanks,

-Kev

-Follow me on Twitter at @KEKline

Dev Advice: Make a Tiny Dev Database Act Like a HUGE Prod Database

Friday, March 16th, 2012

Here’s an evergreen question.  It’s a question that never completely goes away.  But lately, I’ve been getting it a few times per week.  So I thought it’s time to readdress the question, which usually takes some form of the following:

I can’t really do effective development on my little dev laptop because our production SQL Server database is 15 gazillionbytes, way too big for my workstation.  What’s a uber-nerd to do? 

Well, maybe they didn’t use the word “uber-nerd”.  But you get my drift, right?  The production database is really, really big – unmanageably big for keeping a local copy.  So that means the dev either has to create a metadata-only version of the database, which won’t produce realistic query plans, or somehow crush their laptop under 15 gazillionbytes of MDF and LDF files.

Actually, you have a better alternative – a clone database, sometimes called a shell database.  Here’s how I described a cloned database a few years ago here in my Tool Time column for SQL Server Pro Magazine:

In effect, a cloned database includes all of the schema objects of the database (e.g., tables, views, stored procedures), as well as the statistics and histograms (the so-called “statistics blob”). This metadata is quite small by volume but can tell you what estimated query plans look like outside of a large production environment and how those estimated query plans might change when SQL Server is upgraded. Cloned databases are especially useful when the data is confidential, classified, or subject to privacy laws.

The article gives you all the detail you need to effectively and quickly create a small version of a big, ol’ production database that produces the same query execution plans as you’d get on the prod server.

If you’re struggling with doing development on a big SQL Server database, learn the ropes on cloned databases asap!  You’ll be glad you did.

Enjoy!

-Kev

-Follow me on Twitter

 

Have You Heard About the Microsoft TechNet Wiki?

Thursday, March 15th, 2012

Here’s another one to add to your list of browser bookmarks!

The TechNet Wiki covers Microsoft technologies from writers throughout the community for use by the community. As with all wikis, this grassroots effort needs your help.

Microsoft is encouraging everyone to contribute the effort – all you have to do is join. So start a whole new article, add your knowledge or draw from your experience to improve an existing article. You can start small or large… Join in at http://social.technet.microsoft.com/wiki/ or simply use the wiki as a new resource to answer your tough technology questions.

Enjoy,

-Kev

-Follow me on Twitter!

Must-Have Resources – SQL Server Backup & Recovery

Thursday, December 8th, 2011

One of the things that drives me crazy as I’m getting older is that my brain is losing the capacity to differentiate version numbers.  As I speak travel around speaking with customers and at conferences, I find my self saying things like “I can’t recall if this problem was fixed in SQL Server 2000 or 2005. But you don’t have to worry about that any more.”  Or things like “That feature was added in SQL Server 2008 R2, eh, or was that version 6.5.  DOH!” followed by a loud slapping sound as I whap my palm into my forehead.

The Internet doesn’t forget either.  Recommendations that were once helpful, if not outright essential, now are neutral or even downright bad. So now, whenever I put together new presentations, I always spend a lot of time in research, reassessing my knowledge on the topic.  (That doesn’t mean that I’ll extemporaneously say it wrong, because I speak in an off-the-cuff and rapid style. But at least my notes are usually correct).

 

Case In Point

Take backup and recovery (B&R), for example.  I’ve been writing about and performing B&R for years.  I’m even part of the team that builds the most popular B&R tool in the SQL Server space.  It’s an extremely important part of what I do.  And yet, even after spending a couple days re-researching topics (yet again), I still manage to get a few of the more specific details wrong because of changes over the years in the feature set.  How so?

During an Expert’s Perspective webcast last week (and available on-demand) covering the top backup and recovery mistakes on Microsoft SQL Server, I mis-explained the details concerning how SQL Server performs a differential backup.  A very clever SC on our team who was also attending the webcast pointed out to me after the session that I’d described differentials working at an 8k page-level when, in fact, they work at the extend-level (that’s a block of eight 8k pages). #FACEPALM!

When describing the differential backup I said that a bit was flipped on each page header and SQL Server would only back up those pages. Instead, whenever a page is changed a bit is recorded on the differential change map (1bit per extent), the backup process then queries these map pages and backs up those extents that have been marked as changed.

 

The Research Reveals

The cool revelation here is not that I can admit my mistakes.  The take-away from this blog post are all the great articles I read writing my latest slide deck.  These blogs and articles were so good that I needed to spread the word.  Add these to your must read list:

Virtual Log Files must be tamed!

Backup and Recovery Myth Busting

Other Good Sources

And just in case you need a refreshing in the basics of SQL Server backup and recovery, check these out:

Everybody Needs a Test Harness

Monday, October 31st, 2011

When you’re developing new Transact-SQL code or modifying some existing code, do you just launch directly into programming?

I know that I did just that, for years.  It wasn’t until I was trying to performance tune some existing code that I realized I hadn’t actually taken caching of data and execution plans into account.  So all those modified stored procedures that I was so proud of might not actually be faster than the first generation of procedures because I hadn’t checked to ensure that I was testing cached programs against uncached programs (and, by extension, the data used by those programs).  That’s easy enough to fix with a test harness.  Test harness were originally an actual, physical harness used by engineers to clamp down parts of an electrical or mechanical device they were prototyping.  Ours is no different.  It locks down all of the assumptions about our code (like my early, false assumption that I didn’t need to clear the caches) and adds a metric or two for good measure – literally – so we can better measure what’s happening in that code.

Here’s what my test harness looks like:

/* Transact-SQL test harness by Kevin Kline, http://KevinEKline.com, Twitter at kekline */
/* Flush dirty pages from the buffer to the database files. */
CHECKPOINT;
/* Flush the data cache and procedure cache, respectively. For DEV environments only! */
DBCC DROPCLEANBUFFERS;
DBCC FREEPROCCACHE;
/* Enable statistics tracking for IO and timings. Remember, SET commands remain enabled during a session until disabled. */
SET STATISTICS IO ON;
SET STATISTICS TIME ON;
-- Whatever SQL code you'd like to process goes below.
SELECT SalesOrderID
FROM Sales.SalesOrderHeader H
WHERE CustomerID = 344
GO
SET STATISTICS IO OFF;
SET STATISTICS TIME OFF;
/* Textual Execution Plans, if desired.
SET SHOWPLAN_TEXT ON;
SET SHOWPLAN_TEXT OFF;
*/

 

I also like to include the execution plans a lot of the time.  You might wonder why I don’t save the execution plans for the GUI in SSMS?  Well, I’m a big advocate of scripting in general because I like to automate activities.  By pulling the execution plans using scripts, I can use SQLCMD to schedule a large number of query executions during the evening and have the results ready for analysis when I come back into the office in the morning.  Workin’ smarter, not harder, Baby!

So how does this test harness work for you?  Do you use other elements in yours?  If so, share your experiences here!

Thanks,

-Kevin

-Follow me on Twitter

 

Troubleshooting Repeated Login Failures on SQL Server

Friday, October 21st, 2011

 I’d recently experienced a situation where I was getting repeated login failures to a SQL Server where I knew that I had the correct user name and password.  Each time, I’d get error 18456 in response.

“Login failed for user ‘<user_name>’. (Microsoft SQL Server, Error: 18456)”.


The challenge when troubleshooting this error message is that you may have a problem with SQL Server or you may have a problem with Active Directory or Kerberos, if you’re using one of those authentication technologies.

A False Trail


When times are good, and you’re able to make a connection, you can always query sys.dm_exec_connections, to see how you’re connecting, for example, using NTLM rather than Kerberos.  But that doesn’t help us when we can’t connect to the server at all.

In other situations, your problem might be caused by duplicate SPMs in Active Directory.  MVP Russell Fields documented a nice solution for ridding Active Directory of duplicate SPNs here.  Microsoft Support also mentions some troubleshooting steps forauthentication problems here.  Ok, that helps. But it’s not my solution. 


MVPs to the Rescue


Fortunately, my MVP buddies Edwin Sarmiento (blog | twitter) of Canada and Bitemo Erik Gergely (blog) of Hungaria had already discussed and solved the problem for me!

Something Erik pointed out, but hadn’t occurred to me at first, is that if you’re getting this SQL Server error message then you’ve actually reached the server and probably aren’t having a full disconnect error.  The second thing that Erik pointed out is the importance of the state element of this error message.  A lot of the time, you can simply ignore the
state element of an error message.  But not this time.  As it turns out, state is the key to solving the problem.  For example, a state of 18 indicates that the password must be changed.

Microsoft provides a pretty good description of the states of error 18456 here, but it leaves out a few things.  (You’ll get more useful info if you read all of the comments too).  But
again, Erik comes to the rescue by providing
a complete and concise list of error 18456 states here.


Microsoft Improves the Documentation


Even better for all troubleshooting situation involving state information, Microsoft has now added state descriptions for errors in Books Online, including error 18456.  When you look in your SQL Server error log, you see the state of the error and be able to make an accurate deduction about  the nature of the error!

Hope this helps,

-Kev

-Follow me on Twitter