How to create a schema and assign roles with store procedure or function?

Hi All,
I am creating a webpage that will call oracle store procedure or function to create a schema and add roles. Please let me know if there a method to do that.
Thank you

Hi CristiBoboc,
Thank you very much for your help. Here is my code to create a user:
create or replace
FUNCTION user_create (user_name IN nvarchar2, user_pw IN nvarchar2)
RETURN number
IS
sql_stmt varchar2(200);
sql_stmt2 varchar2(200);
var_temp_count NUMBER(2);
un varchar2(30) := user_name;
up varchar2(30) := user_pw;
BEGIN
sql_stmt := 'create user :1 identified by :2
default tablespace users
temporary tablespace temp
quota 5m on users';
sql_stmt2 := 'grant developers to :1';
EXECUTE IMMEDIATE sql_stmt USING un,up;
EXECUTE IMMEDIATE sql_stmt2 USING un;
select count(*) into var_temp_count from dba_users where username = UPPER(user_name);
return var_temp_count;
END;
When I run, I get following error:
exec :myvar :=user_create('aaa','12345');
BEGIN :myvar :=user_create('aaa','12345'); END;
ERROR at line 1:
ORA-01935: missing user or role name
ORA-06512: at "CSDBA.USER_CREATE", line 15
ORA-06512: at line 1

