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.

No comments:

Post a Comment