There are 2 ways to backup an Oracle database, RMAN and VSS. For either, to be able to backup the database without having to stop access to it, you will need to put the database into the ARCHIVELOG mode. If the database is not already in the ARCHIVELOG mode, setting that mode will require restarting the database.

RMAN backups

To get a backup of an active database, the database must be in the ARCHIVELOG mode (see above).

Create an RMAN script file that will backup your database to a location on the servers local drive. For example, c:\rman_backup.txt.

run {

allocate channel oem_backup_disk1 type disk format 'c:\temp\db_backup\%U';

backup as COPY tag '%TAG' database;

backup as COPY archivelog all not backed up delete all input;

release channel oem_backup_disk1;


run {

allocate channel oem_backup_disk1 type disk format 'c:\temp\db_backup\%U' maxpiecesize 1000 G;

backup as COPY tag '%TAG' current controlfile;

release channel oem_backup_disk1;


Then add to the client setup on the CFA a run before line that runs that script. For example, rman target "sys/a@orcl" cmdfile "c:\rman_backup.txt". In this example, sys is the DB username being logged in as, a is the password, and orcl is the name of the database being backed up. Be sure to include the directory that RMAN will put the database backup into in the file set for the client. In this example, that is c:\temp\db_backup

Once the backup job has backed up the copy of the database, it can be deleted from the server. We can do this by setting the Run After Backup. For this example that is del /Q c:\temp\db_backup\*.

VSS Backups

The Oracle VSS writer is a new feature in Oracle 11.1.

This is Oracles documentation on how to backup a database with VSS.

First, the database has to be in the ARCHIVELOG mode (see above).

Then the Oracle VSS Writer service has to be installed for the database. This is done with the oraVSSw command. This command doesnt seem to work as the Oracle documentation (and its own help output) says it should. The command oraVSSw SID /I where SID is the database SID (which seems to be the same as the name of the database). For me, this was oraVSSw orcl /i. Be careful to get the SID right, as there will be no warning that you have it wrong, the service will be registered, but wont do anything.

Once the Oracle VSS Writer service has been registered, you should be able to see it in the services msc snap in (services.msc). The service will be listed as the SID added to its name as Oracle orcl VSS Writer Service.

By default this service is configured to run as the Local System user, but this user does not normally have adequate access to the database. You need to stop the service, right-click it, go to the Log On tab, and set the service to run as a user who is a member of the ORA_DBA group. Then star the service again. Check with the VSSadmin list writers command that the Oracle VSS Writer for your database is shown (if not, the user the service is running as might not have enough access to the database).

Set the client to include all non-excluded writers, and run a backup. This should backup the database. To restore the database, first you will have to stop it, then browse and restore the job you want to restore, check the box for the Oracle VSS Writer, and click restore. Then you will have to recover or start the database again (for details, soee the Oracle documentation on doing a VSS based backup and restore).