Similar Messages

  • How to create a event and assign to task

    Hi
    How to create events in BW and assign to any process..
    Like i want to complete a delta load and do the full load.
    After finishing the delta load, full load has to be triggered.
    So can anyone help to creating the events in bw and assigning it to the prcess.
    Regards
    Rak

    Hi AHP
    Thanks for the reply.. we are not using the process chains instead we are using the infopackage groups. I created the event in SM62, But how should i assign this new event to my delta load.
    In full upload infopackage, in selection option i can give the event there in "after event"
    But my doubt is how to assign my event to the delta infopack
    "<i>you can just put the full load process type variant after the delta load, any consideration ?"</i>. Can you be more specific.
    Regards
    Rak

  • How to create screen sequence and assign to material type

    Hi,
    How to create new screen sequecnce and how to assign it to material type, is there any link of Industry sector with this.
    regards,
      zafar

    how to assign it to material type and also what is use of industry sector
    Industry sector - it simply mean The industry sector groups companies according to activity, for example, plant engineering and construction, mechanical engineering, the chemical industry, and the pharmaceutical industry
    Field references are defined in Customizing for the Material Master in the activity Maintain Field Selection for Data Screens.
    for see field references run tcode OMs9.
    Assign Field references to Material Type by Tcode OmT3E, You can see in OMS2 in General data See Field references and SRef: material type

  • Steps to create User ID and assigne roles.

    Hi,
    What are the steps to create User ID using BAPI_USER_CREATE1.
    How can I assign an User the role ECC/PORTAL/BI?
    Thanks in Advance
    Roy

    Am not sure what type of BI server installation you have...
    But here's one way you could create your users.
    From the BI Administration Tool --> Open your repository either offline or online --> From the menu click on Manage --> Security--> Here's where you could create your users, groups etc., set what subject areas each user/group should have access to --> After creating your users/groups you could double-click on the user or group and set permissions.
    Hope this helps,
    -Esther

  • Create a Participant and assign roles using API (outside the process)

    I want to create a participant in the BPM directory using API, which I believe is available in the fuegopapi-client.jar file. What is missing is a sample or documentation for that API. PAPI Javadocs found on the web don't cover the rest of the API available in the mentioned jar file.
    There are examples of how to do this within a process, but not outside the context of the process. Any references to documentation or samples, you may have come across is greatly appreciated. I have not had success in finding anything on this forum and the web. Thanks.

    Hope it helps
         private void openSesionDFI() throws ProtocolNotSupportedException, AuthenticationException {
              if (directorySessionRol==null){
                             DirectoryConfigurationManager.getRuntime().setPropertiesFileName(props.getProperty("fuego.custom.replication.config.directoryFile").trim());
    Directory.DEFAULT_ENGINE_PRESET);
                             DirectoryPassport directoryPassport = DirectoryPassport.createWithIDAndPreset(props.getProperty("fuego.custom.replication.config.directoryId").trim(), props.getProperty("fuego.custom.replication.config.preset").trim());
                                  if (directoryPassport == null)
                                       throw new RuntimeException("Invalid directory passport for FDI");
                                  System.out.println("openSesionDFI: " +directoryPassport.getUrl());
                                  directoryPassport.fillPassport();          
                                  directorySessionRol = Directory.startAdminSession(directoryPassport);
              System.out.println("openSesionDFI: " +"fin");
         }

  • How to create button programmatically and assign trigger for it and add code

    is that possible ?
    How can I create item a button for example programmatically (at run time)
    and create trigger (when-button-pressed) programmatically and write a code
    in the trigger body as well programmatically.
    thankx

    Hello David
    I used the way list and go button which is more safer than creating buttons because
    you can populate the list on fly.
         | dropdown list     \/
              | go button |
    PROCEDURE populate_user_function_list IS
         rg_list_id RECORDGROUP;
         ret_code     NUMBER;
    BEGIN
         rg_list_id := FIND_GROUP('RG_LIST');
         IF NOT ID_NULL(rg_list_id) THEN
              DELETE_GROUP(rg_list_id);
         END IF;
         rg_list_id := CREATE_GROUP_FROM_QUERY('RG_LIST','SELECT FUNCTION_ID, FUNCTION_ID FROM SMS_ROLE_FUNCTION WHERE SMS_ROLE_FUNCTION.DB_ROLE ='||''''||:GLOBAL.USER_ROLE||''''||' ORDER BY SEQUENCE_NO');
         ret_code := POPULATE_GROUP(rg_list_id);
         --Populate record group.
              IF ret_code <> 0 THEN
              bell;
              MESSAGE('Record Group could not be populated');
              RAISE FORM_TRIGGER_FAILURE;
              END IF;
         POPULATE_LIST('DYNAMIC_BLK.USER_FUNCTION','RG_LIST');
         DELETE_GROUP(rg_list_id);
    END;
    --this is the button to go the user selection
    begin
         if :DYNAMIC_BLK.USER_FUNCTION is not null then
              --go to selected form
              call_form(:DYNAMIC_BLK.USER_FUNCTION,NO_HIDE,DO_REPLACE,NO_QUERY_ONLY,NO_SHARE_LIBRARY_DATA);     
         else
              bell;
              message('Please select a function');
         end if;
    end;

  • How to create Match code and assigne it to main screen of MM03

    Hi,
    My req is as below,
    I have to create one new match code for Material serach  and i want to assign this match code on the main screen on MM03
    while searching the Material.
    Kindly Help
    Sachin Yadav

    solved

  • How to create a spreadsheet and share it with another users?

    Hello.
    I want to create a weekly report spreadsheet, like excel file, for me and my colleagues. Therefore it is needs to have a public access among another users.
    Is it possible?
    Thank you !

    If you mean create the Excel file and then email it to others, just create and save the file to your drive. Then attach the file to an email and send it.
    If you mean having a file somewhere and several people being able to access and work on the file, that is not in the scope of Thunderbird or any other email client. You might get help with a solution from Microsoft support forum.

  • How to create new user and How can i assign end user roles

    Hi,
    I am new to SAP, please explain how to create end users and their roles
    Thanks
    ravi

    Hi,
    Roles are decided by IT managers. Suppose if Persons who are working in shopfloor or production side
    give authorization to Production order create , change and Confirm like that etc
    1. In role maintenance (transaction PFCG), choose the Authorizations tab page.
    2. To change the authorization data for the transactions assigned to the role, choose Change Authorization Data or Expert Mode for Profile Generation. Otherwise, a dialog box appears in expert mode (see Regenerating an Authorization Profile After Changes).
    Please take telp from Basis person also refer this link,
    http://help.sap.com/saphelp_46c/helpdata/EN/52/6714a9439b11d1896f0000e8322d00/frameset.htm
    Thanks

  • Create handling units and assigning them as Packing Proposal for Sales Orde

    Hi Friends
    How to create handling units and assigning them as Packing Proposal for Sales Order Items in the background.
    Could you please help to provide Input Parameters for BAPI_HU_CREATE for sales order OR is there any other program creating and assigning them to Sales Order line Items.
    Thanks in Advance.
    SR

    Hi Friends
    I created Handling Units with BAPI_HU_CREATE , Pack materials with BAPI_HU_PACK in to Handling Untis and assign handling units to sales order with BAPI_HU_CHANGE_HEADER . But These BAPIs are not doing packing sales order line items in to handling units . I have to go sales order and do sales order line item packing by clicking packing button.
    Could you please help on how to do packing Sales Order Line items in the background with BAPIs.
    Thanks in Advance.
    SR

  • Create and assign roles

    Hi Experts,
    How to Crete and Assign roles to users? i need to work on this? please explain on this which T_codes we need.
    I need step by step process.
    Thanks in advance
    David

    Hi,
    You can create roles in the PFCG transaction. Check the below link. It contains the step by step procedure for creating roles.
    http://help.sap.com/saphelp_46c/helpdata/EN/52/6714a9439b11d1896f0000e8322d00/frameset.htm
    Hope this will help.
    -Jaimin

  • How to create a Workset in the Role

    Hello SDN,
    Could you please tell me how to create a Workset within the Role? 
    I tried to create it via right-click on the Folder of the uploaded Role and the only option is available is New Folder.  I don't see any options for Workset.
    Thanks for any helps!
    Regards,
    Niki Nguyen

    Hey Niki,
    Go to Content Admin->Portal Content.
    Select your default work folder. Right click it and select new workset.
    Create and save workset.
    After that open your role and right click on workset and select the option add to role.
    If you are not aware of the location of the role select tab search and type some keywords with *. select it and click locate in catalog.
    Hope this helps!
    Regards
    Atul Shrivastava

  • How to create the ICONS and SYMBOLS

    how to create the ICONS and SYMBOLS
    Title was edited by:
            Alvaro Tejada Galindo

    HI,
    Check this sample code....Not mine...
    REPORT SHOW_ICONS.
    TABLES: ICON.
    INCLUDE <ICON>.
    FIELD-SYMBOLS: <F>.
    SELECT * FROM ICON.
       ASSIGN (ICON-NAME) TO <F>.
       WRITE:   /(5) <F>, 20 '@',21 ICON-ID+1(2),23 '@',ICON-OLENG,
                ICON-BUTTON,ICON-STATUS,ICON-MESSAGE,ICON-FUNCTION,
                ICON-NAME.
    ENDSELECT.
    Also Try this,
    INCLUDE <symbol>.
    INCLUDE <icon>.
    Write:/ 'Phone Symbol:', SYM_PHONE AS SYMBOL.
    SKIP.
    WRITE: / 'Alarm Icon: ', icon_alarm AS ICON.
    For more information check out the following link it will help you.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e4a35c111d1829f0000e829fbfe/content.htm
    Regards,
    Padmam.

  • Can any 1 tell me how to create budget journal and how to enter journal ?

    hi all+
    Can any one tell me how to create budget journal and how to enter journal against that budget ?+
    Regards+
    Yasir+

    http://download.oracle.com/docs/cd/A60725_05/html/comnls/us/gl/budjrnl.htm#index-Budget-journals-Entering--0
    Enter budget journals to maintain an audit trail for your budget balances. You can use budget rules to calculate budget journal amounts automatically.
    When you post budget journals, the journal amounts update existing budget balances. You can review and change your budget journals before posting them.
    Attention: When you use budget rules in Journal Mode, General Ledger calculates the appropriate debit or credit needed to achieve the balance you enter for the account type.
    Prerequisites
    1. Define a budget
    2.Open one or more years for your budget
    3.Define a budget organization
    4. Assign the "Entered" budget entry type to the accounts for which you want to enter budget journals
    To enter budget journals for a single account:
    1. Navigate to the Enter Budget Journals window.
    2. Specify the Budget Organization for the account to which you want to budget. If the budget organization is password-protected, you must enter the password before you can enter budget journals.
    3. Enter the Budget you want to update. You cannot use a budget that is frozen.
    4. Enter the range of Accounting Periods to which you want to budget.
    5. Enter the Currency of the budget amounts you are entering. The accounts must be assigned to the budget organization for this currency.
    6. Choose Journal Mode from the region poplist to enter budget amounts in a journal format.
    You can also use Single Row Mode or Worksheet Mode to enter budget journal amounts. However, you can only generate budget journals from these entry modes when you use the Enter Budget Journals window.
    Additional Information: When you use Journal Mode, Balance Type is a display-only field. It displays Budget when you are entering budget journals. In the Enter Journals window, this field displays Actual when you are entering actual journals.
    7. Enter or query the Account to which you want to budget. You can also switch to Worksheet Mode to easily query accounts, then return to Journal Mode to enter budget journals.
    8. Enter a Debit or Credit amount for each period. Do not enter journal amounts if you want to use budget rules to calculate and distribute budget amounts.
    9. Choose Create Journals to create a budget journal batch. If you are using budgetary control, you specify a funds action when you create the batch.

  • New user created. How to create Central Person and Business partner

    Hi,
    I got a new users created in SRM 5.0 .how to create Central person and business partner.
    Without CP & BP we cannot work. please guide.
    Regards
    G.Ganesh Kumar

    HI GANESH
    As you aware , assign the user to organisation structure via users_gen , the system will create a BP and Central Person , Position and user for you.
    br
    muthu

Maybe you are looking for

  • Confirmation profile selection based on material

    Hi All Is it possible to have a confirmation profile based on the material which is being produced in the Production order? If yes then please give me your suggestions on how to achieve this. regards PK

  • Import (bonded warehouse)

    hi gurus, Can any one tell me,how to map IMPORT under bonded ware house. Regards ROC

  • Usb harddrive to airport exteme

    I would like some advice on how to use Time Machine to automatically back up my external HD, that's connected to my Airport Exteme.  Another question is: I would like advice on using Time Machine on a second external HD approx. once a month.  This HD

  • Script o/p probelm

    Hi experts, sorry guys ,i typed the qusetion wrongly so that again i am posting. script program o/p that is displaying in development is correct whereas in production o/p is not displaying correctly.Request no is successfully transported.Somebody tol

  • Bill value of Billing plan in CRM

    Hi All, can you please suggest on FM or method to get the Bill value of Billing plan in CRM. Thanks in advance. Subhankar