Solved

Networking: Allowing CLIENT PC applications to have access to database file on the SERVER PC?

Posted on 2008-10-08
12
159 Views
Last Modified: 2010-04-12
I need to confirm my ideas on networking. I have a client-server application that I'm about to finish and then deploy.
The database file will be installed on the server somewhere like
   C:\Program Files\MyApplication\DB.fdb
When my application runs on all the client PCs, they will need to be able to connect to the DB.fdb file on the Server.

1. What instructions do I give the customer or his/her Network Administrator on how to allow the client applications access to the file?
---Give details for both the Server PC and the Client PCs.
---Please take into account the path's longevity. For example if a Client Application connects to the file using "\\SERVER\DB.fdb" and for some networking reason that I'm not familiar with this path becomes invalid but the user could connect using a different path - this is BAD - we need whatever Path is going to work most of the time and will survive reboots and log ons and log offs.

ISSUES AND INFORMATION:
--All PCs involved will be Windows 2000 or later
--The application is a Win32 application
--The database file is a FireBird database file
0
Comment
Question by:rfwoolf
  • 7
  • 5
12 Comments
 
LVL 19

Expert Comment

by:NickUpson
ID: 22671496
The server will need to have firebird server, classic or superserver, installed, with appropiate user accounts created

The client PC's will need firebird client installed (may happen as part of the applicaton install)

both client and server need adjustment to firewall settings

The database file or it's folder MUST NOT be shared over the network, access to the database goes client application to server program on server to database file ONLY
0
 
LVL 13

Author Comment

by:rfwoolf
ID: 22671951
NickUpson, thanks for the response, but I'm afraid I didn't get much of an answer there - I don't understand.
In Delphi I have to create a connection string or tell my connection component the path to the database file. You're saying that data connectivity doesn't work this way and that instead it goes to a program. You also say that I mustn't share anything (which would prevent access to the path to the database file).
Perhaps you can indulge me and help me understand :)
0
 
LVL 13

Author Comment

by:rfwoolf
ID: 22672518
"The client PC's will need firebird client installed (may happen as part of the applicaton install)" -- from what I understand you just have to deploy the fbclient.dll file for the clients.
0
 
LVL 19

Accepted Solution

by:
NickUpson earned 500 total points
ID: 22673426
your connection string looks something like myserver::C:\Program Files\MyApplication\DB.fdb, instead of your application directly changing the file (like eg access) your sql instruction are passed to the firebird server program running on myserver. Firebird is designed to work this way, NOT by sharing the file. Indeed it specifically attempts to block such access.

It will by default use port 3050 which need to be enabled via the firewall

client install fbclient.dll is a minimum, better is to actually install the client from the firebird install program, which takes care of a couple of other files, registry, etc
0
 
LVL 13

Author Comment

by:rfwoolf
ID: 22673622
Fantastic. I have installed the client from the Firebird installation program (which isn't great because now my customers have to be told "No, when it gives you options, only install the client stuff"). Anyways, I'll give it a shot. Thanks for the answer!
0
 
LVL 13

Author Comment

by:rfwoolf
ID: 22673783
Nick - Thanks for the helpful answer. As a last part of the question, do you have any advice on building this connection string, i.e. on the client machines when they're installing and running for the first time, not only do I have to show them a list of computer names (or IP addresses) on the network, but I've also somehow got to get the actual LOCAL PATH (e.g. C:\Program Files\") which the CLIENT machine won't be able to see.
I guess one tactic is to configure things on the server, build the connection string ON THE SERVER, store this connection string in a text file, and then,
on the CLIENT machines get it to navigate to the text file and read the connection string from there.
Is that how you would do it?
0
Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

 
LVL 19

Expert Comment

by:NickUpson
ID: 22676087
The names or IP addresses I don't see a way to do, however your server installation can include creating an alias (name) for the database path in the firebird.conf file (NB need to restart after changing this file). Then your connection string becomes something like myserver::/myalias, then the connection string is the same all the time and can be hardcoded into the clients
0
 
LVL 19

Expert Comment

by:NickUpson
ID: 22676699
correction: the file is aliases.conf not firebird.conf
0
 
LVL 13

Author Comment

by:rfwoolf
ID: 22683874
"your server installation can include creating an alias (name) for the database path in the aliases.conf file "
--I've spent a long time now looking into the best way to set up this alias programmatically on the Server Installation. Please don't you have any advice on how to do this - I don't want to tell my clients "okay, drag the file into notepad, type in this value" - I'd rather create the alias using an API or something - but there's @#$@-all information out there! :)
0
 
LVL 19

Expert Comment

by:NickUpson
ID: 22684620
There is no api to do this however as you have to supply the database, why not provide them with a copy of the file to use.
0
 
LVL 13

Author Comment

by:rfwoolf
ID: 22686152
Hi Nick.
Thanks for the answer.
After about 5 hours of searching and thinking and thinking, I eventually came across an indirect solution - one of the Firebird Management Utiilties is called Firebird Database Manager (Freeware) which has an Alias Management module. It also has a nice backup utility and scheduler. So now as part of the configuration after installation I tell the customer to run it and set up an alias that way.
It's by no means ideal, and in fact I can be quite critical of Firebird for this (they will argue that it's the way that it is for security purposes but I disagree - if Linux can do it so can Windows) but what's done is done, my application is now Firebird.
Thanks for the help hey :)!
0
 
LVL 13

Author Comment

by:rfwoolf
ID: 22686159
There seems to be only 1 expert on here that's knowledgeable about Firebird - NickUpson - keep up the good work.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
As companies replace their old PBX phone systems with Unified IP Communications, many are finding out that legacy applications such as fax do not work well with VoIP. Fortunately, Cloud Faxing provides a cost-effective alternative that works over an…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now