Oops, sorry,I have answered at the first question only.
About LocalDB, it is just a path with a series of .orbx files saved in it. So you can use octane.project.getPreferences to read the NT_LOCAL_APP_PREFS node, and get the LocalDB path with A_LOCALDB_DIR.
If not changed in Preferences, by default it is set to C:\Users\UserName\AppData\Roaming\OctaneRender\localDb.