 |
Blog
|
|
|

|
|
 |
Blog |
 |
| -->
 |
Posts Tagged ‘Developer’
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!
Tags: DBA, Developer, Quest Software, Toad, Tools Posted in Cloud, Databases, NoSQL, On-Line Resources, SQL Server, TCD blog post | No Comments »
Friday, May 18th, 2012

You might have noticed that Microsoft has recently launched a cool set of Trust Services for Azure. This is an application-level encryption framework that can be used to protect sensitive data stored on the Windows Azure Platform.
One of the hindrances to adoption of Azure that I keep hearing about is trust and security. If you want to learn more about protecting your data in the cloud you can read up HERE. I’m not pushing you to get into Azure (even though you should), nor am I subtly trying to make you feel guilty for ignoring the cloud in general nor Azure specifically (subtle, ain’t I?). But you really should consider learning a few things about database applications running in the cloud. Our reticence to learn about cloud computing is rough analogous to data processing professionals in the 1980′s who thought the microcomputers where a passing fad. They weren’t. And neither is cloud.
Let me know what you think … after you’ve read about Trust Services for Azure. Enjoy,
-Kev
-Follow me on Twitter!
Tags: Azure, cloud, Developer, Security, SQL Server 2012 Posted in Cloud, Databases, NoSQL, SQL Server, SQLMag, SQLServerPedia Syndication, TCD blog post | No Comments »
Thursday, May 17th, 2012
Speaking at a recent SQL Saturday, an attendee in one of my sessions wanted to know how they could more flexibly react to locks on their application than to wait for blocks to occur and then kill the SPID at the head of the blocking chain. They were also interested in some alternatives to using the SQL Server syntax like the WITH (NOLOCK) hint, since that might have unintended consequences due to allowing reads on uncommitted data.
One alternative I suggested is the SET LOCK_TIMEOUT n statement. Since most of the attendees hadn’t heard of this statement, I figured it’d make a good blog post.
When using the statement, you can set this context for the connection, for a batch of code (such as a function or stored procedure), or for a single SQL statement (excluding a few DDL statements such as CREATE/ALTER DATABASE). By passing a numeric value with the set statement, you specify the number of milliseconds that the statement will wait for a lock to be released before returning a locking error. 0 means don’t wait at all and -1, the default, means wait forever. Once changed, the new setting stays in effect for the remainder of the connection. So you might want to set it back to the default if you want it to apply to only one statement, say a SELECT, in a big batch of statements.
You can also get the same behavior by using the READPAST locking hint.
Hope this helps with those troublesome locking situations! Enjoy,
-Kev
-Follow me on Twitter
Tags: Developer, SQL Server 2012, Transact-SQL Programming Posted in Coding, Databases, Performance, SQL Server, SQLMag, SQLServerPedia Syndication, Transact-SQL Programming | No Comments »
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, DevProConnections, and 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!
Tags: DBA, Developer, SQL Server 2012, SQLMag, Tools & Scripts Posted in Databases, On-Line Resources, SQL Server, SQLMag, SQLServerPedia Syndication, Tool Time | No Comments »
Monday, March 19th, 2012
This might be most most overcommitted four-week period of time ever in my life. I’m tired just thinking about it! Not only am I traveling internationally and speaking over the next few weeks, I’m also helping on two book projects, learning some new applications from Quest Software, and helping on a small Transact-SQL refactoring project.
Swag on hand? I’ve got a special printing of 500 video training DVDs for this trip:
SQL Server Training on DMVs
Performance Monitor and Wait Events
Plus, I’ll have a few posters, stickers, and other goodies. Come see me!
SQL Saturday 105; Dublin, Ireland; March 24
My maternal grandmother was first generation Irish-American and, somehow, going to Ireland feels a lot like going home to grandmom’s house. And all my Irish friends make it feel like I’m going home to see the extended family – cousins and ‘once-removed’ family types. And on top of that, we get to talk about SQL Server at SQL Saturday #105! I’ll be doing a session called “Top 10 Things Every Developer Should Know”. I’ll also be hanging out at the Quest Software booth much of the day and, just for fun, I plan on doing a completely unscripted lightning talk.
SQL Server User Group; Maidenhead, UK; March 27
From Dublin, I head over to the lovely town of Maidenhead, UK. I’ll be spending a couple days in the Quest Software office there in Maidenhead, whose SQL Server User Group is lead by fellow Questie Richard Douglas (blog | twitter). I’ll be presenting after Business Intelligence impresario Jen Stirrup (blog | twitter). Space is limited, but there are still some seats left.
I’ve already heard from other twitterati that some great Microsoft SQL Server MVPs will be attending, like Tobiasz Koprowski (Blog | Twitter). If you live in south, central England, then this is your chance! Register here: http://www.sqlserverfaq.com/events/386/Maidenhead-UG-meeting-SQLBits-Preview-Speakers-include-MVPs-Kevin-Kline-and-Jen-Stirrup.aspx.
SQLBits; London, UK; March 29 – 31
This is the official launch event for SQL Server 2012! This is your chance to get the best and biggest dose of SQL Server 2012 training for quite some time. The free training day event is sold out. However, some of the training day seminars have open seats, including my seminar Leadership Skills for the Database Professional. This seminar distills the years of formal training and hard-won experience I’ve accumulated throughout my career starting as a developer leading a small team, through the founding and early startup years of PASS, into my later years leading a large, multi-national development organization. You’ll learn all the skills that are crucial for you to make the leap (and it’s a big one) from full-time technologist to a leader and manager of people.
And we’ll be hosting our popular SQL trivia quize and IT Horror Stories sessions as well. So be sure to plan on grabbing your lunch and heading into our fun lunch-time sessions!
I hope to see you at one of these upcoming events! Cheers,
-Kevin
-Follow me on Twitter
Tags: Best Practices, Career, DBA, Developer, Leadership, Professional Development, Quest Software, SQL Server 2012, Training Posted in Conferences, Databases, Presentations, Professional Development, SQL Server, SQLMag, SQLServerPedia Syndication | No Comments »
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
Tags: Best Practices, DBA, Developer, Performance, Transact-SQL Programming Posted in Challenges, Cool Technologies, Databases, On-Line Resources, Performance, SQL Server, SQLMag, SQLServerPedia Syndication, Tips & Tricks, Tool Time, Transact-SQL Programming | 1 Comment »
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
Tags: DBA, Developer, Performance, SQL Server 2008 R2, Tools & Scripts, Transact-SQL Programming, Troubleshooting Posted in Databases, On-Line Resources, Performance, SQL Server, SQLMag, SQLServerPedia Syndication, TCD blog post, Tips & Tricks, Tool Time, Transact-SQL Programming | No Comments »
Tuesday, August 16th, 2011
In last month’s column, “2012 Might Really Be the End of the World as We Know It,” I described a number of major developments in the IT industry that are likely to disrupt the life of database professionals everywhere. I categorize those four disruptors – virtualization, cloud computing, solid state drives (SSD), and advanced multi-core CPUs – into two broad groups. I’m going to continue an analysis of these disruptive technologies in inverse order. Today, let’s discuss SSDs.
[READ MORE ON DATABASE TRENDS & APPLICATIONS ]
Tags: Best Practices, Career, DBA, DBTA, Developer, FutureWatch, Goals, Virtualization Posted in Administration, Challenges, Cool Technologies, Databases, IO, Opinion, SQL Server, SQLMag, SQLServerPedia Syndication, Virtualization | No Comments »
Tuesday, August 2nd, 2011
EPIC FAIL! This was supposed to go out last week. But I didn’t schedule it properly, so I’d just like to point out that there are lots of other great webcasts to watch at the Pragmatic Works webcast URL below. Plus, my session will be available via streaming by the end of the week. And thanks the the 1600 folks who registered!
-=-=-=-
Come join me on Tuesday, August 2, 2011 11:00 AM – 12:00 PM EDT for a free webcast covering the internals and architecture of Microsoft SQL Server. It’s not everyday that a dry topic like this is presented in a fun and easy to understand format, so get in while the gettin’ is good. :^)
Registration is free, thanks to the fine folks at Pragmatic Works.
REGISTER HERE
And don’t forget to check out all of Pragmatic Works’ other free webcasts. It’s great stuff and it’s FREE!
Enjoy,
-Kev
Follow me on Twitter
Tags: Best Practices, DBA, Developer, Internals, Monitoring, Performance, SQL Server 2008 R2 Posted in Administration, Databases, Presentations, SQL Server, SQLMag, SQLServerPedia Syndication | No Comments »
Wednesday, July 20th, 2011

