Missing Role Grants after datapump

Hello OTN-Community,
I have a problem with datapump. I am using some include filters to get the relevant data exported. One of these filters inlcudes the ROLES of my database which starts with a certain expression.
After the export into another database these roles exists but all of the role grants and the grants to other users misses. The object grants are exported correctly.
What am I doing wrong?
The export script:
declare
/*some declare specification are not copyed*/
cursor curSchema is
select
distinct
t.Mdbn_Name Name
from
ProphetMaster.Dat_MdBn t
where
Upper(t.MDBN_Name) not in ('****', '***');
begin
-- Schemas festlegen
SchemaList := '''****'',''***''';
if ExportAllProphetUsers then
for recSchema in  curSchema loop
      SchemaList := SchemaList||','''||recSchema.Name||''''; 
end loop;
end if;
-- Dateigröße
FileSizeStr := to_char(MaxFileSize)||'M';
-- Verzeichnis
DirectoryName := 'PHT_PUMP_DIR';
execute immediate  'create or replace directory "'||DirectoryName||'" as '''|| PumpDir||''''; 
-- JobName
JobName := 'PHT_EXPORT'||DateStr;
-- Filename
if not FilenameWithDateTime then
DateStr :='';
end if;
Filename := 'PHTDB'||DateStr||'_%U.DMP';
Logfilename := JobName||'.LOG';
-- Job festlegen und Ausführen
h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'FULL', job_name => JobName, version => 'COMPATIBLE');
dbms_datapump.set_parallel(handle => h1, degree => ParallelExecutions);
dbms_datapump.add_file(handle => h1, filename =>  Logfilename, directory => DirectoryName, filetype => 3);
dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0);
--10g
--dbms_datapump.add_file(handle => h1, filename => Filename, directory => DirectoryName, filesize => FileSizeStr, filetype => 1);
--11g
dbms_datapump.add_file(handle => h1, filename => Filename, directory => DirectoryName, filesize => FileSizeStr, filetype => 1, reusefile =>OverwriteFiles);
dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1);
dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
-- Include Schemas
--dbms_datapump.metadata_filter(handle => h1, name => 'NAME_EXPR', value => 'IN('||SchemaList||')', object_type => 'DATABASE_EXPORT/SCHEMA');
dbms_datapump.metadata_filter(handle => h1, name => 'NAME_EXPR', value => 'IN('||SchemaList||')', object_type => 'DATABASE_EXPORT/SCHEMA');
dbms_datapump.metadata_filter(handle => h1, name => 'INCLUDE_PATH_EXPR', value => 'IN(''DATABASE_EXPORT/SCHEMA'')');
--Include Profiles
dbms_datapump.metadata_filter(handle => h1, name => 'NAME_EXPR', value => 'like ''PROFILE_%''', object_type => 'PROFILE');
dbms_datapump.metadata_filter(handle => h1, name => 'INCLUDE_PATH_EXPR', value => 'IN(''PROFILE'')');
--Include Roles  
dbms_datapump.metadata_filter(handle => h1, name => 'NAME_EXPR', value => 'like ''***%''', object_type => 'ROLE');
dbms_datapump.metadata_filter(handle => h1, name => 'INCLUDE_PATH_EXPR', value => 'IN(''ROLE'')');
-- Größenabschätzung
dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS');
--Start Job
dbms_output.put_line('Import Job started; Logfile: '|| LogFileName);
dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
-- Wait for ending and finishing job
dbms_datapump.wait_for_job(handle=>h1,job_state =>job_state);
dbms_output.put_line('Job has completed');
dbms_output.put_line('Final job state = ' || job_state);
dbms_datapump.detach(handle => h1);
The Import Script:
begin
dbms_output.Enable(buffer_size => null);
-- Verzeichnis
DirectoryName := 'PHT_PUMP_DIR';
execute immediate  'create or replace directory "'||DirectoryName||'" as '''|| PumpDir||''''; 
-- JobName
JobName := 'PHT_IMPORT'|| to_char(sysdate,'_yyyy-MM-DD-HH24-MI');
--FileNames
Filename    := 'PHTDB'||FileNameDateStr||'_%U.DMP';
LogFilename := JobName||'.LOG';
h1 := dbms_datapump.open (operation => 'IMPORT', job_mode => 'FULL', job_name => JobName, version => 'COMPATIBLE');
--Wenn der Datapumpimport auf einer Standardversion ausgeführt wird, muss diese Aufrufzeizeile genutzt werden   
  --h1 := dbms_datapump.open (operation => 'IMPORT', job_mode => 'FULL', job_name => JobName, version => '10.2');
dbms_datapump.set_parallel(handle => h1, degree => ParallelExecutions);
dbms_datapump.add_file(handle => h1, filename =>  Logfilename, directory => DirectoryName, filetype => 3);
dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0);
dbms_datapump.add_file(handle => h1, filename =>  Filename, directory => DirectoryName,  filetype => 1);
dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1);
dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
dbms_datapump.set_parameter(handle => h1, name => 'REUSE_DATAFILES', value => 0);
dbms_datapump.set_parameter(handle => h1, name => 'TABLE_EXISTS_ACTION', value => 'REPLACE');
dbms_datapump.set_parameter(handle => h1, name => 'SKIP_UNUSABLE_INDEXES', value => 0);
--Start Job
dbms_output.put_line('Import Job started; Logfile: '|| LogFileName);
dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
-- Wait for ending and finishing job
dbms_datapump.wait_for_job(handle=>h1,job_state =>job_state);
dbms_output.put_line('Job has completed');
dbms_output.put_line('Final job state = ' || job_state);
dbms_datapump.detach(handle => h1);

Has no one any idea?

Similar Messages

  • Find the roles granted on tables in oracle 10g

    Hi,
    I need to find what roles granted to what tables in a schema. I try to query dba_tab_privs but this will give what roles granted to tables, but i want to find what tables are missing these roles in a schema?
    any help is appreciated.
    Thanks...

    789287 wrote:
    i have another scenario where i have 2 different schemas such as TEST_A ans TEST_B. here TEST_B. at TEST_B user have 2 roles B_query and b_update and granted these roles to TEST_B user.
    TEST_A need to access the TEST_B objects, when i grant the A_QUERY, A_UPDATE to TEST_A user. then i login as TEST_A user to access the TEST_B objects gets an eror object doesn't exist.
    i dont want to grant privileges directly on to the TEST_B objects to TEST_A user. is there anyway i can accomplish this through the role?
    i thought it would appropriate to ask the question here rather opening a thread.
    Thanks...consider to actually post the actual SQL & complete error response from Oracle.
    How do I ask a question on the forums?
    SQL and PL/SQL FAQ

  • Script for Users, Roles,Grant,Tablespace

    Hi,
    Please guide me on the following .
    I am moving database to new Unix server .
    so can I create the script which will check the existing Users, Roles, Grants, Tablespaces from current database and store that data.
    And using same soared data I want to create the same " Users, Roles, Grants, Tablespaces" using the script.
    Can i do this. Please guide me how to do this so I will help me to move database
    Thanks,
    Amol

    You should run ?\rdbms\admin\utlrp (note the ?, which is shorthand for ORACLE_HOME) from the database server. to make sure you have the correct script. You can call sqlplus from Toad easily.
    The script affects PL/SQL only. PL/SQL resides in the SYSTEM tablespace in the SYS schema. You don't have 400G of PL/SQL. It should take a few minutes only.
    The SYSTEM schema WILL be imported. SYS will not be imported, but automagically recreated. The only thing you will miss is Grants which have been made by SYS directly to end-users or roles, outside those defined in catalog.sql
    Sybrand Bakker
    Senior Oracle DBA

  • Expdp users, roles, grants (privs)

    (sorry for the cross-posting - I'm not sure how to delete or move threads and I posted this in the general questions forum thinking I was in this forum)
    So, I think this works - still in the process of testing - but what I want to do is the following:
    1) Export ONLY users, passwords, and privs from TEST
    2) Clone PROD --> TEST
    3) Drop all users in TEST excluding system users.
    4) Import original users file from Step 1.
    I think I've got it with the following. Am I missing anything? I'm testing, but if someone else has done this, I would be happy to hear from something I may be missing.
    JOB_NAME=EXPDP_USERS
    DIRECTORY=DTPUMP
    REUSE_DUMPFILES=Y
    FULL=Y
    DUMPFILE=users_test.dmp
    LOGFILE=users_test_expdp.log
    INCLUDE=SCHEMA:"IN (SELECT USERNAME FROM dba_users where default_tablespace NOT in('SYSAUX','SYSTEM'))",ROLE,USER,SYSTEM_GRANT,ROLE_GRANT,DEFAULT_ROLE,TABLESPACE_QUOTA

    Pl do not post duplicates - expdp users, roles, grants (privs)

  • IPad running iOS 5 has on the menu bar only have 4 icons, being: back, forward, bookmarks, and the "add to bookmarks", but is missing an icon after the "add to bookmarks" arrow, that is a "show all open browser windows" icon. How do I get it in my safari?

    iPad running iOS 5 has on the menu bar only have 4 icons, being: back, forward, bookmarks, and the "add to bookmarks", but is missing an icon after the "add to bookmarks" arrow, that is a "show all open browser windows" icon. How do I get it in my safari?

    What you are seeing is how Safari works now in iOS 5. There is no way to get that icon in Safari now. There other much better browsers available in the App Store. Look at iCab Mobile, Mercury, Atomic, ....
    I have been running iOS 5x for so long now, that I don't even remember if that icon did appear in earlier iOS versions

  • Mail Missing Plug-in after sending; quit and restart Mail fixes it

    mail > Missing Plug-in after sending; quit and restart Mail fixes it.
    Its very obnoxious after all these years to have Apple Mail continue to complain about Missing Plug-in
    This happens for PDFs, .zips, .jpgs and other types.
    Any ideas why Apple cannot seem to fix this?

    Back up all data.
    Boot into Recovery mode. When the OS X Utilities screen appears, follow the prompts to reinstall the OS. You don't need to erase the boot volume, and you won't need your backup unless something goes wrong. If your Mac was upgraded from an older version of OS X, you’ll need the Apple ID and password you used to upgrade, so make a note of those before you begin.

  • RoboHelp 7 - Intermittently missing the space after bolded text in

    We've converted a project of 800+ topics to RoboHelp 7 and
    updated our software with the new latest patch 7.01.001. The funky
    character issues have gone away but now, we noticed that we're
    intermittently missing the space after bolded words. I've check the
    HTML code and it is the coding is the same for all of the bolded
    words within a topic, yet one word will be missing space and all of
    the other bolded words won't.
    This applies to topics that were created in RH7 before the
    patch as well topics that were coverted from RH5 to RH6 and then to
    RH7. Also, applies to topics to were originally imported into RH5
    or RH6 from Word.
    The formatting looks like this: "It does <span
    style="font-weight: bold;">not</span> post in PARA or DBS.
    Sometimes, I see the end code is
    </span><span></span> --or -- </span>
    <spaces>
    I've also seen <b> word </b>
    Problem is that it is inconsistent and we have over 800
    topics within our project. To check each topic in the generated
    version and then go back to Edit will take forever.

    This is a duplicate post due to a forum blip! Click
    here
    for the other post.

  • Missing file system after installing in SSD

    Missing file system after installing in SSD MacBook
    Hi All
    I recently installed a SSD drive in my Macbook, I used the Disk Utility to clone the old HDD.
    When i reboot the machine with the new disk I get the image of a folder with question mark.
    If i reboot the machine again and hold the alt key at the chime I can see two disks.
    One called SSD and another called Recovery.
    if i choose the SSD the OS starts as normal and if i choose the recovery option and check the disk with disk utility
    it tells me that everything is fine.
    Any ideas how i can make the machine boot as it should without having to hold down the alt key a start up??

    Hi i tried this and just got the big symbol of doom at start up.
    However, a little terminal witchcraft did the trick!
    sudo bless -mount /Volumes/"Macintosh HD" -setBoot

  • Missing application icons after upgrade to 2.0

    Missing application icons after upgrading to 2.0. Tetris, Clock and Voice recording icons are missing. Looks like the applications are still installed but they are not showing up with all the other icons.
    There is absolutely nothing in the help about restoring icons.
    Any ideas as to how I can get these missing icons to display again?
    Thanks.

    Great! Where was it?
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • I need help w/ This: missing gina dll after installation...

    I need help w/ This: missing gina dll after installation of linksys adaptor on Win XP.
    Thank you

    I assume you are facing this error on wireless USB adapter ... WUSB54GC .... uninstall the adapter from all programs >> unplug & replug the adapter >> Install the drivers using found new hardware >>
    Once installed use windows wireless configuration to connect to the wireless network .....
    See if it works .....

  • InfoObject is missing in report after upgrade

    Hi,
    My InfoObject Statistical ID is missing in Report after Upgrading from 3.5 to 7.0.
    I did comparison of report before and after upgrade and found this issue.
    the data content is the same but only this infoObject cannot be seen in the report
    how do I correct this issue.
    thanks
    Edited by: Bhat Vaidya on Aug 6, 2008 12:24 PM

    This not fixed. SAP couldn't explain why

  • HT1926 My installation of Itunes to syne my iphone with PC was missing AppleApplicationSupport.msi  after 2 installs how can I install such a file do you have a path for this

    My installation of Itunes to syne my iphone with PC was missing AppleApplicationSupport.msi  after 2 installs how can I install such a file do you have a path for this

    Hi kensb!
    I would recommend that you attempt to reinstall all of the programs and components of iTunes on your machine and reinstall everything again. It can be tricky to get everything uninstalled, so we have an article that can help you make sure you uninstall everything:
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    http://support.apple.com/kb/ht1925
    or
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    http://support.apple.com/kb/ht1923
    Specifically, when it comes to uninstalling, you will want to uninstall applications in this order:
    Use the Control Panel to uninstall iTunes and related software components in the following order. Then, restart your computer.
    iTunes
    QuickTime
    Apple Software Update
    Apple Mobile Device Support
    Bonjour
    Apple Application Support (iTunes 9 or later)
    Important: Uninstalling these components in a different order, or only uninstalling some of these components may have unintended effects.
    You will then want to follow the links in those articles to download the latest package of iTunes software for your computer and install again from there. Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

  • When we run depreciation we miss one asset, after that how we can run depre

    hi gurus
    when we run depreciation we miss one asset, after that how we can run depreciation for that asset

    hi
    In "AFAB"yes we can do it by selecting the  option List Assets and repeat then run the programme you should get the result.
    rajan.

  • HT203167 I am missing my audiobooks after upgrading ipod to new os

    I am missing my audiobooks after upgrading ipod to new os.

    Even though Apple iTunes has reached agreements with the Music and Film industries, they cannot offer Audiobooks over the Cloud.
    So, when you buy an Audiobook, you must download it to your main machine and hold it there. If you upgrade your hardware (iPod, iPhone, or iPad) or IOS software, the audiobook on that device disappears and you will have to download it again from your main machine. This means wiring it up "old school" and not wifi.
    As a consequence, it is advisable never to buy an audiobook from a portable device as it will not sync and will not be available for download elsewhere. I did this and I had to ask Apple to "push" a new file so that I could download it on my main machine.
    Hope this helps.

  • Has anybody experienced missing sent emails after updating their iPhone to IOS 5.0?  Mail composed on phone appears to send but is never delivered nor does it show in sent items. Using Exchange 2010. Any thoughts??

    Has anybody experienced missing sent emails after updating their iPhone to IOS 5.0?  Mail composed on phone appears to send but is never delivered nor does it show in sent items. Using Exchange 2010. Any thoughts??

    @Satterp
    Not sure if you were responding to me or OP - my iPhone is on 5.1.  The OP at the time of writing was on 5.0.1.
    Also, the OP and I had setup our Hotmail as an Exchange server (similar to IMAP), not POP3.

Maybe you are looking for

  • Unable to capture SQLException

    Hi Experts, I am using Oracle JDBC 9.2. The following is my code structure. For each table { For each table data set{ Create insert statement Try{ Execute insert statement } catch (SQLException sqlExc){ Write sqlExc to a file. I have couple tables re

  • FM : BAPI_OUTB_DELIVERY_CREATENOREF

    I used this Function Module to create Outbound Delivery . System gave me sucessfull mesaage that OutboundDelivery 80001122 has been created. External reference: But when I got to VL03N , No Outbound delivery Exisits with this number . Can any body he

  • Where can I find my add ons

    In the past, when I opened the Add Ons area, it showed me the ones I've already got. I can't find that at all. I've tried to load one a couple of times, but I can't tell if it's installed or not. I'm looking for an auto fill add on. I'm using Firefox

  • Is my IP address visible if using another wireless network connection?

    i've got a few questions concerning surfing anonymously on the web... first off, are there any MAC apps that would allow me to surf, proxy surf, anonymously? i know there are many available for the PC. second, is my IP address visible to others on th

  • Append hint generating huge redo

    Hi all, Sorry if this question was already asked here. We have few [partitioned] tables created with no logging option. Java code [which inserts data in these tables] has /*+ Append */ hint. DB is 10.2.0.5 version, DB is in archive. When we query "sy