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 :)
No comments:
Post a Comment