Set Role from procedure

I get this error if I try to execute SET ROLE <rolename> from
the procedure
Error::: ORA-06565: cannot execute SET ROLE from within stored procedure
May I know how to activate the role from the procedure ?

I tried DBMS_SESSION.SET_ROLE, but get the same error
Error::: ORA-06565: cannot execute SET ROLE from within stored procedure

Similar Messages

  • How to set roles from JDBC connections

    Hi guys,
    I have a jdbc connection which purpose is to run queries based on a string that I construct in my program.
    My question is: if I have to run a DCL, like: SET ROLE RL_XXX TO USER1;
    What's the easiest way to do it with my same connection?
    Thanks.

    Hi Marc,
    Sorry for the typo. It's a BDC source, I use a WCF client to access a SQL Database (HR External System) that has 4 fields that are necessary to present in the Sharepoint User Profile. The issue occurs with a Full or a Delta Sync. The problem is that if the
    BDC source is not present the fields are deleted (I get a SPS-Dummy Added and all of the pbjects in the BDC Connector Space are deleted).
    I do not want this to happen. I do not want the User Profile Attributes/Fields to be empty/deleted if there is no connection I simply want them to stay what they are... I have two issues.
    1) Is that the even if i change my data on SQL Server side, the changes do not get picked up by the sync. Since the only field that is being tested for change is an ADid, since the id does not change the BDC does not consider them changes.
    2) If there is no connection I do not want the attributes to be deleted. I have not figured out a way to effectively do this.
    So my issue appears to be simple to solve, but after 4 days and hundreds of tutorial pages read I have yet to figure out a proper way to do this.
    Here is the pseudo-specification
    The Fields that come form the HR System (SQL Server) are to be presented in the user profile. If there is no connection to the BDC file the fields remain as they are until there is a connection and updates can be made. Changes to any of the fields are performed
    manually in the HR system. These changes must be picked up by the daily sync.

  • Set checkbox from procedure

    Hi,
    What is the proper way to set / update a checkbox on a form from a procedure. The item "v_name" OUT parameter works fine. For some reason the checkbox_1 doesn't work. My procedure looks like so:
    CREATE OR REPLACE PROCEDURE PR_SELECT_STUDENT (
         v_stu_id_in                         IN        NUMBER,
         v_name                              OUT      student.name%TYPE,
         v_checkbox_1                        OUT      student.checkbox_1%TYPE
    IS
    BEGIN
      SELECT name, checkbox_1 into v_name, v_checkbox_1
      FROM student WHERE Id = v_stu_id_in;
    END;
         On Page Rendering, I have a PL/SQL after header process like:
    PR_SELECT_STUDENT(
          :P10010_STU_ID,
          :p10010_name,
          :p10010_checkbox_2
    );The :P10010_STU_ID item gets its value from a report page with an Edit link. The user click on the Edit link with student id from the report page to pass the student id into the form on a different page.

    Setting :p10010_checkbox_2 := 'Y'; works but without it doesn't work. Weird.
    I even added TRIM in the procedure but does not seem to help:
    CREATE OR REPLACE PROCEDURE PR_SELECT_STUDENT (
         v_stu_id_in                         IN        NUMBER,
         v_name                              OUT      student.name%TYPE,
         v_checkbox_1                        OUT      student.checkbox_1%TYPE
    IS
    BEGIN
      SELECT name, TRIM(checkbox_1) into v_name, v_checkbox_1
      FROM student WHERE Id = v_stu_id_in;
    END;

  • How to use the Oracle's SET ROLE?

    Hi all,
    does anyone know how I can call SET ROLE (for Oracle) from java before the report is produced with
    Crystal Reports API?
    I'm using Crystal Reports 2008 for the report design and new crystal report java sdk of JRC (v12.2 with SP1) which know as CRJ in my J2EE application.
    I tried to insert a Command (SET ROLE role) into a working fine report.
    The report runned into Crystal Reports 2008 works fine.
    Since has been made a high number of reports without a SET ROLE, to avoid to modify all the reports already made, I tried to run the SET ROLE from JAVA adding a CommandTable to report.
    Below the code inserted into java class:
              ConnectionInfos connInfos = new ConnectionInfos();
              IConnectionInfo iConnInfo = new ConnectionInfo();
              PropertyBag propertyBag = new PropertyBag();
              try {
              String usernameOracle = GestoreContesto.getAttributo("usernameOracleReport");
              String passwordOracle = GestoreContesto.getAttributo("passwordOracleReport");
              String connectString = GestoreContesto.getAttributo("dbUrl");
              String driverName = "oracle.jdbc.OracleDriver";
              //String driverName = "oracle.jdbc.OracleConnectionCacheImpl";
              //String JNDIName = "jdbc/nsisrdatasource";
              String userName = usernameOracle;               
              String password = passwordOracle;
              String TRUSTED_CONNECTION = "false";
              String SERVER_TYPE = "JDBC (JNDI)";
              String USE_JDBC = "true";
              String DATABASE_DLL = "crdb_jdbc.dll";
              //String JNDI_OPTIONAL_NAME = JNDIName;
              String CONNECTION_URL = connectString;
              String DATABASE_CLASS_NAME = driverName;
              propertyBag.put("Trusted_Connection", TRUSTED_CONNECTION);
              propertyBag.put("Server Type", SERVER_TYPE);
              propertyBag.put("Use JDBC", USE_JDBC);
              propertyBag.put("Database DLL",DATABASE_DLL );
              //propertyBag.put("JNDIOptionalName",JNDI_OPTIONAL_NAME );
              propertyBag.put("Connection URL", CONNECTION_URL);
              propertyBag.put("Database Class Name", DATABASE_CLASS_NAME);
              iConnInfo.setAttributes(propertyBag);
              iConnInfo.setUserName(userName);
              iConnInfo.setPassword(password);
              connInfos.add(iConnInfo);
              String TableName = "Custom_Query";
              String TableAlias= "Custom_Query";
              CommandTable table = new CommandTable ();
              table.setAlias (TableAlias);
              table.setName (TableName);
              table.setConnectionInfo(iConnInfo);
              table.setCommandText("SET ROLE role");
              databaseController.addTable(table, null);
              catch (ReportSDKException e) {
                   System.out.println("......");
    When I tries to render a report from Java I received this ERROR:
    15:32:52,935 INFO  [STDOUT] 15:32:52,935 FATAL [JRCCommunicationAdapter] Request failed and JRC Command failed to be undone
    15:32:52,966 INFO  [STDOUT] 15:32:52,951 ERROR [JRCCommunicationAdapter]  detected an exception: Nessun risultato restituito dalla query.
         at com.crystaldecisions.reports.queryengine.Table.u7(Unknown Source)
         at com.crystaldecisions.reports.dataengine.datafoundation.AddDatabaseTableCommand.new(Unknown Source)
         at com.crystaldecisions.reports.common.CommandManager.a(Unknown Source)
         at com.crystaldecisions.reports.common.Document.a(Unknown Source)
         at com.businessobjects.reports.sdk.requesthandler.f.a(Unknown Source)
         at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.byte(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(Unknown Source)
         at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.businessobjects.sdk.erom.jrc.a.a(Unknown Source)
         at com.businessobjects.sdk.erom.jrc.a.execute(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ds.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.an.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.b0.if(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.b0.b(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.bb.int(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.performDo(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.byte(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.addTable(Unknown Source)
         at it.ServletHelper.querySetRole(ServletHelper.java:627)
    It's a big problem. If anyone has any idea, I'd greatly appreciate it.
    Thanks

    Hi all,
    running a report with two command from java (the first contains a simple "SEt ROLE role",
    the second contains a simple select) is raised the error "No results returned by the query" while in
    Crystal Reports 2008's preview the report works fine.
    Therefore I ask: "Is it possible to run a report that contains a query without result from Java?
    How can do with the SET ROLE command, which is essential for me?"
    Thanks

  • Setting ViewObject Stored Procedure Where Clause Param from Struts Action

    I adapted/used Steve's example to get stored procedure to populate my ViewObject. However, I could not retrieve any rows after passing whereClause value from Struts action. The param in execureQueryForCollection returns null.
    What could be wrong. Thanks.
    Here's my code.
    ViewObjectImpl:
    package org.adb.sls.model;
    import java.math.BigDecimal;
    import java.sql.CallableStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Timestamp;
    import java.sql.Types;
    import oracle.jbo.JboException;
    import oracle.jbo.domain.Date;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.DBTransaction;
    import oracle.jbo.server.ViewObjectImpl;
    import oracle.jbo.server.ViewRowImpl;
    import oracle.jbo.server.ViewRowSetImpl;
    import oracle.jdbc.driver.OracleCallableStatement;
    import oracle.jdbc.driver.OracleTypes;
    // --- File generated by Oracle ADF Business Components Design Time.
    // --- Custom code may be added to this class.
    public class ViewApplicableLoanTypesImpl extends ViewObjectImpl
    * PLSQL block that will execute the REF_CURSOR
    private static final String SQL =
    "begin ? := sls_loan_types_pkg.get_applcbl_staff_lns_fn(?); end;";
    * PLSQL block that will count the REF_CURSOR returned rows
    private static final String COUNTSQL =
    "begin ? := sls_loan_types_pkg.get_count_applcbl_staff_lns_fn(?); end;";
    * This is the default constructor (do not remove)
    public ViewApplicableLoanTypesImpl()
    * Overridden framework method.
    * Wipe out all traces of a built-in query for this VO
    protected void create() {
    getViewDef().setQuery(null);
    getViewDef().setSelectClause(null);
    setQuery(null);
    * Overidden framework method
    protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams)
    // input parameter is employee number
    String employeeNumber = null;
    if (params != null) {
    employeeNumber = (String) params[0];
    } else
    System.out.println("param is null");
    storeNewResultSet(qc,retrieveRefCursor(qc,employeeNumber));
    super.executeQueryForCollection(qc, params, noUserParams);
    protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet rs)
    * We ignore the JDBC ResultSet passed by the framework (null anyway) and
    * use the resultset that we've stored in the query-collection-private
    * user data storage
    rs = getResultSet(qc);
    * Create a new row to populate
    ViewRowImpl r = createNewRowForCollection(qc);
    try {
    * Populate new row by attribute slot number for current row in Result Set
    populateAttributeForRow(r,0, nullOrNewNumber(rs.getBigDecimal(1)));
    populateAttributeForRow(r,1, nullOrNewNumber(rs.getBigDecimal(2)));
    populateAttributeForRow(r,2, rs.getString(3));
    populateAttributeForRow(r,3, nullOrNewNumber(rs.getBigDecimal(4)));
    populateAttributeForRow(r,4, rs.getString(5));
    catch (SQLException s) {
    throw new JboException(s);
    return r;
    protected boolean hasNextForCollection(Object qc)
    ResultSet rs = getResultSet(qc);
    boolean nextOne = false;
    try {
    nextOne = rs.next();
    * When were at the end of the result set, mark the query collection
    * as "FetchComplete".
    if (!nextOne) {
    setFetchCompleteForCollection(qc, true);
    * Close the result set, we're done with it
    rs.close();
    catch (SQLException s) {
    throw new JboException(s);
    return nextOne;
    protected void releaseUserDataForCollection(Object qc, Object rs)
    * Ignore the ResultSet passed in since we've created our own.
    * Fetch the ResultSet from the User-Data context instead
    ResultSet userDataRS = getResultSet(qc);
    if (userDataRS != null) {
    try {
    userDataRS.close();
    catch (SQLException s) {
    /* Ignore */
    super.releaseUserDataForCollection(qc, rs);
    public long getQueryHitCount(ViewRowSetImpl viewRowSet)
    Object[] params = viewRowSet.getParameters(true);
    String id = (String)params[0];
    CallableStatement st = null;
    try {
    st = getDBTransaction().createCallableStatement(COUNTSQL,DBTransaction.DEFAULT);
    * Register the first bind parameter as our return value of type CURSOR
    st.registerOutParameter(1,Types.NUMERIC);
    * Set the value of the 2nd bind variable to pass id as argument
    if (id == null) st.setNull(2,Types.VARCHAR);
    else st.setString(2,id);
    st.execute();
    return st.getLong(1);
    catch (SQLException s) {
    throw new JboException(s);
    finally {try {st.close();} catch (SQLException s) {}}
    * Return a JDBC ResultSet representing the REF CURSOR return
    * value from our stored package function.
    private ResultSet retrieveRefCursor(Object qc,String id) {
    CallableStatement st = null;
    try {
    st = getDBTransaction().createCallableStatement(SQL,DBTransaction.DEFAULT);
    * Register the first bind parameter as our return value of type CURSOR
    st.registerOutParameter(1,OracleTypes.CURSOR);
    * Set the value of the 2nd bind variable to pass id as argument
    if (id == null) st.setNull(2,Types.VARCHAR);
    else st.setString(2,id);
    st.execute();
    ResultSet rs = ((OracleCallableStatement)st).getCursor(1);
    * Make this result set use the fetch size from our View Object settings
    rs.setFetchSize(getFetchSize());
    return rs ;
    catch (SQLException s) {
    s.printStackTrace();
    throw new JboException(s);
    finally {try {st.close();} catch (SQLException s) {}}
    * Store a new result set in the query-collection-private user-data context
    private void storeNewResultSet(Object qc, ResultSet rs) {
    ResultSet existingRs = getResultSet(qc);
    // If this query collection is getting reused, close out any previous rowset
    if (existingRs != null) {
    try {existingRs.close();} catch (SQLException s) {}
    setUserDataForCollection(qc,rs);
    hasNextForCollection(qc); // Prime the pump with the first row.
    * Retrieve the result set wrapper from the query-collection user-data
    private ResultSet getResultSet(Object qc) {
    return (ResultSet)getUserDataForCollection(qc);
    * Return either null or a new oracle.jbo.domain.Date
    private static Date nullOrNewDate(Timestamp t) {
    return t != null ? new Date(t) : null;
    * Return either null or a new oracle.jbo.domain.Number
    private static Number nullOrNewNumber(BigDecimal b) {
    try {
    return b != null ? new Number(b) : null;
    catch (SQLException s) { }
    return null;
    Struts Action
    package org.adb.sls.view;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.ViewObject;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import oracle.adf.model.binding.DCDataControl;
    import oracle.adf.model.bc4j.DCJboDataControl;
    import oracle.jbo.html.BC4JContext;
    public class IndexAction extends DefaultADFAction
    protected ActionForward performActionLogic(ActionMapping mapping,
    ActionForm form, HttpServletRequest request,
    HttpServletResponse response)
    throws Exception {
    try {    
    ApplicationModule am = getApplicationModule("SLSApplicableLoanTypesDataControl", request);
    if (am == null)
    System.out.println("am is null");
    ViewObject vo = am.findViewObject("ViewApplicableLoanTypes");
    vo.setWhereClauseParam(0,request.getSession().getAttribute("SSO_EMPLOYEE_NUMBER"));
    vo.executeQuery();
    } catch (Exception e)
    e.printStackTrace();
    return mapping.findForward("success");
    Struts Config
    <form-beans>
    <form-bean name="DataForm" type="oracle.adf.controller.struts.forms.BindingContainerActionForm"/>
    </form-beans>
    <action-mappings>
    <action path="/index" className="oracle.adf.controller.struts.actions.DataActionMapping" type="org.adb.sls.view.IndexAction" name="DataForm" unknown="false">
    <set-property property="modelReference" value="indexUIModel"/>
    <forward name="success" path="/home.do"/>
    </action>
    <action path="/home" className="oracle.adf.controller.struts.actions.DataActionMapping" type="oracle.adf.controller.struts.actions.DataForwardAction" name="DataForm" parameter="/index.uix" unknown="true">
    <set-property property="modelReference" value="indexUIModel"/>
    </action>
    </action-mappings>

    I just found the solution. I've overridden setWhereClause method.
    public void setWhereClauseParams(Object[] values)
    ViewObjectImpl vo = (ViewObjectImpl) super.getViewObject();
    vo.setWhereClauseParam(0,values[0]);
    }

  • Retrive MultiRow Result Set From Procedure

    Hi,
    Can you please guide me, on ways to retrieve result set with more than one row from procedure. I got two ways...
    1. Using Ref Cursor &
    2. Using Collection
    Do we have any other ways also to do this.
    Thanks,
    Ashish
    Edited by: Ashish Thakre on May 28, 2013 10:32 PM

    Hi this is the Oracle Designer forum. You would be better off at the PL/SQL/SQL place

  • Is it possible to set Tomcat Manager to lookup roles from DataSourceRealm?

    I know the Realm Configuration docs say that "Tomcat does not provide any built-in capabilities to maintain users and roles", but manager.xml contains the comment "Link to the user database we will get roles from", so that seems to imply that you can link to a different user database.
    I thought I could do this with JDBCRealm, but after using UserDatabaseRealm, I thought I might set up the dbase as a JNDI Datasource and authenticate and lookup roles via UserDatabaseRealm.
    After getting my database configured as a JNDI DataSource, and failing to authenticate against it via JNDIRealm, I realized that DataSourceRealm is a variation on JDBCRealm where you refer to the dbase via a JNDI DataSource. I have DataSourceRealm working, and I changed my Manager ResourceLink to point to the JNDI DataSource, but Tomcat Manager still can't lookup roles from anything other than the tomcat-users.xml demonstration file.
    The Admin Tool has screens where you can create users and roles, but this only seems to work with MemoryRealm and UserDatabaseRealm (xml files).
    Is this all just for demonstration?
    Is there no possibility of configuring TC Manager and Admintool to interface with an alternate user database (relational)?
    Shouldn't the docs clarify this by stating that you shouldn't bother trying to point the Manager ResourceLink at an alternate user database because it can't be done and the functionality is for demonstration of MemoryRealm and UserDatabaseRealm only?

    Its a 'Yes' or 'No' question.

  • Upload of BW Roles from BW (2004s)

    Hi
    I am in the process of uploading my roles from BW into the portal.
    I was wondering if we can pre configure the properties that the reports (iviews) inherit as part of the upload.
    For example after the role has been uploaded the property "Launch in New Window" is set as " Display in Portal Content Area".
    We would like this to always default to "Display in Separate Window".
    Can this be be setting be configured to apply to all reports uploaded as part of the role upload procedure.  This removes the need to change each iviews properties after the upload.
    Thanks in advance.
    Ian
    Message was edited by:
            Ian Carbonel

    Hi
    I have made changes to the BEx Web Application Iview however the changes did not appear to transport into my test environment.
    I have found the following documentation relating to the protection of objects during transport.
    http://help.sap.com/saphelp_nw04s/helpdata/en/70/ccc572a094fb4c9b15af909767b924/content.htm
    ·        At export: System objects and content objects with the namespace prefixes com.sap.portals* or com.sap.km* are automatically excluded from the export package and therefore not exported. PAR archives are not usually included in the export.
    ·        At import: If there are content objects with the namespace prefix com.sap.portals* or com.sap.km* in a package, they are automatically excluded from the import.
    Is this the reason?  Is it not possible to change the properties of objects in the namespace com.sap.portals*?
    Thanks in advance

  • Why does SET ROLE start a transaction?

    Hi,
    I wonder why SQL command SET ROLE starts a transaction?
    Is it considered to be a DML command?
    If yes, then why?
    Check this simple PL/SQL example (where FND_ADMIN is any role granted to the user executing the code):
    SET SERVEROUT ON
    BEGIN
    dbms_output.put_line('[1]');
    dbms_output.put_line(dbms_transaction.local_transaction_id);
    dbms_output.put_line('[2]');
    dbms_session.set_role('FND_ADMIN');
    dbms_output.put_line('[3]');
    dbms_output.put_line(dbms_transaction.local_transaction_id);
    dbms_output.put_line('[4]');
    END;
    It gives the following output:
    [1]
    [2]
    [3]
    6.40.1217
    [4]
    Regards
    Håkan

    Hm... as documentation states, DBMS_SESSION.SET_ROLE is, quote, "... equivalent to the SET ROLE SQL statement", unquote.
    However, seems that it's doing something more than just SET ROLE:
    SQL> commit;
    Commit complete.
    SQL> select sid, taddr
      2    from v$session
      3   where sid = (select sid from v$mystat where rownum = 1);
           SID TADDR
            46
    SQL> set role CTXAPP;
    Role set.
    SQL> select sid, taddr
      2    from v$session
      3   where sid = (select sid from v$mystat where rownum = 1);
           SID TADDR
            46TADDR is empty – we don't have transaction and there is no transaction state object for our session.
    However:
    SQL> exec dbms_session.set_role('CTXAPP')
    PL/SQL procedure successfully completed.
    SQL> select sid, taddr
      2    from v$session
      3   where sid = (select sid from v$mystat where rownum = 1);
           SID TADDR
            46 5756BD74Why so? I don't know :) But obviously, DBMS_SESSION.SET_ROLE is not a precise equivalent to SET ROLE.
    Regards.

  • Need to call SET ROLE for Oracle before running report

    Hi all,
    does anyone know how I can call SET ROLE for Oracle with Crystal Reports, before running report? I'm using Crystal Reports 2008 to design report (with Server Oracle connection) and Java Reporting Component to run report within a J2EE apllication. If anyone has any idea, I'd greatly appreciate as I'm in trouble.
    Thanks a lot.

    Just a thought...
    If your report's datasource was an Oracle stored procedure, you could call a function to set the role from that SP
    You would be in the same Oracle session from  Report --> SP --> Function, so the role would be retained

  • Could not set role using exec immediate

    sql_stmt := 'SET ROLE :1 IDENTIFIED BY :2';
    EXECUTE immediate sql_stmt USING C_name,C_WORD;
    =================
    ORA-01937: missing or invalid role name
    ORA-06512: at "ASAP.PKG_CREDENTIAL_STORE", line 21
    01937. 00000 - "missing or invalid role name"
    *Cause:    A valid role name was expected.
    *Action:   Specify a valid role name.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    I don't think that you can use bind variables for DDL statements:
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> alter session set nls_language=english;
    Session altered.
    SQL>
    SQL> drop role r;
    Role dropped.
    SQL>
    SQL> create role r;
    Role created.
    SQL>
    SQL> declare
      2  l_role varchar2(30) := 'r';
      3  begin
      4  execute immediate 'set role :1' using l_role;
      5  end;
      6  /
    declare
    ERROR at line 1:
    ORA-01937: missing or invalid role name
    ORA-06512: at line 4
    SQL> show errors
    No errors.
    SQL>
    SQL>
    SQL> begin
      2  execute immediate 'set role r';
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> show errors
    No errors.

  • Replication of roles from cProject to R/3 PS

    Hi
      I want to know the procedure to replicate the roles from the cProjects to project system. If any one know pl help me.
    Regards
    Nanthu

    Hi Zhenbo
    I have received the Conf. guide and i have configured as per the guide.
    The project definition,phases and tasks are replicated to R/3 PS but if i assign role in the project it is not replicating  to R/3 PS. It is showing the following error
    1.R/3 PS Network object could not be created.
    2.R/3 PS Error occurred during processing.
    Replicated incorrectly
    Settings:
    Account integration scenario : Replication to R/3 PS using CRM MW
    Replication type : From release of project - Automatic
    Project Elemt conf: 'Blank'
    Please suggest me what should i do to replicate the roles to R/3 PS as activity.
    Regards
    Nanthu

  • Integrate GRC 10.1 with CUA and how to import roles from CUA & Child systems into GRC for provisioning

    Hello,
    I am trying to integrate CUA into our GRC 10.1 system through the below steps and so far I have completed the below steps following SAP Notes 1680108 and 1616121:
    1. Connected CUABOX to GRCBOX like a plug-in system.
    2. Updated CUA Global System and CUA Model Distribution in Maintain CUA settings under User Provisioning.
    3. Next I am trying to import the roles from CUA(CUABOX) into GRC(GRCBOX) to be able to provision roles in CUA Child Systems(ECCBOX).
    After reading few discussions in SCN, I have figured that we have to download a template in Role Import and populate it accordingly to upload the CUA child system roles into GRC system for provisioning in CUA Child Systems.
    Unfortunately, this template has multiple fields and I am unable to determine the fields that should be populated as CUA Global System and CUA Child System to import into GRC. Also, when we upload CUA Child System Roles template what selections should be made in Role Import window.
    Any help in this regard is very helpful.
    Thank you,
    Pawan

    Hi Alessandro,
    I have "Create user if does not exist" setting checked for both change action and assign role action and also have CUA enabled. Here is the list of steps that I am performing:
    1. Create an access request for new account, T-CUA_CHILD and select a role from a child system ECC Z_ECC_ROLE_IN_CHILD_SYSTEM.
    2. Approvals provided to assign the ECC role.
    3. I see the following in GRFNMW_DBGMONITOR_WD.
               Auto provisioning activity at end of request at Path GRAC_DEFAULT_PATH and Stage              GRAC_SECURITY
                   New User:T-CUA_CHILD created in System(s): ECC (created without role assignments)
                   T-CUA_CHILD User does not exist in target system CUA
    GRC created an account without role assignment in ECC but also throwed me an error that the user does not exist in CUA.
    However, if I select roles from both CUA and ECC it creates the account in both systems with the selected role assignments.
    So I am wondering if there is way to provide CUA access to users by default for new account requests types. I have tried setting up default roles for CUA but it does not assign the roles by default until I select the CUA system.
    Thank you for your help!
    Pawan

  • How to send/set parameter from BSP page to iview

    Dear Expert,
    Can advise me how to send or set parameter from BSP page to iview ?
    http://xxx.xxx.com/irj/portal?navigationtarget=roles://pcd:portal_content/FLD.ObjetLibrary/FLD.Iviews/FLD.CRM/ET/bsppage.htm?lv_param=xxx
    I want to view my bsp page in portal but with parameter value.
    I can open my bsp page without parameter value like link below :
    http://xxx.xxx.com/irj/portal?navigationtarget=roles://pcd:portal_content/FLD.ObjetLibrary/FLD.Iviews/FLD.CRM/ET/
    Thnx & Regards,
    Pieter

    Hi,
    your BSP page get's integrated via an iFrame. So, simply speaking, it's not possible to pass an parameter back.
    But what you can try is to use the Portal DataBag component. In the BSP page, store the information you want to pass in the browser. The iView/Portal than has to check if there is a new parameter / value stored.
    SAP Help: http://help.sap.com/saphelp_nw70/helpdata/en/68/322a9261c54e51b7965f86aac3dae2/frameset.htm
    br,
    Tobias

  • How to set users from AD as UCM administrators

    Hi
    I need to set group from Active Directory as UCM administrators
    We have configured AD provider on WLS and group named MyGroup in AD
    I created role MyGroup in UCM and users from this AD group can login to UCM.
    I tried to create credentials map named "MyMap" with "MyGroup,admin" values,
    add "ProviderCredentialsMap=MyMap" to <domain>/ucm/cs/data/providers/jpsuserprovider/provider.hda
    and restart UCM
    But it not works.
    Please advice
    Thanks
    Leon

    Leon wrote:I created role MyGroup in UCM and users from this AD group can login to UCM.Try removing the role "MyGroup" you've defined in UCM from the User Admin applet. It's not needed in this case. The "MyGroup" should just "come over" from AD as a role, if you've configured the WLS AD provider correctly.
    Otherwise the mapping itself looks ok.

Maybe you are looking for