Ok

En poursuivant votre navigation sur ce site, vous acceptez l'utilisation de cookies. Ces derniers assurent le bon fonctionnement de nos services. En savoir plus.

- Page 4

  • [Cassandra] Changer mot de passe, changer nom de cluster

    Changer mot de passe : 

     

    modifier paramètres dans yaml : 

    keystore_password
    truststore_password 

     

    Changer de nom de cluster :

    1 -UPDATE system.local SET cluster_name = '<cluster_name>' where key='local';

    2- nodetool flush system (recommended)

    3. cluster_name update cassandra.yaml the name for the new cluster
    4. Restart cassandra cluster
  • [Postgres] User Privs

    SELECT grantee AS user, CONCAT(table_schema, '.', table_name) AS table, 
        CASE 
            WHEN COUNT(privilege_type) = 7 THEN 'ALL'
            ELSE ARRAY_TO_STRING(ARRAY_AGG(privilege_type), ', ')
        END AS grants
    FROM information_schema.role_table_grants
    GROUP BY table_name, table_schema, grantee;

  • [Postgres] Afficher plus d'infos

    postgres=> dtvsi+
                                                              List of relations
         Schema     |             Name             |   Type   |        Owner        |          Table          |    Size    | Description

  • [Postgres] Trouver les schemas

    select nspname
    from pg_catalog.pg_namespace where nspname not like 'pg%' and nspname <> 'information_schema';

  • [Postgres] Privilege par user

    WITH "names"("name") AS (
      SELECT n.nspname AS "name"
        FROM pg_catalog.pg_namespace n
          WHERE n.nspname !~ '^pg_'
            AND n.nspname <> 'information_schema'
    ) SELECT "name",
      pg_catalog.has_schema_privilege(current_user, "name", 'CREATE') AS "create",
      pg_catalog.has_schema_privilege(current_user, "name", 'USAGE') AS "usage"
        FROM "names";