Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving a database to a new server

Status
Not open for further replies.

stebjo

Technical User
Apr 1, 2002
5
SE

If i wanna move an entire database in Oracle to a new server with all it's objects(rules, triggers, users, procedures, roles, tables , data... blabla) Can someone tell me the best way to do that. i know how i would do in sql-server, but i guess that it is more complex in oracle.

Please, give me some hints so i can study them.
Thank you all:))))
 
Easiest way to do this would be to create an EXPort of the database on the old machine, and then IMPort the data to the new machine. I know you will need to have the intial DB configured, and I think (not 100% sure) you need to create the schema that you are going to copy into. Take a look at the EXP and IMP functions in your documentation for all the settings. Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
The hint with the same versions is dangerous. Oracle changed some of the v$-Views and data-dictionary tables in 8.1.7. So exporting with exp Version 8.1.7 will need other Views in the data dictionary than exp Version 8.1.6 and will give you an error complaining about wrong Views.
 
If you just want to move the database to another server depending on the OS. If you are using NT you can just copies all of the file to the destnation directories and create a service for the instance then re-create the control by using a copy of the control from the previous server that you are moving from. syntax: "alter database backup controlfile to trace" this should create an text that
you can modify to fit you new directories structure.

If the OS is Unix it's even easier just tar or ftp the all of the database files to the destination filesystem. And also remember to recreate the trace file from the previous server. syntax: "alter database backup controlfile to trace"
this should create an text that you can modify to fit you filesystem. Make the necessary changes to re-create the controlfile and startup your instance.....
Good Luck..
 
"alter database backup controlfile to trace"

what does this do? Mike
______________________________________________________________________
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Hey Mike,

The control file is a binary file Oracle uses as a repository of the configuration. Without this file (or if the file is corrupted) Oracle cannot function properly.

Control file the following info: DBname and ID. Name and locations of Data files and redo logs. Names of tablespaces. Timestamp of DB creation. Current Log sequence number. CHeckpoint info. Log history. Backup info.

Since the file is a binary. You cannot read the file directly. "alter database backup controlfile to trace" will force Oracle to convert the control file to text. By keeping it in text you maintain a copy of it.
 
What can you do with the text version of the control file?

Is it just a reference?
Mike
______________________________________________________________________
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Hi all,

the reason of the first posts about using import/export is of course that this task is the easiest way to do it.

It is possible of course to use a file copy if a DBA is firm with the complete Oracle backup and recovery tasks. But the question in the beginning didn't sound so.

A small additional hint to backup of the database and transfer to another server:
a) has the new server the same name/IP-address/domain?
b) has the database on the new server the same name and domain like the original server?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top