Custom settings are not saved in the User Profile when using Citrix XenApp


A quick fix for many issues with Citrix XenApp involves deleting (read: moving) the User Profile, and creating a new one by logging in again.

However, sometimes this creates another problem where custom settings are not saved between sessions, eg. SQL Server Management Studio will always display the “configuring the environment for first time use” message, and view options revert to default, every time you log in.


  1. Make sure you delete User Profiles correctly via Advanced system settings (DO NOT just delete from C:\Users):Delete-User-Profiles
  2. If there are still issues, check for and delete profiles ending with .bak in the registry (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList):
  3. Next time the user logs in, they shouldn’t get the “You have been logged on with a temporary profile” warnings, and custom settings should persist between sessions.

Open HP System Management Homepage and HP Version Control Agent without shortcuts

Usually, there will be a shortcut on the desktop (and in All Programs) to open the HP System Management Homepage, but here’s the URLs to use if you can’t find them for some reason:

HP System Management Homepage: https://localhost:2381

HP Version Control Agent: https://localhost:2381/vcagent

Storage Notes – IOPS, RAID, Performance and Reliability

I’ve read countless articles and posts in my quest to understand the nuances of storage.
I’ll add the useful links I have now, and will update this post over time.


These first three posts cover many aspects of storage, so they’re a great start:

Some important excerpts from above:

For databases and other random-access applications, throughput is much less important than I/O latency and the number of I/O operations per second (IOPS) the storage system can perform.

So does it make sense to add SSDs to a storage system with 1-Gbps connections? Sure does, if that storage system is going to run a database application like Oracle, MySQL or even Exchange, all of which manage data in small pages. To saturate even one 1-Gbps connection would take 15,000 8K IOPS, while a 12-drive SATA system without SSD would struggle to deliver 1,500.

This relationship between IOPS and latency is one very good reason to pay more attention to published results from benchmarks like JetStress, TPC-C and SPC-1 rather than simple performance tests like Iometer.

In the real world many RAID controllers don’t have the bandwidth or CPU horsepower to achieve total parallelization, so a 14+1 RAID 5 set will do small I/Os significantly slower than a 5+1 RAID set.

While an oversimplification–as all rules of thumb are–the storage admin’s rule of thumb to use RAID 10 for random I/O workloads and parity RAID for sequential workloads does hold water. Of course, sequential workloads, other than backups, are becoming rare in today’s virtualized data center.

[Read more…]

List all SQL Server backups for the previous 7 days

The following script will list all backups for every database for the previous 7 days, including backup type:

CONVERT(CHAR(100), SERVERPROPERTY('Servername')) AS Server,
CASE msdb..backupset.type
WHEN 'D' THEN 'Database'
END AS backup_type,
msdb.dbo.backupmediafamily.physical_device_name, AS backupset_name,
FROM   msdb.dbo.backupmediafamily
INNER JOIN msdb.dbo.backupset ON msdb.dbo.backupmediafamily.media_set_id = msdb.dbo.backupset.media_set_id
WHERE  (CONVERT(datetime, msdb.dbo.backupset.backup_start_date, 102) >= GETDATE() - 7)


An error occurred due to invalid data in the XML file used by this application. The XML file has been corrupted and should be reinstalled from the installation media.


You’ve updated your HP server using the latest ProLiant Support Pack, but after a reboot your network connections are down, and you get the following message when trying to open the HP Network Configuration Utility:

An error occurred due to invalid data in the XML file used by this application. The XML file has been corrupted and should be reinstalled from the installation media.


Uninstall the NIC drivers, then reboot:

Using SSD Drives for SQL Server

I’ve  just watched a great video explaining How to Optimally Use SQL Server with SSD’s Without Burning Them Out.

