Not new, but several excellent Visual Studio 2010 debugging tips from Scott Guthrie, some you probably know and perhaps the odd one you might not be aware of (or have forgotten about).
admin
Fixing Slow SQL Server Management Objects (SMO) Performance
Just recently I’ve been converting a small utility that uses SQL-DMO to use SQL-SMO instead (SQL-DMO is deprecated in SQL Server 2008 R2; if you really need to use it, install the Backward Compatibility Components from the SQL Server 2008 Feature Pack from the Microsoft Download Centre). Remembering all those posts saying how slow SMO was compared to DMO, a colleague mentioned this:
SMO has the concept of Delayed Instantiation of Object Properties. The concept consists of not returning every property of a database object when the object is requested. Some properties, like the StoredProcedure’s IsSystemObject property, are not returned by default when you request a Stored Procedure or a collection of Stored Procedures from the Database. It is only when you explicitly access the IsSystemObject property that SMO goes back to the database to get its value.
[…]
If you find your SMO code is running slowly, use SQL Profiler to check whether you are accessing properties that are not returned by default and creating extra roundtrips to the database. Force SMO to load those properties by default by using the Server.SetDefaultInitFields method:
Server server = new Server(); // Load all properties for columns server.SetDefaultInitFields(typeof (Column), true); // ...or load all properties for all objects server.SetDefaultInitFields(true);
To build an SMO application, you need to reference the SMO assemblies. Click ‘Add Reference’ and navigate to the folder
C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies
Add references to:
- Microsoft.SqlServer.ConnectionInfo.dll
- Microsoft.SqlServer.Smo.dll
- Microsoft.SqlServer.Management.Sdk.Sfc.dll
- Microsoft.SqlServer.SqlEnum.dll
(These are the minimum files that are required to build an SMO application)
Ref.: How to: Create a Visual C# SMO Project in Visual Studio .NET
SQL Server Code Name “Denali” CTP3 Released
SQL Server Code Name “Denali” CTP3 has been released. You can download from TechNet here (I believe it requires a current subscription).
Resources:
|
SQL Server 2008 R2 Service Pack 1 Released
The title says it all!: SQL Server 2008 R2 Service Pack 1
SQL Server 2008: The ultimate guide to the datetime datatypes
I mentioned Tibor Karaszi’s guide a while back and he’s updated it for the datetime datatypes added in SQL Server 2008. A great reference: The ultimate guide to the datetime datatypes
Windows Azure Platform FAQs
Just for my reference: Windows Azure Platform FAQs contains a nice overview and description of many of the aspects of Microsoft’s cloud offering, including SQL Azure, and a list of feature differences between SQL Server versions and SQL Azure.
Improving SQL Server Management Studio’s Tabs
I saw this post by Brent Ozar, Fixing SQL Server Management Studio’s Tab Text, and immediately made the changes whilst face palming myself and going “D’oh!” at the same time.
What are the improvements? First, the status bar is moved to the top of the tabbed window space, where your eyes are normally focused. Second it removes the server name, database name and login (which are all in the status bar anyway) from each tab title so that you can actually navigate around the tabs!
It’s been a constant source of frustration over many years of using SSMS, and I feel chastised for not investigating the options before. Nice one Brent!
MVC Mini Profiler
If you are working with ASP.NET MVC 3 you might be interested in this project: the mvc-mini-profiler. It includes standard profiler timing output but also comprehensive database profiling capabilities.
MVC Mini Profiler was designed by the team at Stack Overflow, and is actively being used there to monitor the Stack Exchange family of sites.
Visual Studio 2010 Web Standards Update
Visual Studio 2010 Web Standards Update is a free extension available for anyone who is using Visual Studio 2010 SP1 and it provides HTML5 & CSS3 support based on current W3C specifications.
It supports:
- HTML5 – Video, Audio, Input Type, Drag & Drop, WAI-ARIA, Microdata, Schema.org
- Browser API – GeoLocation & Local Storage
- CSS3 – 2D Transforms, 3D Transforms, Animations, Background & Borders, Basic Box Model, Basic UI, Behaviour, Colour, Flexible Box Layout, Fonts, Paged Media, Hyperlink Presentation, Line, Lists, Marquee, Media Queries, Multi Column, Namespaces, Presentation Levels, Ruby, Selectors, Speech, Syntax, Template Layout, Text & Transitions. It also supports vendor specific prefixes like –ms, -webkit & -moz.
Note: This extension is created by a bunch of folks within Microsoft in their spare time. This is NOT an official Microsoft product
Scott Hanselman blogged about it here.
You can download here: Web Standards Update for Microsoft Visual Studio 2010 SP1
Who’s Your Product?
Love this quote, which sums up the model of companies like facebook, google etc.:
“If you are not paying for it, you’re not the customer; you’re the product being sold.”
Originally(?) appeared here and quoted many times since.