docs.synthesized.io
Open in
urlscan Pro
2606:50c0:8000::153
Public Scan
URL:
https://docs.synthesized.io/tdk/latest/user_guide/getting_started/database_permissions
Submission: On June 26 via manual from GB — Scanned from GB
Submission: On June 26 via manual from GB — Scanned from GB
Form analysis
0 forms found in the DOMText Content
Integrate Airflow Spark GCP Cloud Composer SYNTHESIZED TDK * * Download * Getting Started * What is TDK? * Installation * Database permissions * Getting Started * IDE Setup * AWS Marketplace * GCP Marketplace * Tutorials * Configuration * Masking * Generation * Subsetting * Data Filtering * Multiple Databases * More examples * Hashicorp Vault as a Secret Manager * Reference * Configuration reference * Transformations * Command-line interface * Application properties * Inventory Configuration * CLI Docker environment variables * Scripting Transformer * Deployment * Docker * Kubernetes * AWS EKS * AWS ECS * Azure AKS * Integrations * Secret Managers * BigID integration * GitHub Actions * Testcontainers integration * AWS S3 * AWS License Manager * Troubleshooting * Custom database types * java.sql.SQLException: Zero date value prohibited * Automatically Generated Types * FAQ * Changelog * Issues & Support * Privacy Policy * Data Processing Addendum * Terms of Service Synthesized TDK v1.58 * Home * default * Synthesized Governor * v1.58 * v1.57 * v1.56 * Synthesized SDK * v2.14 * v2.13 * v2.12 * Synthesized SDK3 * v3.2 * v3.1 * v3.0 * Synthesized TDK * v1.58 * v1.57 * v1.56 * Synthesized TDK * Getting Started * Database permissions v1.58 v1.58 v1.57 v1.56 Edit this Page CONTENTS * SQL Server * PostgreSQL * MySQL * Oracle * DB2 DATABASE PERMISSIONS CONTENTS * SQL Server * PostgreSQL * MySQL * Oracle * DB2 In order to run TDK successfully, the following minimum users permissions are required. Replace ${database}, ${user}, ${password} with names of your database, user and password respectively. SQL SERVER Input database (reading): use "${database}"; create login "${user}" with password = '${password}'; create user "${user}" for login "${user}"; grant select to "${user}"; grant view definition to "${user}"; sqlCopied! Output database (writing): use "${database}"; create login "${user}" with password = '${password}'; create user "${user}" for login "${user}"; grant alter, create table, references, insert, update, select, delete to "${user}"; sqlCopied! POSTGRESQL Input database (reading): create user "${user}" password '${password}'; grant connect on database "${database}" to "${user}"; /* If you use other schemas in your database, you should also explicitly provide access to these schemas. */ grant select on all tables in schema "public" to "${user}"; sqlCopied! Output database (writing): create user "${user}" password '${password}'; grant connect on database "${database}" to "${user}"; grant create on database "${database}" to "${user}"; sqlCopied! MYSQL Input database (reading): CREATE USER "${user}" IDENTIFIED BY '${password}'; GRANT SELECT, SHOW VIEW ON `${database}`.* TO "${user}"; sqlCopied! Output database (writing): CREATE USER "${user}" IDENTIFIED BY '${password}'; GRANT SELECT, SHOW VIEW, ALTER, CREATE, CREATE VIEW, DELETE, DROP, INDEX, INSERT, REFERENCES, TRIGGER, UPDATE ON `${database}`.* TO "${user}"; sqlCopied! ORACLE Input database (reading): CREATE USER ${user} IDENTIFIED BY "${password}" / GRANT CREATE SESSION TO ${user} / GRANT UNLIMITED TABLESPACE TO ${user} / BEGIN --USE ACTUAL OWNER(S) INSTEAD OF 'TEST' HERE FOR R IN (SELECT owner, table_name FROM all_tables WHERE owner='TEST') LOOP EXECUTE IMMEDIATE 'grant select on '||R.owner||'.'||R.table_name||' to ${user}'; END LOOP; END; / sqlCopied! Output database (writing): CREATE USER ${user} IDENTIFIED BY "${password}" / GRANT CREATE SESSION TO ${user} / GRANT UNLIMITED TABLESPACE TO ${user} / GRANT CREATE ANY TABLE, CREATE ANY VIEW, CREATE ANY MATERIALIZED VIEW, CREATE ANY SEQUENCE, CREATE ANY INDEX, ALTER ANY TABLE, DROP ANY INDEX, DROP ANY TABLE, DROP ANY VIEW, DROP ANY MATERIALIZED VIEW, DROP ANY SEQUENCE, SELECT ANY TABLE, SELECT ANY SEQUENCE, INSERT ANY TABLE, UPDATE ANY TABLE, DELETE ANY TABLE TO ${user} / sqlCopied! DB2 DB2 does not have its own users and relies on the operating system. So you have to create an OS user on the server running DB2 before you can grant permissions. Input database (reading): BEGIN DECLARE script VARCHAR(1024); DECLARE SQLSTATE CHAR(5) DEFAULT '00000'; DECLARE cur CURSOR FOR SELECT 'GRANT SELECT ON ' || rtrim(tabschema) || '.' || rtrim(tabname) || ' TO ${user};' FROM syscat.tables WHERE tabschema NOT LIKE 'SYS%' AND tabschema <> 'NULLID'; OPEN cur; rec_loop: LOOP FETCH cur into script; IF SQLSTATE ='02000' THEN LEAVE rec_loop; END IF; EXECUTE IMMEDIATE script; END LOOP; CLOSE cur; END; @ GRANT EXECUTE ON FUNCTION SYSPROC.db2_get_instance_info to ${user}; @ sqlCopied! Output database (writing): GRANT DBADM WITH DATAACCESS ON DATABASE TO USER ${user}; @ sqlCopied! Installation Getting Started