Notification

Icon
Error

Unable to back up database - I am unable to backup the SQL database - incorrect login

Posted: Friday, May 13, 2022 7:07:45 PM(UTC)
Jeff Palmer

Jeff Palmer

Member Original PosterPosts: 1
0
Like
Lansweeper is working fine. I can log into the web interface, scan items, etc. No problem. I have to migrate it to another server. I have followed the instructions, but I am unable to connect to the database.

I stopped the services, as described.

I installed the Microsoft SQL Management Studio

I enter the database name (localdb)\.\LSInstance

I set the Authentication to SQL Server Authentication

Here is where I'm stuck. The instructions state to log in with the ID used to install Lansweeper (admin in this case). BAD PASSWORD. During an update some time ago, the default web admin login was disabled and I had to use a different one to get into the web interface. I used that account. BAD PASSWORD. I did a lot of digging and found there is a user ID named lansweeperuser and tried that, but don't know the password as that is random generated on initial install.

I tried to change that password using the ConfigEditor, and matched the service and website passwords, but it will not save as it gets a "Login failed for user 'lansweeperuser'. (18456)", so I cannot change it. The DatabaseMaintenance tool has a "Backup" button, which does create a .bak file, but nothing documented how you restore this file.

Aside from the issues I'm having, this process is way overly complicated. If you have full admin rights on the web interface, there should be a database backup and restore option available there. The installer advanced option should have an import DB as well (with admin web account credentials required) as well as a database backup option (not just a link on how to back up the database).

I've searched the forum and the only apparent answer people get is that they are using the wrong password. Not very helpful. There is nothing in any of the backup/migration instructions for any kind of troubleshooting.

Brick wall What do I need to do to migrate this system?
FrankSc
#1FrankSc Member Administration Posts: 209  
posted: 5/17/2022 7:51:10 AM(UTC)
For a LocalDB database, only the Windows account that installed it is granted access by default. Resetting the lansweeperuser password also requires access to your database, so you can only change it after you regained access. Therefore, we suggest adjusting the user account that performed with an account you have access to. You can verify which user performed the installation by opening regedit on your Lansweeper server and checking the value for 'Inno Setup CodeFile: InstalledBy' in the following registry location:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Lansweeper_is1

Change the existing user account to a local or domain account you have access to and that has access to your Lansweeper server. Afterwards, you should be able to log in with that user using Windows Authentication. Your SQL instance name under LocalDB is (localdb)\.\LSInstance.

Afterwards you can also reset the lansweeperuser password: https://www.lansweeper.c...eeper-database-password/

Active Discussions

Lansweeper Lansweeper Dark Theme
by  mrobbins   Go to last post Go to first unread
Last post: Yesterday at 5:38:01 PM(UTC)
Lansweeper Detect Docking Stations
by  GlenH  
Go to last post Go to first unread
Last post: Yesterday at 3:52:13 PM(UTC)
Lansweeper Exclude non-windows assets from scanning by assetname
by  rapheren   Go to last post Go to first unread
Last post: Yesterday at 1:18:12 PM(UTC)
Lansweeper HTTPS Certifikate untrusted
by  pskup  
Go to last post Go to first unread
Last post: Yesterday at 9:20:07 AM(UTC)
Lansweeper Migrate to new host but without SQL
by  pskup   Go to last post Go to first unread
Last post: Yesterday at 9:03:14 AM(UTC)
Lansweeper Object reference error after updating to 10.2.0.0
by  Erik.T  
Go to last post Go to first unread
Last post: Yesterday at 8:10:25 AM(UTC)
Lansweeper Custom reporting - Asset Groups and AD Description
by  rbshawn   Go to last post Go to first unread
Last post: 6/29/2022 10:54:10 PM(UTC)
Lansweeper A FIX for an odd Scan Error WMI/DCOM from scanning server
by  danielm  
Go to last post Go to first unread
Last post: 6/29/2022 10:14:44 PM(UTC)