buy tb500

postgres rules

February 8th, 2022 by ayad

ALTER ROLE grafana_kms_srv WITH LOGIN;
GRANT SELECT ON ALL TABLES IN SCHEMA company_domain TO grafana_kms_srv;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO grafana_kms_srv;
GRANT USAGE ON SCHEMA public TO grafana_fms_srv;
GRANT USAGE ON SCHEMA company_domain TO grafana_fms_srv;

Distribute SSH key in servers

February 2nd, 2022 by ayad

put the ssh public key of your PC in the following command and run it in any server want to access without password

echo ‘put the public key here’ >> /root/.ssh/authorized_keys

list all the available extensions in postgres

February 2nd, 2022 by ayad
SELECT * FROM pg_available_extensions;
or 
run this in postgres
\dx

cluster_admin permission in OKD/Openshift

January 30th, 2022 by ayad

oc adm policy add-role-to-user cluster_admin ayad

trace route with port

January 30th, 2022 by ayad

traceroute -T -p 22 alzwea.com

edit deployments in OKD/Openshift

January 30th, 2022 by ayad

oc edit deployments.apps announcement-portal

snnounvrmrnt-portal = service name

Show shared buffer in postgres

January 28th, 2022 by ayad

show shared_buffers;

Show postgres file settings

January 28th, 2022 by ayad

select * from pg_file_Settings;

reload postgres database

January 28th, 2022 by ayad

select * from pg_reload_conf();

Backup all the databases in postgres

January 15th, 2022 by ayad
pg_dumpall > all_pg_dbs.sql