Database Creation Commands

Following are the database creation commands:

CREATEDB

The createdb command is used to create the AE database and users. You can create the database before, during,  or after installing AE.

Prerequisites

Before executing the createdb command:

  • You should have the database admin user credentials of the database server.
  • Ensure to enable the TCP/IP for the SQL database server.

Syntax Defined

Syntax: ae createdb

Sample Output

The following is the output of creating database after installing AE:

 

D:\RPA\AssistEdgeAutomation\scripts>ae createdb

Executing this command will delete any data present in database (if database exists).

Are you sure you want to continue (Y/N) : Y
Following values were provided during installation:
    Database Hostname: rpaserver-01
    Database Port:     1433
    Database Name:     rpadev
    Database UserName: devuser
Do you want to continue with these values? (Y/N): N
Please provide database type (MsSQL, Oracle or Postgres) : MsSQL
Enter Database Hostname: dbserver-01
Enter Database Port: 1433
Enter Database Username: produser
Enter Database Password (HIDDEN):
Enter Database Name: rpaprod
If Database admin user is a Windows User, then provide username in format domainame\username
Please provide database admin username : admin
Please provide database admin password  (HIDDEN):
Database connection created.
Executing script: dropTable.sql
Executing script: createTable.sql
Executing script: createIndex.sql
Executing script: seedData.sql
Executing script: insertDateDimData.sql
Executing script: hotKeyDataXmlData.sql
Executing script: createConstraint.sql
Executing script: trigger.sql
Executing script: lowcode.sql
Executing script: quartz.sql

 

Are you sure you want to continue (Y/N) : Enter Y and provide details related to the database as mentioned below:

  • Do you want to continue with these values? (Y/N): Enter Y, if you want to continue with the previous database details else enter N>8 .
  • Please provide database type (MsSQL, Oracle or Postgres): Provide the database type for AssistEdge and then press <Enter>8  .
  • Enter Database Hostname: Provide the database hostname for the instance and then press <Enter>8 .
  • Enter Database Port: Provide the database port number for the instance and then press <Enter>8 .
  • Enter Database Username: Provide the username of the database for AssistEdge and then press <Enter>8 .
  • Enter Database Password <HIDDEN>: Provide password of the above database user and then press <Enter>8 .
  • Enter Database Name: Provide name of the database for AssistEdge and then press <Enter>8 .
  • Please provide database admin username : Provide Windows/Oracle/Postgres database admin username accordingly and then press <Enter>8 .
  • Please provide database admin password  (HIDDEN): Provide database admin username accordingly and then press <Enter>8 .

Database Connection Created

DBCREATEQUERY

The dbcreatequery command prints the necessary database queries that assist you in creating database, user, and schema and grant appropriate access to the user. These queries must be executed by the database administrator one by one rather than as a script. 

Syntax Defined

Syntax: ae dbcreatequery

Sample Output

D:\RPA\AssistEdgeAutomation\scripts>ae dbcreatequery


Please provide database type (MsSQL, Oracle or Postgres) : MsSQL
Enter Database Username: produser
Enter Database Password (HIDDEN):
Enter Database Name: RPAprod
-- Drop Database
IF EXISTS (SELECT name FROM sys.databases WHERE name = N'produser') DROP DATABASE [RPAprod];
-- Create Database
CREATE DATABASE [rpaprod] ;
-- Create User
CREATE LOGIN [produser] WITH PASSWORD=N'produser', DEFAULT_DATABASE=[rpaprod], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF;
-- Grant Access
USE "rpaprod"; CREATE USER "db202316" FOR LOGIN "produser";
USE "rpaprod"; EXEC sp_addrolemember db_owner, "produser";
USE "rpaprod"; EXEC sp_addrolemember db_datareader, "produser";
USE "rpaprod"; EXEC sp_addrolemember db_datawriter, "produser";
-- Create Schema
DROP SCHEMA IF EXISTS usch_aese;
CREATE SCHEMA usch_aese;
USE "rpaprod"; ALTER USER "produser" WITH DEFAULT_SCHEMA = usch_aese;


D:\RPA\AssistEdgeAutomation\scripts>

 

Enter details related to the user as mentioned below:

  • Please provide database type (MsSQL, Oracle or Postgres): Provide the database type for AssistEdge and then press <Enter>8 .
  • Enter Database Username: Provide the username of the database for AssistEdge and then press <Enter>8 .
  • Enter Database Password <HIDDEN>: Provide password of the above database user and then press <Enter>8 .
  • Enter Database Name: Provide name of the database for AssistEdge and then press <Enter>8 .

CREATEDBTABLES

The createdbtables command is used to create the objects in the existing database. This command can be used when you do not have database admin credentials. You can ask the database admin to create the database and the user with the queries generated by DBCreateQuery command. Once the database and user are created, this command will create the required objects.

Prerequisites

Before executing the createdbtables command:

  • You should have the server details and port details in which the database is created.
  • Ensure that database is created in the database server.
  • You should have the database name, username, and password. 
     

Syntax Defined

Syntax: ae createdbtables

Sample Output

 

