问题
I try to create my first database backup. But it doesn't work. I don't know what I did wrong. Thanks in advance.
Backup tablespace:
BACKUP TABLESPACE USERS FORMAT 'c:\FRA\users%u';
My created backup tablespace:
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5 Full 150.32M DISK 00:00:02 28-NOV-20
BP Key: 5 Status: AVAILABLE Compressed: NO Tag: TAG20201128T220319
Piece Name: C:\FRA\USERS05VGMFT7
List of Datafiles in backup set 5
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
7 Full 17446796 28-NOV-20 NO C:\NAUCZANIE\ORADATA\WWWOR\USERS01.DBF
I tried to restore tablespace and I got an error.
RMAN> RUN{
2> SQL 'ALTER TABLESPACE USERS OFFLINE';
3> RESTORE TABLESPACE USER;
4> RECOVER TABLESPACE USERS;
5> SQL 'ALTER TABLESPACE USERS ONLINE';
6> }
sql statement: ALTER TABLESPACE USERS OFFLINE
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 11/28/2020 22:11:18
ORA-01539: tablespace '' is not online
RMAN-11003: failure during parse/execution of SQL statement: ALTER TABLESPACE USERS OFFLINE
ORA-01539: tablespace 'USERS' is not online
来源:https://stackoverflow.com/questions/65055016/i-cant-restore-tablespace-ora-01539-tablespace-is-not-online