Front End Database and Users (1 Viewer)

Lilly420

Registered User.
Local time
Today, 00:47
Joined
Oct 4, 2013
Messages
126
Hello,

I have a Database which is split and both the front-end and back-end are on the shared network, which I have found does not improve the speed at all of the front-end. I have done some reading on this and it says that the front-end database files should be installed on each user's PC…and I am confused by what that means exactly. Reading further, it said I would need the Advanced Installer to do this…so am I understanding this correctly? I did try to put a copy of the front-end DB on my local drive…and it did not change anything.

The problem is we are in a controlled environment and we all have the MS Suite including Access and are unable to download anything on to our computers that is not authorized by the company.

I just need to know if I am out of luck or if there are any other options?

Thank you for the help, as always.

Lilly
 

Frothingslosh

Premier Pale Stale Ale
Local time
Today, 00:47
Joined
Oct 17, 2012
Messages
3,276
The idea behind having a front end and a back end is that you place the back end on the network (typically on a dedicated server if you can) and the front end is placed onto every user's machine. The backend will have the tables, and the front end literally everything else.

Normally there's no special installation required - a simple copy and paste is typically enough. (Other options include a batch file or even an executable file to do the install.)

If you've tried a local front end copy with the network backend and are still seeing speed issues, then it could be anything ranging from massive network latency to poorly built queries to slow machines. That said, it's typically either queries or tables that need optimization.

So please give us a bit more information:

What is the speed issue you mentioned? Does it affect all queries or just a few? Can you post the SQL for some of these queries? (Posting the structure for the related tables may help, too.)
 

isladogs

MVP / VIP
Local time
Today, 05:47
Joined
Jan 14, 2017
Messages
18,247
Adding to the previous reply, Access databases are just files in the same sense that a Word doc is a file. There should be no issue related to company policy as nothing needs installing.

Splitting a database will not normally improve performance.
It allows the database to be used safely in a multi user environment.
In that situation, not splitting will lead to corruption.
If well designed, splitting shouldn't significantly worsen performance either. However poor design can cause split databases to be slower.
 

shadow9449

Registered User.
Local time
Today, 00:47
Joined
Mar 5, 2004
Messages
1,037
Just to add a bit:

- If you want a really good article explaining why and how to split, read Albert Kallal's explanation on the topic: http://kallal.ca/Articles/split/index.htm

- One REALLY important point on that page if you don't read the whole thing is that you are going to want to keep a persistent connection or you might see a real speed degradation.

- One thing that I do to help with the deployment of the front end I create a small batch file on each computer that says:

copy \\path_to_server\MyDB.mdb C:\MyDbFE\MyDB.mdb /Y

That way when I make revisions I just need to change the one on the server and everyone automatically gets updated. To automate this I put it in the Windows startup folder.

- To find the startup folder for the local user open Run and then enter Shell:startup
- To find the startup folder for ALL users of the computer enter Shell:Common Startup

Then every time users log into Windows, the front end updates automatically. It takes less than a second every morning and that way it's no extra effort for me to deploy 100 copies of the FE than it does 1 copy. Another bonus to this is that I know a lot of developers put temporary tables into another linked local database to prevent database bloating. In my approach, since the FE gets updated with a fresh copy every morning it never gets bloated.

Feel free to keep asking if you need more help!
 

Lilly420

Registered User.
Local time
Today, 00:47
Joined
Oct 4, 2013
Messages
126
Hello,

Thank you all for the help and sorry for the delay in responding. I did read through the articles and found them helpful.

