This project has moved and is read-only. For the latest updates, please go here.

Moving SQLite databases between Windows & POSIX

Apr 26, 2015 at 2:02 PM
I've got the openPDC image running on a Raspberry Pi 2, seems to be running just fine. PMU Connection Tester shows data, etc. My goal is to use the Pi as a small standalone data recorder in substations that do not have network connectivity.

I would like to use the openPDC Manager to configure the database on the Pi. I'm able to copy the openPDC.db off and put it on my Windows machine, and I run the configuration utility to point the manager at the database, but when I run the manager, it won't let me "log in" to the database. The manager seems to want to use my Windows machine name to access the db (as MACHINE\user), whether or not I specify a machine name.

I tried creating a new openPDC.db on my Windows machine, but the Pi didn't seem to react too well to that (PMU Connection Tester failed to connect, for example).

Admittedly, I'm new to this software, so I'm trying to glean as much from the manuals as I can, and while moving between platforms is mentioned in the docs, it doesn't seem to be working as implied.

Thanks for any help!
Apr 26, 2015 at 9:52 PM
Edited Apr 26, 2015 at 11:03 PM
This seems to be in the area of users (per the documentation). I ran the script against my Pi's database, and the add-user.log file appears to reflect that my MACHINE\user was added in an Administrator role, but moving the openPDC.db file over to my Windows machine still won't let me open it. I think I'm running the script correctly -

sudo bash -u MACHINE\user (note that there are actually two slashes here, but only one is showing up in this post)

and taking the default that the new user will be an administrator (not specifying the -z option). The POSIX document just says "TODO: Complete section – also include “” script instructions", so I'm kind of reading between the lines.

The specific error message I'm getting for openPDC Manager is:

User "MACHINE\user" has not been assigned any roles and therefore has no rights. Contact your administrator.
Apr 26, 2015 at 11:25 PM
Hi Andrew__M,

The openPDC Manager actually expects the SID of your user account to be in the database. Normally, the usernames in the security tables in the openPDC database would be replaced by SIDs each time the openPDC service's configuration is reloaded. For a number of reasons, the service is unable to do that with your setup. Your best option may be to find the SID for your Windows account manually and use the script to add your SID instead of your username. The following page describes how to find your SID.

Apr 26, 2015 at 11:47 PM
Thanks Stephen - that worked! I've now got the file open in Manager.

On to... Step 1 of a bunch more... :)