Getting rid of event log references to mssqllocaldb

Posted:
Mon Feb 04, 2019 12:40 pm
by DannyC
Hi,
In the event log are several entries relating to the JiwDemo database on mssqllocaldb.
How can we get rid of those and any reference to JiwaDemo?
Re: Getting rid of event log references to mssqllocaldb

Posted:
Mon Feb 04, 2019 1:03 pm
by Mike.Sheen
That's odd.
When Jiwa.exe is first loaded, we read the JiwaConnections.xml from the users %appdata%\Roaming\Jiwa Financials\Jiwa 7\%version% folder.
If that file does not exist, we check to see if JiwaConnectionsTemplate.xml is present in the Program Files (x86)\Jiwa Financials\Jiwa 7 folder.
If that also does not exist, only then we will try creating a new JiwaConnections.xml and setting up a localdb database by copying JiwaDemo_Primary.mdf from the Program Files (x86)\Jiwa Financials\Jiwa 7\Data Files folder to the C:\Users\%username%\AppData\LocalMicrosoft\Microsoft SQL Server Local DB\Instances\mssqllocaldb folder.
The log entry you are seeing is the failure to copy to the C:\Users\%username%\AppData\LocalMicrosoft\Microsoft SQL Server Local DB\Instances\mssqllocaldb folder because the JiwaDemo_Primary.mdf file already there - but we check immediately before copying it to see if it is present - that's how we know whether to copy it or not.
It might be a permission issue on that file or folder - try manually copying the JiwaDemo_Primary.mdf file from the Program Files (x86)\Jiwa Financials\Jiwa 7\Data Files folder to the C:\Users\%username%\AppData\LocalMicrosoft\Microsoft SQL Server Local DB\Instances\mssqllocaldb folder - it might be enough to get it to skip the setting up of the localdb database.
Re: Getting rid of event log references to mssqllocaldb

Posted:
Mon Feb 04, 2019 1:42 pm
by DannyC
Thanks.
We have different Windows accounts set up to run the plugin scheduler service (not running on Local System) and the REST API service.
As these Windows users are not really logging into the Jiwa GUI, I gather based on the information you've provided that I should log into the Jiwa GUI and create a connection to their live Jiwa database. This'll create the JiwaConnections.XML file.
I can also see that the JiwaDemo_Primary.MDF and log file are already in their mssqllocaldb folder.
So if I create a connection for each Windows user i.e. to create a JiwaConnections.XML file, can I then delete the JiwaDemo_Primary database files from the profile? I'd like to free up 190Mb for each user who doesn't need the mssqllocaldb database.
cheers
Re: Getting rid of event log references to mssqllocaldb 

Posted:
Mon Feb 04, 2019 1:57 pm
by Mike.Sheen
DannyC wrote:So if I create a connection for each Windows user i.e. to create a JiwaConnections.XML file, can I then delete the JiwaDemo_Primary database files from the profile? I'd like to free up 190Mb for each user who doesn't need the mssqllocaldb database.
Yes - if the JiwaConnections.xml is there, we'll not try to copy the JiwaDemo_Primary.mdf.