LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

SQL Server sprawl, heard it twice in one day

Last week on Wednesday I attended a Quest seminar which was hosted by a couple of Quest people, one of them being Brent Ozar. On my way to New York City I was reading a couple of chapters of SQL Server 2008 Administration In Action written by Rod Colledge. I was totally blown away by what I read, this is probably the best SQL Server admin book I have ever read.

Read More...

Finding Out How Many Times A Table Is Being Used In Ad Hoc Or Procedure Calls In SQL Server 2005 And 2008

This was asked on twitter the other day and I emailed the person the solution to this. The solution uses dynamic management views and it is not perfect because of a couple of reasons. 1) The dynamic management views don’t keep this information forever, restart the server and your data is gone 2) If your table name is in a comment it will be picked up by this query 3) If the table name is part of another object it will also be picked up, for example if you have a table name customer and a view name customers then it will return a row if customers was part of the query but you are lloking for the customer table

Read More...

Arranging your VB.Net and C# code with NArrange

Today I discovered a nice little tool for Visual studio called NArrange. This is what it does according to their website. Reduces the amount of time developers spend arranging members within code files. With NArrange, you don’t need to worry about where you place a new member definition in a class… just type away and run NArrange prior to compilation. After formatting, the new member will be automatically moved to the appropriate location in the source file.

Read More...

Expanding a VMWare disk the easy way

Today I wanted to upgrade an existing VM from windows 2003 server to windows 2008 server. The machine has 10GB virtual disk but windows 2008 was not too pleased with that, it needed more. It needed 9606MB free space on the disk to complete the order. I knew I had been looking to do this before and I knew it wasn’t easy. But then I found a reference to the VMWare vCenter Converter.

Read More...

TTDing an interview question

Today I noticed this older post on stackoverflow and the first thing I thought, this would be great if done in a TDD manner. Very short too. The question is **Design a function f, such that: f(f(n)) == -n Where n is a 32 bit signed integer; you can’t use complex numbers arithmetic. If you can’t design such a function for the whole range of numbers, design it for the largest range possible.

Read More...

Instance design; Where to do your work as a DBA and DB Developer

One thing I stress to all the developers and DBAs I talk to is the concept of creating custom objects and where to place those objects on any particular instance. To get the obvious out of the way, we all must keep in mind that all third parties (most) come with restrictions on modifying them in any way. This meaning alteration to any objects, additional objects or process altering objects to any database on an instance.

Read More...

Dynamic Data Sources in SSRS

This as many of my blogs, is another DBA task and typically isn’t required in a user released reporting situation. I have used it a few times for very specialized reports that the user community runs, so it’s possible that you may also be able to use it there. One thing I stress is the use of unsafe assembly in this write and the examples I just put together in order to write the blog for everyone.

Read More...

When Books On Line is not really correct

A question was posted in our SQL Server programming forum today. A person had this stored procedure CREATE PROCEDURE TestStuff @id INT, @Val1 VARCHAR(20), @Val2 VARCHAR(20) AS SELECT @id,@Val1,@Val2 Executing it like this works EXEC TestStuff 1,'test1','Test2' However executing it like this also works EXEC TestStuff 1,test1,Test2 So even though you don’t enclose the character value in quotes it works. From the SQL Server 2008 Books Online (June 2009) EXECUTE (Transact-SQL) page, I changed the color to red for the sentence that is wrong.

Read More...

Highly Critical Adobe Reader/Acrobat SWF Content Arbitrary Code Execution Vulnerability

Another critical Adobe Reader Vulnerability. A vulnerability has been reported in Adobe Reader and Acrobat, which can be exploited by malicious people to compromise a user’s system. The vulnerability is caused due to an error in authplay.dll when processing SWF content and can be exploited to execute arbitrary code. From Adobe’s security advisory A critical vulnerability exists in the current versions of Flash Player (v9.0.159.0 and v10.0.22.87) for Windows, Macintosh and Linux operating systems, and the authplay.

Read More...

Windows 7 and Windows Server 2008 R2 Released To Manufacturing

Windows 7 and Windows Server 2008 R2 have both RTMed!! Build 7600 was declared as RTM Below is a picture of Steve Ballmer and Steven Sinofsky. Steve Ballmer is holding the gold disk, he must be feeling relieved. When will you get Windows 7 RTM? That is the big question isn’t it? Developers with MSDN Subscriptions will be able to download Windows 7 RTM in English on August 6th and remaining languages by October 1st.

Read More...