To display various script parameters and their descriptions, run help on any script as follows: • For *.sh files (run in terminal): *.sh --help • For *.ps1 files (run in powershell) - Get-Help .\*.ps1 |
In the examples below, the following resource names are used: • Resource group name – testresourcegroup • SQL server (logical server) name – testing-sql-server • SQL server (logical server) admin name |
For this example, the command is: ./thingworxAzureSingleInstanceDBSetup.sh -h testing-sql-server -d thingworx -g testresourcegroup |
For this example, the command is: .\thingworxAzureSingleInstanceDBSetup.ps1 -h testing-sql-server -d thingworx -g testresourcegroup |
• When prompted about what subscription to use, either type in one of the names listed, or press ENTER to use the subscription that was last set • To verify the newly-created ThingWorx database in your SQL server logical server, use the following command to list all databases: - az sql db list --resource-group [resource group name] --server [SQL server (logical server) name] |
For this example, the command is: ./thingworxAzureSingleInstanceSchemaSetup.sh -d thingworx -l sqlTestAdmin -u twadmin -h testing-sql-server.database.windows.net -t <password> |
In this example, the command is: .\thingworxAzureSingleInstanceSchemaSetup.ps1 -d thingworx -l sqlTestAdmin -u twadmin -h testing-sql-server.database.windows.net -t <password> |
The following expected warning displays when executing the script: Warning! The maximum key length for a clustered index is 900 bytes. The index 'data_table_indexes_pkey' has maximum length of 902 bytes. For some combination of large values, the insert/update operation will fail. |
• -l is the SQL Server login user and -u is the ThingWorx database user that will be created and used for ThingWorx. • When prompted for a password, enter the password for the SQL server (logical server) admin’s password • To view the details of your ThingWorx database, use following Azure CLI command: - az sql db show --resource-group [resource group name] --server [logical server name] --name Thingworx |