Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: database backup
dagnu <dagnu_at_ifrance.com> schreef in berichtnieuws
50de3b68.0307180619.5b43ff03_at_posting.google.com...
| Hi everybody,
|
| I'm not DBA, so i've got problem:
| I'd like to move my database to an other server (Oracle 8.1.7, Solaris
| 8); my database had dbf files on 2 partitions ...
|
| I've used this command: exp system/manager file=export.dmp full=y
| log=/log.txt
| But when i do the import, i retrieve dbf files only from the first
| partition :( (where there are the log, control files, etc ...)
|
| So, what is the best way to migrate a database !! export, import or
| copy files ?!
|
| Thanks to all (my question is not easy to answer !!)
Oracle database files, controlfiles and redolog files are not binary
compatible between different platforms
When the new server is running the same OS (so Solaris 8) and has exactly
the same Oracle version installed (inclusive patches and bugfixes, so
8.1.7.x.y) you can copy the files. Shutdown the database before. When using
ftp, make sure you do a binary (not ascii) ftp.
To find a list of these files:
sqlplus internal
select file#, name from v$datafile;
select member from v$logfile;
select name from v$controlfile;
When the filenames (included the full path) on the new server are not exactly the same you must use rename commands on a mounted database for all database files and redolog files.(let's help here, you are not a dba). The database stores the filenames that makes the database in the controlfile. This is a binary, not a text file. You must use rename commands to change it there:
sqlplus internal
startup mount
alter database rename file 'old name' to 'new name';
..... repeat for each file .....
select file#, name from v$datafile; (optional, to check the names)
select * from v$logfile; (optional, to check names)
alter database open;
When the open fails you have made a mistake. Fix it with the proper rename
commands and try to open the db again.
Names of controlfiles are specified in the init.ora file.
The other solution is full export, full import. It's the only one when OS and Oracle version are not the same. You must create the database first on the new server. Include the tablespaces when the file names of the datafiles are not exactly the same, imp can't create them then. The export dump file is binary compatible across platforms. Again: do binary ftp. You can also make an export from the new server, connecting to the remote database on the current server. Received on Fri Jul 18 2003 - 12:30:45 CDT