How to create backup and restore [message #601732] |
Mon, 25 November 2013 02:07 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/8ebe2c7ccb62a2a415451f8afccea5f9?s=64&d=mm&r=g) |
lock_heart
Messages: 36 Registered: November 2013
|
Member |
|
|
Hii guys, I've created a application using oracle form 6i. Well now my client want me to add backup and restore option into menu.So that they could take backup of their data regularly but i really don't know how to create backup and restore file option. Can anyone please tell me how to do this...
|
|
|
|
|
|
|
Re: How to create backup and restore [message #601752 is a reply to message #601751] |
Mon, 25 November 2013 05:30 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
I assume that means forms has to be involved.
I ask because doing backups via forms is not normal, most companies just take nightly backups of the DB using the rman, run from a scheduler (db or cron).
There's no easy way to do it from forms as that's just not how it's done.
So are you absolutely sure that forms has to be involved or has your client just asked for this because they don't really understand what's involved in backing up a database?
|
|
|
Re: How to create backup and restore [message #601765 is a reply to message #601749] |
Mon, 25 November 2013 06:33 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
John Watson
Messages: 8964 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
lock_heart wrote on Mon, 25 November 2013 10:34Thanks john, but can you tell me in detail I'm not going to do your job for you, and I certainly can't give away intellectual property. Have you looked at the package yet?
|
|
|
Re: How to create backup and restore [message #601786 is a reply to message #601765] |
Mon, 25 November 2013 13:01 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/c514fffdfe7aab065b12f1f8ace8f6c1?s=64&d=mm&r=g) |
Adeel Qadir
Messages: 48 Registered: November 2013 Location: Pakistan
|
Member |
|
|
You can take backup through push button or menu but you cant do it restore for some data merging and data corruption problem.
Taking a backup by press button or menu is below and understand it step by step.
1. First of all create a push button or menu (Name = Take Backup or any name u want)
2. Copy the below trigger code in push button or menu
begin
host('exp You_User_Name/Your_password@TNS_name file=D:\backups\backup_'||to_char(sysdate,'ddmmrr_hhmiss_am')||'.dmp');
----(D:\backup is file path where backup file saved after creating and to_char(sysdate,'ddmmrr_hhmiss_am' is a automatic creating file name with present sysdate and time.)
if form_success then
message('Backup Created successfully.')
message('Backup Created successfully.')
else
message('Some error Occurred while performing backup action');
end if;
end;
[Updated on: Mon, 25 November 2013 13:03] Report message to a moderator
|
|
|
Re: How to create backup and restore [message #601787 is a reply to message #601786] |
Mon, 25 November 2013 13:31 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
Adeel Qadir wrote on Mon, 25 November 2013 14:01Y
2. Copy the below trigger code in push button or menu
begin
host('exp You_User_Name/Your_password@TNS_name file=D:\backups\backup_'||to_char(sysdate,'ddmmrr_hhmiss_am')||'.dmp');
----(D:\backup is file path where backup file saved after creating and to_char(sysdate,'ddmmrr_hhmiss_am' is a automatic creating file name with present sysdate and time.)
An export is just a logical backup, not a real backup. OP hasn't really said what they mean by backup. For example, table, schema or entire database.
|
|
|
|
|
|
|
|
Re: How to create backup and restore [message #601820 is a reply to message #601814] |
Tue, 26 November 2013 01:31 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
You have several problems. The major one is that you don't know what you are doing. Another one is that you don't know how you'd do that. Then, you are assigned a task to do something you don't know with a tool that is probably the wrong choice. Smells like a BIG failure.
Maybe you should take step by step and focus on one problem at a time, think it over, read documentation, meet the enemy.
As your client told you to implement "backup" (did you ask them what they mean by saying that? What kind of a backup? Backup what exactly?) into your Forms application, I'm not sure they know what they are talking about or you didn't understand the requirement.
Is it to backup only some data from several tables (for example, INSERT them into another table and UPDATE the source table if something goes wrong)?
Is it a logical backup (export); you can use HOST built-in and run EXP (or EXPDP), but you most probably won't import that back easily because of existing objects, data stored within these objects, whether some of them have to be restored (or all of them), how will referential integrity constraints affect that process etc. Generally speaking, not a straightforward task.
Is it a RMAN backup? I know nothing about it, I'm not a DBA and I don't know what it involves. Lucky me, I don't have to implement it into a Forms application so I won't read any documentation at the moment, but you probably should.
So, go back to your client and do the first step. You and they must understand each other VERY well before you move on to the next step.
|
|
|
|
Re: How to create backup and restore [message #601873 is a reply to message #601866] |
Tue, 26 November 2013 10:16 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
If they want to be able to completely restore data in the event of hardware failure etc then they definitely do not want inserts/updates. They want RMAN.
I strongly suggest you go and read the documentation on it and learn what it does.
Or go and hire a DBA who knows how to use it.
|
|
|
|
Re: How to create backup and restore [message #602137 is a reply to message #601898] |
Fri, 29 November 2013 23:57 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](//www.gravatar.com/avatar/c514fffdfe7aab065b12f1f8ace8f6c1?s=64&d=mm&r=g) |
Adeel Qadir
Messages: 48 Registered: November 2013 Location: Pakistan
|
Member |
|
|
i have mentioned already in my post. Restore command is not comfortable from Button or Menu. because its merging or loss your data, So every Developer manage it manually. In addition when you restore data it required a File name (which one u want to restore) here is a main fault to manage restore automatically because you can not give any file name automatically when user pressed Restore Button. So that its main problem and not manageable.
|
|
|