Tuesday, April 05, 2011

Firebird fixed!

After the untimely demise of the NT server, I had to move the databases and the firebird server to a different computer. I had tried to do this before in December but was unable to connect from other computers on the network.

This time around, I noticed that I was getting a strange error message about temporary files; it turns out that the temporary file directory had been set to a directory which doesn't exist. But more importantly, I still couldn't get any computer to connect to the databases.

When the db server was on the nt computer, the db drive was mapped as 't:', and the connection strings/locations were like "t:\db\manager.fdb". I mapped the db server on the new computer also as "t:" (after removing the previous definition, of course), but naturally this didn't work. I then tried a different solution: replacing the 't:' with the fully qualified network name, ie "\\kivserver\firebird\db\manager.fdb". This too did not work, although the error message was subtlely different. This is where I was in December.

I did a fair amount of googling last night in order to see whether someone had had the same experience as I. Most of the sites which I checked lead to dead ends (in the sense that they didn't help me, not that the sites don't exist!) but eventually I found something which helped. I tried it out on one of the networked computers, and yes! I could connect. 

The secret is not to use the fully qualified network name but to use the hosting computer's ip address and then the local reference (where the database sits on the server). Thus the successful connection string is "\firebird\db\manager.fdb". Lo and behold, the computers can now connect to the databases. I have just finished doing a complete sweep of three computers defining ten database connection strings, and once again everything is working properly.

On a slightly related note, I see that my previous post about the now defunct NT server managed to attract in one days more visits than my blog attracts in two weeks. Unfortunately I have not been able to determine what the cause of this sudden attraction nor what the search text was. True, Google Analytics does provide search strings, but none of them had the correct number of hits. Keep on hitting me! Although I imagine that those who came here to read about NT4 were probably bemused by the other subjects about which I write.


IndyJCL said...

add the line

youralais = e:\firebird\db\manager.fdb

to the aliases.conf file in the firebird server directory and it creates an alias to your db file. (probably have to stop and restart the server service to become effective).

Your connection string becomes:

This makes it much more generic and you can move the location without changing your clients (as long as the server doesn't change)

Thomas Steinmaurer said...

I'm pretty sure, as your blog items about Firebird have been mentioned on http://www.firebirdnews.org, this is where the traffic comes.

No'am Newman said...

It transpires that 36% of the traffic reaching my blog comes from 'referred sites', so the comment about firebirdnews.org makes sense.

Popa Adrian Marius said...

I wanted to tell you last night but i was distracted by other articles of yours about prolog , delphi ...
Could you put also some links in the articles also the source code would be interesting (somewhere on github.com)

If you write more about it please join us (firebirders)
I wish there was some articles about prolog+ delphi+sql