Subject Re: [ib-support] File system
Author Helen Borrie
At 02:07 AM 22-02-02 +0530, Nataraj S Narayanan wrote:

>I have to maintain a 110 old Local IB 4 installations on Win 98/D1/BDE
>2.5. The medical.gdb is used in multi-user mode (2 systems) inspite of
>being 'local
>Interbase'. I am using host file entries for DNS resolution and gave paths
>in the BDE as hostname:c:\data\medical.gdb.
>
>The local 'gurus' tell me that this is a dangerous course to take.

Listen to the gurus. InterBase is not a file-served database. The client program has its own network layer for accessing a remote server and, by attempting to connect multiple users through the local interbase server interface (libs) you are asking for corruption.

You mentioned in other messages that you don't have the Delphi 1 source code. I think you are battling against the odds, particularly if any part of the application hard-codes the local connection.

But, with a bit of grace, if your app is coded to connect through a BDE alias *everywhere*, you might be able to finesse the app into using a multi-user connection using TCP/IP. Since you have the server on Win98, you don't have the NetBEUI (Windows Workgroups) option...this is supported only if the server is NT (...Win2K...XP).

In your tests PLEASE don't use the production copy of your customer's database. Get the last good backup from BEFORE you started your suicidal experiments.

If TCP/IP is going to work you need to have each client machine's IDAPI configuration properly set up. I don't know if v.2.x (which is, like Delphi 1, 16-bit) even supports TCP/IP. That said, if it does support TCP/IP, it will be ancient, about 1993-4 vintage. So, cross your fingers...

1. You need to decide on a server name. It can be anything simple, like IBSERVER.
2. In setting up the networking protocols on all machines, set up only TCP/IP and **remove** NetBEUI and IPX/SX. (you can put NetBEUI back later, if the customers need it for something else.)
3. You need to know the IP address of the network card on the server machine. If Windows98 won't give it to you, just use 192.12.13.1.
4. In the HOSTS file on the server and on each client, make an entry for the server:

192.12.13.1 IBSERVER (or use the server's real IP address if it is known)

5. Once you have that set up, test the TCP/IP connection from the clients using Start | Run and enter the command

ping IBSERVER

If the client-to-server network connection is working, you should get back 4 successful probes. If you get something like "Request timed out" then the connection isn't working. At this point, you'll need to cycle back through the TCP/IP setup on the machines and fix whatever is wrong. If you are new to networking, you might need your gurus to help with this.

6. In the IDAPI configuration (BDE Administrator) for the server and all clients, enter the Server path for the application's BDE alias as

IBSERVER:c:\data\medical.gdb

Once that is done, use a BDE database admin client such as DbExplorer to test whether you can get
(first) one connection to that alias from each client machine; then
(second) two or more simultaneous connections to the same alias

If YES, then your best hope is that the developer who wrote your application was 100% faithful to BDE rules and accessed the database ONLY through the alias. You must test this rigorously, because one single local-only access within that application will corrupt data in a potentially unrecoverable way.

>installed networking just the other month. The system crashed after 2
>weeks giving 'transaction' errors. There were a lots of missing from a
>detail table inspite of the header record being intact on the master
>table. But then the setup had'nt a UPS at that time. The file system was
>of course vfat.

The corruption probably has little or nothing to do with the power supply - which is not a reason to abandon the idea of a UPS. Although InterBase is good about recovering from a crash, the BDE is not. Every kind of abnormal termination from a BDE database application will break something. A database that is being accessed through the BDE **must** have forced (synchronous) writes set true...I think, though, that this happens automatically on Win9x because the platform doesn't support async writes...

>Now that the cuustomer has setup a UPS 2 days back , the fellow wants me
>to setup the networking again. But i am apprehensive.

A UPS is useful for when a disruption occurs to the power supply, in that it will give the users time to shut down their applications normally before shutting down the server normally, before the UPS power runs out. In this situation, if the users don't have UPS protection on their machines, they will have local breakages; and will also lose any unsaved work.

It won't protect the system from BDE-sourced corruption in the event of users crashing out of the application.

>Is the data curruption dur to lack of UPS? Would an NTFS have recovered
>the data and the missing detail table records?

Data corruption is almost certainly the result of forcing multi-user use of a local connection through shared Windows resources. Corruption on Windows servers can also occur if one user connects to the server using [ c:\data\medical.gdb ] in the string whilst another is connected using [ c:data\medical.gdb ] or vice versa. (Note the missing backslash after the drive designator - Windows allows this but it is death to InterBase databases).

NTFS is not an option for you. It is only available on an NT server. I can't even recommend replacing the OS on the server with NT Workstation, as Delphi 1 is 16-bit, anyway, and (by my recollection) cannot address the NTFS filesystem.

>The size of gdb file is
>50 MB. Or is it the problem of DNS - should i have gone for a real DNS
>server rather than 'hosts' file?

Hmmm...does Win98 have the capability to serve DNS?


>Please help me out all of you and prevent me from a chronically frustrated
>man.

I think you are battling against the odds...if you can't get your application to network across TCP/IP then you will have to accept that it cannot be used in anything but a single-user environment.

Good luck!
Helen

All for Open and Open for All
Firebird Open SQL Database ยท http://firebirdsql.org
_______________________________________________________