Difference between revisions of "Auto Backup of Oracle Database on Windows"

From SmartHCM Wiki
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Auto Backup of Oracle Database:'''
 
  
<pre>
+
 
 +
 
 
We are using batch file system for scheduling database. First write your export string in a notepad and save that notepad  file as  .bat  file.
 
We are using batch file system for scheduling database. First write your export string in a notepad and save that notepad  file as  .bat  file.
</pre>
+
 
  
 
'''EXAMPLE:'''
 
'''EXAMPLE:'''
  
 +
 +
For example this  is our export string:
 
<pre>
 
<pre>
For example this  is our export string:
 
 
 
EXPDP system/system@orcl schemas=smarthcm_allied directory=dump_dir logfile=smarthcm_allied.log dumpfile="smarthcm_allied_%date:/=_%_%time::=_%.DMP"   
 
EXPDP system/system@orcl schemas=smarthcm_allied directory=dump_dir logfile=smarthcm_allied.log dumpfile="smarthcm_allied_%date:/=_%_%time::=_%.DMP"   
  
Line 20: Line 20:
 
[[File:database_backup_windows_1.png]]
 
[[File:database_backup_windows_1.png]]
  
<pre>
+
 
Write this export string in notepad file and save it as .bat file.
+
 
</pre>
+
 
 +
'''Write this export string in notepad file and save it as .bat file.'''
  
  
Line 29: Line 30:
  
  
<pre>
+
 
NOW, Schedule  this  batch file by TASK SCHEDULER of WINDOWS.
+
 
</pre>
+
'''NOW, Schedule  this  batch file by TASK SCHEDULER of WINDOWS.'''
 +
 
 +
 
  
  
 
[[File:database_backup_windows_3.png]]
 
[[File:database_backup_windows_3.png]]
  
<pre>
+
 
Click create basic task.
+
'''Click create basic task.'''
</pre>
+
 
  
  
Line 45: Line 48:
  
  
<pre>
+
 
Write Name and Description of task whatever you want.
+
 
</pre>
+
'''Write Name and Description of task whatever you want.'''
 +
 
 +
 
  
  
 
[[File:database_backup_windows_5.png]]
 
[[File:database_backup_windows_5.png]]
  
<pre>
+
 
Pick up Task Trigger i.e select duration or event when you want task to be performed. In our case we are selecting  Daily.
+
 
</pre>
+
 
 +
'''Pick up Task Trigger i.e select duration or event when you want task to be performed. In our case we are selecting  Daily.'''
  
  
Line 61: Line 67:
  
  
<pre>
+
 
Set timing of task.
+
 
</pre>
+
'''Set timing of task.'''
 +
 
 +
 
  
  
 
[[File:database_backup_windows_7.png]]
 
[[File:database_backup_windows_7.png]]
  
<pre>
+
 
In our case action is Start a program.
+
 
</pre>
+
'''In our case action is Start a pro</pre>gram.'''
 +
 
  
  
Line 76: Line 85:
  
  
<pre>
+
 
Browse to the batch file you have prepared earlier.
+
 
</pre>
+
'''Browse to the batch file you have prepared earlier.'''
 +
 
 +
 
  
  
Line 89: Line 100:
  
  
<pre>
+
 
Finish  the setup.
+
 
</pre>
+
'''Finish  the setup.'''

Latest revision as of 11:06, 2 February 2017


We are using batch file system for scheduling database. First write your export string in a notepad and save that notepad file as .bat file.


EXAMPLE:


For example this is our export string:

EXPDP system/system@orcl schemas=smarthcm_allied directory=dump_dir logfile=smarthcm_allied.log dumpfile="smarthcm_allied_%date:/=_%_%time::=_%.DMP"  


="smarthcm_allied_%date:/=_%_%time::=_%.DMP"   is used  to have different name at every backup. By this timestamp method you can even schedule  multiple
backup at same day.

Database backup windows 1.png



Write this export string in notepad file and save it as .bat file.


Database backup windows 2.png



NOW, Schedule this batch file by TASK SCHEDULER of WINDOWS.



Database backup windows 3.png


Click create basic task.



Database backup windows 4.png



Write Name and Description of task whatever you want.



Database backup windows 5.png



Pick up Task Trigger i.e select duration or event when you want task to be performed. In our case we are selecting Daily.


Database backup windows 6.png



Set timing of task.



Database backup windows 7.png


In our case action is Start a program.


Database backup windows 8.png



Browse to the batch file you have prepared earlier.



Database backup windows 9.png



Database backup windows 10.png



Finish the setup.