This article gives you some examples of tar, gzip and gunzip commands on Linux operating system.
How do you take an export of a database that is 100GB in size whereas the disk space available to store the export dump is only 20GB ? Similarly how do you make a tar ball of the E-Business Suite APPL_TOP that is already 50GB in size whereas the disk space available is only 15GB ?. We are in the process of migrating our existing Oracle installations from the HPUX platform to Linux and for the most part, we spend time in transferring files between the platforms. 'Create and Compress' is one option that i have used successfully and i will illustrate the syntax in this post.
Full database export using parallel compression
- Login to source HPUX database host
- mknod db_full_exp.dmp p
- gzip < db_full_exp.dmp > db_full_exp.dmp.gz & nohup exp system/***** parfile=params.lst file=db_full_exp.dmp &
- Copy the above db_full_exp.dmp.gz to the target Linux database server
- gunzip db_full_exp.dmp.gz
- imp system/***** parfile=params.lst file=db_full_exp.dmp
The Oracle Applications 11i E-Business Suite Linux Migration involves copying several source directories from the source platform to the target Linux platform. The below example deals with the $APPL_TOP copy. Same syntax can be used for other directories that should be migrated. Please replace the "PIPE" with the actual PIPE symbol on the keyboard.
- On source HPUX node, cd $APPL_TOP
- tar cvf - . PIPE gzip > /any_directory_having_free_space/appl_top_files.tar.gz
- Copy the appl_top_files.tar.gz to the target Linux node
- On target Linux node, cd $APPL_TOP (directory should be empty)
- gunzip -c appl_top_files.tar.gz PIPE tar xvf -
A database administrator should automate processes and tasks and that extra knowledge in programming comes a long way in accomplishing these goals. Mastery in advanced unix commands like awk and sed will also help eliminate manual tasks for the most part. Ease in shell scripting or perl scripting will help one spend less time in routine tasks thereby giving more time for other important and priority activities.
Post a Comment