Home » Developer & Programmer » Forms » HOW TO TAKE THE BACKUP WITH THE USE OF FORM
HOW TO TAKE THE BACKUP WITH THE USE OF FORM [message #130104] Thu, 28 July 2005 03:32 Go to next message
samit_gandhi
Messages: 226
Registered: July 2005
Location: Hong Kong
Senior Member

I want to make the form for the backup of the database. When i click the backup button it will automatically create a .dmp file on the harddisk and take the backup of the database.

Will it be possible?? If yes then how??

Samit Gandhi
Re: HOW TO TAKE THE BACKUP WITH THE USE OF FORM [message #130183 is a reply to message #130104] Thu, 28 July 2005 11:02 Go to previous message
Tafer
Messages: 64
Registered: July 2005
Location: Here!
Member
Use something like this:

/*************************************************************/
DECLARE
user varchar2();
password varchar2();
tns_connectionvarchar2();
dmp_file varchar2();
log_file varchar2();
schema_owner varchar2();

BEGIN
user := ...; -- current user
password := ...; -- password for the user
tns_connection := ...; -- name of the database in your tns_names
dmp_file := ...; -- name of the DMP file that you want to create or update, it must have a .dmp extension
log_file := ...; -- Log file. (Optional)
schema_owner := ...; -- schema owner.

HOST
( 'START /WAIT EXP '
|| user ||'/'||password||'@'||tns_connection
|| ' file='
|| dmp_file
|| ' log='
|| log_file
|| ' owner=SCHEMA_OWNER grants=y indexes=y rows=y triggers=y constraints=y'
);
END;
/**************************************************************/

You can change it to match your usual EXP command.

To run this, you'll need a user with permissions for the export, and the machine must have the Oracle Client installed.






[Updated on: Thu, 28 July 2005 11:09]

Report message to a moderator

Previous Topic: record groups
Next Topic: INFO NEEDED
Goto Forum:
  


Current Time: Fri Sep 20 00:48:27 CDT 2024