D:\RPA\AssistEdgeAutomation\scripts> ae  createdbtables


Executing this command will delete any data present in database (if database exists).

Are you sure you want to continue (Y/N) :

Following values were provided during installation:
    Database Hostname: rpserver-01
    Database Post:     1433
    Database Name:     rpadev
    Database UserName: devuser
Do you want to continue with these values? (Y/N): N
Please provide database type (MsSQL, Oracle or Postgres) : MsSQL
Enter Database Hostname: dbserver-01
Enter Database Port: 1433
Enter Database Username: produser
Enter Database Password (HIDDEN):
Enter Database Name: rpaprod
Executing script: dropTable.sql
Executing script: createTable.sql
Executing script: createIndex.sql
Executing script: seedData.sql
Executing script: insertDateDimData.sql
Executing script: hotKeyDataXmlData.sql
Executing script: createConstraint.sql
Executing script: trigger.sql
Executing script: lowcode.sql

Executing script: quartz.sql

 

Are you sure you want to continue (Y/N) : Enter Y and provide details related to the database as mentioned below:

  • Do you want to continue with these values? (Y/N): Enter Y, if user want to continue with the previous database details else enter N>8 .
  • Please provide database type (MsSQL, Oracle or Postgres): Provide the database type for AssistEdge and then press <Enter>8 .
  • Enter Database Hostname: Provide the database hostname for the instance and then press <Enter>8 .
  • Enter Database Port: Provide the database port number for the instance and then press <Enter>8 .
  • Enter Database Username: Provide the username of the database for AssistEdge and then press <Enter>8 .
  • Enter Database Password <HIDDEN>: Provide password of the above database user and then press <Enter>8 .
  • Enter Database Name: Provide name of the database for AssistEdge and then press <Enter>8 .

UPDATEPASSWORD

The updatepassword command is used to update the password of the database user in AE. This is used in case the password of the database user is updated.

Prerequisites

Before executing the upgrade-txn command, ensure:

  • All components are stopped.
  • To have the Updated password for the Database user.

Syntax Defined

Syntax: ae updatepassword

Alias Defined

Alias: ae up

Sample Output

 

D:\RPA\AssistEdgeAutomation\scripts>ae updatepassword
Enter Database Username: produser 
Enter Database Password (HIDDEN):
Enter Database Name: rpaprod
Database connection success

 


Enter details related to the user as mentioned below:

  • Enter Database Username: Provide the username of the database for AssistEdge and then press <Enter>8 .
  • Enter Database Password <HIDDEN>: Provide password of the above database user and then press <Enter>8 .
  • Enter Database Name: Provide name of the database for AssistEdge and then press <Enter>8 .

 

Updatepassword database hostname (Optional Switch)

The ae updatepassword db_hostname command is used to update the database hostname and port of the database in AE. With this switch all details such as hostname, port, username, password, and database name can be updated.

 

NOTE:

“db_hostname” is a keyword and need not be replaced by actual hostname.

 

Prerequisites

Before executing the ae updatepassword db_hostname command, ensure:

  • All components are stopped.
  • To have the updated database details like hostname, port number, username, password and database name

 

Syntax Defined

Syntax: ae updatepassword db_hostname

 

Alias Defined

Alias: ae up db_hostname

 

Sample Output


D:\RPA\AssistEdgeAutomation\scripts>ae updatepassword db_hostname
Enter Database Hostname: DBServer
Enter Database Port: 1433
Enter Database Username: produser 
Enter Database Password (HIDDEN):
Enter Database Name: rpaprod
Database connection success.

 

Enter details related to the database and user as mentioned below:

  • Enter Database Hostname: Provide the database hostname for the instance and then press <Enter> 8 .
  • Enter Database Port: Provide the database port number for the instance and then press <Enter>  8 .
  • Enter Database Username: Provide the username of the database for AssistEdge and then press <Enter> 8 .
  • Enter Database Password <HIDDEN>: Provide password of the above database user and then press <Enter>8 .
  • Enter Database Name: Provide name of the database for AssistEdge and then press <Enter>8 .

    Upon providing the details the connection is validated. If the connection is not successful, you can still opt for updating the details.

ADDSUPERADMIN

The addsuperadmin command adds a user to the existing AE database as a super admin. The user can then access the AE Admin module and can add new users to it.

Prerequisites

Before executing the addsuperadmin command, make sure the database is created.

Syntax Defined

Syntax: ae addsuperadmin

Sample Output

D:\RPA\AssistEdgeAutomation\scripts>ae addsuperadmin


Please provide First name :  AERPA

Please provide Last name :  User 

Please provide Email id : aerpa.user@ev.com

Please provide Unique id : aerpa.user

 

User added to database.


Enter details related to the user as mentioned below:

  • Please provide First name : Provide the first name for the AssistEdge Admin user and then press <Enter>8 .
  • Please provide Last name : Provide the second name for the AssistEdge Admin user and then press <Enter>8 .
  • Please provide Email id : Provide the Email ID for the AssistEdge Admin user and then press <Enter>8 .
  • Please provide Unique id : Provide the Unique ID for the AssistEdge Admin user and then press <Enter>8 .