In situations where no user with the Database Admin role is available to add a new user to Antero User Security, a new user can be added directly to the necessary database tables via SQL Server Management Studio.
The steps in this article must be done by a user that has access to the SQL Server instance that contains the Antero user database(s), SQL Server Management Studio, and has roles in SQL that allow the use of the SSMS Edit command, and inserting records into the Antero user database.
Adding the New User to the User Table
1. Open SSMS (SQL Server Management Studio), and connect to the SQL Server instance hosting your Antero database(s).
2. From the Object Explorer, expand the folder named Databases.
3. Locate your Antero database in the list of databases, and expand it.
4. Locate the Tables folder, and expand it.
5. Scroll down until you locate the table named dbo.User, and right click on it.
6. From the menu that is displayed, select Edit All Rows, or Edit Top "n" Rows, where n is the value set in SSMS settings (see note below).
The value shown regarding the number of rows to edit in the Edit Top Rows or Edit All Rows menu option depends on settings in SQL Server Management Studio. The default is Edit Top 200 Rows, but you may see another value.
7. The contents of dbo.User will be displayed.
8. As in the image below, select the first empty cell under the column labeled Name:
9. Type the domain username of the user into the cell in the image above, and then press the right arrow key on your keyboard to select the next cell to the right.
Ensure that the selected row remains the same for the duration of the editing process.
10. Continue pressing the right arrow key until you get to the column labeled IsDBAdmin. If the user should have the Antero DB Admin role, enter a 1 into the field, or enter a 0 into the field if the user should not have the DB Admin role.
11. Press the right arrow key once more to arrive at the IsSetupToolsUser column, and enter a 1 if the user should have the Setup Tools role, and enter a 0 into the field if they should not.
12. Once the name, IsDBAdmin and IsSetupToolsUser columns have values, press the Enter key on your keyboard to insert the new row into the User table.
If any errors are encountered, please contact AllMax Technical Support at 800-670-1867.
13. Next, make a note of the value in the ID column of the row that you just created, you will need it in the next section.
14. We are now finished with the dbo.User table. Close the dbo.User edit window.
Adding the New User Record by ID to the User Security Table
1. From the Object Explorer, in the same database, right click the dbo.UserSecurity table, and select Edit All Rows, or Edit Top n Rows.
2. The contents of the dbo.UserSecurity table will be shown.
3. Select the first empty cell under the column labeled UserID as in the image below:
4. Enter the ID from step 13 above, and then press the right arrow key on your keyboard to select the RoleID column.
5. In the RoleID column, enter a 1 to grant the user full permission to every section.
6. Once the ID column, and the RoleID column have values, press the Enter key on your keyboard to insert the new row into the table.
7. The user has now been added with full permissions to every section of Antero, and has the DB Admin role, which grants the user access to the User Security section, where additional users may be added.
8. You may now close the SQL Server Management Studio window, and we hope you enjoy using Antero 7!
If any errors are encountered, please contact AllMax Technical Support at 800-670-1867.