ORACLE

Total Pageviews

Thursday, 10 December 2015

Table Export Using Windows7 Scheduler





Table Export Using Windows7  Scheduler

1.       Create Directory  F:\backup\Export\Tables

2.       SQL> connect sys as sysdba

3.       SQL> create directory test_dir as ‘F:\backup\Export\Tables’;

4.       SQL> grant read,write on test_dir to scott;

5.       Start ---> run ---> notepad --. SAVE ---> F:\backup\scrips\

File Name ---> SCOT_TABLE_EXPORT.BAT

Encoding ---> UTF – 8

Click on SAVE


SCOT_TABLE_EXPORT.BAT
Set oracle_sid=orcl
set oracle_home=f:\oracle\product\10.2.0\db_1
F:
Cd  f:\oracle\product\10.2.0\db_1\bin
expdp userid=scott/tiger directory=test_dir dumpfile=emp_expdp_%date:~7,2%_%date:~4,2%_%date:~10,4%.dmp  tables=emp logfile=empdate.log

1.       Start ---> run ---> taskschd.msc

2.       Left Side pane click on Task Scheduler Library

3.       Right Side Pane click on Create Taks

4.       Click on General tab ---> write task Name -------------SCOTT_TABLE_EXPORT

5.       Click On Triggers Tab ---> NEW ---> 

Begin The Task ---> on a schedule

Setting  select Daily and there is various option please choose according to your need

Click on OK

6.       Click on Action Tab ---> NEW --->

Action ---> Start a Program

Setting --->

Program/Scripts ---> F:\backup\scrips\ SCOT_TABLE_EXPORT.BAT ( Browse the batch file )

Add Argument ---> -a adv

Start in optional ---> F:\oracle\product\10.2.0\db_1\bin