?
Solved

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

Posted on 2008-10-08
12
Medium Priority
?
166 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

 
LVL 19

Accepted Solution

by:
NickUpson earned 2000 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
 
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows 10 Creator Update has just been released and I have it working very well on my laptop. Read below for issues, fixes and ideas.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

765 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