0

I am new to oracle and I have abc.dmp file at c:\abc.dmp location. I want to import this abc.dmp file. I am using the following command.

c:\>imp system/mypassword file=c:\abc.dmp full=y

I am using Toad for Oracle 12.1 Version. Now after import has been done I don't know where this db has been restored.

I have also created a new user and used the following command.

c:\>imp system/mypassword file=c:\abc.dmp fromuser=system touser=testuser2014.

After this commend has been executed, I don't know where the db is restored.

Please help me.

Thanks in advance

migrated from stackoverflow.com Mar 17 '14 at 11:48

This question came from our site for professional and enthusiast programmers.

1

Thanks. I have imported dmp file by following steps..

Command to open SQLPLUS

In Command Prompt: C:> sqlplus / as sysdba


Clear Screen:

SQL> Clear Screen


1- First create a new user by

SQL> Create user TestUser1 identified by test; -- (test is password)

2- Grant Privilages to new created user TestUser

SQL> Grant dba, IMP_FULL_DATABASE, EXP_FULL_DATABASE to TestUser;

Optional:

You can check which users have the above three grants

SET lines 100 --May not work
COL privilege FOR a50 -- May not work
SELECT grantee, granted_role, default_role 
FROM dba_role_privs 
WHERE granted_role IN ('DBA', 'EXP_FULL_DATABASE', 'IMP_FULL_DATABASE') 
ORDER BY 1,2; -- May not work

3- Check TableSpace for this newly created user

SQL> select * from dba_users

Note: here you will see that the default DEFAULT_TABLESPACE for TESTUSER is USERS

4- Create a new TableSpace for this newly created user "TestUser"

SQL> CREATE TABLESPACE tbs_testuser1
    DATAFILE 'tbs_testuser1.dat' 
        SIZE 256M REUSE
        AUTOEXTEND ON NEXT 256M MAXSIZE 2048M

    ONLINE;

5- Now Connect this newly created tablespace 'tbs_testuser1' to 'testuser1'.

SQL>  ALTER USER TESTUSER1 default tablespace tbs_testuser1 quota unlimited on tbs_testuser1;

6- Check whether your 'tbs_testuser1' tablespace is connected to user or not.

SQL> select * from dba_users

7- In command prompt:

c:\>imp system/password file=File Path.dmp log=LOGFileName.log fromuser = <UserName of User from which file is imported> touser=testuser1
0

The data will be restated under the user/schema you have just created ! I mean all the objects that reside in the abc.dmp.
And the datafiles are located under the user tablespace.

Follow this article for more details on import/export in Oracle.

  • You're missing the obvious thing that an Oracle user is a schema, which (until 12c) equates to a MySQL "database". That is almost certainly why the OP is confused. – Philᵀᴹ Mar 17 '14 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.