Home » RDBMS Server » Backup & Recovery » How to Backup and recover
How to Backup and recover [message #123748] Tue, 14 June 2005 12:46 Go to next message
sureddi
Messages: 10
Registered: June 2005
Location: Houston
Junior Member

Hello all!

I need to backup a large database that i can only access remotely (around 20G). The main purpose of this backup is to recreate the database structure (there are no information about that database model) at another location.

Iam not an oracle DBA.So Iam new to this I read that we can take use export import methods.I dont how to use it and where to use it.I like to copy the ddatabase structure,users same as it is in production server.Here in my Office DBA is not available so I Like to do this.Its an online database.Everyday it was taking Backup.

I have to take hot back and restore are i have to do export and import.If any of this methos how to do it.

I'm using oracle 8i in windows.

Thanks for the help!

Sri
Re: How to Backup and recover [message #123765 is a reply to message #123748] Tue, 14 June 2005 14:59 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Export / import should work easily if you want only the structure.
If you want the data also it may take a little longer.
Please read docs for export/import methods.
http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76955/toc.htm
Re: How to Backup and recover [message #124154 is a reply to message #123765] Thu, 16 June 2005 11:00 Go to previous messageGo to next message
sureddi
Messages: 10
Registered: June 2005
Location: Houston
Junior Member

Iam able to do export but the problem is it was to large so iam not able to do.Even I can take only structure but Iam trying to do export to take atleast 5 rows from each table is it possible .If yest can you tell me what parameter i have to add.

Bye
Sri
Re: How to Backup and recover [message #124173 is a reply to message #124154] Thu, 16 June 2005 12:34 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
No direct method for that.

In the source database create a new user (say NEWUSER)
in newuser schema create new tables from the original user with just 5 records.
now export this NEWUSER ( which has as the tables like the original user , but only 5 records~).
import NEWUSER to another database.
try something like this , spool the output and run (to create new temp tables).
Beware that, CTAS ( create table as select considers only the tables. Indexes/constraints are not considered).
After importing NEWUSER to new database,
you can recreate the indexes/constraint taken from originaluser.

scott@9i > select 'create table newuser.another_'||table_name|| ' as select * from '||table_name||' where rownum <6;' from user_tables;

'CREATETABLENEWUSER.ANOTHER_'||TABLE_NAME||'ASSELECT*FROM'||TABLE_NAME||'WHEREROWNUM<6;'
----------------------------------------------------------------------------------------------------
create table newuser.another_DEPT as select * from DEPT where rownum <6;
create table newuser.another_EMP as select * from EMP where rownum <6;

Previous Topic: time taken by import
Next Topic: It is very urgent help me
Goto Forum:
  


Current Time: Fri Mar 29 02:26:43 CDT 2024