Posts

ORACLE Database ADRCI

ADRCI is Automatic Diagnostic Repository Command Interpreter. Its command line tool to manage diagnostic data. Diagnostic data include alert log, trace file, dump, HM report and more. Automatic Diagnostic Repository ADR is file based repository for Oracle database diagnostic data. It stores alert log, core dump, health monitor reports. The same directory structure is used across multiple products of Oracle database like listener, CRS, ASM. ADRCI provide interactive mode, to launch it use adrci command. Make sure Set ORACLE_HOME and PATH variable properly. The relative location from where adrci launched that define behavior of it. If you launch adrci utility from perticular database diagnostic destination then home path set to that database by default. Using show control purge policy can be found. adrci> show control; ADR Home = /oracle/app/oracle/diag/rdbms/testdb/testdb: ************************************************************************* ADRID  SHO...

MySQL Database Backup

Hello guys In this post we are going see how to take MySQL database backup and schedule it for daily backup. 1. Create backup user and grant appropriate permissions. CREATE USER 'backup'@'localhost' IDENTIFIED BY 'backup'; GRANT SELECT, SHOW VIEW, RELOAD, REPLICATION CLIENT, EVENT, TRIGGER ON *.* TO 'backup'@'localhost'; GRANT LOCK TABLES ON *.* TO 'backup'@'localhost'; 2. Create .my.cnf file with below content. Create this file in home directory of database owner. Set 600 permission for this file. [mysqldump] user=mysqluser password=secret 3. Copy below files to desired locations. mysql_database_backup.sh   mysql_backup_schedule.sh 4. Make changes to mysql_backup_schedule.sh file /home/mysql/isdba/mysql_database_backup.sh /home/mysql/mysql/bin /home/mysql/database_dumps/dumps db_name >> /home/mysql/database_dumps/logs/db_name.log first parameter to mysql_database_backup.sh is location of mys...

PostgreSQL pg_controldata utility

Image
Hello Guys, In this post we are going see a utility provided by PostgreSQL to find information about database cluster.  If we want know information about PostgreSQL cluster like database block size, catalog information,  checkpoint information, WAL segment size, etc. we will use pg_controdata utility. the location of pg_controldata utility will be same as your postgresql installation then bin directory. to execute this utility we have to provide data directory location as parameter. The sample output is attached here. #############################!!! Happy Learning !!!################################

PostgreSQL Database Major Upgrade

Image
Hello Guys... In this post we are going to see PostgreSQL database major upgrade. The earlier version of PostgreSQL is 9.6.5 and we are going to upgrade it to 10.1 Prerequisite: A server with any flavour of UNIX having PostgreSQL 9.6.5 installed. Binaries of PostgreSQL 10.1 Access to special OS user using database is installed. Here we are using postgres user as special OS user. postgres used for below execution. Configuration Details: Old data directory:  /pg_data/pg_data_9.6.5/ New data directory:  /pg_data/pg_data_10.1/ Old installation directory:  /pghome/postgres_9.6.5/ New Installation directory:  /pghome/postgres_10.1/ Upgrade Procedure: backup database cluster. shutdown database cluster. Rename installation directory. It is good practise to rename installation directory instead of delete, if we have any trouble we can revert the changes. Install PostgreSQL 10.1 using source code. I am going to write post for Standard PostgreSQL Data...