tags:

views:

368

answers:

2

How do I make a backup of a PLSQL db?

+2  A: 

The question is do you really want to do it from PL/SQL?

Assuming you are using an oracle DB they have commands that will dump your DB into a file. It is dumped in such a way that the DB (tables and all) can be re-created from scratch (so you can re-create a secondary backup [not that I would recommend this way]).

Here is the FAQ
http://www.orafaq.com/wiki/Import_Export_FAQ

Martin York
WHAT I MENT IS HOW TO USE SQL COMMAND SUCH AS 'SQL>ALTER TABLESPACE BEGIN BACKUP ;' AND 'SQL>HOST COPY SOURCE TARGET' AND 'SQL>ALTER TABLESPACE END BACKUP ;'
A: 

Your question requires some clarification.

Do you want to: a) create a copy of the database for use somewhere else b) create a backup of the database for backup and recoverability purposes

If you are looking to simply create a copy of the database somewhere else, then the use of the import and export utilities (imp and exp, or impdp and expdp in 10g) should be sufficient.

If you are looking to backup the database for recoverability purposes, then you should really be looking into the use of RMAN, which is Oracle's enterprise backup solution. Docs can be found here: RMAN Quick Start Guide

Dwayne King