How to Add a Company in the Server Manager
Each company database of ABM (Advanced Business Manager) that people should reach in a web browser is added once, as a company, in ABM Service Server Manager. Press Add a company... at the top of the manager window, choose the company in one of three ways, and press Add. The company becomes a Windows service of its own with its own web address.
How do I add a company to ABM Service Server?
Open ABM Service Server Manager, press Add a company..., and on the first tab, Pick from ABM, pick the company from ABM's own list, press Set it up for me to make its SQL login, press Test both, and then Add. The window has two other tabs for when that is not possible: Use a script and Type it myself.
- Open Start, type ABM Service Server Manager, and approve the Windows permission prompt. The manager always runs as an administrator.
- Press Add a company... at the top of the manager window. The Add a company window opens on its Pick from ABM tab.
- Choose the company, and give it a SQL login, on one of the three tabs.
- Check Service name, Port and Display name at the foot of the window.
- Press Add. A progress window shows each step, and the new company appears in the manager's list.
Which tab to use in Add a company:
- Pick from ABM: when your Windows sign-in, or a SQL login you have, is a SQL Server administrator. The window finds ABM's SQL Server and the company, and makes the login.
- Use a script: when somebody else, such as your database administrator, makes logins on that SQL Server. The window writes the script and they run it in SQL Server Management Studio.
- Type it myself: when you already have a SQL Server login for the company, or want to check or change any detail by hand.
The three tabs share the same details, so moving between them loses nothing: what Pick from ABM found is already filled in on Type it myself. If you change the company's SQL Server or database on another tab, Pick from ABM clears its Company choice and says so. Add tests any connection that has not passed a test as it now stands, and nothing is created until both pass.
How do I add a company with Pick from ABM?
On the Pick from ABM tab of Add a company, the window reads ABM's own settings on this server to find ABM's SQL Server and control database, lists ABM's companies, and makes a SQL login for the one you pick, all with your own Windows sign-in.
- Check SQL Server and ABM control under 1 · Find the company in ABM. When ABM is installed on this server they are filled in for you, with ABM uses this beside the server. When it is not, the tab says ABM's settings were not found on this computer. Pick or type the SQL Server ABM uses.
- Choose the company in the Company list. The window puts ABM's name for it in Display name, and fills in Service name from its database's name unless you have typed a service name yourself.
- Press Set it up for me under 2 · A SQL login for ABM Service. The window makes the login, ticks off each thing it did, and ends Now press Test both. The Login and Password boxes show the new login; Show beside the password reveals it.
- Press Test both under 3 · Check, and wait for a tick on every line.
- Press Add.
The SQL Server list offers ABM's SQL Server and the SQL Servers installed on this server straight away. Opening the list also searches the network, which takes a few seconds and may not find every server, so you can always type a name instead. Choosing another SQL Server looks for ABM's control database on it.
A company already added on this server shows (already added here) after its name in the Company list, and picking it says to open its Settings in the Server Manager instead. A company whose entry in ABM's list names no SQL Server or no database is not offered; add it with Use a script or Type it myself. When the company's database is on a different SQL Server from ABM's control database, the tab says so, and the login is made on both servers.
If your database administrator would rather make the login, press Copy script instead beside Set it up for me, and have the script run the way the Use a script tab describes.
What if my Windows sign-in cannot read ABM's list or make the login?
Use an administrator's SQL login for the window instead. When the Pick from ABM tab of Add a company cannot read ABM's list, or Set it up for me cannot make the login, a box appears on that tab headed Use a SQL login instead, for reading ABM's list and making the login. It is used for this window only and never saved. Type its SQL login and Password and press Use it: the tab reads ABM's list again with it, keeping the company you had picked, then press Set it up for me.
The sentence that brings the box up says who could not do what, and on which server:
- can't sign in to the server: your Windows sign-in, named in brackets, has no login on that SQL Server.
- isn't allowed to list the databases, read ABM's list or make the login, ending It needs to be a SQL Server administrator there.: it can sign in but may not do that.
- No SQL Server answered at the name: check the name, that SQL Server is running, and that its port is open from this computer.
- answered with SQL Server error followed by a number and SQL Server's own message: any other failure.
When the login works, the box says Using the SQL login followed by its name and for this window. The window uses it only to look at SQL Server and to make the company's own login, and forgets it when it closes. The company never connects with it.
When Set it up for me stops part-way, what it already did stays done, and pressing it again is safe. If no administrator's login is at hand, press Copy script instead and give the script to whoever looks after SQL Server, or use the Use a script or Type it myself tab.
How do I add a company with a script for SQL Server Management Studio?
On the Use a script tab of Add a company, say where the company's database and ABM's control database are, press Copy script, and have the script run in SQL Server Management Studio by an administrator of that SQL Server. Then press Test both and Add.
- Choose the SQL Server and the company's Database under 1 · Where the company is. Choosing the server lists its databases in Database for you to choose the company's own; when they cannot be listed, type the database's name.
- Check ABM's server and ABM control. When they came from ABM's settings on this server, the tab says Found from ABM's own settings on this computer.
- Press Copy script under 2 · The script. The script goes on the clipboard, and the Login and Password boxes show the login it makes.
- Paste it into SQL Server Management Studio, connected to that SQL Server as an administrator, and press Execute.
- Press Test both on the Use a script tab. When the company is found in ABM's list, the tab says Found in ABM's list: with its name, and fills in Display name.
- Press Add.
After Copy script, Show the script shows the script in the window, so it can be read before it is run. When the two databases are on different SQL Servers, the script comes in two parts, each saying at the top which SQL Server to run it on. If the clipboard is in use, the tab says The clipboard is busy. Press Copy script again.
Every press of Copy script, like every press of Set it up for me, gives the same login a new password, so run the script you copied last. The script carries the password, as its first lines say, so treat it like one. You do not need to keep the password yourself: once the company is added, ABM Service Server keeps it, encrypted, with the company's connection.
How do I add a company with a login I already have?
Use the Type it myself tab of Add a company. It has the two groups of boxes, The company database and ABM's control database (the people, and who may open this company), each with SQL Server, Database, Login and Password, and a Test button of its own.
- Type the company database's SQL Server, Database, Login and Password, and press Test under that group.
- Type the control database's four boxes, and press its Test.
- Press Add.
Login and Password are marked required in both groups. The company always connects with a SQL Server login, never with Windows authentication, because its Windows service runs under an account of its own that has no login on a SQL Server on another machine. Left blank, the window says Enter the SQL Server login and password. followed by why.
When ABM's settings were found on this server, the control group's SQL Server and Database are already filled in. The control group may use a different login from the company group, at sites where the company's login cannot read the control database.
A login you bring yourself needs every right that the login the Server Manager makes has, because Test checks each one and Add is refused while one is missing. If it lacks some, ask your database administrator to add them, or make a login that has them all with the Pick from ABM or Use a script tab.
What SQL login does the Server Manager make for a company?
Each company added with Set it up for me or Copy script in Add a company gets a SQL Server login of its own, with a random password of 24 characters. Its name is abmservice_, then the Service name as it was when the login was first made, kept to lower-case letters and digits, then an underscore and six random characters, such as abmservice_acmeltd_k7q2mx. The two buttons make exactly the same login with exactly the same rights.
- In the company's database, the login is made a member of
db_datareader,db_datawriteranddb_ddladmin, and is grantedEXECUTE: ABM Service reads and writes the company's data, adds its own tables and indexes, and runs ABM's procedures. - In ABM's control database, it may only read four tables,
UserList,CompanyList,ABMFlexandSettings: the people and their passwords, who may open which company, ABM's version and its serial number. A table that this ABM does not have is skipped. - It is given nothing in any other database.
- Running it again is safe: the login is made, or its password changed, and nothing is given twice. In one Add a company window, a second press for the same company changes the same login's password; another company, or a new window, gets a new login.
- Its password follows the Windows password rules but never expires, so the company does not stop working one day because of an expired password.
The Server Manager writes every login it makes, or copies as a script, to manager.log in C:\ProgramData\ABM Service\Server\logs: the login's name, its SQL Server and databases, and set up from the window or script copied (made when someone runs it). The password is never written there.
A login stays in SQL Server after Cancel, after the company is removed, and after ABM Service Server is uninstalled. A database administrator can find every one by its abmservice_ name and delete one that is no longer used. The script is written for SQL Server 2014 and newer.
What do the Test answers mean?
Test both, and each Test on the Type it myself tab of Add a company, opens the exact connection that will be saved, checks it is the right kind of database, and then checks each right ABM Service needs, one line each: a tick when it passes, a cross when it does not. While it runs, the window's tabs and Add are greyed out.
For the company database the lines are the database's name, on its SQL Server, answers: an ABM database, then Reads its tables, Writes its tables, Can add ABM Service's own tables and indexes and Runs ABM's procedures. For the control database they are its name, on its SQL Server, answers: ABM's control database, then Reads UserList, CompanyList, ABMFlex, Settings.
Under a missing right the window says Give this login the missing right: running the login script again does it, or ask whoever looks after SQL Server. For a login made in this window, press Set it up for me again, or copy the script again and have it run: the same login gets every right back, with a new password. Then press Test both again.
When the connection itself fails, a single line says what to fix:
- refused the login: wrong login name or password (or the login has no access). Check the login and password, and that the script has been run.
- answered, but the database ... does not exist or this login cannot open it. Check the database name, or that the login was given that database.
- No SQL Server answered at the name you gave. Check the server name, that SQL Server is running, and that its port is open from this server.
- Connected, but ... does not look like an ABM database (or ABM's control database). You reached a database, but not the right one: check the database name.
- Connected to the server, but the database could not be read, followed by SQL Server's message. The login got in but may not read the database's list of tables.
- SQL Server error followed by a number and SQL Server's own message: a failure the window has no plainer words for.
Each connection's test can take up to about ten seconds when its server does not answer.
What are the Service name, Port and Display name for?
At the foot of Add a company, below all three tabs, Service name is the company's fixed name on this server, Port is the number in its web address, and Display name is how the company is shown in the Server Manager's list and in Apps & Features.
- Service name is filled in from the company's database name when you pick a company or choose or type a database. Once you type a service name yourself, the window keeps it. The line under it says The Windows service followed by AbmService- and the name, and on this computer. It can't be changed later. It also becomes a folder, so it cannot be empty, cannot contain any of
\ / : * ? " < > |or two dots in a row, and cannot end with a dot: a name such as "Smith & Sons Ltd." is refused with ends with a dot, which a folder name cannot carry., while spaces and an ampersand inside the name are allowed. Spaces at either end are removed when you press Add. - Port is offered as the lowest free number from 5080 upwards, and a port another company already has is refused, even when that company is stopped. Any number from 1 to 65535 is accepted, port 80 included, but the manager checks it only against the other companies, never against other programs on the server: a port another program already uses is accepted, and the company then cannot start its web server. The web address becomes
http://followed by the server's name, a colon and this port. - Display name is optional. Picking a company on Pick from ABM, or a Test both on Use a script that finds the company in ABM's list, puts ABM's own name for it there, replacing what was there. The line under it says Shown in the Server Manager's list and in Apps & features. Can be changed later. It is changed in the company's Settings..., in the box of the same name. With a display name, the company's Apps & Features entry reads ABM Service Web Server followed by it in brackets; without one, the company's line and its entry use the service name.
Why does the Add a company window refuse to add the company?
When something in the Add a company window would not work, the reason appears in red above Add and Cancel at the foot of the window, nothing is created, and the window stays open so you can fix it.
- The company needs a name: it becomes the service's name on this machine. Service name is empty.
- is already a company on this computer. Pick another service name, or open its Settings instead. Another company on this server has that service name.
- Port ... already belongs to the company, with (a stopped company keeps its port). Choose another port.
- Enter the SQL Server login and password. No login has been made or typed yet: press Set it up for me or Copy script, or type one on Type it myself.
- Enter at least the SQL Server and the database name. No company has been picked, or a box on Type it myself is empty.
- The failed lines of a test, ending Nothing is added until Test passes. A connection had not passed a test yet, or had changed since it did, so Add tested it and it failed. Fix what the line says and press Test both, or Test, again.
A company that was only half made, because an earlier Add was interrupted, does not count as taken: add it again with the same Service name to finish it.
Why does adding a company fail after the window closes?
When the server itself is not ready, the Add a company window closes and a message box gives the reason, with nothing created.
- The code-signing certificate is missing, or No update feed is configured. The server's own files are incomplete; run the ABM Service Server setup again, then add the company again.
- The server software ... is not installed. The service software this manager expects is missing; run the ABM Service Server setup again.
- pins no signing certificate, naming the file
machine.json. A settings file left from an earlier installation is broken. Delete the file the message names and add the company again: the manager writes it again from the installed certificate. Running the setup again does not repair this file, even though the message offers it. - names no update feed, naming the file
machine.json. Delete the file the message names and add the company again, or run the ABM Service Server setup again, which writes the update feed into it. - Another ABM Service Server Manager operation is changing this machine's web services, followed by (or an Apps & Features removal, or the server setup, is running). Only one add, settings change, removal or update of the server software may change the server at a time, and the manager window waits 30 seconds for the other one before giving up. While an ABM Service Server Manager window is open, the setup, the uninstallers and the command-line commands wait for it to close rather than run, so when nobody else is on the server, try again after a minute. If it keeps happening, close the manager and open it again, because it finishes any interrupted change when it opens; if it still repeats, send
manager.log, fromC:\ProgramData\ABM Service\Server\logs, to your software supplier.
A SQL login the window already made stays in SQL Server; the next attempt in a new window makes another one.
What happens when I press Add?
When you press Add in the Add a company window, the manager registers the company as a Windows service, opens its port in Windows Firewall, adds its Apps & Features entry and starts it. The progress window shows writing the company's configuration..., registering the Windows service..., opening the firewall port... and starting the company....
- The Windows service is named AbmService- followed by the service name, shown in Services as ABM Service Web Server with the name in brackets. It starts automatically with Windows, and Windows restarts it if it stops unexpectedly.
- The firewall rule allows incoming connections on the company's port, for every network profile, and has the same name as the service.
- The two connections are stored on the server encrypted for that machine, in the company's folder under
C:\ProgramData\ABM Service\Server. Their passwords are never written to a log. - The first start of the server's first company downloads the ABM Service web application from the update feed before it can serve anything, so for the first minute or two the company's line in the manager shows no version yet. It then shows the version and Running. A company added later starts on the copy already downloaded.
When the company shows Running, press Open under it to see it in a browser on the server, then open its web address from another computer. Both show the ABM Service sign-in page. Until the system administrator ticks people under Who may use ABM Service in a web browser, on Administration › Sign-in in the ABM Service desktop app, the page lists nobody and says Staff use ABM Service in the desktop app., or goes on to the customer sign-in when the company has customer sign-ins. Once it is running, the company's web server also contacts DP Systems by itself, as How to Connect ABM Service Server to DP Systems explains.
If the manager is closed or the server restarts in the middle of an Add, the next time the manager opens it either finishes the Add or undoes it, and says which at the top of the window.