logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Problem Database Mirror MSsql & MSsql possible with never Vers. as .94 ?
MSrobots
#1 Posted : Wednesday, December 21, 2011 8:06:48 AM(UTC)
Rank: Newbie

Groups: Member
Joined: 12/21/2011(UTC)
Posts: 4
Points: 12
Location: Clearlake Oaks,CA

Dear Ivar,

thank You for your great Mailserver. I am using it for a small company I am working for. But they keep everything. So one reason for me to use your mailserver was to rewrite your copy example for Imap4 and import all OLD Mails since ~1992.

Everybody is happy - Mails get Indexed by different Application of mine and IMAP4 just looks in smaller subfolders, so it works also.

BUT all my Databases are mirrored and for some reasonI do not understand I can not add Failover Partner to connectionstring.

So this

<API_initstring>connectionstring=Data Source=192.168.10.21,49433;Network Library=DBMSSOCN;Application Name=LumisoftMailserver;User Id=xxxxx; Password=yyyyy;Initial Catalog=mailserver
mailstorepath=Settings\Bauintegra\MailStore\</API_initstring>

works but If I add Failover Partner

<API_initstring>connectionstring=Data Source=192.168.10.21,49433;Network Library=DBMSSOCN;Failover Partner=192.168.10.24,49433; Application Name=LumisoftMailserver;User Id=xxxxx; Password=yyyyy;Initial Catalog=mailserver
mailstorepath=Settings\Bauintegra\MailStore\</API_initstring>

it stops working.
(Server seems not to start successful - no client can connect no Mail in/out.)

I am helpless. The same connection works with web-application on the same server and does failover and back.

After falling Database back Lumisoft Mailserver starts working again without restart or other help. Just fine.

Do you have any clue why ?

And any way to stay on MS SQL but get never Version as .94 ? I feel left behind and I do not think that xml is possible I am running Lumisoft Mail with over 90 GB Database (.mdf) and it will still grow in the next years to come.

Mike
ivx
#2 Posted : Wednesday, December 21, 2011 8:53:09 AM(UTC)
Rank: Administration

Groups: Administration
Joined: 9/15/2006(UTC)
Posts: 1,946
Points: 5,711
Man
Location: Estonia

Was thanked: 68 time(s) in 68 post(s)
Hi,

About failover stuff i cant say nothing, i haven't used it ... .

>And any way to stay on MS SQL but get never Version as .94 ? I feel left behind and I do not think that xml is possible I am running Lumisoft Mail with over >90 GB Database (.mdf) and it will still grow in the next years to come.
There no benefit on mssql(if for some reasong messages must be stored to sql), in xml version messages are stored as separate "eml" files, so it can store a lot of GB. In xml version just users and settings stored to xml, also xml probably deprecated and replaced with sqllite.

About mssql version, i havent decided yet if it will be deprecated or code will be updated in version 0.97.
(You can email me directly ivar@lumisoft.ee, i can let you know desicion on first week of january)

MSrobots
#3 Posted : Wednesday, December 21, 2011 11:13:09 AM(UTC)
Rank: Newbie

Groups: Member
Joined: 12/21/2011(UTC)
Posts: 4
Points: 12
Location: Clearlake Oaks,CA

Hi Ivar,

thanks for the fast answer, I really would like to stay on MSsql since I managed in the last 2 Years to replace 4 different db-types with mssql and have still 3 more (differen) DB-types to get rid of. There are still tons of dbf (1982-1999) and some other stuff.

So cosolidation is my goal. And that mirroring works really nice for high availability and easy downtime for one of both servers without stopping everything.

In the forum here I stumbled over some post a year old claiming nhibernate would deliver different DB under one API. Did that ever worked out ?

If you would save email as TEXT in MSsql not encoded binary(?) Base64(?) or what it is (I still need to figure that out) even fulltext-search would work ! But I do not want to complain at all - You did great work with that mailserver.

thank you

Mike
MSrobots
#5 Posted : Wednesday, December 21, 2011 11:31:36 AM(UTC)
Rank: Newbie

Groups: Member
Joined: 12/21/2011(UTC)
Posts: 4
Points: 12
Location: Clearlake Oaks,CA

Oh.

I forgot. Do you have some "update-script" from MSsql to XML/filesystem ?

I could set up a second LumiSoft-mailserver and give it a try how it compares to my running one.

But I DID set Primary keys and Indexes so SQL-DB is pretty fast even with 90 GB.

thanks

Mike
ivx
#6 Posted : Wednesday, December 21, 2011 1:11:59 PM(UTC)
Rank: Administration

Groups: Administration
Joined: 9/15/2006(UTC)
Posts: 1,946
Points: 5,711
Man
Location: Estonia

Was thanked: 68 time(s) in 68 post(s)

Currently i can say sql-lite is tens of times faster. It uses messages text-header caching for full text search.
In my computer searching 10K messages takes less than 1 sec, while current mssql takes 1 minute(because no caching implemented).

For testing, currently only way to get messages from 1 server to another is to use mail server UI messages transferer(user UI window)
or standalone IMAP sync app from: http://www.lumisoft.ee/l...oad/downloads/Examples/

