Uncategorized

Isolating Linux High System Load

Originaly by  Sean Reifschneider Date Ocbober 8, 2010 on https://www.tummy.com/articles/isolating-heavy-load/ There are typically two reasons that a server will show high load and become unresponsive: CPU and disc utilization. On a rare occasion it’s something like a hardware error causing a disc to become unresponsive. There are some great tools for tracking and isolating these issues, as long… Continue reading Isolating Linux High System Load

Debian · Linux

Debian upgrade from 7 to 8

Upgrading Debian wheezy/7 to jessie/8 – skipping backup part – you own it – stop running services such as apache, nginx, mysql, or postgresql: service nginx stop As root edit /etc/apt/sources.list file: Change all instances of wheezy to jessie. This is how my sources.list file looked after replaced the line wheezy with jessie: deb http://ftp.nl.debian.org/debian… Continue reading Debian upgrade from 7 to 8

Linux

Restoring a Linux RAID1 array after one hard drive failed

1. The problem Recently one hard drive (sdb) from a mail server HDD failed. I was having /dev/sda and /dev/sdb, with the 3 partitions /dev/sda1, /dev/sda2 and /dev/sda4 as well as /dev/sdb1, /dev/sdb2 and /dev/sdb4 /dev/md0 = /dev/sda1 + /dev/sdb1 /dev/md1 = /dev/sda3 + /dev/sdb3 /dev/md2 = /dev/sda4 + /dev/sdb4 /dev/sdb failed, and I had… Continue reading Restoring a Linux RAID1 array after one hard drive failed

PostgreSQL · RDBMS

PostgreSQL: alter ALL tables OWNER TO myuser

My task was to ALTER the OWNER of some tables, but you can use the code bellow to alter/grant/select/insert/update/delete on ALL tables/schemas of your PostgreSQL databases. Get the list of tables that we will work on. I have choosen the public schema: SELECT table_name from information_schema.tables WHERE table_schema = ‘public’; Now prepare the sqls queries,… Continue reading PostgreSQL: alter ALL tables OWNER TO myuser

Linux · MS Windows · Oracle · RDBMS

How to reset password for OracleDB

To reset the password for Oracle DB you should first find the password file. This should be under <Oracle instalation>\server\database\PWD<SID>.ora. Delete the file and run the Oracle password utility from the command line as: orapwd file=PWD<SID>.ora password=<password> entries=<users> Usage: orapwd file=<fname> password=<password> entries=<users> force=<y/n> The <password> is your new sys password. After you log in as sys you… Continue reading How to reset password for OracleDB

Linux · MS Windows · PostgreSQL · RDBMS

How to reset root password for PostgreSQL

Resetting the administrator/root password for PostgreSQL works on both Linux or MS Windows. Actually in PostgreSQL the default admin/root account is named postgres. 1. Make a backup copy then edit your pg_hba.conf usually found in data/pg_hba.conf of your PostgreSQL installation like this: # TYPE DATABASE USER CIDR-ADDRESS METHOD # IPv4 local connections: host all all 127.0.0.1/32… Continue reading How to reset root password for PostgreSQL