.::: Script to Restore Backup Full & all Transaction in one Command for...
1. check before restore2. check directory backup & create dblist,txtls > dblist.txt[root@teguhth teguhth]# ls > dblist.txt[root@teguhth teguhth]# cat...
View Article.::: Script Backup Full All Database in PostgreSQL EDB :::.
corelation with http://teguhth.blogspot.com/2023/08/backup-and-restore-postgresql-edb.html 1. check data from tableselect * from teguhth.public.pembelian;select * from edb.public.barang; 2. run...
View Article.::: Create External Table PostgreSQL, EDB using Foreign Data Wrapper...
1. create new externaldb for sample create database externaldb;\c externaldb;teguhth=# create database externaldb;CREATE DATABASEteguhth=# \c externaldb;You are now connected to database "externaldb"...
View Article.::: Create dblink using dblink_connect & dblink in PostgreSQL EDB :::.
1. check before setting select pg_read_file('/etc/hostname') as hostname, version();psql -h 10.10.10.8 -U admin -p 5432 -d teguhth -c "select pg_read_file('/etc/hostname') as hostname, version();";psql...
View Article.::: How to Use backup & Restore Database MySQL MariaDB using MariaDB Backup...
A. Backup with mariabackup 1. install mariabackupyum install -y MariaDB-backup -y2. check data before testingselect * from teguhth.barang;select * from teguhth.pembelian; 3. backup full database #...
View Article.::: Enable pgaudit & pgauditlogtofile in PostgreSQL EDB ::.
1. Download pgaudit & pgauditlogtofilehttps://download.postgresql.org/pub/repos/yum/16/redhat/rhel-8.2-x86_64/yum install -y...
View Article.::: Access MariaDB from PostgreSQL using dblink /FOREIGN DATA WRAPPER...
1. install mysql_fdwwget https://download.postgresql.org/pub/repos/yum/15/redhat/rhel-7.9-x86_64/mysql_fdw_15-2.8.0-2.rhel7.x86_64.rpmyum install mysql_fdw_15-2.8.0-2.rhel7.x86_64.rpm -y2. create...
View Article.::: Create a dblink to a remote server MariaDD MySQL to PostgreSQL EDB and...
1. install ODBC postgresql * configurehttp://teguhth.blogspot.com/2024/01/install-postgresql-odbc-driver-on-linux.htmlA. using dblink1. create table dblink example table barang CREATE TABLE...
View Article.::: Create User MongoDB role admin and readonly and...
1. create user adminuse admindb.createUser({ user: "admin",pwd: "admin",roles: [{ role: "readAnyDatabase", db: "admin" },{ role: "readWriteAnyDatabase", db: "admin" }]});show users;2. create user...
View Article.::: Study Kasus Praktis belajar Query create & insert table/Collection...
1. correlation with other posthttp://teguhth.blogspot.com/2020/12/study-kasus-praktis-belajar-query.html2. create collection with primarykey use teguhthshow dbsshow...
View Article.::: Script to check cpu & memory usage service in linux include custome...
1. check custome cpu usage and memory usage [root@teguhth special]# cat custom_service.sh#!/bin/bashecho "run custom_service.sh <name_service>"PIDX=${1}# Mendapatkan PID dari proses...
View Article.::: Script check cpu usage & memory usage & Total Memory Server SQL Server...
1. create store procedure cpu monitoring sql server for monitoringCREATE PROCEDURE sp_total_usage_cpu_SQLProcessUtilizationASBEGINDECLARE @ts_now bigint = (SELECT cpu_ticks/(cpu_ticks/ms_ticks)FROM...
View Article.::: How to enable CDC (Change Data Capture) in MariaDB, MySQL, MarinaDB in...
Enable Binary Logging1. check table for sample SELECT *,@@hostname,@@version FROM teguhth.pembelian 2. Create table for cdc # create table CREATE TABLE audit_table ( id INT AUTO_INCREMENT PRIMARY...
View Article.::: Check Status Backup & Restore Progress in % Percent MSSQL SQL Server :::.
A. Backup1. Query 1SELECT @@servername as ServerName, command, percent_complete,total_elapsed_time, estimated_completion_time, start_time FROM sys.dm_exec_requests WHERE command IN ('RESTORE...
View Article.::: Convert pgaudit & pgauditlogtofile log insert into table in PostgreSQL...
continue from http://teguhth.blogspot.com/2024/02/enable-pgaudit-pgauditlogtofile-in.html1. Create table pgaudit_logCREATE TABLE pgaudit_log (log_time text,user_name text,dbname text,process_id...
View Article.::: How to enable CDC (Change Data Capture) in PostgreSQL, EDB :::.
1. Enable WAL (Write-Ahead Logging): PostgreSQL uses Write-Ahead Logging for durability. Ensure that your PostgreSQL server is configured to use WAL.2. Create Audit Table: Create an audit table where...
View Article.::: Backup & Restore Database MongoDB Using Mongodump & mongorestore :::.
Step 1: Create Direct Backups Using Mongodumpmongodump [root@teguhth ~]# mongodump2024-04-15T14:59:40.783+0700 writing admin.system.users to dump/admin/system.users.bson2024-04-15T14:59:40.789+0700...
View Article.::: Enable userstat USER_STATISTICS, CLIENT_STATISTICS, INDEX_STATISTICS,...
A. Enable Statistic Plugin1. Check configuration statisticFrom queryshow variables like '%userstat%';From mariadb configuration# cat /etc/my.cnf.d/server.cnf | grep userstat2. Enable userstat...
View Article.::: Additional Environment PostgreSQL EDB example pg_ctl: command not found...
1. Run pg_ctlpg_ctl[root@teguhth ~]# su - postgresLast login: Sun May 12 08:18:13 WIB 2024 on pts/1-bash-4.2$ pg_ctl -D /var/lib/pgsql/15/data status-bash: pg_ctl: command not...
View Article.::: How to configure Transparent Data Encryption (TDE), Monitoring & Remove...
A. Create TDE1. Create Master KeyUSE Master;GOCREATE MASTER KEY ENCRYPTIONBY PASSWORD='TDEpassword!';GO 2. Create Certificate protected by master keyCREATE CERTIFICATE TDE_CertWITH...
View Article