Here’s some notes:

  • 1 x SSD can give 4-5x the IOPS a 15k HDD gives. (I thought it would be more than this. Maybe because the video is from SQL Server Days 2011, and is a little out of date.)
  • The file allocation unit size (cluster size) recommended for SQL Server is 64 KB; this changes things when comparing IOPS stats from SAN. Ask for “Steady State IOPS”:
  • 4KB pages are standard on SSD
    • Smallest read/write structure.
  • Pages are grouped into blocks (128).
    • 512KB per block.
    • Smallest erasable structure
  • SSD write performance will degrade over time as it gets full.
  • SSD read performance stays roughly the same.
  • TRIM will help slow this down:
    • Check your OS supports TRIM by running this command
    • fsutil behavior query DisableDeleteNotify (should return 0)
    • If not 0, try to set it with this command:
    • fsutil behavior set DisableDeleteNotify 0
  • DO NOT defrag a SSD.
  • SSD typically don’t handle random writes very well.
  • Always use Enterprise SSDs, as they can last 10x longer than Prosumer SSDs.
  • Useful SMART tool is SSD Toolbox:
  • DO NOT use SSDs for TempDB, and maybe not even Log.
  • Base Solution – Tiered Infrastructure:
    • Eliminate bottlenecks:
      • Think 6Gbps and higher
      • Multilink
    • Use good controllers with Wear Levelling
    • Look at IOPS and response rates in Steady State
  • Problems with TempDB:
    • TempDB involves heavy Random writes.
    • Most used database
    • Enormous amounts of reads and erases
    • Kill (standard) SSDs extremely fast!
  • Log Files
    • Consider using Enterprise SSDs only, with RAID1 (mirrored).
    • Be careful with autogrowth.
    • Log files have more sequential reads and writes; more suited to HDDs.
  • Indexes
    • This is the best candidate for using SSD.
    • Place index filegroup on SSD.
    • Rebuild options that matter for SSDs:
      • MAXDOP=1 (this keep writes sequential)
  • Problem drive order of failure:
    • TempDB
    • Log
    • Data
  • Data Writes:
    • Logically view this as log entries being written and then used as instructions to write data pages out to the disk by an asynchronous process.
    • Heavily random access pattern; great for SSD.
  • Conclusion:
    • SSDs are not so good for sequential writes
    • SSDs are great for Random reads; indexes and Data files.
    • IO Volume matters, not just IOPS.

Recover a Corrupt Database Using SQL Server

Here’s an informative post explaining some options when recovering a corrupt database using SQL Server:

Don’t forget to backup the tail of the log!

Here’s the process, including a few extra tips if the original server is unavailable:

DNS Scavenging Explained

I just read this excellent post explaining DNS Scavenging:

Well worth a read, as this subject can be a little confusing.

Best Windows Shortcuts and Tips

I use keyboard shortcuts whenever possible, so I’m going to keep my favourite ones here for reference.


  • WIN + E = Opens Explorer window – details view is my fave.
  • CTRL + [ ‘+’ key on number pad] = Auto expands Explorer window columns to fit contents.
  • WIN + L = Locks computer.
  • WIN + D = Shows desktop. Another press maximises windows as they were previously.
  • WIN + R = Shows Run command box.
  • WIN + P = Shows options for multiple screens and projector.
  • WIN + X = Shows Windows Mobility Center.

Window Movement

  • Win + [Left Arrow] = Snaps window to left half of screen.
  • Win + [Right Arrow] = Snaps window to right half of screen.
  • Win + [Up Arrow] = Maximises window to full screen.
  • Win + Shift + [Left Arrow] = Moves window to the monitor on the left.
  • Win + Shift + [Right Arrow] = Moves window to the monitor on the right.


Jump into the commandline from a deep path in Explorer
Type ‘cmd’ into the address bar, or shift + right-click the folder and choose ‘open command window here’.

Make pinned Explorer shortcut open My Computer instead of Libraries


  1. Right-click the pinned Windows Explorer icon on your taskbar:
  2. Right-click the Windows Explorer again in the list, then select Properties:
  3. Change target to %windir%\explorer.exe Shell:MyComputerFolder

The trust relationship between this workstation and the primary domain failed


You’ve just reverted to a previous snapshot using VMware vSphere 5.1, and the next time you try to login, you get the following error:

The trust relationship between this workstation and the primary domain failed


Unjoin then rejoin the computer to the domain.

You can also change some settings in GPO for computer passwords.

Configuring the Password Expiry

Contrary to user account password policy, the machine account password is managed by two options:

  • The change interval specified the time between forced changes of the machine account password.
  • The expiry defines whether machine account password expires at all.

Both options are configured through group policies under the following node:

Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > Security Options

  • Domain member: Disable machine account password changes
  • Domain member: Maximum machine account password age

Both options are not configured by default.

Best Practices in Virtual Environments

In virtualised environments, machine account password changes should be disabled. By preventing machines from changing this password automatically, domain synchronization issues are effectively remedied.

By default, a machine account password is changed every 30 days. When a virtual machine has been in use for more than 30 days and is then reset to an earlier state, the snapshot contains an outdated password causing the machine to loose its connection to the domain.