Want to take "CREATE script" for all roles existing in DB.

Hi All,
I want to take "CREATE script" for all roles existing in DB.
Please provide me script to generate if you have or suggest any link or doc.
Oracle 10G

Use this-
select 'select dbms_metadata.get_ddl(''ROLE'','''||ROLE||''')||chr(10)||''/'' from dual;'
from dba_roles
Please be aware grants will not come in the definition
If you like the answer then don't forget to give points

Similar Messages

  • Creating sequences for all tables in the database at a time

    Hi ,
    I need to create sequences for all the tables in my database.
    i can create individually ,using toad and sqlplus.
    Can any one give me a code for creating the sequences dynamically at a time for all the tables.
    it is urgent ..
    Regards.

    I need to create sequences for majority of the tables that are having ID column
    which is sequences."The majority" is not the same as all. So you probably want to drive your generation script off the ALL_TAB_COLUMNS view...
    where column_name = 'ID'You need to think about this carefully. You might want different CACHE sizes or different INCREMENT BY clauses for certain tables. You might even (whisper it) want a sequence to be shared by more than one table.
    Code generation is a useful technique, but it is a rare application where one case fits all.
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

  • Creating synonys for all table

    i want to create synonyms for all atbles.the synonyn name and table name are same.instead creating one by one synonym i wnat to create all synonyms at a time.
    1)select 'CREATE PUBLIC SYNONYM'||' '||'test'||' '||'for' ||' '||'test' from dual
    2)select OBJECT_NAME from user_objects where OBJECT_TYPE ='TABLE'
    in the first query if we replace with test with 2nd query then we can get the script for that.
    i replaced that biut its not working how to do it

    Here is a generic grant script. If you review it, you will see how it works and can adapt it to your varying needs.
    BEGIN
        FOR x IN ( SELECT owner,
                          object_name,
                          DECODE(object_type, 'TABLE' ,   'select, insert, update, delete',
                                              'SEQUENCE', 'select',
                                              'VIEW',     'select',
                                                          'execute') AS privs,
                          DECODE (owner, 'SCHEMA_1', 'USER_1',
                                         'SCHEMA_2', 'ROLE_A'
                                          ) AS app_user
                     FROM dba_objects
                    WHERE object_type IN ('TABLE',    'PACKAGE', 'PROCEDURE',
                                          'FUNCTION', 'SEQUENCE', 'VIEW')
                      AND owner       IN ('SCHEMA_1', 'SCHEMA_2' ))
        LOOP
          BEGIN
            EXECUTE IMMEDIATE 'grant ' || x.privs       || ' on ' || x.owner ||
                              '.'      || x.object_name || ' to ' || x.app_user   ;
            EXECUTE IMMEDIATE 'create or replace synonym '|| x.app_user||'.'||x.object_name||
                               ' for ' ||x.owner||'.'||x.object_name ;
          EXCEPTION
            WHEN others THEN
              dbms_output.put_line('Bad owner = '||x.owner||';  Bad app_user='||x.app_user||
                                   ';  Bad object_name='||x.object_name);
          END;
        END LOOP;
    END;
    /

  • Create schedulers for all existing user jobs

    Hi Forum,
    In my database (Oracle Database 10g Enterprise Edition Release 10.2.0.4.0), I have 7 DB schemas.
    There are total existing 50 jobs (usaer_jobs).
    I want to shift them all to scheduler (user_scheduler_jobs).
    My plan is,
    1.     Create schedulers for all existing user jobs.
    2.     Enable all schedulers.
    3.     Disable all jobs.
    Is there any way / method for such shifting? I am ready to this exercise schema wise at a time.
    How to create scripts for creating schedulers from existing jobs?
    Thank you & regards..

    PROCEDURE CREATE_JOB
    Argument Name               Type               In/Out Default?
    JOB_NAME               VARCHAR2          IN
    SCHEDULE_NAME               VARCHAR2          IN
    JOB_TYPE               VARCHAR2          IN
    JOB_ACTION               VARCHAR2          IN
    NUMBER_OF_ARGUMENTS          BINARY_INTEGER          IN     DEFAULT
    JOB_CLASS               VARCHAR2          IN     DEFAULT
    ENABLED               BOOLEAN           IN     DEFAULT
    AUTO_DROP               BOOLEAN           IN     DEFAULT
    COMMENTS               VARCHAR2          IN     DEFAULT
    CREDENTIAL_NAME          VARCHAR2          IN     DEFAULT
    DESTINATION_NAME          VARCHAR2          IN     DEFAULTdoes not appear to be an available option.

  • Ran CATT Script for the role assignment to users

    Hi All,
    I have ran ECATT script for doing role assignment in QAS and completed successfully. I did this through CUA. What is the next step after running catt script? Do I need to doing anything with PFUD in each child system? Because I checked in the child systems many derived single roles are not generated in QAS.(RED). Is it because of running catt script or it might have came like that only from development? Please advise..
    Regards,
    Masood

    >
    Salman123 wrote:
    > Please let me know how should I proceed from here
    Hi,
    I have told you why the error message is there.  What do you not understand about the resolution? Your parent roles are out of sync with the child roles so you need to re-sync them.   An example of how do do this is to "adjust derived" from the master role.  Only when you have done this will your roles be in sync again.

  • How to create gpo for all users in all ou?????

    hello,plz help me.i want to create gpo for all users in all ou.but i dont want that gpo to do in domain????

    Can you elaborate what you mean by "but i dont want that gpo to do in domain"?
    In terms of applying it to all users, that's simple enough, you can simply leave the GPO's security filtering with its default setting as "Authenticated Users" which then apply to everyone.
    In terms of it applying to all OUs, you only have two options.
    1) Create the GPO and link it to the root of your domain, so it then applies to the entire domain and all the OUs within it.
    2) Create the GPO, but instead link it to each OU that you want it to apply to. You can apply one GPO to as many OUs as you want, simply right click on the OU and select "Link an Existing GPO...". It's then not applied to the root of the domain, only the
    OUs, but any changes you make to the GPO are applied to all the OUs that you've linked it to (rather than having a separate GPO for each of them).

  • Where can I find the status of the u0093User Compareu0094 for all roles?

    Hi Gurus,
    After we do a “User Compare” some of the roles are still in yellow .
    I would like to produce a complete list of all roles left “uncompared” so that I can work on them one by one. But I can’t find the relevant table.
    Where can I find the status of the “User Compare” for all roles?
    Thanks in advance.

    Igor,
    There are several reasons to have "yellow" ID's after running a comparison.  Often they  are caused by time stamp issues.  As far as I know there is no table that has a complete list of roles that has not been compared.
    I would analyze what roles/user combos are having the issue then look at the underlying tables surrounding them.
    If you want to see the tables PFCG_TIME_DEPENDENCY uses you can analyze the program or run an ST01 SQL trace and view the tables the program is using via SQL statements.
    Cheers,
    Ben

  • How can I resize and reposition the Date Created window for All windows?

    When setting view options for a finder window set to list view, I cannot get column resizing or positioning to hold. When making those changes, the option for "All Windows" automatically shifts to "This window only" and it then does not hold.
    How can I resize and reposition the Date Created column for All WIndows?

    Hi Harmz,
    Try dragging this file to the Îesktop & reboot...
    /Users/YourUserName/Library/Preferences/com.apple.finder.plist

  • SAP HR-- In form 16 , i am not able take print out for all pages..

    Hi,
           In SAP HR module , i have totally 5 pages, i need to take the printout for all pages.. but i am getting only 1 pages.pls could u solve this problem
    Regards
    senthil

    There is no relation with module to printer settings
    check the printer settings for declared printer in output devices
    otherwise contract basis guy
    regards
    sateesh

  • Need FM which create authorization for a Role

    Hi,
    i neeed to create authorization for the roles. can anybody tell me , is there any FM to create authorization for a Role.
    it is done through PFCG transaction.
    i need a FM which creates authorization for a Role.
    Thanks in advance

    Hi Sami
    Try this link.
    Re: Programatically create Security Profiles via BAPI/FM in R/3?
    Regards
    Neha

  • 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

  • Generating .sql script for all objects of a User/Schema

    Hi All,
    What are the ways in which I can generate scripts for a full USER (all objects) with dependencies. (by dependencies I mean for example that PK be created first before creating FK).
    We can export the full schema using (exp rows=n) but this will generate a .dmp file. I want a .sql file which can be run on any other machine (from SQL> prompt) so that user and all objects are created (without the need to use "imp").
    Thanks
    -AKJ

    But the easiest way to do this would be to do an export with rows=N and then an import.
    You coule do an export and then let run the import utility with indexfile=<you_name_it>.sql and this way you'll get a file with all statements included (but table definition commented out).
    Or you do it yourself (DIY-method), where you have to select all your relevant objects and their dependencies.

  • Create hyperlink for all images

    Hello everyone,
    I am new to scripting, but I am assuming my current task needs some scripting.
    I have a catalog laid out in InDesign.  It is about 250 pages and each page has about 10 image so there are about 2500 images.  The way I have them laid out is each image is placed inside a frame.  Now, I need to hyperlink each image to an external web site.  For example, for an image whose name is (12345.jpg), the hyperlink will be "https://www.testabc.com/productdetails.aspx?itemnum=12345".  Similarly if the next item is 67890, then the hyperlink would need to be "https://www.testabc.com/productdetails.aspx?itemnum=67890".  All images are linked to a folder on the computer.
    Can you please suggest how best to write and run this script.  Any and all help would be greatly appreciated.
    Thank you

    I can't test the script at the moment, but looking at it, I do notice that the entire for loop is within a try-catch. That means that if it encounters an error, it stops processing any more graphics. There may be a good reason for this, but I think you could just move the try-catch into the for loop, so it can catch any individual linking error without stopping completely. Something like this:
    var myDoc = app.activeDocument; 
    var  myGr = app.activeDocument.allGraphics; 
    alert(myGr.length) 
        for(i=0; i<myGr.length; i++) 
          try{
            var myGrName = String(myGr[i].itemLink.name); 
            var mySplitName = myGrName.split(".")[0]; 
            app.select(myGr[i].parent) 
            myHyperlinkPageItemSource =  app.activeDocument.hyperlinkPageItemSources.add(app.selection[0]) 
            var myHyperlinkURLDestination = app.activeDocument.hyperlinkURLDestinations.add("https://www.testabc.com/productdetails.aspx?itemnum=" + String(mySplitName)));
            var myHyperlink = app.activeDocument.hyperlinks.add(myHyperlinkPageItemSource, myHyperlinkURLDestination, {name: "https://www.testabc.com/productdetails.aspx?itemnum=" + String(mySplitName)})   
            } catch(e){} 
    alert("Process Completed")
    The forum's syntax highlighting is giving me a hard time, but I would probably throw an "alert(myGrName)" into those catch brackets so you can begin to try to figure out where it's erroring out (if that is indeed the problem).
    Another thought is that, if there's a chance of multiple images with the same number, you might want to have your hyperlinkURLDestination check for an already existing destination before adding a new one.

  • Want to run compensation process for all employee at once.

    Dear All,
    I have created Compensation Adjustment which use an user exit to read employee appraisal and create the compensation amount.
    its working fine by this transaction code HRCMP0001C - Change .
    but i want to run for all employees simultaneously, and here on this transaction, its only one employee can be select at a time for compensation adjustment.
    any body hv any idea how to run this compensation process for all employees at once?
    thanks in advance

    there is one option available in Edit >Spreadsheet. but it giving an error.
    Error while generating document
    Message no. SOFFICEINTEGRATION141
    Diagnosis
    An internal error occurred in the SAP Document Container Control.
    Procedure
    If the error recurs, enter an error message. There are notes related to how to create a log file using the report SAPROFFICEINTEGRATIONTRACE.
    any body hv idea how to solve it?...thanks

  • Trying to create script for EOP quarantine filter

    Hello,
    I would like to create a small Powershell script which should search sender domain whose email blocked in the office 365 EOP quarantine mailbox  and send email alert to Admin by checking after 3-4 hrs. with the details like received time sender email
    address and recipient email address
    Please help me with your valuable suggestion if it's possbile
    regards,
    Swapnil
    Regards, Swapnil Jain

    Hello Chen,
    This is very great script you suggested and which is helping me lot
    Really thanks for all the suggestion and here is the my script based on your script
    Get-QuarantineMessage -StartReceivedDate 09/25/2014 -EndReceivedDate 09/26/2014 | ? {$_.senderaddress -like '*mscsoftware.com'}| export-csv processes.csv -UseCulture
    Regards,
    Swapnil
    Regards, Swapnil Jain

Maybe you are looking for

  • Displaying 2 columns in a single column using HTML section of reports.

    Hi Team, I have a requirement in which we need to display 2 columns in the same column of OBIEE report. At present we have 2 columns as 2 different columns. For example if i have a column A which is used as @A in html section i need the new column to

  • ORacle error

    Hi, I have experienced oracle fallowing errors while making the BCV. Errors in file /cbsora/ora92/rdbms/log/udump/bobind_ora_29118.trc: ORA-27154: post/wait create failed ORA-27300: OS system dependent operation:semget failed with status: 28 ORA-2730

  • How to split rows based on two columns..

    Hi all... I have a requirement. I have product column, sell, purchace prices..(total of three columns) in a data set. my data set is such a way that..if sale price exists...there is no purchase price and vice versa.. I need too present in a report ,t

  • RESOURCE_NAME : cmtcallbk

    Hi all and happy new year! Could someone tell me that is the RESOURCE_NAME cmtcallbk in v$resource_limit. I have the following value: RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL LIMIT_VALU cmtcallbk 4294966174 4294967295 6600 UNLIMIT

  • Recommendations for a HP LJ 3015 Replacement...

    It would be a whole lot easier if I just tossed these two 3015's out and replaced them... Anyone have a suggestion on what I should purchase? Actually they are in perfect shape... Send me your address and I will give them to you. EDIT... I have been