Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7177211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:39:54+00:00 2026-05-28T16:39:54+00:00

We have a shell script that perform a physical backup of our oracle database

  • 0

We have a shell script that perform a physical backup of our oracle database (tar + compress of all our database files). Recently, we created a tablespace containing tables that we dont need to backup its contents.

Is it possible to ignore data files relative to this tablespace and have a valid backup?

PS: we don’t want to use RMAN.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:39:55+00:00Added an answer on May 28, 2026 at 4:39 pm

    I preface my remarks here with a note: this is NOT the normative pattern. Normally, we use RMAN to backup ALL the datafiles in the database. With that said…


    Yes, it may be possible to restore and recover the database from a backup with a m ssing datafile. But the recovery will require that the tablespace be dropped when the database is restored.

    For the simple case of a dropping a tablespace that contains a single datafile: first restore the database files, then:


     STARTUP NOMOUNT;
    
     ALTER DATABASE MOUNT ;
    
     ALTER DATABASE DATAFILE '<complete_path_to_datafile>' OFFLINE DROP ;
    
     ALTER DATABASE OPEN ;
    
     DROP TABLESPACE <tablespace_name> INCLUDING CONTENTS ;
    

    Then, continue with database recovery ( RECOVER DATABASE ; )

    Obviously, the tablespace_name you provide in the DROP TABLESPACE command would be the one related to the datafile that is dropped.

    Obviously, this wouldn’t work for the SYSTEM tablespace. And I wouldn’t dare try this on other tablespaces like UNDO, SYSAUX, USERS. And there’s different syntax for dropping and adding TEMPORARY TABLESPACES.

    I don’t know of any “gotchas” with the ‘DROP TABLESPACE … INCLUDING CONTENTS’, but consider that objects in other tablespaces could be impacted. (Consider that the dropped tablespace might have indexes for tables in other tablespaces, impacts on foreign key constraints, impacts on stored procedures, and so on.)

    And it goes without saying, that you would need to test this type of restore procedure in a test environment before you rely on this technique in production.

    Without testing, you would be much better served by using RMAN to backup ALL of the datafiles.


    NOTE: I have not done anything like this since Oracle 8, possibly Oracle 7.3 (back when we had to roll our own hotbackup scripts). Since we’ve started using RMAN, I haven’t had a need to test anything like this.

    NOTE: The RECOVER DATABASE may need to be run before the ALTER DATABASE OPEN. I think you may get an exception warning about “datafile needing more recovery”, like you do when you start the database when a tablespace has been left in BEGIN BACKUP mode…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need to have a Shell script that will * Identify all the files [
Have a shell script that reads the files in a particular directory. #!/bin/bash for
I have a bash shell script that loops through all child directories (but not
I have a shell script that runs every night to backup my EC2 sites
I have a shell script that executes a number of commands. How do I
I have a Windows shell script that opens an application. I'd like to modify
I have a Bourne Shell script that has several functions in it, and allows
I have a PHP script that I'm invoking from another shell script that sends
I have a shell script file (run.sh) that contains the following: #!/bin/bash %JAVA_HOME%/bin/java -jar
Have people noticed that if you modify the source of a shell script, any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.