17. December 2012 17:46
Found a very cool way to check backup and restore history of SQL Server databases. MSDB holds a host of usually irrelevant information until you really need it that is.
Here's the statment:
[bs].[database_name] as [source_database_name],
[bmf].[physical_device_name] as [backup_file_used_for_restore]
FROM msdb..restorehistory rs
INNER JOIN msdb..backupset bs
ON [rs].[backup_set_id] = [bs].[backup_set_id]
INNER JOIN msdb..backupmediafamily bmf
ON [bs].[media_set_id] = [bmf].[media_set_id]
ORDER BY [rs].[restore_date] DESC
3. October 2011 20:18
It's almost time for this year's Australian ALM conference. It's in Sydney again, this time at Le Montage in Lillyfield.
There is a great line up of international (and local) speakers, and if last year was anything to go by, it will be a jam packed 2 days again.
Very much looking forward to November rolling around for this one.
24. May 2011 13:29
It never ceases to amaze me the new and wonder spin that companies can put on the outsourcing train (wreck).
A letter I received from a company starting with M titled A Partner for Queensland IT Companies, has to come close to taking the cake.
They state, "We are the nearest and biggest offshore developer to Australia...". Oh so your the nearest, well that makes all the difference then.
They go on to say, "We tap into theintellectual skills base of Australia's nearest neighbour but many of our senior executives, including me are Australian." I don't think that anyone really cares very much about where your senior executives come from.
When are companies like this going to see past the quick buck their making, (by attempting to build systems at top rate while paying staff bottom rate), and realise that you're no cheaper than a company in Australia where the client can easily meet face to face with developers.
3. May 2011 16:17
There is nothing regular about regexs. Awesome expressions doesn't roll of the tongue as nicely but it's what they are.
Some cool uses I have found:
- Swap variable assignment direction i.e. a=b => b=a.
- Generation of class property code from a list of column names.
Today I had an Excel sheet with two columns that I needed to import into a QL database. On each row the values were tab separated. I was able to use "\(.+\)\t\(.+\)" in my find expression and "insert into temp values(\1,'\2')" in my replace expression to do the job.
They are complex to master and get crazy very quickly - regex for validating email addresses - but they are well worth the effort.
11. April 2011 19:05
I had to rebuild my machine today and came across Ninite a whole ago.
Apps are grouped and you select the ones you want to install and it builds a single install for you to run.
3. February 2011 09:48
Warning bells started to ring when Red Gate purchased .NET reflector. Why would a commercial organisation want to purchase a free tool?
Well the FAQ spells it all out. Ka Ching! The current "free" version of .NET Reflector 6.6 will EXPIRE May 30, 2011. The only option is to go to V7 which is a $35 perpetual license (until they decide to expire that one as well).
The best question and the poorest justification comes under the heading "Aren't you beaking a promise you made when you purchased .NET Reflector?". On no we didn't promise, but simply stated that was our intention.
I would not be surprised to find that .NET Reflector 6.7 does not contain a time bomb. And there is a certain life span for .NET Reflector anyway. When Microsoft releases .NET 6 or which ever number they pull out of the hat for the next version, .NET reflector will not be able to inspect assemblies of this version and beyond.
Way to go Red Gate - how not to do it!
There is the commercial side of things too. You can't expect people to do everything for free and they have to pay staff who work on the product. Again from the FAQ regarding an open source option, "This was one of the options we investigated, but it didn't make sense for us as a commercial company." Nice wording from the company sales and marketing goons, but if it doesn't make sense, then give it back to the community.
28. January 2011 17:58
I passed this exam yesterday. Not a hard one and from what I can see one of the easier of the .NET 4 series of exams.
Learnt quite a bit about EF4 which I have not done a lot of. We mainly use LINQ to SQL or stored procs with generated classes. Slowly getting a handle on disconnected objects in EF4 and how to persist to the DB on re-attach.
Well worth the effort of studying.
8. October 2010 12:38
Came across a very cool Codesmith solution called PLINQO that really speeds up the process of creating new database projects from scratch.
Open the QuickStart Codesmith template in Codesmith Professional and all you need to do is specify the database and you're away.
Generated with the solution's files is a LINQ to SQL dbml file ready to go.
You can also choose to:
- Create an interface project as either a dynamic data website or web application.
- Create to create a test project.
- Choose the location of the output files.
- Copy the Codesmith templates to the output folder with defaults set from the initial generation ie source database.
When you generate output on the generated CSP file all classes are automatically generated including files that you can add code to without wiping out the core functionality. Generated files that can be regenerated at any time have .generated in their names.
I see this as a alternative to using something like Visual Studio Lightswitch. PLINQO allows you to modify the templates to suit your needs for differing styles or standards.
You can check out more about PLINQO here.
30. July 2010 10:00
I found a neat way to find a table in a large LINQ to SQL (or Entity Framework) designer workspace. No more scrolling, zooming and panning. Click on the design workspace so a table etc is not selected and view the properties. Up the top of the properties window there is a drop down list of table. Select the table you're after and it's automatically selected in the design workspace.
15. June 2010 14:47
David Platt's article in the May edition of MSDN Magazine describes beautifully something I have been trying to put my finger on for a while now. His article is here.
- Your software has no value in and of itself.
- Software increases a user's happiness either by helping a user accomplish task or putting the user in a pleasureable state e.g. games.
- Users do not want to think about using your software.
Further on David quotes a retired NFL referee (but this would/should apply to referees of all sports), "We must do an outstanding job today because we don't want people to remember us. We must work the game so expertly that, later, it will seem as if we weren't even there".
To me this means software being an extension of the user, working within the user's defined rules and regulations and where possible not hindering the user by making them work the way the software was designed to work. Software should work the way the users want it to. I will qualify that to say the way users want to within their budget and sense of reasonableness. After all if customers had an unlimited budget they could still come up with wacky solutions that no one can use.
23. April 2010 15:13
Shift-Del in VS2008 very nicely deleted the whole line and if the option "Apply Cut or Copy commands to blank lines when there is no selection" in Tools -> Options -> text Editor was not set it would not replace the contents of the clipboard with an empty string! Duh!
Now in VS2010 Shift-Del no longer works on empty lines unless the above option is set. But now this means that I am overwriting my clipboard with empty text.
Update: I have since found that Ctrl-Shft-L will perform an Edit.LineDelete command which deletes the line regardless of what's in the clipboard. I have now remapped this command to Shft-Del and all is good.
23. April 2010 09:40
A friend recommended that a try a product called DPack from USysWare recently. It has turned out to be a very useful add on. They have just released a beta for VS1010 as well.
One feature that I particularily like is the ability copy and paste project references. Select one or more references, hit copy and paste them into another project.
There are many more useful features however. Alt-S for instance launches the solution browser (short initialisation required) where you can search for text throughout your solution, including filtering on classes, interfaces etc as well as starts with, ends with or contains.
22. April 2010 11:22
I found an awesome SQL search tool from Red Gate this morning. SQL Search 1.0, which is free at this stage, integrates in with SQL Management Studio and presents itself as a toolbar. Click the search button and a SQL Search document tab is create allowing you to search for text (including exact match option). You can specify an object type (or all objects) and a database (or all databases) on the selected server.
The search is blindingly fast as well. Even across all databases on a server. In my case 25 databases on this particular SQL2008 instance.
You can download from http://www.red-gate.com/products/SQL_Search/index.htm/.
16. April 2010 11:27
I am settling back into a work routine after the inaugural Australian ALM Conference which I found extremely worthwhile. Similar in style to a Tech.Ed with the important difference being that the ALM conference was all about what you can do here and now not in Tech.Ed style in 6-12 months time.
Speakers that I saw were all excellent and not too many people so that you couldn't get a question in.
Some topics that I found particularily interesting were, Intelli trace and the ability to run and debug code that a unit test was running and the test may have failed. Great step forward for testing and development integration, unfortunately only in the Ultimate edition of VS 2010.
11. March 2010 22:48
The first annual Application Lifecycle Management (ALM) will be held April 13 and 14 2010 at Luna Park in Sydney. You can check out the full details here. The conference will also incorporate the Australian release of Visual Studio 2010 and .NET 4.0.
There are two tracks currently available, ALM and Visual Studio (with rumours of a SQL Track) and has a host of big name local and international speakers.
Some of the topics on offer were broached at last year's Tech.Ed on the Gold Coast, but where Tech.Ed is a preview direction and what's possible, this conference will fill the gaps that left you hanging from Tech.Ed.
I can thoroughly recommend a look to see what's on offer.