Skip to content

Instantly share code, notes, and snippets.

View SQLadmin's full-sized avatar

SqlAdmin SQLadmin

View GitHub Profile
/*****************************************************************
-------------------------------------
tsqltools - RDS Add CDC
-------------------------------------
Description: This stored procedure will help you to enable CDC on
all the exsiting tables. You have to run this store procedure on the
database where you need to add the tables. It won't support Cross
database's tables.
How to Run: If you want to enable CDC on the tables which
all are in DBAdmin database,
/*****************************************************************
-------------------------------------
tsqltools - RDS - Auto CDC
-------------------------------------
Description: This stored procedure will help you to enable CDC
automatically when a tables is created. This is basically a database
Trigger and it'll ecxecute enable CDC procedure when we creat a
new table. This is a database level trigger, so it won't replicate
the new tables which are in another database.
How to Run: If you to enable this on DBAdmin database,
/*****************************************************************
-------------------------------------
tsqltools - RDS - Auto CDC
-------------------------------------
Description: This stored procedure will help you to enable CDC
automatically when a tables is created. This is basically a database
Trigger and it'll ecxecute enable CDC procedure when we creat a
new table. This is a database level trigger, so it won't replicate
the new tables which are in another database.
/*****************************************************************
-------------------------------------
tsqltools - RDS - Auto CDC
-------------------------------------
Description: This stored procedure will help you to enable CDC
automatically when a tables is created. This is basically a database
Trigger and it'll ecxecute enable CDC procedure when we creat a
new table. This is a database level trigger, so it won't replicate
the new tables which are in another database.
@SQLadmin
SQLadmin / xtrabackup_full_increment_restore.sh
Last active January 2, 2025 21:08
Automate xtrabackup for FULL/Incremental and restore
#!/bin/bash
# This is my production backup script.
# https://sqlgossip.com
set -e
set -u
usage() {
echo "usage: $(basename $0) [option]"
echo "option=full: Perform Full Backup"