How to re-install Microsoft SQL Compact system

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
michelje
New user
New user
Posts: 9
Joined: 2019-05-08 17:19

How to re-install Microsoft SQL Compact system

Post by michelje » 2019-05-08 18:03

Hi,

Unfortunately and accidentally, I have uninstalled Microsoft SQL Server 2008 and therefore I cannot access to hmailserver.
So as to restore the access I have reinstalled "Microst SQL Server Compact 4.0 SP1 x64 ENU" but I don't know whether it's the right software and how I could reset the parameters to back into operation hMailServer ?

Do you have any idea how I can reset the parameters and do you think it's the right SQL server software?

Thank you in advance for your help.

User avatar
Dravion
Senior user
Senior user
Posts: 1328
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: How to re-install Microsoft SQL Compact system

Post by Dravion » 2019-05-08 22:39

For hMailServer 32-Bit you neeed the x86 Version, for hMailServer 64-Bit you need the x64 Version.

After installation restart hMailServer Service and try to login with hMailAdmin. If you get an Error, post the Error text into your next reply..
64-Bit builds of hMailserver

hMailServer-5.6.+ (HCD) https://github.com/hMailServer-ComDevs/hmailserver
hMailServer-5.6.+ (LTS) https://github.com/Dravion/hMailServer/releases

User avatar
mattg
Moderator
Moderator
Posts: 19810
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: How to re-install Microsoft SQL Compact system

Post by mattg » 2019-05-09 01:35

Also include the hmailserver.ini contents (with the passwords removed /masked)

Which version and edition of SQL Server were you using?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

michelje
New user
New user
Posts: 9
Joined: 2019-05-08 17:19

Re: How to re-install Microsoft SQL Compact system

Post by michelje » 2019-05-09 20:02

Thank you for your quick answers!

I have installed "Microsoft SQL Server Compact 3.5 SP1 x86" (which was the previous system) but it still doesn't work.
Moreover, the last error message I have is dated yesterday and said that "the provider is not found" (it seems that even the logs system no longer wants to work :| ).
I have published the file hmailserver.ini.
Do you have any idea of what's happening?

Code: Select all

ProgramFolder=C:\Program Files (x86)\hMailServer
DatabaseFolder=C:\Program Files (x86)\hMailServer\Database
DataFolder=C:\Program Files (x86)\hMailServer\Data
LogFolder=C:\Program Files (x86)\hMailServer\Logs
TempFolder=C:\Program Files (x86)\hMailServer\Temp
EventFolder=C:\Program Files (x86)\hMailServer\Events
[GUILanguages]
ValidLanguages=english,swedish
[Security]
AdministratorPassword=***
[Database]
Type=MSSQLCE
Username=
Password=**
PasswordEncryption=1
Port=0
Server=
Database=hMailServer
Internal=1

User avatar
Dravion
Senior user
Senior user
Posts: 1328
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: How to re-install Microsoft SQL Compact system

Post by Dravion » 2019-05-09 20:25

Thats completely reasonable because you need
Microsoft SQL Server Compact 4.0 SP1 x64 ENU

You can download the same MS-SQL-CE Runtime the hMailServer Installer will install from the official hMailServer
Developer Repo (click the Download Button)
https://github.com/hmailserver/hmailser ... 64-ENU.msi

PS: You cannot install a 32-Bit version on a 64-Bit OS, so 64-Bit is correct even if you install the official 32-Bit version
of hMailServer 5.6.7
64-Bit builds of hMailserver

hMailServer-5.6.+ (HCD) https://github.com/hMailServer-ComDevs/hmailserver
hMailServer-5.6.+ (LTS) https://github.com/Dravion/hMailServer/releases

michelje
New user
New user
Posts: 9
Joined: 2019-05-08 17:19

Re: How to re-install Microsoft SQL Compact system

Post by michelje » 2019-05-09 20:41

Thanks Dravion and the other for your assistance :)
I have installed "Microsoft SQL Server Compact 4.0 SP1 x64 ENU" but hMailServer remains unable to connect to the database.
Do I need to launch a "reset" of the database?
I have moreover tried to move the Logs folder so as to have those up-to-date.

User avatar
Dravion
Senior user
Senior user
Posts: 1328
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: How to re-install Microsoft SQL Compact system

Post by Dravion » 2019-05-09 20:57

There is something strange going on.
In the Repo on Github Martin has added SQL-CE Compact 4.0 SP1 but the Installer packages

Microsoft SQL Server Compact 3.5 (32-Bit Version only) which will trigger a Incompatibility Warning
on Windows 10 64-Bit.


For the official 5.6.7 Build 2425 (32-Bit Release) you absolutely need Version 3.5.

Howto fix:
ReRun hMailServer 5.6.7 Installer over your hMailServer Installation, it will fix your SQL CE Errors https://www.hmailserver.com/download_ge ... loadid=262

Or download and unpack and run the SQL-CE 3.5 Standalone Installer attached to my Post

PS: Dont forget to stop hMailServer service before you do anything and start the hMailServer Service again
it after you installed MS SQL CE.
Attachments
SSCERuntime-ENU.zip
(1.13 MiB) Downloaded 13 times
64-Bit builds of hMailserver

hMailServer-5.6.+ (HCD) https://github.com/hMailServer-ComDevs/hmailserver
hMailServer-5.6.+ (LTS) https://github.com/Dravion/hMailServer/releases

