This discussion is archived
2 Replies Latest reply: Nov 15, 2012 4:29 AM by Osama_Mustafa RSS

Need help regarding import !!

AnkitV Newbie
Currently Being Moderated
Hi

I am a sort of new to DBA activities. Have done one refresh till now for refreshing a schema in one DB to another DB.
I have a job to refresh a schema S in D1 with S in D2. But S doesn't exist in D2. I Need to import only 5 given tables.

1) I understand I first need to create user S in D2 using CREATE USER command as sys. Then I should import S from D1 to D2 using TABLES clause. Am I correct ?
2) I need to know what privileges do I need to give S in D2 for it to function well for basic DB operations. Like I know it will have privileges on 5 tables added, but is there anything else to be taken care of ?

Thanks.
  • 1. Re: Need help regarding import !!
    Niket Kumar Pro
    Currently Being Moderated
    1)correct

    2)Grant connect,resource to s; {in D2 after user creation}
  • 2. Re: Need help regarding import !!
    Osama_Mustafa Oracle ACE
    Currently Being Moderated
    1) I understand I first need to create user S in D2 using CREATE USER command as sys. Then I should import S from D1 to D2 using TABLES clause. Am I correct ?
    yes this true , and in import option you could use :
    -if you are using imp : fromuser = touser = option
    -if you are using impdp : you have to use remap_schema option
    2) I need to know what privileges do I need to give S in D2 for it to function well for basic DB operations. Like I know it will have privileges on 5 tables added, but is there anything else to be taken care of ?
    You can check D1 user privileges before start import to know what priv you should give it by using :
    set heading off
    set pages 0
    set long 9999999
    select dbms_metadata.get_granted_ddl('ROLE_GRANT', user)  
    from dual;
    select dbms_metadata.get_granted_ddl('SYSTEM_GRANT', user)  
    from dual;
    select dbms_metadata.get_granted_ddl('OBJECT_GRANT', user)  
    from dual;

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points