|
If you are not using Windows, go to the section, MSSQL Database Setup for ThingWorx: Linux.
|
|
Before executing the following steps, verify that the sections Installing SQL Server Management Studio (Database Admin Client) on Windows Machine are performed.
|
|
The GUI steps are below. If you are using the Query Editor in SSMS, enter the following Transact-SQL command:
CREATE LOGIN twadmin WITH PASSWORD = '<password>';
|
Option
|
Parameter
|
Default
|
Description
|
Example
|
||
---|---|---|---|---|---|---|
-h
|
server
|
localhost
|
FQDN or IP of database server
|
-h 10.0.0.221
|
||
-i
|
server-instance
|
<blank>
|
Instance name provided during database installation.
|
-i SQLEXPRESS
|
||
-p
|
port
|
1433
|
Port of SQL Server
|
-p 1433
|
||
-a
|
database-admin-user-name
|
sa
|
Admin user name that has appropriate rights.
|
-a sa
|
||
-l
|
login-name
|
twadmin
|
Name of login created above manually.
|
-l twadmin
|
||
-d
|
thingworx-database-name
|
thingworx
|
Name of database
|
-d thingworx
|
||
-u
|
thingworx-user-name
|
<same-as-login-name>
|
Name of user that will be created inside the database.
|
-u twadmin
|
||
-s
|
schema-name
|
twschema
|
Name of schema created inside thingworx database.
|
-s twschema
|
||
-r
|
password
|
Password@123
|
Password of database-admin-user
|
"Password@123"
|
|
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.
|
Option
|
Parameter
|
Default
|
Description
|
Example
|
||
---|---|---|---|---|---|---|
-h
|
server
|
localhost
|
FQDN or IP of database server
|
-h 10.0.0.221
|
||
-i
|
server-instance
|
<blank>
|
Instance name provided during database installation
|
-i SQLEXPRESS
|
||
-p
|
port
|
1433
|
Port of SQL Server
|
-p 1433
|
||
-l
|
login-name
|
twadmin
|
Name of login created above manually.
|
-l twadmin
|
||
-d
|
thingworx-database-name
|
thingworx
|
Name of database
|
-d thingworx
|
||
-o
|
option
|
all
|
To execute all scripts / model / data / property / model with property will execute.
|
-o all
|
||
-r
|
password
|
Password@123
|
Password for the login-name
|
"Password@123"
|
Option
|
Parameter
|
Default
|
Description
|
Example
|
||
---|---|---|---|---|---|---|
-h
|
server
|
localhost
|
FQDN or IP of database server
|
-h 10.0.0.221
|
||
-i
|
server-instance
|
<blank>
|
Instance name provided during database installation
|
-i SQLEXPRESS
|
||
-p
|
port
|
1433
|
Port of SQL Server
|
-p 1433
|
||
-a
|
database-admin-user-name
|
sa
|
Admin user name which is having appropriate rights.
|
-a sa
|
||
-d
|
thingworx-database-name
|
thingworx
|
Name of database
|
-d thingworx
|
||
-r
|
password
|
Password@123
|
Password of database-admin-user
|
"Password@123"
|