We all have a thirst for wonder. It's a deeply human quality... There's wonder and awe enough in the real world. Nature's a lot better at inventing wonders than we are.
I have a custom access application that I sell to individuals. I am looking to put the back end data files on a new SQL Server with Winhost. Each individual end user will need their own back end copy. What would be the best way to set the SQL Server up for individual copies? Would I make a individual SQL data file copy for each individual user?
If I did an individual copy for each user and I had hundreds of SQL data files then if I had to do an backend update for everyone then I would have to update each individual SQL data file what a headache.
The way I have it set up now when I distribute and install the custom app on the end user's computer the back end data file is split but if I ever need to update or modify the back end data file I do it with code in the front end user file.
I use a little custom Access form that I have in the program that only I the developer can see or use. It is called Backend-Updater By Peter D. Hibbs. Some of you old time developers should know him, I know Richard would.
Any help on SQL data files would be appreciated.
Ray WhiteOP
@Reply 3 days ago
Ray WhiteOP
@Reply 3 days ago
This is the Back-End Updater by Pete Hibbs
Ray WhiteOP
@Reply 3 days ago
I may have put this post in the wrong place for everyone to see it, You can move it if need.
If you've got your own dedicated SQL Server, I would normally give each customer their own database and their own SQL Server login. That keeps their data completely separate and makes backups, restores, and customer-specific troubleshooting much cleaner.
Yes, that means you could end up with hundreds of databases, but don't think of them as hundreds of separate SQL Server installations. They're all databases on the same server. For a backend update, you can run the same ALTER TABLE, CREATE TABLE, stored procedure, or other SQL script against each customer database. With administrator access, that can be automated with a script rather than manually opening every database one at a time.
That is essentially the SQL Server equivalent of what your Backend-Updater does now. Your Access front end could still check a backend version number and apply upgrade scripts when needed, or you could keep the upgrades under your control and run them centrally on the server. I would lean toward centrally managed updates if the server is yours. It avoids depending on every customer to open the front end and successfully run an update.
Pete Hibbs' Backend-Updater was a great utility. The same overall idea applies here, but instead of copying or modifying an Access file, you execute SQL Server update scripts against the appropriate customer database.
One other approach, especially if this is more of a service that you're managing and the customers don't need direct access to the table structure, is to put everyone in the same database and add a ClientID to the appropriate tables. Then you control what each customer can read or write based on that ClientID.
However, don't rely solely on an Access form filter for that. If customers connect directly to SQL Server, enforce the separation on the SQL Server side with permissions, views, stored procedures, or row-level security. Otherwise, a determined user could potentially bypass the front end and see data they shouldn't.
You could also have the Access front end communicate with an API instead of giving customers direct SQL Server table access at all. The API would handle authentication, ClientID filtering, and updates.
There are a million ways to architect it, but for a traditional Access application where each customer has their own independent data, separate databases and logins are usually the cleanest. A shared database with ClientID is more attractive when you are centrally managing a larger multi-tenant service.
Ray WhiteOP
@Reply 3 days ago
Wow you the man Richard. :)
(Pete Hibbs' Backend-Updater was a great utility) Ya, I still use it in all of my Access Apps.
Yeah I need to really get my head wrapped around SQL Server and learn it inside out.
I would rather each end user have their own individual back end SQL data file.
I was just mainly concerned on how I would update hundreds of back end data files at once.
FYI.
I will be using Winhost.
I would like for each end user to have their own individual back end data file
then when they install the program on their computer I will issue them a unique login ID password so the program will connect to their individual data file.
Ray WhiteOP
@Reply 3 days ago
And the end user will not have any access to the SQL server back end.
What I'm planning to do with the Access Web Publisher that I built is very similar. Each user will have their own SQL Server database and their own FTP login on my server. A lot of people don't want to go through the hassle of setting up their own web hosting, SQL Server, FTP accounts, and all that blah blah blah, so I'll handle that part for them.
Each customer gets their own database and their own database login credentials. They will have CRUD access - create, read, update, and delete - to the tables and other objects they need in their own database, but they won't be able to affect my databases or anyone else's.
This can all be automated. You set up each user with their own database, assign the appropriate login, and point their front end to that database. In your case, the customer would install your program, you issue them a unique login ID and password, and the program connects only to that customer's SQL Server database. Since they won't have direct access to SQL Server itself, you have even more control over what they can do.
The nice part is that you can still make updates to all of those separate databases with one centrally managed process. If you need to add a field, create a table, modify a query, update a stored procedure, or remove something, you run the appropriate SQL script with administrator permissions against every customer database on the server. You don't have to manually open hundreds of databases and change them one by one.
That would probably be the easier setup for you. It preserves the separate-database model you prefer, keeps each customer's data isolated, and still lets you manage schema changes centrally. You could write a small administrative updater that loops through your customer database list and runs each upgrade script, much like the role Pete Hibbs' Backend-Updater plays for Access back ends now.
I may do a lesson or two on this for my SQL Server course, because I can see it being beneficial to a lot of people. That's the route I would go, and the route I'm planning to go myself. I just have to work out the logistics.
With a dedicated SQL Server, I'm 99% sure Winhost can handle it. I'm out of town right now, but I plan on testing this more thoroughly when I get back.
A shared SQL Server plan is definitely not what I'd use for this. You need the ability to create and manage separate customer databases, logins, permissions, backups, and centrally run your update scripts. Those are the kinds of things you generally need dedicated-server-level control for.
I pay a little over $300 per month for my dedicated server, so as long as that is within your budget, you should be OK.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.