Show NTFS Allocation Unit Size and Partition Offset

To get the file allocation unit size of a partition (e.g. C:) :
fsutil fsinfo ntfsinfo c:
NTFS Volume Serial Number : 0xa8ecb969ecb93284
Version : 3.1
Number Sectors : 0x000000000c7ff4fd
Total Clusters : 0x000000000018ffe9
Free Clusters : 0x000000000017ac97
Total Reserved : 0x0000000000000000
Bytes Per Sector : 512
Bytes Per Cluster : 65536
Bytes Per FileRecord Segment : 1024
Clusters Per FileRecord Segment : 0Mft
Valid Data Length : 0x0000000000090000
Mft Start Lcn : 0x000000000000c000
Mft2 Start Lcn : 0x00000000000c7ff4
Mft Zone Start : 0x000000000000c000
Mft Zone End : 0x000000000003e000

Values should be 65536 bytes (64KB) for partitions on which SQL Server data or log files reside

To get the partition offset run this command:
wmic partition get BlockSize, StartingOffset, Name, Index
BlockSize Index Name StartingOffset
512 0 Disk #1, Partition #0 65536
512 0 Disk #2, Partition #0 32256
512 0 Disk #4, Partition #0 65536
512 0 Disk #6, Partition #0 65536
512 0 Disk #7, Partition #0 65536
512 0 Disk #3, Partition #0 65536
512 0 Disk #5, Partition #0 65536
512 0 Disk #0, Partition #0 16384
512 1 Disk #0, Partition #1 21474508800

SQL 2008 Cluster: The current SKU is invalid


I tried to add a second node to a SQL 2008 Cluster but it fails with this error:

The current SKU is invalid

Many blogs suggest to launch setup using command line but the solution is easier:

Copy Setup Files to second node and launch setup from there !


UPDATE:
Trying to add the 2nd node to the second SQL failover cluster instance I got again the problem and the solution is:

Copy the key from DefaultSetup.ini and delete file, then retry to install 2nd node and enter the key manualy.

Convert VHD from Hyper-V to Virtual PC

Many site said it's impossible to convert an Hyper-V VHD based image to Virtual PC 2007 format, I found a way to do it, basically you need to remove integration services before copy vhd, then replace hal.dll.

STEP BY STEP INSTRUCTIONS
1) Before copy VHD file, REMOVE Hyper-V Integration Services
2) Stop the Virtual Machine and copy the VHD file (let's call VirtualMachine1.vhd)
3) Start another virtual machine inside Virtual PC with same OS and use as a Secondary Disk the previous copied file (VirtualMachine1.vhd)
4) Using Windows Explorer from the previous started virtual machine open the Secondary Disk (let's suppose it's recognized as E:)
5) Replace hal.dll from the secondary disk (E:\WINDOWS\system32\HAL.DLL) using the file present into C: Partition.
6) Don't install ACPI drivers

More details about HAL.DLL file on: http://support.microsoft.com/kb/309283

HyperV Integration Services: Fatal error during installation

Problem:
Installing Integration Services on HyperV I got the following problem:
"An error has occured: Fatal error during installation."

Solution:
Delete (or rename) two file on the guest machine
C:\WINDOWS\system32\DRIVERS\wdf01000.sys
C:\WINDOWS\system32\DRIVERS\wdfldr.sys
Reboot and reinstall the integration services.

Released WinFail2Ban

Some months ago I wrote I was starting a new OpenSource project called WinFail2Ban.

Yesterday I released the first version and you can download from hrere.

More details on: http://winfail2ban.sourceforge.net

inSSIDer WiFi Scanner

inSSIDer is a FREE Application that scans Wi-Fi networks, tracks signal strength over time, and determines their security settings (including whether or not they're password-protected).





It's open source and require .NET Frameworks.





Metageek also provide Chanalyzer, a tool that allow to “visualize” the wireless landscape for effective explanations on how to optimize a wireless network.







Chanalyzer is bundled with an Antenna and cost about 400$

SQL Internals Viewer

SQL Internals Viewer is a tool for looking into the SQL Server storage engine and seeing how data is physically allocated, organised and stored.

All sorts of tasks performed by a DBA or developer can benefit greatly from knowledge of what the storage engine is doing and how it works. This tool has been designed to make database internals more accessible.

A Quick Start Video:
http://www.sqlinternalsviewer.com/Guides/allocation_map.html

For example you can see IAM (Index Allocation Map) for a specific index or the Allocation Map for a table.







More details on: http://www.sqlinternalsviewer.com/

Install Key Add License Validation, Product Activation, and Installation Keys to your .Net based application. Prevent casual copying and keep your customers honest. Similar to Microsoft style product activation where the product key is validated against an internet server. Supports server based creation, maintenance and validation of install key codes.

http://www.codeplex.com/InstallKey

Features

  • Uses 30 character install keys made up of only capital alphanumeric characters. This helps to make keys easy to read.
  • Data entry key validation. This helps to catch data entry errors before validating the Install Key against the server and can be used to distinguish between two keys for two different products.
  • Key validation against a central server. Validating an install key against a server should prove to be harder to bypass, as well as providing a mechanism to revoke rogue keys.
  • Server validation is only required once. A tamper-proof surety file that is specific to the machine where the installation occurs can be validated again at any time, without another round trip to the license server.
  • Your application specific license properties can be embedded within the tamper-proof surety file. These properties can be retrieved at any time after validation, and do not require a connection to the license server.
  • Unique key usage counting. Key usage counting is done by comparing machine specific hardware identifiers.
  • Written in Visual Studio 2005 and based on .Net 2.0. This should allow this product to also be used with Visual Studio 2008 and .Net 3.0, 3.5.
  • Database backend can be either SQL Server 2005 or SQL Express 2005

SSIS on a named instance


I ran into a fairly unique problem recently with SSIS in a clustered environment.
TITLE: Microsoft SQL Server Management Studio
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
ADDITIONAL INFORMATION:
The SQL server specified in SSIS service configuration is not present or is not available. This might occur when there is no default instance of SQL Server on the computer. For more information, see the topic "Configuring the Integration Services Service" in Server 2005 Books Online.
Login timeout expiredAn error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.Named Pipes Provider: Could not open a connection to SQL Server [2]. (MsDtsSrvr)

SSIS is not clusterable, so when the install took place, SSIS was configured on the first node like a non cluster install.
To Fix it:
- Stop SSIS Service
- Edit: "C:\Program Files\Microsoft SQL Server\90\DTS\Binn\MsDtsSrvr.ini.xml"
- Replace Server Name with Clustered Instance Name
- Start SSIS Service

xp_cmdshell sql 2008


In SQL 2008 Surface Area Configuration (SAC) is no more available...


The functionality of Surface Area Configuration for Services and Connections will now be performed by SQL Server Configuration Manager (SQL CM).


Right click server name, click facets and in the facet choose Sql Server configuration manager and configure the xp_cmdshell option.