The key point of sql lite is that user have less to admin/manage. Server folder is fully copy/pasteable.
Also mailstore folder is easy to move.
MSrobots
#7 Posted : Friday, December 23, 2011 12:23:37 AM(UTC)
Rank: Newbie

Groups: Member
Joined: 12/21/2011(UTC)
Posts: 4
Points: 12
Location: Clearlake Oaks,CA

Hi Ivar,

I may have time to test .97 next week. But I found the Problem with Mirroring:

Having 'Failover Partner' in connectionstring REQIERES also 'Initial Catalog'. Witch is provided in api_initsttring.

But on api_init you check for existance of DataBase (to create if not there). And THERE is the problem.

ConnectionstringBuilder.ToString() removes DataBase Information! (that is what you want there to open con without DB)

and THAT con.Open() throws the error. Because no DBname there needed by Failover Partner in connectionstring.

Stupid, isnt it ?

Since I know my DBs are there I just commented that check out and LumisoftMailserver runs perfect with MS sql Database Mirroring.

wonderful.

Now I need to recode my web-application to use the newer MIME Implementation. I used some examples 2 years ago and have still warnings (deprecated ...) running fine with .94 but I want to test .96 and I guess I should do that anyways.

While searching thru your code to find the solution I stumbled over your Net folder.

2 years ago I just needded a simple to handle mailserver for our ~40 mailadresses, beeing able to manage accounts thru my own web-application. Sampling code from examples and Mailserver Manager I was able to do that, imported the old stuff and - well - since then every thing works fine. So I did never looked closer at that NET library.

Now I did. WOW.

You are a hell of a programmer. What an amount of work. AND well structured (#regions, interfaceces etc.).

I am really, really impressed.

and I started programming at a time where COBOL was state of the art ....

thank you again for sharingyor code.

Can I offer you some 'compensation' ? Maybe translating some of your wtext files to GERMAN ?

WOW.

Mike


ivx
#8 Posted : Saturday, December 24, 2011 8:58:02 AM(UTC)
Rank: Administration

Groups: Administration
Joined: 9/15/2006(UTC)
Posts: 1,946
Points: 5,711
Man
Location: Estonia

Was thanked: 68 time(s) in 68 post(s)
Hi,

>used some examples 2 years ago and have still warnings (deprecated ...) running fine with .94 but I want to test .96 and I guess I should do that anyways.
Yep, some day i remove deprecated stuff, so its wise to use newr stuff timely.

>Can I offer you some 'compensation' ? Maybe translating some of your wtext files to GERMAN ?
Translating probably not needed, i have deprecated web mail. There are some good free ones available.


quandary
#4 Posted : Wednesday, February 08, 2012 9:53:32 PM(UTC)
Rank: Advanced Member

Groups: Member
Joined: 6/6/2010(UTC)
Posts: 39
Points: 120
Location: Switzerland

MSrobots;4427 wrote:
Hi Ivar,
In the forum here I stumbled over some post a year old claiming nhibernate would deliver different DB under one API. Did that ever worked out ?

I didn't fully finish it.
It worked perfectly in a Winforms app. Well, I might have introduced some bugs converting SQL code to nHibernate (more than 95 stored procedures), and I cannot say anything about performance, but overall, it seemed to work.

When I put it from the WinForms into the API, then it lost the initial config after loading the initial configuration for unknown reason.
It might have been related to nHibernate 3 being an alpha-release back then, or an issue with a static variable.
(
nHibernate loads information on the entire schema from XML files into it's configuration.
I put the object holding the configuration into a static variable, because I wanted to create static classes and methods for that I don't have to create an instance of a class always, because when nHibernate creates the factory (which it would have to do for each instance), it loads and reads many XML config files, which takes almost 10 to 15 seconds, so it should only be done once at startup. For unknown reason that static object - or an object withing the object - becomes somehow NULL, while == NULL is false...

The other possibility is that the API calls init, then somehow disposes, and for further calls passes connection string + query to a new instance each, which would explain why my config-object is/was always NULL. Anyway, I need to somehow eliminate that static variable, because it probably isn't thread-safe.
)

I filed a bug report for nHibernate, which was ignored, claiming that there probably was something wrong with my XML files.
It got on my nerveres, I did some other things in-between, waiting for nHibernate to get out of Alpha.
Then, my laptop's hard-disk crashed. I had (and still have) a backup somewhere, just de-dusted it recently, to get the old version of the server that worked. Maybe I'll make a fresh attempt to finish this soon.

I also used nHibernate to create the database schema for MS-SQL, MySQL, PostGre, Oracle and Firebird - which worked like a charm.
The main problem there was getting Oracle to run on Ubuntu. The makefiles Oracle supplies with the installer were riddled with bugs, but RedHat/Oracle uses an older gcc version, which doesn't detect that...

I recently managed to get Sybase and MS-Access (v2003) to work on Linux, but there seems to be a few little bugs in the mono ODBC pinvoke calls (int32 used instead of int64 for 64-bit Linux systems), so these are next.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.082 seconds.