cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
SSTechIII
Engaged Sweeper
Here is what happened:

I was running Lansweeper 3.0 on a server that had to be reformated so I backed up the Lansweeper database.

Once the server had been reinstalled, I installed Lansweeper 3.1 and tried to restore the database I had just backed up.

Unfortunately, it didn't work. I get an error message:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
Additional information:
Cannot open backup device 'C:\Lansweeper\backup.bak' Operating system error 5 (Access is denied).
RESTORE HEADERONLY is teminating abnormally. (Microsoft SQL Server, Error: 3201)


It seems to be a permission problem, I remember having to set up a lssqluser for the Lansweeper 3.0 installation. Now it is lssqluser31, could that be the problem?

Could somebody with SQL knowledge tell me what I have to do to be able to restore my backup?

Any suggestion is welcome.
3 REPLIES 3
SSTechIII
Engaged Sweeper
Well, I finally got it to work again.

I reinstalled SQL Server Express and ran the Lansweeper 3.1 installer again, choosing to install only the database (not the website or the service since they were already running). It didn't work as the installer would fail to create the database regardless of the type of authentication chosen.

So I used the scripts provided with Lansweeper 3.0 instead to successfully create the database. I then manually created a user (lssqluser) with the correct permissions.
Finally I followed the instructions to upgrade the database to 3.1. I was then able to restore my backup (after finding out that the Overwrite database option must be checked). I also had to update the config files for the service and the website to match the user name and password of the SQL user I had created manually.

SSTechIII
Engaged Sweeper
I agree with you that it seems to be a permission problem. At one point I had to restart the server, and I noticed the following event being logged when it restarted:

Event Type: Failure Audit
Event Source: MSSQL$SQLEXPRESS
Event Category: (4)
Event ID: 18456
Date: 6/20/2008
Time: 2:21:41 PM
User: N/A
Computer: MyServer
Description:
Login failed for user 'lssqluser31'. [CLIENT: my.server.ip.address]

Also, I checked the properties of the database and notice that my user account (domain\username) is the owner. Shouldn't lssqluser31 be the owner?

Even though I connect as domain\username using Management Studio Express, I can't browse to my own My Documents folder to select the backup file, so there's definitely a permission issue.

Where can I check the SQL permissions, and what are they supposed to look like? I checked the NTFS permissions and I have full control on the folders and files I want to browse to. I am a member of the Administrators group on the server.

Thanks for your help.
Hemoco
Lansweeper Alumni
This is typically an NTFS permission error : Cannot open backup device 'C:\Lansweeper\backup.bak' Operating system error 5 (Access is denied).
Is the file on this location and does your user (restoring the database) have permissions on it?