My FNZ Studio Version

Data & Integration

Latest Update: 25.07.2022 | Margherita Taffarel
Documentation
2024
2023
2022.2
2022.1
11
10
9

1 Problem

As an Appway Administrator, I need to set up (or request to a Database administrator) a Database user which can be set in the configuration of the Data Source used by the Business Data Storage. Which steps do I need to take?

2 Solution

To set up a Database user to be used by the Business Data Storage, you need to perform the following steps directly on the Database (outside of Appway):

  1. Create a new Database user.
  2. Give to the user the necessary grants for the Business Data Storage.

Consider that PostgreSQL, Oracle, and Microsoft SQL Server are currently supported. See the sections below for detailed steps for each of them.

2.1 Database User Setup for PostgreSQL Data Sources

Follow these steps:

  1. Create a new database user:

    CREATE USER data_team_user WITH
           LOGIN
           NOSUPERUSER
           NOCREATEDB
           NOCREATEROLE
           NOINHERIT
           NOREPLICATION
           CONNECTION LIMIT -1
           PASSWORD 'data_team_pwd';
    
     CREATE SCHEMA data_team_schema
           AUTHORIZATION postgres;
    

    where postgres is the admin user considered.

    Note that the user (and schema) name used in the script above is just an example, any user (and schema) name allowed by PostgreSQL can be used.
  2. Set BDS grants:

    GRANT CREATE, USAGE ON SCHEMA data_team_schema TO data_team_user;
    GRANT USAGE ON ALL SEQUENCES IN SCHEMA data_team_schema to data_team_user;
    

    These also include grants needed for the username logging feature (see the Securing and Auditing the Data Handled by the Business Data Storage recipe).

    For more information, see the Postgre documentation.

    A quoted user is supported by the BDS.

2.2 Database user Setup for Oracle Data Sources

Follow these steps:

  1. Create a new database user:

     ALTER SESSION SET "_ORACLE_SCRIPT" = true;
     CREATE USER data_team_user IDENTIFIED BY data_team_pwd
     ALTER USER data_team_user QUOTA unlimited ON USERS;
    

    Note that:
    • The user name has to be the same as the schema name defined in the Data Source.
    • The user name used in the script above is just an example, any user name allowed by Oracle can be used.
    • A quoted user name is not supported by the BDS.
  2. Set BDS grants:

     GRANT CREATE SESSION TO data_team_user;
     GRANT CREATE TABLE TO data_team_user;
     GRANT CREATE SEQUENCE TO data_team_user;
    
  3. Set username logging related grants. These grants are needed for the username logging feature (see the Securing and Auditing the Data Handled by the Business Data Storage recipe).

    GRANT CREATE ANY CONTEXT to data_team_user;
    GRANT EXECUTE ON SYS.DBMS_SESSION TO data_team_user;
    GRANT CREATE PROCEDURE TO data_team_user;
    

    For more information, see the Oracle documentation.

2.3 Database user Setup for Ms SQL Server Data Sources

Follow these steps:

  1. Create a new database user:

    CREATE DATABASE DataTeamDatabase
    
    USE DataTeamDatabase
    
    CREATE LOGIN DataTeamUser
    WITH PASSWORD = 'YourStrong!Passw0rd',
    DEFAULT_DATABASE = DataTeamDatabase;
    
    CREATE SCHEMA DataTeamSchema
    
    CREATE USER DataTeamUser FOR LOGIN DataTeamUser WITH DEFAULT_SCHEMA = DataTeamSchema
    

    Note that the user name used in the script above is an example: any user name allowed by Ms SQL Server can be used. If a quoted user name is used, the quotes must also be used in the Appway Data Source configuration. A quoted user is supported by the BDS.
  2. Set BDS grants:

    GRANT CONNECT TO DataTeamUser
    ALTER ROLE db_datareader add member DataTeamUser
    ALTER ROLE db_datawriter add member DataTeamUser
    ALTER ROLE db_ddladmin add member DataTeamUser
    
    USE MASTER
    GRANT VIEW ANY DEFINITION TO DataTeamUser
    

    For more information, see the related documentation.
© 2026 Appway AG. All Rights Reserved