Re: Backup mode information in data dictionary

From: Brian P. Mac Lean <brian.maclean_at_teldta.com>
Date: 1996/10/03
Message-ID: <3253D38C.2705_at_teldta.com>#1/1


Moorthy N. Rekapalli wrote:
>
> Hello There,
>
> Where in the data dictionary that I will find that the tablespace
> is in backup mode. I thought that the STATUS field of the
> DBA_TABLESPACES will show that information. I issued
>
> SQLDBA> ALTER TABLESPACE USER_DATA BEGIN BACKUP;
>
> After this, the status of the user_data tablespace is online. From
> this information, how can I tell that the tablespace is in backup
> mode.
>
> THANKS IN ADVANCE.
>
> Moorthy

This should work:

REM BOF BOF BOF BOF BOF BOF BOF BOF BOF BOF BOF BOF BOF BOF BOF set verify off
set pagesize 23
set linesize 80
set pause on
set pause 'Hit enter to continue'
set feedback off
set showmode off
set echo off  

col tablespace_name format a20    heading "TableSpace|Name"
col file_id         format 999    heading "File|ID"
col ddf_status      format a10    heading "TableSpace|Status"
col vb_status       format a18    heading "Backup|Status"
col time            format a20    heading "Last Backup|Start Time"
ttitle "TABLESPACE BACKUP STATUS Report For Oracle TableSpaces|Time Order"
select ddf.tablespace_name,
       ddf.file_id,
       ddf.status as ddf_status,
       vb.status as vb_status,
       vb.time

from dba_data_files ddf, v$backup vb
where vb.file# = ddf.file_id
order by 5;  

ttitle "TABLESPACE BACKUP STATUS Report For Oracle TableSpaces|TableSpace Name Order"

select ddf.tablespace_name,
       ddf.file_id,
       ddf.status as ddf_status,
       vb.status as vb_status,
       vb.time

from dba_data_files ddf, v$backup vb
where vb.file# = ddf.file_id
order by 1, 2;  

exit;
REM EOF EOF EOF EOF EOF EOF EOF EOF EOF EOF EOF EOF EOF EOF EOF

-- 
                       \\|//
                       (0-0)
           +-----oOO----(_)-----------+
           | Brian P. Mac Lean        |
           | Database Analyst         |
           | brian.maclean_at_teldta.com |
           | http://www.teldta.com    |
           +-------------------oOO----+
                      |__|__|
                       || ||
                      ooO Ooo
Received on Thu Oct 03 1996 - 00:00:00 CEST

Original text of this message