Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am working with an Oracle Database and I have a user (called XY) with permissions R/W. I would like to to do automatic backups of the user schema XY. I don't own the server and I don't know if the provider does backup of my schema. Probably does,but I would like to do myself the automatic Backup. I use as Oracle Client the tool SQL Developer.

I know that I can do Extras-> Database Copy but it is not automatic.

Can I achieve this with this client? If so, how?If it is not possible, what alternative do I have?

Thanks!

share|improve this question
    
Do you have access to the server's filesystem? In that case you can use dbms_datapump to create a schema dump. –  a_horse_with_no_name Dec 18 '13 at 21:53
    
As far as I know I have not acces to server's filesystem. The provider is an external company and we have only one user in its Oracle Database with R/W permissions. For the other user schemas our user has just read permissions. I have created in my user schema only two tables and currently I do the backups of these tables manually (copy table).I want just to define an automatic job that does that for me every day. –  Ziggy Dec 18 '13 at 22:00
    
Do I should use RMAN? –  Ziggy Dec 18 '13 at 22:31
    
You need local access to use rman. –  Phil Dec 18 '13 at 23:49
1  
old fashioned exp/imp –  ibre5041 Dec 19 '13 at 7:10

1 Answer 1

If you will have access to server's filesystem, or you can ask for this, you can use crontab utility. To verify whether you have access to cron, type in the following

crontab -e

If you will have an OS user,and if you can use the crontab utility to schedule a job, you can try something like this:

*/30 * * * * ~/bin/dump.bsh 1>~/bin/log/dump.log 2>&1

This simple entry make a logical backup every half hour. The dump.bsh file:

#!/bin/bash
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:$ORACLE_HOME/bin
. $HOME/.bash_profile

now=`date +"%Y-%m-%d_%H-%M"`
expdp user/passwd directory=data_pump_dir dumpfile=lbackup$now.dmp schemas=schema_to_backup

You need to set Oracle env variables (here in the .bash_profile) since cron passes only a minimal set of env variables to your jobs.

Otherwise, go and have a look at this SQL Developer page. In the exports (expdp) section there is also a reference to automatic jobs.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.