Re: 8.1.7 Backup and Restore

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sat, 10 Aug 2002 17:53:44 +0200
Message-ID: <ulae9t57d7ivbf_at_corp.supernews.com>


"Chuck" <chuck6723_at_yahoo.com> wrote in message news:ulabbnk9iq9c7d_at_corp.supernews.com...
> Prior to moving to a new server, we did an export of all of the databases.
> This worked fine. When importing on the new server, we lost all the user
> defined schemas that were created for our application as well as schemas
for
> each user that had an ID on the system. I also lost one tablespace that
all
> user's were associated to as their default. I ended up re-creating the
> databases and then creating all of the database tables, views, etc. from
> ERWIN. Then we ran some load scripts to load up the initial data.
Lucklily
> we just went to a production application so we didn't lose much.
>
> What did we do wrong? I thought if you do an export then the tablespaces,
> schemas, etc. should be importing just as they were exported.
>
> Can anyone give advice on fixing this problem so if I ever have to import
> from an export again, eveything will be restored just as it was backed up.
>
> Thank you.
>
> Chuck
>
>

1 This first this that happens is the series of Create tablespaces commands If the directories used in the datafile clause don't exist, the create tablespace command will fail.
2 Consequently, the create user commands which are run after the create tablespace commands will also fail
3 Consequently you will loose the schema

Your error was not checking the presence of the correct directories and/or precreating the tablespaces prior to the import. You can easily do that from the export by imp show=y log=<any filename> edit <any filename> and isolate the create tablespace commands

If there was no need to physically reorganising all tables, you would have been better of with cloning the database

- dump the controlfile
- copy all datafiles to the new server
- copy the script generated by the alter database backup controlfile to
trace in the first step
- when necessary edit it
- run it, and presto

Please note: an export does NOT constitute a backup

Hth

--
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address
Received on Sat Aug 10 2002 - 17:53:44 CEST

Original text of this message