Oracle RMAN REPORT SCHEMA Command: Display Database Files
Oracle RMAN REPORT SCHEMA Command: Display Database Files
Purpose
The REPORT SCHEMA command is an essential Oracle RMAN (Recovery Manager) tool that displays comprehensive information about all database files in your Oracle database. This command provides database administrators with a quick view of the current database structure, including permanent datafiles, temporary files, tablespaces, and their associated details. Unlike SQL queries that target specific data dictionary views, REPORT SCHEMA retrieves information directly from the RMAN repository stored in the control file, making it a fast and reliable way to assess your database file structure before performing backup or recovery operations.
Code
1REPORT SCHEMA;
Basic Syntax
The simplest form of the command is:
1RMAN> REPORT SCHEMA;
This command connects to the target database and reads information from the control file to generate a report. You do not need to connect to a recovery catalog for basic usage, though a target database connection is required.
Advanced Syntax with AT Clause
When connected to a recovery catalog, you can view the database schema from a past point in time:
1RMAN> REPORT SCHEMA AT TIME 'SYSDATE-14'; -- Schema from 14 days ago
2RMAN> REPORT SCHEMA AT SCN 1000; -- Schema at specific SCN
3RMAN> REPORT SCHEMA AT SEQUENCE 100 THREAD 1; -- Schema at log sequence
Important Note: You must be connected to a recovery catalog when using the AT clause.
Output Structure
The command produces two main sections:
1. List of Permanent Datafiles
- File number
- Size in megabytes
- Tablespace name
- Rollback segments indicator (YES/NO)
- Complete datafile path
2. List of Temporary Files
- File number
- Size in megabytes
- Tablespace name
- Maximum size in megabytes
- Complete tempfile path
Key Points
- No Recovery Catalog Required: The basic
REPORT SCHEMAcommand works with just a target database connection and reads from the control file - Real-Time Information: The command shows the current state of database files, reflecting any recent changes to the database structure
- Quick Alternative to SQL: Instead of querying
dba_data_filesordba_temp_filesviews, you can get all file information in one command - Pre-Backup Verification: Database administrators commonly use this command to verify which files need backup before executing RMAN backup operations
- Works with Pluggable Databases: The command functions correctly with Oracle multitenant architecture and individual PDBs
Insights and Explanations
When to Use REPORT SCHEMA
The REPORT SCHEMA command is particularly useful in several scenarios:
- Before Backup Operations: Verify all datafiles that will be included in your backup strategy
- After Database Changes: Confirm that newly added datafiles or tablespaces are visible in the database structure
- Recovery Planning: Understand the database layout before performing restore and recovery operations
- Database Documentation: Generate a quick snapshot of your database file structure for documentation purposes
Understanding the Term "Schema"
When you see "REPORT SCHEMA" in RMAN context, do not confuse it with database schemas containing user objects and data. In RMAN terminology, "schema" refers to the physical structure of the database—the files and tablespaces that make up the database storage architecture.
Control File vs Recovery Catalog
By default, RMAN uses the target database control file to retrieve schema information. The control file contains current metadata about all database files. When you see the message "using target database control file instead of recovery catalog," this indicates normal operation without a catalog connection.
However, if you need historical information about your database schema from a previous point in time, you must connect to a recovery catalog. The recovery catalog stores extended metadata and allows you to query past database states using the AT clause.
Practical Example
Here's a real-world example showing how the command updates dynamically:
1RMAN> REPORT SCHEMA;
2
3Report of database schema for database with db_unique_name HAWK
4
5List of Permanent Datafiles
6===========================
7File Size(MB) Tablespace RB segs Datafile Name
8---- -------- -------------------- ------- ------------------------
91 1040 SYSTEM YES /u01/oradata/hawk/system01.dbf
102 890 SYSAUX NO /u01/oradata/hawk/sysaux01.dbf
113 1025 UNDOTBS1 YES /u01/oradata/hawk/undotbs01.dbf
124 10 USERS NO /u01/oradata/hawk/users01.dbf
13
14List of Temporary Files
15=======================
16File Size(MB) Tablespace Maxsize(MB) Tempfile Name
17---- -------- -------------------- ----------- --------------------
181 37 TEMP 32767 /u01/oradata/hawk/temp01.dbf
After adding a new datafile to the USERS tablespace, running REPORT SCHEMA again immediately shows the new file.
Integration with Other RMAN Commands
The REPORT SCHEMA command is part of RMAN's broader reporting capabilities. Other related commands include:
REPORT OBSOLETE- Shows backups no longer needed based on retention policyREPORT NEED BACKUP- Identifies files requiring backupLIST BACKUP- Displays available backup sets
Best Practices
- Run Before Major Operations: Always check your schema before starting complex backup or recovery procedures
- Verify After Changes: After adding or modifying datafiles, confirm the changes are reflected
- Document Regularly: Save output periodically for historical reference and capacity planning
- Combine with Other Reports: Use alongside other RMAN report commands for comprehensive database assessment
References
- Reporting on RMAN Operations - Oracle Help Center - Official Oracle documentation on RMAN reporting operations including REPORT SCHEMA syntax and usage
- REPORT - Oracle Database Backup and Recovery Reference - Complete REPORT command reference with detailed syntax for all clauses including AT clause requirements
- ORACLE:RMAN> REPORT SCHEMA - oracleEdge - Clarification on RMAN schema terminology versus database schema concepts
- Find Tablespace Info Using RMAN report schema - Thinking Out Loud - Practical examples showing real-time updates when datafiles are added
- Check all datafile details with RMAN in oracle - SmartTechWays - Quick reference guide for checking datafile details from control files
- rman report schema - Kundun Oracle - Comparison between SQL queries and RMAN commands for retrieving file information
- Basic RMAN Commands - Expert Oracle - Collection of essential RMAN commands including historical schema reports
- Reporting on Backups and Database Schema - Oracle Documentation - Detailed examples of REPORT SCHEMA with AT clause for historical queries