Remote Desktop Services Component Architecture Poster
Grab your own poster! A visual guide to key Remote Desktop Services technologies in Windows Server 2008R2
Virtually Free
Get the latest update rollup package for the Hyper-V role in Windows Server 2008 R2 and be sure to bookmark the Windows Virtualization Team Blog. Be sure to check out blog World Simplified is a Virtual World. And doncha evah neglect application virtualization, such as the goodness at the App-V Product Team Blog.
Let’s Optimize Some Desktops (Assuming You Have Gone Full Cloud Yet)
Check out The Official Microsoft Desktop Optimization Pack (MDOP) Blog where you can get cool tools like the Diagnostics and Recovery Toolset (DART), currently in its v7 beta release.
We Can Always Perform a Little Better
Have you checked out the Ask the Performance Team blog yet. You should! Then there’s the Microsoft Enterprise Networking Team blog. And if you’re looking for help with the Windows Server Core, be sure to check out the Ask the Core Team blog. Excellent stuff!
As the Tool Time columnist at SQL Server Magazine, I’m always on the lookout for great free tools that get on-going support from their creators. One common experience is finding a nice debugging tool, only to discover that there’s no information on how to interpret the debugger result sets! (SQLIOSim anyone?) That’s why I love the Microsoft Advanced Windows Debugging and Troubleshooting blog. Another must-have on your Favorites list.
Enjoy!
-Kev
Follow me on Twitter
Tags: Best Practices, cloud computing, DBA, Debugging, Developer, Performance, SQL Server 2008 R2, Tools, Troubleshooting, Virtualization, Windows Posted in Administration, Cloud, Cool Technologies, Databases, On-Line Resources, Performance, SQL Server, SQLMag, SQLServerPedia Syndication, TCD blog post, Tips & Tricks, Tool Time | No Comments »
|
|
 |
|
|