Results 1 to 13 of 13

Thread: Oracle restore

  1. #1
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322

    Unanswered: Oracle restore

    anyone got any restore scripts for a 10g database?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    ORACLE - DBA Tips Corner

    Oracle Recovery Procedure

    http://www.oracle.com/technology/dep...R_Overview.htm

    In SQL Server, all I would have to do is:

    Code:
    RESTORE DATABASE <db_name>
       FROM DISK = '\\<file path>\<file name>'
       WITH   MOVE '<logical data file name>_data' TO '\\<file path>\<file name>.MDF'
            , MOVE '<logical log file name>_log'  TO '\\<file path>\<file name>.LDF'
    	, REPLACE
    GO
    nothing as simple as this?
    Last edited by Brett Kaiser; 10-15-09 at 12:49.
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,296
    you don't give any information on if the target is ASM, whether the source was cooked or ASM, whether the destination filesystems match the source, etc.

    If you don't give us full info how are we supposed to help you?
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Nope. Oracle restores are very different from SQL Server restores. What are you trying to do? Clone a database (restore to a different server), or restore over an existing database?

  5. #5
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Quote Originally Posted by MCrowley
    Nope. Oracle restores are very different from SQL Server restores. What are you trying to do? Clone a database (restore to a different server), or restore over an existing database?

    Dude, what does REPLACE do?

    I have a dump/backup or so I'm told

    I just want to restore that "good" back up to a winserver

    Never had to do this before....played with 8i 10 years ago...writing packages and sprocs using SQL+

    Made me long for working on DB2 OS/390...so painful

    In any case, Acronyms with a noob makes a lot of sense...dontcha think

    I displayed what a restore is to me....that's what I know

    Is there No simple restore in Oracle from a goos backup on a Win Box?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  6. #6
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    If the database is not that large (say under 10 GB), you can use exp/imp to move the data over. Larger than that, you may run into problems with the data being inconsistent when you import it. For a test database, I might not be that concerned, though. Just keep in mind that exp/imp is not really a backup and restore method. It can hurt you, if you depend on it.

    For larger databases, the folks here take a cold backup, and restore the filesystem files to the new box, then generate a new set of control files. There are a number of other steps I can not think of at the moment, but that is the gist of what they do. But then, they do that for a 1TB database.

  7. #7
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    ah...so this crap the 3rd party vendor built I'm looking at is really smoke and mirrors and not really best practices....

    go figure
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  8. #8
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    If they have counseled you to use export for backups, then yes, it is not a best practice. You will have no point in time recovery.

  9. #9
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    OK, Onions have layers, Ogre's have ayers...does Oracles "concept" of a restore so voluminous that question I post here is nebulous?

    Can your "restore" indexes alone, or Tables, or entire schemas?

    Anyone know what this does?

    @echo off
    set usr=%1
    set pwd=%2
    set sid=%3
    set o8i=%4
    set dir=%5
    set fnm=%6
    set fnm=%dir%\%fnm%
    if %o8i% == 1 goto Oracle8i
    plus80 %usr%/%pwd%@%sid% < .\trunc.mdu > %fnm%i1.log
    plus80 %usr%/%pwd%@%sid% < .\alt01.mdu >> %fnm%i1.log
    imp80 %usr%/%pwd%@%sid% FILE=%fnm% BUFFER=30720 SHOW=NO IGNORE=YES GRANTS=YES INDEXES=YES ROWS=YES FULL=YES LOG=%fnm%i2.LOG
    @echo on
    echo off
    goto end
    :Oracle8i
    sqlplus -s %usr%/%pwd%@%sid% < .\trunc.mdu > %fnm%i1.log
    sqlplus -s %usr%/%pwd%@%sid% < .\alt01.mdu >> %fnm%i1.log
    imp %usr%/%pwd%@%sid% FILE=%fnm% BUFFER=30720 SHOW=NO IGNORE=YES GRANTS=YES INDEXES=YES ROWS=YES FULL=YES LOG=%fnm%i2.LOG
    @echo on
    echo off
    :end
    cls

    And does anyone have experience with a product called equity edge?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  10. #10
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >Can your "restore" indexes alone,
    Never tried to do so & am not sure it makes any sense
    If ROWS=NONE, then there is nothing to index.
    imp can generate just INDEX DDL.

    >Can your "restore" Tables
    Yes

    >Can your "restore" entire schemas?
    YES

    imp help=yes
    above will display all command line options
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  11. #11
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    At a guess, it appears to be a windows batch file that takes in a few inputs, then wipes out a database, and then imports a set of data to replace that data. This will require a database be sitting there, waiting for the data to be imported into, of course.

    It seems to branch between 8.0 and 8i versions of the script, as well.

  12. #12
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    ahhh so the db must exist for it to be "restored"

    If I get a file from a vendor that I want to restore over the original one they gave us, then that should restore everything? Assuming it has everything?

    How would a Backup an entire database just to be on the safe side, so I can restore back to that point in case everything blows up?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  13. #13
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >ahhh so the db must exist for it to be "restored"

    The imp (import) utility must connect to a functioning, up & online instance/DB.

    >If I get a file from a vendor that I want to restore over the original one they gave us, then that should restore everything?
    >Assuming it has everything?
    Correct

    >How would a Backup an entire database just to be on the safe side, so I can restore back to that point in case everything blows up?
    exp username/password file=full.dmp FULL=YES

    export/import can operate at three different "levels";
    FULL=YES
    which includes "everything"; (SYS objects are not included)

    OWNER=<schema_name>
    which does one schema

    TABLES=(TABLE1,TABLE2)
    which does 1 or more tables
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •