Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a web-based client-server architecture; The server communicates with a database server holding oracle database, I want to enable the client to trigger the backup operation; i.e. the user on the client side just sends a command to the server which then directs it to the database server, where all the work is done automatically. The client has no oracle tools to establish the backup operation. I think the best solution is to create a stored procedure on the database server which backs up the database. Is that possible? and if so then how?
Thanks.
Posted

1 solution

You could use the Data Pump API ... Oracle Documentation here[^]

There is an example of using it in a stored procedure here[^] - you'll need to change the example to get the data instead of the schema
 
Share this answer
 
Comments
mido_h_89 21-May-14 5:21am    
Thanks, this is what I have done.
But I would like to ask about two issues please...
The first
the detach function to detach the handler, is it necessary to be used at the end of the procedure? and what if I dont use it? I read the Oracle documentation but I didnt get their point, they say it doesn't teerminate the job but indicates that the user is not interested in it, an when I use detach at the end of my procedure the exported .dmp file disappears.
The second
to perform a user (client side) triggered back up as the modification are only to the data, I used TABLE parameter for the export operation. But the version parameter... what should it be? I also read the documentation but couldn't determine what I need (LATEST or COMPATIBLE) ?
Thanks
CHill60 21-May-14 8:10am    
We are getting a little beyond my knowledge of Oracle now, but as far as I know
1. If you don't detach from the job it is left in a "running" state (even when it has terminated). That is not a problem because you can reattach later. If you are sure that the .dmp file is removed when you detach then go down this route. Sorry I can't be more specific but this is not something that I have personally done.
2. I am always wary of not using default settings ;-) and COMPATIBLE is the default. However if you use any of the newest datatypes they may not be exported properly - depends on the database compatibility settings. If your backup is never likely to be used to downgrade to a previous version I would probably go with LATEST.

I must emphasise that I have never personally managed backups in Oracle, so if you are still not sure it might be worth posting another question about the detach and version (i.e. your comment) so that others with more experience in this area see it.
mido_h_89 28-May-14 4:55am    
That's OK. Thank you ^_^

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900