Posts

Showing posts from 2013

TFS 2010 Compatibility

Quick note if you've recently upgraded to Visual Studio 2012 or beyond, and you're trying to create new projects on TFS 2010: You must still use the Visual Studio 2010 Team Explorer for that specific bit. If you looked at the compatibility page at http://msdn.microsoft.com/en-us/library/dd997788.aspx ("Compatibility between Team Foundation clients and Team Foundation Server"), you might be tempted to skip the text at the top and just scroll down to the "TFS 2010" section that applies to you. But if you do that, you'll miss this important point within the general guidance: "To create a team project or manage process templates on an on-premises TFS, you must connect using the same version level of Visual Studio or Team Explorer. That is, to create a team project on TFS 2013, you must connect from Team Explorer 2013." When you use VS 2012 against TFS 2010, and try to create a project, you may get the following error: "TF30170: The plugin Mic

SQL Server Deadlocks - Easy Quick Start Guide

If you find the topic of SQL Server deadlocks a little intimidating and mysterious, you are not alone. But fear not, this Quick Start lays out the practical shortcut I bet is sufficient for most scenarios. Definition: What is a Deadlock A deadlock occurs when 2 threads are competing for similar resources, and Thread 1 HAS A and WANTS B, and Thread 2 HAS B and WANTS A. They’re stuck. SQL Server picks a loser and throws error 1205 "Transaction... has been chosen as the deadlock victim." The BIG PROBLEM if your application has a lot of deadlocks is unpredictable application behavior . This can especially show up in apps that call large stored procs where the failing statement gets rolled back, but the proc itself may just keep on trucking with the next statement. This is all based on what kind of error handling you're doing, whether you have XACT_ABORT on, whether you're doing explicit transactions with BEGIN TRAN or not, etc. Very Probably your application is no

SQL Server Support Dates

This is the best link ever on SQL Server support dates, not sure how I missed it before: http://support.microsoft.com/lifecycle/?c2=1044  

Great Tool: Access to MSSQL (Access to SQL Server)

Have you ever been troubled by how terrible the "Import from Access" tools are in SQL Server? I can't even remember specifically how bad they are, I just remember the pain I felt the couple of times I tried. So I don't do it that way any more. I now just use this great tool from BullZip: Access to MSSQL. It works like you would expect, which is awesome. http://bullzip.com/products/a2s/info.php BullZip is one of my favorite companies because, like RedGate, they make simple tools that do their job well. Their PDF Printer goes on every machine I touch. It just works. Hope that helps, have a nice day.

How to do SQL Source Control with TFS and WinMerge when you don'town "SQL Source Control"

I am a huge huge fan of Red Gate's SQL Source Control  and use it every day at work. On my side projects though I can't necessarily justify the $400 price tag (yet). So in the mean time, I am using the following somewhat painful process to source control my scripts against TFS. (Microsoft now has a hosted " Team Foundation Service " where you can host your code for free.) The current solution uses Visual Studio 2010, SQL Server 2008 R2 Express Management Studio, and WinMerge. Here's the process: Initial Load: In your TFS working folder, add a "DB" folder. For me this sits next to my Visual Studio Solution folder. Add the DB folder to Source Control. In SSMS, right-click on your database, choose Tasks > Generate Scripts and script out the entire database into your new DB folder. I create a file for each object. In Source Control, check all that in. You now have your database under version control, kinda. Add an additional sibling folder called DBC

Useful DevExpress Videos

This is a living list of DevExpress videos that I've personally found useful and so are probably good for other DevExpress beginners. Full Applications "Get Started" Mini Application http://www.devexpress.com/Support/Webinars/details.xml?id=GetStartedASPNET Key Takeaway: Introduction to several core DevEx ASP.Net controls: menus, other navigation, gridview, pivot reports and charts, an Outlook style scheduler, and an Access style banded  report wizard. ASPxGridView Grouping Introduction http://www.youtube.com/watch?v=G8AXvi3E_jE Key Takeaway: To automatically group by column X, set it's GroupIndex=0.

How to use Relative Paths in ASP.Net

Core issue: how to make relative paths work inside a Master Page that is inherited by children at different folder levels, especially when your production site lives at a deeper folder level than your development site. CSS Relative Paths in ASP.net -  using runat="server" in the head tag allows you to just use the ~ "web app root"  style referencing: <head runat="server"> <title>ABC System</title> <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" /> </head> Unfortunately this doesn't work on Javascript references, so unless you're referencing a permanent CDN you end up doing something funky inside the body tag: <body> <!-- This jquery script is outside head so we can use Page.ResolveURL. For some reason: - head: runat eq server is often required for various asp.net features - head: runat eq server resolves "~" style CSS references, but not JS - a code block

How To Reassign a SQL Server Agent Operator

Neat trick in SQL Server 2005. If you need to reassign or replace a SQL Agent Operator, you can do so during the delete of the old operator. Like I had a bunch of stuff attached to a "ThisDBA" type operator and needed to reassign it to the "DBAGroup" operator. Here was the fastest path: Create your new Operator. Under "SQL Server Agent", "Properties", "Alert System": Change the "fail-safe operator" to your New Operator. Delete your Old Operator. Near the bottom of the Delete dialog screen is a "Reassign Operator" checkbox. Check that and choose your New Operator from the Popup. Click "Okay" twice and now your jobs and alerts are all attached to the New Operator. SWEET!