This content has been marked as final. Show 6 replies
tanvir ahmed wrote:I don't use XE but I think it should be supporting export and import binaries which should be able to do what you are looking for.
I am newbie in oracle database pls explain in some more detail.
I have same database 11g express edition on two computers at two different locations and want to run same database by taking backup from one compuer and restoring on other computer.
That sounds to me to be the closest answer to the question posted. And perhaps the easiest solution.
Stop database, and copy all files to another machine.
Install XE on the "another machine", shut it down. Shutdown the source database. Copy the datafiles to the new host. Startup your "new" database, it will be an exact clone of the original.
To find out what files need to be copied, as system (or sysdba) run:
To do a proper database clone its better to recreate the controlfile and reset the archive sequence number- leave out the controlfile copy part. In the diag_path location find the trace file under diag/rdbms/$ORACLE_SID/<db_name>/trace it should be the latest ora*.trc file.
select name from v$datafile; ... file1, file2 ... show parameter control ... control_files ... file1 ... alter database backup controlfile to trace [reset logs]; ... show parameter diag; ... diagnostic_dest ... <drive:>|/diag_path
The trace file has the commands to recreate the controlfile, which includes the datafiles and putting the tempfile back in place. If the datafiles are in a different location, i.e. in Windows going to a different drive, or you want do put datafiles in a different folder location, the create controlfile statement is the easiest time to get the file directories right.
If you add the "reset logs" qualifier (don't use the brackets!) you'll get just the reset logs version of the create controlfile statement, otherwise you'll get both NORESETLOGS and RESETLOGS versions of a create controlfile statement, run one or the other. Not both. Not the entire trace file, just the create controlfile, alter database open [reset logs], alter tablespace temp add tempfile ... bits. No recovery is needed for a database that is shutdown when datafiles get copied to a new location/host.