To start with, I'll tell you about schema in Oracle.
A schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. Each user owns a single schema.
It looks like database in postgresql. You create database, when you need separate data storage for you application. And with Oracle DB you create schema, because Oracle is database instance itself. It's quite unusual, when you first time start working with Oracle, but it's safe and convinient on the other side.
You could use full import when you need exact copy of database. And it could be done if you've got connection info for both databases.
You need to use:
exp 'sys/password@SID1 as sysdba' FILE=path_to_dump.dmp FULL=y
It's not recommended to use
sys account, you should use system instead. But I have no right to risk, so I use account with maximum rights.
This command will collect every public info from your database. So you'll get exact copy of another database. Even users like
SYSTEM will be changes (password for example).
Command for full import isn't very different from previous one:
imp 'sys/password@SID2 as sysdba' FILE=path_to_dump.dmp FULL=y
Now you've got full copy of database. There are some restriction, but if you haven't got special settings for tables then I think all important data to run project will be imported.
This part assuming that you've created user with right permission. Or otherwise you'll get error that user does not exist.
There are a lot of information. If you need dump with everythinh into known file just type:
exp schema_name/schema_password@SID file=path_to_dmp_dir.dmp
Import is harder. Because first time you could do a mistake and there will be all tables into your
SYSTEM schema. Like it was in my first day with this DBMS.
Here is command for import:
imp schema_name/schema_password@SID_of_target_database file=C:\Users\user_name\Desktop\dump\schema_name.dmp fromuser=export_schema_name touser=import_schema_name
It's really important to log with schema credentials and add from and to users, because if you use
full=y it will only affect this user and if it's empty you could always delete schema using:
DROP USER schema_name CASCADE
SYSTEM you won't be able to do so, that's why you should always point schema name and use it's login. You could get Oracle: ORA-12899 error, here is troubleshooting advice.