Thursday, October 18, 2012

Sql Server 2008–Optimal BlockSize for drives

Did you know that the optimal block size for Sql Server data and log drives is 64Kb? (sometimes it can be 32kb)

An appropriate value for most installations should be 65,536 bytes (that is, 64 KB) for partitions on which SQL Server data or log files reside. In many cases, this is the same size for Analysis Services data or log files, but there are times where 32 KB provides better performance. To determine the right size, you will need to do performance testing with your workload comparing the two different block sizes.

To determine the block size of your drives, run the following command:

fsutil fsinfo ntfsinfo b:

Where b: is the drive.

The value you are looking for is “Bytes Per Cluster” and its reported in bytes.

Read about it at:

Visio 2010 crashes all the time–Windows 7

Visio 2010 kept on crashing on my Windows 7 64 bit machine.

Found out that if I disabled the “Send to bluetooth” plugin, the crashes went away. (File => Options => Add-Ins => Manage (Com Addins) ==> Go)

Thursday, October 11, 2012

Powershell–Get the size of a database

Here is a powershell script that uses SMO to determine the size of a database:

$dbServer = “xxxxxx”
$databaseName = "yyyyyy"

[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') | out-null
$sqlServerSmo = New-Object -TypeName Microsoft.SqlServer.Management.Smo.Server ($dbServer)
if ($sqlServerSmo.databases[$databaseName] -ne $null)
    Write-Host (($sqlServerSmo.databases[$databaseName].Size * 1MB) /1GB)
    Write-Host "Database $databaseName does not exist on server $dbServer"
Write-Host "Done"

Tuesday, October 02, 2012

Colorado Elections 2012–Blue Book

The Colorado 2012 blue book is available online at

This year the following measures are up for voting:

Amendment S - State Personnel System
Shall there be an amendment to the Colorado constitution concerning the state personnel system, and, in connection therewith, expanding the veterans' preference; increasing the number of candidates eligible to be appointed to a position; adjusting the duration of allowable temporary employment; allowing the flexibility to remove a limited number of positions from the system; modifying the residency requirement; adjusting the terms of service for members of the state personnel board; and requiring merit-based appointments to be made through a comparative analysis process?

Amendment 64 - Use and Regulation of Marijuana
Shall there be an amendment to the Colorado constitution concerning marijuana, and, in connection therewith, providing for the regulation of marijuana; permitting a person twenty-one years of age or older to consume or possess limited amounts of marijuana; providing for the licensing of cultivation facilities, product manufacturing facilities, testing facilities, and retail stores; permitting local governments to regulate or prohibit such facilities; requiring the general assembly to enact an excise tax to be levied upon wholesale sales of marijuana; requiring that the first $40 million in revenue raised annually by such tax be credited to the public school capital construction assistance fund; and requiring the general assembly to enact legislation governing the cultivation, processing, and sale of industrial hemp?

Amendment 65 - Colorado Congressional Delegation to Support Campaign Finance Limits
Shall there be amendments to the Colorado constitution and the Colorado revised statutes concerning support by Colorado's legislative representatives for a federal constitutional amendment to limit campaign contributions and spending, and, in connection therewith, instructing Colorado's congressional delegation to propose and support, and the members of Colorado's state legislature to ratify, an amendment to the United States constitution that allows congress and the states to limit campaign contributions and spending?

More info:

League of Woman Voters: