Skip to content

Instantly share code, notes, and snippets.

@CodMonk
CodMonk / CodeMonk#pg_backup.bat
Last active June 11, 2024 09:41
Batch file to backup PostgreSQL DB
@echo off
goto comment
Author: Code Monk
Description: This file use to backup the database using PostgreSQL backup utility "pg_dump".
Backup parameters should be setup before executing this file
File Format flags :
c = Custom
t = Tar
@CodMonk
CodMonk / CodeMonk_Part#Man.sql
Created November 12, 2015 10:39
MySQL Stored Procedure for Table Partitioning
CREATE DEFINER=`root`@`localhost` PROCEDURE `Cmonk_partition_manager`(in partition_frequency varchar(100), in db_schema varchar(100),in input_table_name varchar(100), in partition_column varchar(100))
BEGIN
-- Author - Code Monk
-- Version - 1.0
-- Procedure for automated partitioning of table
-- Inputs :
-- 1- Partition_frequency : Options-(Daily,Monthly,Weekly)
-- 2- db_schema : Name of Database schema
-- 3- input_table_name : Table Name