The BE database is on a server in New Jersey – I am on a server in New Hampshire - and the front end is on my local drive (System: C: Database – I can't go any further on my drive as it is protected) and the tables are linked to that BE NJ drive. The DB is not large-FE 3KB, BE 2KB. There are some forms, reports, and queries but nothing too large and I do have an audit trail code on all forms (which there are about 6 for the user).

I also have the same Database (not split) on the NJ drive and it opens with a slight delay and the main form opens in about 13 seconds. The split FE DB - from my local drive that takes 11 seconds to open and over 90 seconds to open the main form which has about 60 fields on it.

There is a user who is on the NJ drive and did some testing with me (all the users of this DB will be on the NJ drive that is why I put the BE there). He opens the non-split DB very quickly and pulls the form up in no time. I sent him a copy of the Local Split DB with the links and when he places it on his C drive and tries to open from there, it says "files cannot be found". I am assuming it is the link (path), which I thought was correct but will do more testing with that today and let you know how I make out unless you know?

Also, when you say "poor design", would you elaborate on that? I have built a few DB (not split), and never had any issues (crashing, etc.) but certainly am not an expert so any thoughts you have around this would be appreciated.

So I am plugging away…

Thank you all.

Lilly

 

isladogs

MVP / VIP
Local time
Today, 05:47
Joined
Jan 14, 2017
Messages
18,247
Why does it take 13 seconds to load the main form with a non split database on your local machine? That does suggest design issues.
There are numerous reasons for poor performance including lack of normalisation, tables not indexed, poorly designed queries etc. Far too many issues to cover in one post.
You can find excellent guidance on dealing with issues like this on allen browne's website or the FMS site etc etc

As for the network speed, is this a WAN or VPN or some other remote connection like Citrix or Terminal Services?
 

Lilly420

Registered User.
Local time
Today, 00:47
Joined
Oct 4, 2013
Messages
126
Hello,

Thank you. No, the non-split database does not take long to open at all even on the Network. The front-end split DB which lives on my local drive takes 11 seconds to open and 90 seconds to open the form-the BE is on the network...sorry if this was not clear. I will do some more research, as you are correct, it could be many things. Thank you.

It is WAN.

Lilly
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 23:47
Joined
Feb 28, 2001
Messages
27,229
Lilly, I looked at the Kallal article. It left out some considerations. Here are some issues I didn't see addressed in it.

Q: Why split a database and then distribute it?

A: Because every time you open a file, whether or not it is visible to anyone else, you go through the file system, which goes through the lock manager to take out locks on what you open.

If everyone uses the shared copy of the front end (FE) on the shared drive, everyone's locks must interact with all other current lock holders. HOWEVER, if all of the queries, forms, reports, macros, and modules are in a PRIVATE COPY of the FE file, then when you open THAT file, it is not visible to everyone else. The locks are still taken out but (a) they are all PRIVATE so (b) no interaction with users. Which means (c) no chance of being locked out of a particular form or report.

If a file is local to your system (private copy) then your system's internal lock manager performs the operation and is pretty fast since every lock is in local memory. If the file is shared, then the machine hosting the shared file must act as the lock manager and your lock interactions must cross the network.

Access itself does lock management beyond that done by the file system. The .LDB file that gets created in the same folder as the FE file is Access's lock database. If it is shared then all sharing users must update THAT file, again contending with lock competition. But for the FE file as a private copy? Locks are created - but there is no need to interact with everyone else so no competition.

Of course, the shared back end (BE) still has this problem of lock interaction. So things are still tougher than they would be for isolated files. But this would be the same for shared or non-shared FE so no BE lock difference between those cases.

Q: Is a split & distributed DB faster than one where all the files are on the shared server?

A: Yes but sometimes not by much. And using an "auto download" batch file negates the tiny speed difference.

Access with a native FE and native BE is essentially a file-based application. It uses SMB protocol, which is the Windows file sharing protocol. If you open a local copy of MS Access (.EXE file) but are launching a shared FE, that file has to be copied in part or in total to the working memory of your PC using SMB protocol. That happens because MSACCESS.EXE has to find everything in the database so that when you open something, it knows where to look for it. If the FE is local however, that's just a disk read. So the difference in speed is due entirely to the difference between a disk operation and a network operation - a miniscule difference.

Speed improvements can occur for local copies of FE databases that have lots of code behind the scenes, lots of queries that open dynamically, lots of macros that get triggered. But for a typical user who opens one form at a time, one report at a time, the speed difference between local copies and network copies can be hard to see.

Speed differences don't exist for operations on the BE because they are always based on file transfer operations across the network. The only way to make that faster is to either optimize the database structurally OR buy a faster network.

Q: How do I optimize the database structurally?

A: For that, use the search feature of this forum to look up articles on database optimization. If you are not familiar with it, the SEARCH feature is 3rd from the right in the ribbon near the top of this page, just under the box that identifies who you said you were when you logged in.

In general, judicious indexing will make some functions faster. Persistent connections between FE and BE can help. And tailoring of all queries, forms, and reports to use either NO LOCKS (for read-only cases) or OPTIMISTIC LOCKS (for read/write cases) will help by a small amount. However, be aware that the most optimized database you can build will still face a bottleneck if you have a slow network.

The user who was physically closer to the shared drive saw faster response. This means that you have a very clear proof that the network's speed IS an issue and will have to be "lived with" for your database users who aren't so close.

As long as your network is all hard-wired, you should be stable if slow. If anyone starts using Wi-Fi connections however, you run a SERIOUS risk of corrupting the database. Unstable networks, because they can drop connections, can disrupt file transfers. But Access WORKS based on file transfers. That is the backbone of its operation. If you break the backbone, you've got huge troubles.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 12:47
Joined
May 7, 2009
Messages
19,247
You cant do anything about the speed because the server is far. A typical connection can only be 100 meters away. More than that expect the worst. It will take ages even on a simple Update statement.
 

Frothingslosh

Premier Pale Stale Ale
Local time
Today, 00:47
Joined
Oct 17, 2012
Messages
3,276
Back in 2013, I worked at a company that implemented a database run over a WAN, with the back end in Novi, Michigan, and the front end being used by folks both in Novi and in Phoenix, AZ. For the AZ people, it was basically unusable, with 10-20 second lag times on pretty much every data request or change.

The only solution we found was to switch the back end over to SQL Server, as it works MUCH better with a WAN than Access does. At my current job, my database servers (all SQL Server) are about two blocks from where I work (GM Renaissance Center in Detroit), while users are spread between multiple Detroit locations, Southfield MI, and Lansing MI, and we have minimal speed issues.

If your company requires people in two different states to use the same database, then you *REALLY* need to look into switching the engine you use for the back end. Access is not going to cut it.
 

Lilly420

Registered User.
Local time
Today, 00:47
Joined
Oct 4, 2013
Messages
126
Thank you all for this information, I truly appreciate it.

I am going to read through all of this and the other articles and posts suggested.

You are all wonderful, thank you again.

Lilly
 

Cronk

Registered User.
Local time
Today, 14:47
Joined
Jul 4, 2013
Messages
2,772
Another solution where there is a narrow bandwidth to the remote data, is to use Citrix where effectively the FE is running on the remote server with the BE Access accdb. In this set up, the users PC acts like a dumb terminal.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 05:47
Joined
Feb 19, 2013
Messages
16,634
I have a Database which is split and both the front-end and back-end are on the shared network
what has not been mentioned is that if users share the front end at the same time, you will almost certainly end up corrupting the front end with no means of recovery except by replacing with a clean version.

As others have said, good database and application design is required - think like a web developer. A web page brings minimal data across - single forms are for one record at a time - not a whole table which is then filtered. Continuous forms might bring a screenful of records across at a time. Don't use lookups in tables. Only load data when required - if you have hidden subforms, don't set the source object until made visible. Plenty of other options.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 23:47
Joined
Feb 28, 2001
Messages
27,229
But be aware that the Citrix solution requires special care because the typical Citrix admin won't let each user have private storage on the server in which to put the FE. Without that, you might as just share the FE anyway. Because with Citrix and a totally unimaginative admin, that's what you will be doing.

We had to threaten mayhem with splintered baseball bats in order to get them to sit down and just LISTEN to what we needed.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 00:47
Joined
Feb 19, 2002
Messages
43,368
I also have had trouble with every Citrix installation. The admin's don't have a clue how Access works. But eventually they listen. Here's the batch file the Citrix users run from a shortcut. It copies the master copy of the FE from the server to their personal directory.

md %USERPROFILE%\DwgLog
del %USERPROFILE%\DwgLog\DrawingLog.accdb
copy "\\BSCCTIMBERLINE1\Timberline Office\AccessApps\Data\CommonFE\DrawingLog.accdb" %USERPROFILE%\DwgLog
%USERPROFILE%\DwgLog\DrawingLog.accdb
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 23:47
Joined
Feb 28, 2001
Messages
27,229
Pat, glad to know I'm not the only one who ran into a Citrix admin with a narrow perspective. (Sounds nicer than the other phrases I could have used.)
 

isladogs

MVP / VIP
Local time
Today, 05:47
Joined
Jan 14, 2017
Messages
18,247
I've no experience of Citrix but Terminal Services has worked well for several of my clients. I believe its got another name now.

If anyone has experience of both systems, how did each compare in terms of cost, reliability, speed etc
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 23:47
Joined
Feb 28, 2001
Messages
27,229
Citrix IS using "Terminal Services" (as the name of a Windows feature.) If you are talking about a third-party product calling itself "Terminal Services" then I have no experience but I would say it is kind of cheeky to do that.
 

isladogs

MVP / VIP
Local time
Today, 05:47
Joined
Jan 14, 2017
Messages
18,247
I meant TS as supplied with Windows Server.
Why would you also need Citrix if it's using TS itself?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 23:47
Joined
Feb 28, 2001
Messages
27,229
Citrix is a proprietary name for a package that uses TS. Like Kleenex is a proprietary name for facial-quality paper tissues.
 

Users who are viewing this thread

Top Bottom