Solved

schedule export

Posted on 2014-04-01
5
312 Views
Last Modified: 2014-04-06
How can we schedule export in linux ?
0
Comment
Question by:tonydba
5 Comments
 
LVL 34

Expert Comment

by:johnsone
ID: 39969316
What I would do is to write a small script that does the export.  Then schedule that through cron.

Here is the documentation for the cron file (aka crontab) -> http://www.manpagez.com/man/5/crontab/

If your version of crontab supports it, you should run the "crontab -e".  That should bring up the current version of the file and allow you to edit it.  Once you save it, it will be loaded for you.

Be sure that whatever script you write sets up the Oracle environment.  Command run through cron do not execute your login scripts, so absolutely no environment variables will be set up before the script is run.
0
 
LVL 13

Expert Comment

by:Alexander Eßer [Alex140181]
ID: 39969344
0
 
LVL 23

Expert Comment

by:David
ID: 39969477
Hi Tony, just as background, can you provide:

-- the database version;
-- whether or not you mean export, or its replacement, datapump (expdp);
--  whether or not the database instance is running in ARCHIEVELOG mode (changes captured as REDO, written, saved as archive logs)

Where I'm going with this, is to educate you on having a recoverable backup.  Export is good for having copies of stuff, but awkward to restore from.
0
 
LVL 15

Accepted Solution

by:
Devinder Singh Virdi earned 500 total points
ID: 39970889
Example

Step 1: open crontab using below command
crontab -e

Step2: use below to schedule your script with frequency

0 10 * * * your_exp_script parameter1 parameter2 > log_fileLocation_output.log 2>&1

#* * * * * command to be executed
#- - - - -
#| | | | |
#| | | | ----- day of week (0 - 6) (Sunday=0)  
#| | | ------- month (1 - 12)    
#| | --------- day of month (1 - 31)
#| ----------- hour (0 - 23)
#------------- min (0 - 59)

Using above, backup will start at 10:00 am
0
 

Author Closing Comment

by:tonydba
ID: 39981681
fine thanks..
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
how to tune this sql query 61 101
percentage remaining 6 40
consolidate 4 lines of oracle query output to 1 line 4 43
null value 15 65
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now