Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Tablespace Backup/Restore test

saurabhviva
Occasional Contributor

Tablespace Backup/Restore test

HI,

We have just installed the DP 06.11 on our servers and now want to test the backup/restore for our database.

The backup performed successfully but while trying to restore the file I am geeting some error message, request you to please review the backup/restore process below and suggest me if I am making some mistake in my steps.

SQL> create tablespace testtbs;

Tablespace created.

SQL> create table testtable (empid number(2))
2 tablespace testtbs;

Table created.

SQL> insert into testtable values(2);

1 row created.

SQL> insert into testtable values(3);

1 row created.

SQL> select * from testtable;

EMPID
----------
2
3

*Tablespace testtbs Backup Taken Successfully.

SQL> update testtable set empid=5 where empid=2;

1 row updated.

SQL> commit;

Commit complete.

SQL> select * from testtable;

EMPID
----------
5
3

SQL> alter tablespace testtbs offline;

Tablespace altered.

*Restore tablespace testtbs performed on DP successfully.

But while making tablespace testtbs online, I am getting below error message:

SQL> alter tablespace testtbs online;
alter tablespace testtbs online
*
ERROR at line 1:
ORA-01113: file 22 needs media recovery
ORA-01110: data file 22:
'/home/oracle/app/oracle/oradata/VIVADEV/datafile/o1_mf_testtbs_6hpg7g6y_.dbf'

Please suggest.

Regards,
Saurabh
4 REPLIES
Shibin_2
Honored Contributor

Re: Tablespace Backup/Restore test

Volker Borowski
Honored Contributor

Re: Tablespace Backup/Restore test

Hi,

a database is no filesystem.
While you backup the tablespace, the DB still writes to the tablespace. Thus, since the
backup takes a couple of time, your backup is not consistent.
After you restored it, it requires
RECOVERY to make it consistent again.

Do a google search to learn the difference
between restore and recovery in oracle language.

You will require the offline redologs to
recover your tablespace.

Volker
Volker Borowski
Honored Contributor

Re: Tablespace Backup/Restore test

Oh,

and while I review your scenario:

This looks like you want to set back the tablespace to an earlier timestamp.

THIS CAN NOT BE DONE as simple as you think.

It would make the entire DB inconsistent.

Partial "point-in-time" reset strategies
require a significant amount of action
and a proper and preplanned documentation,
to make sure nothing goes wrong.

Volker
saurabhviva
Occasional Contributor

Re: Tablespace Backup/Restore test

Hi Folks,

Please find the attached steps which I followed during the TSPITR but failed,
please suggest if I am making some mistake in the process.

Your help is highly appreciated !!

Regards
Saurabh