Compare 2 Servers RPM and Install RPM from Text File List

1. Generate RPM list on Old Server rpm -qa --queryformat='%{NAME}\n' | sort > serverold.txt 2. Generate RPM list on New Server rpm -qa --queryformat='%{NAME}\n' | sort > servernew.txt 3. Copy File to New Server and use diff comand to get differences diff serverold.txt servernew.txt > diff.txt 4. Get list of packages missing in new Server … Continue reading Compare 2 Servers RPM and Install RPM from Text File List

Shell Script to Monitor Oracle Tablespace and Send Email Alert Only If Threshold Exceeds

[code language="bash"] export MMSG=/tmp/$$.mail export ADDR="email address here" export ORACLE_HOME=/u02/app/oracle/product/11.2.0/dbhome_1 export ORACLE_SID=appdev1 file=/tmp/${$}_`date +%Y%m%d` sqlplus -s system/password << .eof > $file set pages 0 select df.tablespace_name tspace, round(sum(fs.bytes)/(df.bytes) * 100) "%_free", round(sum(fs.bytes)/(1024*1024)) free_ts_size, df.bytes/(1024*1024) tot_ts_size from dba_free_space fs, (select tablespace_name, sum(bytes) bytes from dba_data_files group by tablespace_name ) df where fs.tablespace_name = df.tablespace_name group by … Continue reading Shell Script to Monitor Oracle Tablespace and Send Email Alert Only If Threshold Exceeds

Shell Script to Monitor AIX Filesystem and Send Email

The Below Shell Script checks the Filesystem mount points and using AWK outputs all filesystem exceeding 90% space to a file called diskspacepoll. Once that is done the sed command removes any special character like '%' from the output file and cleans it to a file called output.log The next important logic is in the … Continue reading Shell Script to Monitor AIX Filesystem and Send Email

Notepad++ find and replace string with a new-line

Most of the times DBA's need to edit blocks of PL/SQL or SQL scripts and perform some modifications. Notepad++ is a very powerful and lightweight tool to perform edits.   Lets say you have a document with text like below:   111 XYZ DCD 999 ABC Now you need  add a line break if you … Continue reading Notepad++ find and replace string with a new-line

Schema Replication using Oracle Goldengate 11g (Installation & Configuration)

GoldenGate is touted by Oracle as its future for data replication. It will slowly phase out Oracle Streams and will be more closely coupled with Oracle products. Golden Gate is relatively simpler to use and monitor than Oracle streams. Below I will demonstrate how to configure ASYNC Schema Replication one side using Oracle GoldenGate 11g … Continue reading Schema Replication using Oracle Goldengate 11g (Installation & Configuration)

Monitor User Processes and Send Email Shell Script Solaris10

Sometimes on a system it is important to know the maximum user processes does not increase so much that it consumes all shared memory. Recently we had an incident in our ORganization where a rogue application bug caused user processes to spike upto 20,000 and it consumed all memory and swap and the entire server … Continue reading Monitor User Processes and Send Email Shell Script Solaris10

Configuring DNS on Solaris 10 (Joining Solaris10 server to Domain)

################ Configure Solaris 10 machine to be on DNS############## 1. Check for file resolv.conf in /etc directory, if it doenst exist create it 2. add below information to the resolv.conf file domain mydomain.com nameserver 172.20.4.10 nameserver 172.20.4.166 search mydomain.com 3. Check for file nsswitch.conf in /etc directory hosts:      files ipnodes:    files ## edit the above … Continue reading Configuring DNS on Solaris 10 (Joining Solaris10 server to Domain)

Setting up user profiles for Grid and Oracle user : Oracle RAC 11gR2 on Solaris 10

Below is the Solaris user profiles for "grid" and "oracle" user. If you have followed Oracles official documentation for installation ORacle Rac 11gR2. It is best practice to install Oracle clusterware under grid user and oracle database with Oracle user. It takes a little time to get used to this setup specially for RAC users … Continue reading Setting up user profiles for Grid and Oracle user : Oracle RAC 11gR2 on Solaris 10

Oracle Database 11g installation on Solaris 10

I had installed Oracle Database 11g on Solaris 10 few days back. I thought of documenting the steps for easy reference. Please find below steps for the same Installation Pre-Requisite Refer to Oracle Database Installation Guide 11g Release 1 (11.1) for Solaris Operating System for checking Hardware and Software Requirements. User Creation and Environment Settings … Continue reading Oracle Database 11g installation on Solaris 10

Automatic Storage Management (ASM) in Oracle Database 10g

Automatic Storage Management (ASM) in Oracle Database 10g Automatic Storage Management (ASM) is a new feature was introduced in Oracle 10g to simplify the storage of Oracle datafiles, controlfiles and logfiles. Overview of Automatic Storage Management (ASM) Initialization Parameters and ASM Instance Creation Startup and Shutdown of ASM Instances Administering ASM Disk Groups Disks Templates … Continue reading Automatic Storage Management (ASM) in Oracle Database 10g