Wednesday, September 26, 2012

Veeam Error - File is locked by running session

I have recently been playing around with Veeam and trying to get replication up and going. It was working for a while on my test machine but then I ran into a problem with the error "File is locked by running session" when I kicked off the replication job.

I'm not sure what caused this but there is a Veeam KB on it here http://www.veeam.com/KB1487. It was however a bit brief and I wasn't sure how to run the commands when using SQL Express. After a bit of googling at multiple sites here is how its done...

(Note before starting make sure you dont have any backup or replication jobs running!)


1) Find the instance name of your Veeam installation (by default I believe this is just veeam but you can check it by going into services and look for the SQL Server (InstanceNameHere) service. In my case this was SQL Server (Veeam).

2) Open a command line and type sqlcmd -S localhost\veeam (replace the veeam here if your instance name is different). This will connect us to the database instance.

3) If successful you will now see a line with 1>

We still have to connect to the database so type select name from sys.database to list all the databases in this instance. My one was called VeeamBackup which I think is the default name.

4) Select the Veeam backup database by typing "select VeeamBackup" and then on line 2 type go. You should get a message saying  "Changed database context to VeeamBackup

5) Type the command from the KB article (copied below)

delete [Backup.TrackedActions.Leases]
delete [Backup.TrackedActions.LockItems]
delete [Backup.TrackedActions.Locks]

then type "go"

You should see something like 1 rows affected.

Now try and run your replication job again. It should now work and you can go and have another coffee :)

Wednesday, June 27, 2012

Windows Server 2012, VMWare Workstation and that flashing blue screen

Just wanted to make a quick note about installing Windows Server 2012 into VMWare workstation (I have version 8.0.3).

The initial installation went fine but when I installed VMWare Tools I ended up with a flashing blue screen for some reason. Booting into safe mode worked but removing and re-installing the tools did nothing. After dicking around in the settings of the VM for a while I discovered that if you turn on 3d graphics everything worked again.

Random, but there you go.

Friday, January 27, 2012

Internet Explorer 8 and Windows 7 with SAP NetWeaver

Recently had a problem with our SAP portal where single sign on (SSO) wouldnt work with the new Windows 7 clients we were deploying. Windows Vista with IE 7 would work fine but Windows 7, which has Internet Explorer 8, wouldnt work with single sign on. After a bit of troubleshooting we were able to narrow the problem down to authentication types. This blog post here was particularly useful in helping us troubleshoot... http://blogs.technet.com/b/instan/archive/2009/10/12/changes-in-default-encryption-type-for-kerberos-pre-authentication-on-vista-and-windows-7-clients-cause-security-audit-events-675-and-680-on-windows-server-2003-dc-s.aspx Basically to fix this we had to change a group policy to get this to work. If you change the policy under local computer policy / computer configuration / windows settings / security settings / local policies / security options / network security: Configure encryption types allowed for kerberos this should fix your problem. We had to tick all of the boxes as as Windows 7 uses aes256, our domain (at 2003 level) uses rc4, and it seems that NetWeaver needs DES_CBC_CRC and _MD5 to work. Make sure you try logging off and back on as well as a full restart when testing this as that was how we found that just ticking the DES options then prevented us from logging back on after a restart.

Tuesday, January 17, 2012

Expanding a VirtualBox hard disk for Vista or Windows 7

Thought I would add this here for my own reference as well as others as just spent a bit of time googling around the place to figure out how to do this (I am running Windows 7 as my host system). Long story short you need to use the VBoxManage command.

1) Open a command prompt and browse to the VirtualBox directory, in my case it is C:\Program Files\Oracle\VirtualBox> but it may be different if you installed VirtualBox somewhere else.

2) Type VBoxManage.exe then add the path and file name to the hard disk file that you want to expand and then add -- (note that there are 2 dashes there) resize and then the size that you want the disk to expand to. If you dont know the path to the hard disk file open virtualbox and click on file / virtual media manager then click on the disk you wish to grow and the path will be in the details windows at the bottom.

A properly formatted command might look like this:

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyhd "C:\Users\MyUser\VirutalBox Machines\Vista.vdi" --resize 20000

This would expand the hard disk of the virtual machine named Vista.vdi to 20 gigs. NB: Note the speech marks around the path to the .vdi file...you need these if there is a space in the name of the path to the file location.

3) Now boot your Vista or Windows 7 machine. Press Windows button and R to open the run command and type diskmgmt.msc This will open the disk management console. Right click on the disk you wish to grow and choose extend volume. Follow the prompts through and hey presto your disk has grown.

NB: You can extend the system volume (typically C: drive) of a Windows Vista, 7 or server 2008 machine natively but if you are trying it with XP you have to use third party tools. Hope this helps someone.