Visit Our UNIX and Linux User Community

Problem in scheduling an Export of a table

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problem in scheduling an Export of a table
# 1  
Old 08-25-2009
Problem in scheduling an Export of a table

Hi, I am facing a problem while scheduling an export of a table using cron job. I have written a simple export command inside a shell script like
echo started
exp schemaname/temp1234  file= /test/d.dmp  tables=per_st  log= /test/d.log  
echo ended

I tried scheduling it through cronjob.
1,2,3 * * * * /test/  >> /test/test.log

The scheduler runs the script and places the echoed statements in test.log.But the dumps are not being created under respective folders. The export command is not working i guess..
Could anyone suggest any solution for this problem..

Last edited by vgersh99; 08-25-2009 at 08:47 AM.. Reason: code tags, PLEASE!
# 2  
Old 08-25-2009
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums


This is the crontab of your database user that is able to do the export? You will have to make sure that you are using the environment of your database user since in cron it will not automatically use all settings like variables etc. that are set up in environment files like .profile etc.

Have a look here too maybe:
# 3  
Old 08-25-2009
exp schemaname/temp1234  file= /test/d.dmp  tables=per_st  log= /test/d.log  

chage for:
exp schemaname/temp1234  file=/test/d.dmp  tables=per_st  log=/test/d.log  

# 4  
Old 08-25-2009
Thanks.. Thers is no syntax problem .The script is working fine when its run from command prompt.
# 5  
Old 08-25-2009
ok, in my system doesn't work with this space
# 6  
Old 08-25-2009
Originally Posted by chipcmc
ok, in my system doesn't work with this space
once again, check the posted crontab FAQ.
# 7  
Old 08-25-2009
You should go back to zaxxon's question, regarding the environment, setting ORACLE_HOME, ORACLE_SID, etc. (best done by sourcing oraenv in your script).

And do you really want to run the cronjob in three consecutive minutes (1,2,3) every hour?

Previous Thread | Next Thread
Test Your Knowledge in Computers #446
Difficulty: Medium
The Large Hadron Collider experiments at CERN run on Scientific Linux.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Export HTML table

HI , I have a HTML tables as below. It has 2 tables ,I want to extract the second table . Please help me in doing it. <html> <body> <b><br>Running Date: </b>11-JAN-2019 03:07</br> <h2> Schema mapping and info </h2> <BR><TABLE width="100%" class="x1h" cellpadding="1"... (3 Replies)
Discussion started by: deepti01
3 Replies

2. UNIX for Advanced & Expert Users

How can i export entries from table into a variable and parse them?

Hi, I need to export some entries from a table, from a specific column and then redirect them into a file. I used sql plus, in order to fetch the entries and i put them in one variable. When i am running the script it stuck at a point and does not move further. I did something like: ... (4 Replies)
Discussion started by: cookie2
4 Replies

3. Shell Programming and Scripting

How to export hive table data to a file on local UNIX?

Hi All , I am stuck on the below situation.I have a table called "test" which are created on hive.I need to export the data from hive to a file(test.txt) on local unix system.I have tried the below command ,but its giving the exception . hive -e "select * from test " > /home/user/test.txt ; ... (1 Reply)
Discussion started by: STCET22
1 Replies

4. Shell Programming and Scripting

Export table and restart from last table

Hello all, Thank you in advance for reading my post and helping me.. Scenario: I have 50 tables whose names are in a file export.sql, i use the below command to export all these tables one by one cat export.sql|while read tn do echo "export to $tn.del of del select from... (7 Replies)
Discussion started by: family_guy
7 Replies

5. Shell Programming and Scripting

Export table of 50 columns

Dear all, I have a big table of 50 columns and more then 100, 000 rows in mysql. Could you please help me that how I can export it as .csv or . txt that I can open it in MS excel????? OR how can I export the specific columns of the table??? Thanks AAWT (5 Replies)
Discussion started by: AAWT
5 Replies

6. Shell Programming and Scripting

Shell script to export data from Oracle table .

Hi, I want to write a shell script which will export data from oracle table . I don't want to save that data . I want the queries . Right now i am right clicking on the table and clicking on export as to my desktop . Please let me know if any one have any idea . (2 Replies)
Discussion started by: honey26
2 Replies

7. Shell Programming and Scripting

How to export table data to xml file?

Hi , I would like to get some suggestion from the experts. My requirement is to export oracle table data as an xml file. Any unix/linux tools, scripts available? Regards, (2 Replies)
Discussion started by: LinuxLearner
2 Replies

8. Shell Programming and Scripting

Export a HTML table to Xcel

Hello All, I have a perl script that prints a HMTL table. I want to convert this data into a report and this want to export this information into Excel. How can I do this? Regards, garric (3 Replies)
Discussion started by: garric
3 Replies

9. Shell Programming and Scripting

help for writing shell script to export table data

Hi All, I need to write a shell script(ksh) to take the tables backup in oracle(exporting tables data). The tables list is not static, and those are selecting through dynamic sql query. Can any body help how to write this shell script. Thanks, (3 Replies)
Discussion started by: sankarg
3 Replies

10. Shell Programming and Scripting

export table from oracle database

i would like to export a particular table in my oracle database installed in a hpux box. i would like to determine the filesize of the output before performing these action so i can assess if my harddisk can still handle it. thanks as usuall :rolleyes: (1 Reply)
Discussion started by: inquirer
1 Replies

Featured Tech Videos