michelje
New user
New user
Posts: 9
Joined: 2019-05-08 17:19

Re: How to re-install Microsoft SQL Compact system

Post by michelje » 2019-05-09 21:26

I have actually re-installed hMailServer and now it works normally!
Nevertheless, I would like to transfer the old database's data to the new. Do you think I would need a SQL Management Studio ?

User avatar
Dravion
Senior user
Senior user
Posts: 1328
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: How to re-install Microsoft SQL Compact system

Post by Dravion » 2019-05-10 01:13

Why did you do this?
If you simply overinstall it about your existing Installation all DB Data would still be in a correct state.

Now you need to extract your old DBSettings and insert it into your new DB.
64-Bit builds of hMailserver

hMailServer-5.6.+ (HCD) https://github.com/hMailServer-ComDevs/hmailserver
hMailServer-5.6.+ (LTS) https://github.com/Dravion/hMailServer/releases

michelje
New user
New user
Posts: 9
Joined: 2019-05-08 17:19

Re: How to re-install Microsoft SQL Compact system

Post by michelje » 2019-05-10 10:19

Sorry, I haven't been clear enough.
I have overinstalled another hMailServer system. It has repaired the first original system.
However, now it (the original system) seems unable to read the data directory and the database.

Is there any process to force the update of the database?

User avatar
Dravion
Senior user
Senior user
Posts: 1328
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: How to re-install Microsoft SQL Compact system

Post by Dravion » 2019-05-10 10:22

Please provide Logfiles and Screenshots of Error.
We need detailed Informations to investigate the Problem.
64-Bit builds of hMailserver

hMailServer-5.6.+ (HCD) https://github.com/hMailServer-ComDevs/hmailserver
hMailServer-5.6.+ (LTS) https://github.com/Dravion/hMailServer/releases

michelje
New user
New user
Posts: 9
Joined: 2019-05-08 17:19

Re: How to re-install Microsoft SQL Compact system

Post by michelje » 2019-05-10 23:08

Sorry for my late.
Here are all of the screenshots of my first hmailserver system (C:\Program Files (x86)\hMailServer\) and hMailServer.ini.
The last logs I have are dated 8th of May.

The database directory:
Database directory.png
The data directory:
Data directory.png
hMailServer's homepage:
hMailServer home page.PNG
hMailServer.ini:

Code: Select all

[Directories]
ProgramFolder=C:\Program Files (x86)\hMailServer
DatabaseFolder=C:\Program Files (x86)\hMailServer\Database
DataFolder=C:\Program Files (x86)\hMailServer\Data
LogFolder=C:\Program Files (x86)\hMailServer\Logs
TempFolder=C:\Program Files (x86)\hMailServer\Temp
EventFolder=C:\Program Files (x86)\hMailServer\Events
[GUILanguages]
ValidLanguages=english,swedish
[Security]
AdministratorPassword=***
[Database]
Type=MSSQLCE
Username=
Password=***
PasswordEncryption=1
Port=0
Server=
Database=hMailServer
Internal=1
But perhaps there is a confusion between the two tables (first system's table and new's).
Do you think it can be possible to make a distinction between these tables?
Last edited by michelje on 2019-05-10 23:12, edited 1 time in total.

michelje
New user
New user
Posts: 9
Joined: 2019-05-08 17:19

Re: How to re-install Microsoft SQL Compact system

Post by michelje » 2019-05-10 23:12

Here are also other screenshots:
General Directory:
Software hmailserver.PNG
The general directory
Error logs:
Error logs.PNG
Event logs
Events logs.PNG

User avatar
Dravion
Senior user
Senior user
Posts: 1328
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: How to re-install Microsoft SQL Compact system

Post by Dravion » 2019-05-11 00:28

Ok, do the following.

1) Stop hMailServer Service
2) Goto C:\Program Files (x86)\hMailServer\Logs and delete (or backup first) and delete all logfiles
3) Start hMailServer again
4) Take a look at C:\Program Files (x86)\hMailServer\Logs and put all files into a ZIP Archive
5) Attache the ZIP Archive to your next reply.

This will help more then any long explainations whats really going wrong, so we can fix the Problem.
64-Bit builds of hMailserver

hMailServer-5.6.+ (HCD) https://github.com/hMailServer-ComDevs/hmailserver
hMailServer-5.6.+ (LTS) https://github.com/Dravion/hMailServer/releases

michelje
New user
New user
Posts: 9
Joined: 2019-05-08 17:19

Re: How to re-install Microsoft SQL Compact system

Post by michelje » 2019-05-11 07:26

I have found the problem thanks to your procedure!
hMailServer actually and automatically launches the new and blank system (C:\Program Files (x86)\hMailServer1\) instead of launching the old (even if I click on the original "hMailAdmin.exe").

Therefore, logging files are well stocked in the folder C:\Program Files (x86)\hMailServer1\logs) and do not relate error.
So, would it be possible to switch the database or the version of hMailServer Windows has to use?

Thanks

michelje
New user
New user
Posts: 9
Joined: 2019-05-08 17:19

[SOLVED]Re: How to re-install Microsoft SQL Compact system

Post by michelje » 2019-05-11 16:24

I've solved the problem.
I set the new hMailServer.ini using the paramaters of the first so as to force hMailServer to use the first database.
Thank you for your help.

Post Reply