Configure database connection with command line

The
FactoryTalk
DB Connection Config Utility supports four types of database access permissions with command line. The utility is installed in:
C:\Program Files (x86)\Common Files\Rockwell\DBConnConfigUtil\RNADBConnConfigUtil.exe.
The syntax of the command line is:
RNADBConnConfigUtil.exe -<operationType> [sqlServerName] [sqlUserName] [sqlUserPassword] [databaseNameList] [gMSAuserName] [domainGroup] [loginUser] [loginUserPassword]
The following list identifies the command-line parameters.
Parameter
Description
operationType
Required.
  • -help: prompts instructions for using this utility.
  • -w: specifies Windows Service and skips SQL Server configuration.
  • -a: specifies gMSA and skips SQL Server configuration.
  • -g: specifies Active Directory domain group and skips SQL Server configuration.
  • -l: specifies System Local group and skips SQL Server configuration.
  • -ws: specifies Windows Service and SQL authentication configuration.
  • -as: specifies gMSA and SQL authentication configuration.
  • -gs: specifies Active Directory domain group and SQL authentication configuration.
  • -ls: specifies System Local group and SQL authentication configuration.
  • -ww: specifies Windows Service and Windows authentication configuration.
  • -aw: specifies gMSA and Windows authentication configuration.
  • -gw: specifies Active Directory domain group and Windows authentication configuration.
  • -lw: specifies System Local group and Windows authentication configuration.
sqlServerName
Optional.
Specifies the name of the SQL Server where you want to create the logon user.
sqlUserName
Optional.
Specifies the SQL Server logon account to log on to SQL Server.
sqlUserPassword
Optional.
Specifies the SQL Server logon account password to log on to SQL Server.
databaseNameList
Optional.
Specifies the name of the database to which you want to set SQL Server permissions.
Separate each name with a semicolon.
gMSAuserName
Optional.
Specifies the gMSA username that you want to create as the logon user.
Note
: To specify a gMSA, use one of the following formats:
  • DomainName\gMSA
  • gMSA
domainGroup
Optional.
Specifies the Active Directory domain group name that you want to create as the logon user.
loginUser
Optional.
Specifies the Windows logon user or domain user.
If the Data Access Service logon account is the same as the username you want to configure, you don't need to enter username or password.
Note:
To specify a local account username, use a format like
.\LocalAccountName
. When used with
-l
,
-ls
, and
-lw
parameters,
LocalAccountName
is the the same as
.\LocalAccountName
.
To specify a domain username, use one of the following formats:
  • DomainName\DomainUser
  • DomainUser
loginUserPassword
Optional.
Specifies a password for a Windows logon user or a domain user.
No username or password is required if using the same username as the Data Access Service logon account.
Below are the examples of different configurations.
  • RNADBConnConfigUtil -help
    Prompts instructions on how to use this utility with command line.
  • RNADBConnConfigUtil -w
    Use a Windows built-in Network Service account to access the Data Access Service without configuring the SQL Server account on the server computer.
  • RNADBConnConfigUtil -a <gMSAuserName>
    Use a gMSA account to access the Data Access Service without configuring the SQL Server account on the server computer.
    Required to enter a gMSA username for configuration.
  • RNADBConnConfigUtil -g <Active Directory Domain group> [loginUser] [loginUserPassword]
    Use an Active Directory Domain group account to access the Data Access Service without configuring the SQL Server account on the server computer.
    Required to enter an Active Directory Domain group name, username, and password.
    No username or password is required if using the same username as the Data Access Service logon account.
  • RNADBConnConfigUtil -l <sqlServerName> [loginUser] [loginUserPassword]
    Use a pre-configured FactoryTalk Data Access local group without configuring the SQL Server account on the server computer.
    Required to enter a SQL Server name, username, and password.
    No username or password is required if using the same username as the Data Access Service logon account.
  • RNADBConnConfigUtil -ws <sqlServerName> <sqlUserName> <sqlUserPassword> <databaseNameList>
    Use a Windows built-in Network Service account to access the Data Access Service and SQL Server authentication to log on the SQL Server.
    Required to enter a SQL Server name, SQL Server logon username and password, and the database name list to be configured.
  • RNADBConnConfigUtil -as <sqlServerName> <sqlUserName> <sqlUserPassword> <databaseNameList> <gMSAuserName>
    Use a gMSA account to access the Data Access Service and SQL Server authentication to log on the SQL Server.
    Required to enter a SQL Server name, SQL Server logon username and password, a database name list, and the gMSA username to be configured.
  • RNADBConnConfigUtil -gs <sqlServerName> <sqlUserName> <sqlUserPassword> <databaseNameList> <domainGroup> [loginUser] [loginUserPassword]
    Use an Active Directory domain group account to access Data Access Service and SQL Server authentication to log on the SQL Server.
    Required to enter a SQL Server name, SQL Server logon username and password, a database name list, an Active Directory domain group, and username and password in this group to be configured.
    No username or password is required if using the same username as the Data Access Service logon account.
  • RNADBConnConfigUtil -ls <sqlServerName> <sqlUserName> <sqlUserPassword> <databaseNameList> [loginUser] [loginUserPassword]
    Use a pre-configured FactoryTalk Data Access local group and SQL Server authentication to log on SQL Server.
    Required to enter a SQL Server name, SQL Server logon username and password, a database name list, and username and password in the FactoryTalk Data Access local group to be configured.
    No username or password is required if using the same username as the Data Access Service logon account.
  • RNADBConnConfigUtil -ww <sqlServerName> <databaseNameList>
    Use a Windows built-in Network Service account to access the Data Access Service and Windows authentication to log on SQL Server.
    Required to enter a SQL Server name and a database name list to be configured.
  • RNADBConnConfigUtil -aw <sqlServerName> <databaseNameList> <gMSAuserName>
    Use a gMSA account to access the Data Access Service and Windows authentication to log on SQL Server.
    Required to enter a SQL Server name, a database name list, and the gMSA username to be configured.
  • RNADBConnConfigUtil -gw <sqlServerName> <databaseNameList> <domainGroup> [loginUser] [loginUserPassword]
    Use an Active Directory domain group account to access the Data Access Service and Windows authentication to log on SQL Server.
    Required to enter a SQL Server name, a database name list, and the Active Directory domain group to be configured.
    No username or password is required if using the same username as the Data Access Service logon account.
  • RNADBConnConfigUtil -lw <sqlServerName> <databaseNameList> [loginUser] [loginUserPassword]
    Use a pre-configured FactoryTalk Data Access local group and Windows authentication to log on SQL Server.
    Required to enter a SQL Server name, a database name list, and a username and password in the FactoryTalk Data Access local group to be configured.
    No username or password is required if using the same username as the Data Access Service logon account.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal