Sunday 12 February 2017

What is nohup command ? How to Run Datapump Jobs in Background with ‘’nohup ‘’ mode.



This is used to run Expdp / Impdp Jobs or any other long running jobs in Background.


Step 1: Create a parameter file for export or import

$ cat expdp.par

 

job_name=tab_export

directory=EXP_DIR

dumpfile=EMP_table_.dmp

logfile=export_EMP.log

reuse_dumpfiles=y

 



Step 2:  Create a shell script for your exp par file in nohup.
Also, Change the permission of this file  to execute this.

$ vi exp.sh

nohup expdp parfile=/home/oracle/st/exp.par &


[Esc]

!wq   [ENTER]


$ chmod 744 exp.sh



Step 3: Now run the shell script in nohup using below command.
This will release the prompt immediately and there will not be any running job in the prompt. 

$ nohup export.sh &

[1] 30221


$ nohup: appending output to `nohup.out'


[1]+  Done                    nohup export.sh


Note:
You can see the datapump job running in DBA_DATAPUMP_JOBS view.

Oracle Release Number Format



-         Major Database Release Number
The first numeral is the most general identifier. It represents a major new version of the software that contains significant new functionality.

-         Database Maintenance Release Number
The second numeral represents a maintenance release level.  Some new features may also be included.

-         Fusion Middleware Release Number
The third numeral reflects the release level of Oracle Fusion Middleware.

-         Component- Specific Release Number
The fourth numeral identifies a release level specific to a component. Different components can have different numbers in this position depending upon, for example, component patch sets or interim releases.

-         Platform-Specific Release Number
The fifth numeral identifies a platform-specific release. Usually this is a patch set. When different platforms require the equivalent patch set, this numeral will be the same across the affected platforms.



Sunday 8 January 2017

Housekeep : Quick Tips for DBA


Many a times , the DBA need to remove/housekeep the files on file system on Server so as to make the database running fine...!!

 
You can also remove files based on the age of the file. For example, say you determine that any trace files more than 2 days old can be safely deleted. Typically, the find command is used in conjunction with the rm command to accomplish this task. Before removing files, first display the results of the find command:

$ find . -type f -mtime +2 -name "*.trc*"



If you are satisfied with the list of files, then add the 'rm' command to remove them:

$ find . -type f -mtime +2 -name "*.trc*" | xargs rm


In the prior line of code, the results of the find command are piped to the xargs command, which executes the rm command for every file found by the find command. This is an efficient method for deleting files based on age. However, be very sure you know which files will be deleted.

Another file that sometimes consumes large amounts of space is the listener.log file. Because this file is actively written to by the listener process


$ cp listener.log /u01/backups




Next, use the cat command to replace (nullify) the contents of the listener.log with the /dev/null file (which contains zero bytes) :

$ cat /dev/null > listener.log



For Archivelog deletion, we can use various policies as below :


On Primary

RMAN>  CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;

On Standby ( Depends upon where backup is preformed )

RMAN>  CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;