How is the -gm parameter effecting query runtime in detail?

During test I found out, that the parameter -gm seems to have some dramatic impact onto runtime of queries. In Detail I found a something like factor 0.5 to 0.6 inside my tests for a smaller system:
-iqtc 12000
-iqmc 12000
-iqlm 1000
-gm 100
-m
-iqrlvmem 6000
When setting -gm 1001, runtimes for a single query goes up from about 10 to about 40s.
So how is the -gm parameter effecting IQ in detail?

When IQ starts it allocates threads based on the -iqmt parameter.  If you don't set it, then it is computed as something like:
     -- 60 threads for each core up to 4
     -- 50 threads for each core after 4
     -- number of connections (-gm option)
     -- add 6 more just for good measure
Let's assume that your IQ instance has 16 cores and you have -gm set to 100 .  IQ would allocate 946 threads (60*4+50*12+100+6).  We have to add 1 more thread to this, too.  Before we can allocate threads, we have 1 thread that is running to start the server.
On my 16 core system, here are the threads allocated at startup for various values of -gm:
     -gn 10: 857 threads
     -gn 100: 947 threads (notice the +1 from the above algorithm?)
     -gn 1000: 1847 total threads
There are two major deductions from the thread total: IO threads and SA/user threads.
Of the threads, 40% are supposed to be held in reserve to handle IO tasks (sweeper and prefetch threads are set to 10% each and apply to main and temp cache) via the Prefetch_Threads_Percent and Sweeper_Threads_Percent options.  I am double checking this area just to make sure.  There was some work done on this in the v16 timeline.
For user threads, I don't see you having set -gn.  Assuming that -gn is not set, then IQ will reserve 5 + -gm threads (105).  Not a problem.  IQ will grab 5 more threads than are allocated via the above algorithm, but that's OK.
Things go a bit wrong on you when your -gn is set to the recommended value of 1.5 * -gm.  What happens is that we are computing the number of threads needed based on -gm (100 or 1000).  However, we are actually allocating threads based on -gm (105, 1005, 150, or 1500 depending on the default or best practices used).
Imagine that -gn is set to 1.5x -gm.  Of the 1847 threads allocated, 1500 are held in reserve for user connections.  Read that as threads for the catalog only.  There would be just 347 threads left over.  But don't forget the IO threads either.  Now all of a sudden there are no threads left for any work in IQ.  We are thread starved.  When IQ gets into a thread starvation mode, we have little or no threads left over to do work in IQ.  At that time, we use the one guaranteed thread that each user connection has to do all work.  This holds true for worker thread starvation as well as IO thread starvation.
One of two things is happening in your case.  You are either thread starved and forced to run everything single threaded or your system has so many threads that it must spend too much time maintaining threads that are not being used.
If you can run sp_iqsysmon in '-debug' mode you can look at the "Thread Manager" section to check out the thread usage and allocations.
Mark

Similar Messages

  • How to pass multiple query string values using the same parameter in Query String (URL) Filter Web Part

    Hi,
    I want to pass multiple query string values using the same parameter in Query String (URL) Filter Web Part like mentioned below:
    http://server/pages/Default.aspx?Title=Arup&Title=Ratan
    But it always return those items whose "Title" value is "Arup". It is not returned any items whose "Title" is "Ratan".
    I have followed the
    http://office.microsoft.com/en-us/sharepointserver/HA102509991033.aspx#1
    Please suggest me.
    Thanks | Arup
    THanks! Arup R(MCTS)
    SucCeSS DoEs NOT MatTer.

    Hi DH, sorry for not being clear.
    It works when I create the connection from that web part that you want to be connected with the Query String Filter Web part. So let's say you created a web part page. Then you could connect a parameterized Excel Workbook to an Excel Web Access Web Part
    (or a Performance Point Dashboard etc.) and you insert it into your page and add
    a Query String Filter Web Part . Then you can connect them by editing the Query String Filter Web Part but also by editing the Excel Web Access Web Part. And only when I created from the latter it worked
    with multiple values for one parameter. If you have any more questions let me know. See you, Ingo

  • Need Help-How Store the input parameter through java bean

    Hello Sir,
    I have a simple Issue but It is not resolve by me i.e input parameter
    are not store in Ms-Access.
    I store the input parameter through Standard Action <jsp:useBean>.
    jsp:useBean call a property IssueData. this property exist in
    SimpleBean which create a connection from DB and insert the data.
    At run time servlet and server also show that loggging are saved in DB.
    But when I open the table in Access. Its empty.
    Ms-Access have two fields- User, Password both are text type.
    Please review these code:
    login.html:
    <html>
    <head>
    <title>A simple JSP application</title>
    <head>
    <body>
    <form method="get" action="tmp" >
    Name: <input type="text" name="user">
    Password: <input type="password" name="pass">
    <input type="Submit" value="Submit">
    </form>
    </body>
    </html>LoginServlet.java:
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class LoginServlet extends HttpServlet{
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException{
    try
    String user=request.getParameter("user");
    String pass=request.getParameter("pass");
    co.SimpleBean st = new co.SimpleBean();
    st.setUserName(user);
    st.setPassword(pass);
    request.setAttribute("user",st);
    request.setAttribute("pass",st);
    RequestDispatcher dispatcher1 =request.getRequestDispatcher("submit.jsp");
    dispatcher1.forward(request,response);
    catch(Exception e)
    e.printStackTrace();
    }SimpleBean.java:
    package co;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.util.*;
    public class SimpleBean {
    private String user="";
    private String pass="";
    private String s="";
    public String getUserName() {
    return user;
    public void setUserName(String user) {
    this.user = user;
    public String getPassword() {
    return pass;
    public void setPassword(String pass) {
    this.pass = pass;
    public String getIssueData() //method that create connection with database
    try
    System.out.println("Printed*************************************************************");
    getUserName();
    getPassword();
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Loading....");
    Connection con=DriverManager.getConnection("jdbc:odbc:simple");
    System.out.println("Connected....");
    PreparedStatement st=con.prepareStatement("insert into Table1 values(?,?)");
    System.out.println("~~~~~~~~~~~~~~~~~~~~");
    String User=getUserName();
    st.setString(1,User);
    String Password=getPassword();
    st.setString(2,Password);
    st.executeUpdate();
    System.out.println("Query Executed");
    con.close();
    s=  "Your logging is saved in DB ";
    System.out.println("Your logging is saved in DB *****************");
    return(s);
    catch(Exception e)
    e.printStackTrace();
    return "failed";
    }submit.jsp:
    This is Submit page
    <html><body>
    Hello
    Student Name: <%= ((co.SimpleBean)request.getAttribute("user")).getUserName() %>
    <br>
    Password: <%= ((co.SimpleBean)request.getAttribute("pass")).getPassword() %>
    <br>
    <jsp:useBean id="st" class="co.SimpleBean" scope="request" />
    <jsp:getProperty name="st" property="IssueData" />
    </body></html>web.xml:<web-app>
    <servlet>
    <servlet-name>one</servlet-name>
    <servlet-class>LoginServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>one</servlet-name>
    <url-pattern>/tmp</url-pattern>
    </servlet-mapping>
    <jsp-file>issue.jsp</jsp-file>
    <jsp-file>submit.jsp</jsp-file>
    <url-pattern>*.do</url-pattern>
    <welcome-file-list>
    <welcome-file>Login.html</welcome-file>
    </welcome-file-list>
    </web-app>Please Help me..Thanks.!!!
    --

    Dear Sir,
    Same issue is still persist. Input parameter are not store in database.
    After follow your suggestion when I run this program browser show that:i.e
    This is Submit page Hello Student Name: vijay
    Password: kumar
    <jsp:setProperty name="st" property="userName" value="userValue/> Your logging is saved in DB
    Please review my code.
    login.html:
    {code}<html>
    <head>
    <title>A simple JSP application</title>
    <head>
    <body>
    <form method="get" action="tmp" >
    Name: <input type="text" name="user">
    Password: <input type="password" name="pass">
    <input type="Submit" value="Submit">
    </form>
    </body>
    </html>{code}
    LoginServlet.java:
    {code}import javax.servlet.*;
    import javax.servlet.http.*;
    public class LoginServlet extends HttpServlet{
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException{
    try
    String userValue=request.getParameter("user");
    String passValue=request.getParameter("pass");
    co.SimpleBean st = new co.SimpleBean();
    st.setuserName(userValue);
    st.setpassword(passValue);
    request.setAttribute("userValue",st);
    request.setAttribute("passValue",st);
    RequestDispatcher dispatcher1 =request.getRequestDispatcher("submit.jsp");
    dispatcher1.forward(request,response);
    catch(Exception e)
    e.printStackTrace();
    }{code}
    SimpleBean.java:
    {code}package co;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.util.*;
    public class SimpleBean {
    private String userValue="";
    private String passValue="";
    private String s="";
    public String getuserName() {
    return userValue;
    public void setuserName(String userValue) {
    this.userValue = userValue;
    public String getpassword() {
    return passValue;
    public void setpassword(String passValue) {
    this.passValue= passValue ;
    public String getissueData() //method that create connection with database
    try
    System.out.println("Printed*************************************************************");
    getuserName();
    getpassword();
    Class.forName("oracle.jdbc.driver.OracleDriver");
    System.out.println("Connection loaded");
    Connection con=DriverManager.getConnection("jdbc:oracle:thin:@VijayKumar-PC:1521:XE","SYSTEM","SYSTEM");
    System.out.println("Connection created");
    PreparedStatement st=con.prepareStatement("insert into vij values(?,?)");
    System.out.println("~~~~~~~~~~~~~~~~~~~~");
    String userName=getuserName();
    st.setString(1,userName);
    String password=getpassword();
    st.setString(2,password);
    st.executeUpdate();
    System.out.println("Query Executed");
    con.close();
    s= "Your logging is saved in DB ";
    System.out.println("Your logging is saved in DB *****************");
    return(s);
    catch(Exception e)
    e.printStackTrace();
    return "failed";
    }{code}
    submit.jsp:
    {code}This is Submit page
    <html><body>
    Hello
    Student Name: <%= ((co.SimpleBean)request.getAttribute("userValue")).getuserName() %>
    <br>
    Password: <%= ((co.SimpleBean)request.getAttribute("passValue")).getpassword() %>
    <br>
    <jsp:useBean id="st" class="co.SimpleBean" scope="request" />
    <jsp:setProperty name="st" property="userName" value="userValue/>
    <jsp:setProperty name="st" property="password" value="passValue"/>
    <jsp:getProperty name="st" property="issueData" />
    </body></html>web.xml:<web-app>
    <servlet>
    <servlet-name>one</servlet-name>
    <servlet-class>LoginServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>one</servlet-name>
    <url-pattern>/tmp</url-pattern>
    </servlet-mapping>
    <jsp-file>submit.jsp</jsp-file>
    <url-pattern>*.do</url-pattern>
    <welcome-file-list>
    <welcome-file>Login.html</welcome-file>
    </welcome-file-list>
    </web-app>Sir I can't use EL code in jsp because I use weblogic 8.1 Application Server.This version are not supported to EL.
    Please help me...How store th input parameter in Database through Java Bean                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How Insert the input parameter to database through Java Bean

    Hello To All..
    I want to store the input parameter through Standard Action <jsp:useBean>.
    jsp:useBean call a property IssueData. this property exist in
    SimpleBean which create a connection from DB and insert the data.
    At run time when I click on submit button servlet and server also show that loggging are saved in DB.
    But when I open the table in Access. Its empty.
    Ms-Access have two fields- User, Pass both are text type.
    Please review these code:
    login.html:
    <html>
    <head>
    <title>A simple JSP application</title>
    <script language=javascript>
    function f(k)
    document.forms['frm'].mykey.value=k;
    document.forms['frm'].submit();
    </script>
    <head>
    <body>
    <form method="get" action="tmp" name="frm">
    Name: <input type="text" name="User">
    Password: <input type="password" name="Pass">
    <input type=hidden name="mykey" value="">
    <input type="button" value="Submit" onclick="f('submit.jsp')">
    <input type="button" value="Issue" onclick="f('issue.jsp')">
    </form>
    </body>
    </html>LoginServlet.java:import javax.servlet.*;
    import javax.servlet.http.*;
    public class LoginServlet extends HttpServlet{
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException{
    try
    String User=request.getParameter("User");
    String Pass=request.getParameter("Pass");
    co.SimpleBean st = new co.SimpleBean();
    st.setUser(User);
    st.setPass(Pass);
    request.setAttribute("User",st);
    request.setAttribute("Pass",st);
    RequestDispatcher dispatcher1 =request.getRequestDispatcher("/"+request.getParameter("mykey"));
    dispatcher1.forward(request,response);
    catch(Exception e)
    e.printStackTrace();
    }SimpleBean.java:package co;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.util.*;
    public class SimpleBean
    private String User="";
    private String Pass="";
    private String s="";
    public SimpleBean(){}
    public String getUser() {
    return User;
    public void setUser(String User) {
    this.User = User;
    public String getPass() {
    return Pass;
    public void setPass(String Pass) {
    this.Pass = Pass;
    public String getissueData() //method that create connection with database
    try
    System.out.println("Printed*************************************************************");
    getUser();
    getPass();
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Loading....");
    Connection con=DriverManager.getConnection("jdbc:odbc:simple");
    System.out.println("Connected....");
    PreparedStatement st=con.prepareStatement("insert into Table1 values(?,?)");
    System.out.println("~~~~~~~~~~~~~~~~~~~~");
    String User=getUser();
    st.setString(1,User);
    String Pass=getPass();
    st.setString(2,Pass);
    int y= st.executeUpdate();
    System.out.println(y);
    System.out.println("Query Executed");
    con.commit();
    con.close();
    s=  "Your logging is saved in DB ";
    System.out.println("Your logging is saved in DB *****************");
    return this.s;
    catch(Exception e)
    e.printStackTrace();
    return "failed";
    }submit.jsp:
    This is Submit page
    <html><body>
    Hello
    Student Name: <%= ((co.SimpleBean)request.getAttribute("User")).getUser() %>
    <br>
    Password: <%= ((co.SimpleBean)request.getAttribute("Pass")).getPass() %>
    <br>
    <jsp:useBean id="st" class="co.SimpleBean" scope="request"/>
    <jsp:setProperty name="st" property="User" value="request.getParamaeter("Pass")"/>
            <jsp:setProperty name="st" property="Pass" value="request.getParamaeter("Pass")"/>
       <jsp:getProperty name="st" property="issueData"/>
    <% st.getissueData(); %>
    </body></html>web.xml:<web-app>
    <servlet>
    <servlet-name>one</servlet-name>
    <servlet-class>LoginServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>one</servlet-name>
    <url-pattern>/tmp</url-pattern>
    </servlet-mapping>
    <jsp-file>issue.jsp</jsp-file>
    <jsp-file>submit.jsp</jsp-file>
    <url-pattern>*.do</url-pattern>
    <welcome-file-list>
    <welcome-file>Login.html</welcome-file>
    </welcome-file-list>
    </web-app>Please Help me..

    Dear Sir,
    Accordingly your suggestion I check the SimpleBean class putting the constant values in this bean class.That is Sucessfully Inserted constant values in database.
    Like for example..
    myfirstjavabean.java:
    package myfirstjava;
    import java.io.*;
    import java.sql.*;
    public class myfirstjavabean
    private String firstMsg="Hello world";
    private String s="";
    public myfirstjavabean()
    public String getfirstMsg()
    return firstMsg;
    public void setfirstMsg(String firstMsg)
    this.firstMsg=firstMsg;
    public String getissueData() //method that create connection with database
    try
    System.out.println("Printed*************************************************************");
    getfirstMsg();
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Loading....");
    Connection con=DriverManager.getConnection("jdbc:odbc:sampleMsg");
    System.out.println("Connected....");
    PreparedStatement st=con.prepareStatement("insert into Table1 values(?)");
    System.out.println("~~~~~~~~~~~~~~~~~~~~");
    String Msg=getfirstMsg();
    st.setString(1,Msg);
    int y= st.executeUpdate();
    System.out.println(y);
    System.out.println("Query Executed");
    con.commit();
    con.close();
    s=  "Your logging is saved in DB ";
    System.out.println("Your logging is saved in DB *****************");
    return this.s;
    catch(Exception e)
    e.printStackTrace();
    return "failed";
    }Vij.jsp:
    <html>
    <body>
    <jsp:useBean id="st" class="myfirstjava.myfirstjavabean" scope="request" />
    <jsp:getProperty name="st" property="firstMsg" />
    <jsp:getProperty name="st" property="issueData" />
    </body>
    </html>These above example sucessfully inserted the Hello World message in database.
    But which value I put user input at run time Its not inserted in database.
    Which is my previous problem that is persist.
    Please Help..

  • How change the Date parameter based on server date

    Hi,
    We are using Query browser to connect to Bex Query.In BEx Query we have a date prompt which is mandatory.So by using Query prompt selector the dashboard has been created.But in our scenario the date has to be picked up from current system date/Server date and it has to change automatically when ever the dashboard has been opened.How to achieve this.
    Regards,
    Venkat

    Using the query prompt selector, the date will be listed in the drop down box. Here you can see only the date available in the server. Use the "Insert selected items" option you can pass the current date using =today() function.
    But the pain behind using the query prompt selector on date you have scroll a lot to search for a specific date, on this case i would suggest you to take the calender component to trigger the query. You have the same flexibility to pass the current date in this component.

  • How get the dynamic parameter values

    <p>Hi everyone. <br /><br />I have made an application to show the Crystal Report . Because the input interface is not very good, so I write an interface by myself. Now this funcation can show all static parameters. But I have some troubles with the dynamic parameters.  How to get the values of the dynamic parameters?</p><p>By the way, if I add a dynamic parameters , it will show the dadabase logon window twice. How to add the logon infomations for dynamic parameters using .net?</p><p>My develop entironment is : Crystal Report XI, RAS XI, Visual Studio 2003 c#.</p>

    See note number 1412611 in the notes database:
    https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true
    Ludek

  • How show the Extractor's Sap query

    Hi masters,
    I have a custom extractor in R/3 created with SAP Query method.
    By RSA2, if I try to double click on Extractor name it does not succeed nothing!
    How can I see the Sap Query created behind The Extractor?
    Thanks so much!

    Hi Martina,
    if you want see the infoset in the extractor use sq02.
    Bye

  • How does the width parameter in the peak detector work?

    I would like to know how the window slides. For example if i take a width of 3. My first window is from 1 to 3. My next window will slide from 4 to 6 or from 2 to 4.
    Thank you.

    Madhuri,
    Please Refer to NI Article at http://zone.ni.com/devzone/conceptd.nsf/webmain/55181A206A523FD186256ABE00626EA9?opendocument
    I have Used Peak Detetor in the past. One thing is the width function works on sets of Points.
    It Performs a Least Squares Fit based on points you provide then extracts the quadratic Polynomial then checks this polynomial for Peaks using Parabolic Concavity.
    I can be at best vague on how it does this. But my experience shows that you have to play with the width no to kind of optimize the peak detection for your dataset
    If you can find additional information please post it here for others..
    Good Luck
    Mache
    Good Luck!
    Mache

  • How is the Method Parameter Identified in this Code Snippet ?

    package methods;
    public class Me10 {
         public static void main(String[] args) {
              short y=6;
              long z=7;
              go(y);
              go(z);
         public static void go(Short s)
              System.out.println("SHORT");
         public static void go(Long l)
              System.out.println("LONG");
         public static void go(int i)
              System.out.println("INT");
    O/P :
    INT
    LONGEven when y is declared as short why does the INT method get called ?
    What can we do so that when i pass y , short method will be called ?
    Thabks in Advance.

    as far as I understand, method parameters are identified per JLS section 15.12.2 'Determine Method Signature':
    "...This step uses the name of the method and the types of the argument expressions to locate methods that are both _accessible_ and applicable, that is, declarations that can be correctly invoked on the given arguments. There may be more than one such method, in which case the _most specific_ one is chosen. The descriptor (signature plus return type) of the most specific method is one used at run time to perform the method dispatch...
    ...The informal intuition is that one method is more specific than another if any invocation handled by the first method could be passed on to the other one without a compile-time type error..." [...click here to continue reading if you're interested|http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.12.2|JLS 15.12.2 'Determine Method Signature']
    As for calling 'Short' method for 'y' value, I'd probably use something like go(new Short(y))

  • Parameter Effectivity and BAPI_NETWORK_COMP_ADD

    Any suggestions on how to set/pass parameter effectivity data when adding a component using BAPI_NETWORK_COMP_ADD?

    Hi,
    It's really interesting. The field you are referring to has a unique data element and domain. They are not being used anywhere else. Also, Field is not getting validated again in this FM. What I would suggest is
    If the networks earlier created were created using a BAPI in a program, you could use the field in this also.
    Else, based on your requirement you have to choose the value. For ex, If thro' WBS use '08'.
    Sujay

  • How can i remove paramter form at runtime of report through PSP

    I am working on PSP (PL/SQL Server pages) with html code. I made some reports through report builder (rdf files). I pass variables into report parameter through PSP and I call the reports through this code
    OWA_UTIL.redirect_url (
    p_report_url
    || '?runp=&report=WEB_BOOK_LOCATION.rdf&destype=cache&desformat=htmlcss&server=rep60_kmas&userid='
    || p_usrcon||'&p_inst_id='||p_inst_id
    but I dont want parameter form on runtime . I know the code which is used only in developer forms , this is
    add_parameter (pl_id, 'PARAMFORM', text_parameter, 'NO');
    How can I remove parameter form on runtime from PSP.
    Thanks and regards
    --Anwar

    Would adding &paramform=NO to the call solve the problem?
    I am working on PSP (PL/SQL Server pages) with html code. I made some reports through report builder (rdf files). I pass variables into report parameter through PSP and I call the reports through this code
    OWA_UTIL.redirect_url (
    p_report_url
    || '?runp=&report=WEB_BOOK_LOCATION.rdf&destype=cache&desformat=htmlcss&server=rep60_kmas&userid='
    || p_usrcon||'&p_inst_id='||p_inst_id
    but I dont want parameter form on runtime . I know the code which is used only in developer forms , this is
    add_parameter (pl_id, 'PARAMFORM', text_parameter, 'NO');
    How can I remove parameter form on runtime from PSP.
    Thanks and regards
    --Anwar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             

  • How To change the ADF View Object  query where-clause at RunTime?

    I am trying to create a simple display page which will display user data (username, assoc_dist_id, assoc_agent_id, status , etc). The User data is stored in a database table and i am using an ADF Read Only table based on the View Object to display the data on the JSF page.
    However, i want to display only the users that a particular person accessing the page has the AUTH LEVEL to see. e.g. If the person accessing the page is an 'ApplicationAdministrator' then the page should display all users in the table, If its a 'DistributorAdministrator' then the page should display only users associated with that Distributor (i.e. assoc_dist_id = :p_Dist_id ) and If its an 'AgentAdministrator' , then the page should display only users associated with that Agent ( i.e. assoc_agent_id = :p_Agent_id).
    Currently my af:table component displays all the users in the table because the query for the view object is (select * from users) . However, i want to use the same viewobject and just set the where-clause at runtime with the appropriate parameter to restrict the dataset returned.
    Do anyone knows how to accomplish this ?

    David,
    See the custom method initializeDynamicVariableDefaults() in the SRViewObjectImpl.java class in the FrameworkExtentions project in the SRDemoSampleADFBC sample application. You can find out how to install the demo if you haven't already from the ADF Learning Center at:
    http://www.oracle.com/technology/products/adf/learnadf.html
    This class is a framework extension class for view objects that adds a neat, generic feature to be able to dynamic default the value of named bind variables. You can read more about what framework extension classes are and how to use them in Chapter 25, "Advanced Business Components Techniques" of the ADF Developer's Guide for Forms/4GL Developers, also available at the learning center above.
    It is an example of generic framework functionality that "kicks in" based on the presence of custom metadata properties on a named bind variable. See section 25.3.3 "Implementing Generic Functionality Driven by Custom Properties" in the dev guide for more details. Using this sample code, if you add a bind variable to a view object, and define a custom metadata property named "DynamicDefaultValue" on that bind variable, and set this custom metadata property to the value "CurrentUser", then that bind variable will have its value dynamically defaulted to the name of the authenticated user logged in. If instead you set this custom property to the value "UserRole", then the bind variable will be set to the comma-separated string containing the list of roles that the authenticated user is part of.
    Once you've created a framework extension class for view objects like this, you can have the view objects you create inherit this generic functionality.See section 25.1.4 "How to Base an ADF Component on a Framework Extension Class" in the dev guide for more info on this.
    By adapting a technique like this (or some idea similar that better suits your needs) you can have your view object query contain bind variables whose values automatically take on the defaults based on something in the user-session environment.

  • How tochange the description ofa field inthe parameter form query generator

    I have a parameter form which is fetching the details from the Location table.
    /* Select From [OLCT] T4 */
    Declare @ToLoc Varchar(300)
    /Where/
    Set @ToLoc = /* T4.Location*/ '[%4]'
    when i execute the parameter form Query selection criteria displayed is
    Name
    OLCT table the description of the field location is Name i want to change the description to location
    Please Help

    Thanks for the reply , It does not help.
    If meant the selection box when I run query to input values
    for example
    /* Select From [OINV] T1 */
    Declare @FromDate Datetime
    /Where/
    Set @FromDate = /* T1.DocDate*/ '[%1]'
    /* Select From [OINV] T2 */
    Declare @ToDate Datetime
    /Where/
    Set @ToDate = /* T2.DocDate*/ '[%2]'
    /* Select From [OLCT] T3 */
    Declare @FromLoc Varchar(300)
    /Where/
    Set @FromLoc = /* T3.Location*/ '[%3]'
    /* Select From [OLCT] T4 */
    Declare @ToLoc Varchar(300)
    /Where/
    Set @ToLoc = /* T4.Location*/ '[%4]'
    /* Select From [OLCT] T5 */
    Declare @Country Varchar(300)
    /Where/
    Set @Country = /* T5.Country*/ '[%5]'
    /* Select From [OLCT] T6 */
    Declare @State Varchar(300)
    /Where/
    Set @State = /* T6.state*/ '[%6]'
    Exec [SAP_SP_DB]..[NABC_TaxReport] 'SAP2007B','Inflow',@FromDate,@ToDate,@FromLoc,@ToLoc,@country,@state
    In the above query I have from and To Location which displays as Name in the selection box

  • How to set the table input in Query template?

    Hi all.
    I need to call a Bapi_objcl_change, with import parameter and a table as an input. I have done this, in BLS. I have set the table input in the
    form of xml. In BLS, I get the output(the value gets change in SAP R3, what i have given in BLS).  But if i set the same xml structure  in
    query template, I didn't get the output. Table input parameter does not take that xml source.  How to set the table input in Query template?
    can anyone help me?
    Regards,
    Hemalatha

    Hema,
    You probably need to XML encode the data so that it will pass properly and then xmldecode() it to set the BAPI input value.
    Sam

  • How to use the same column value in the casecadeing parameter in ssrs report?

    Hi frnz,
    I have a table site contains one filed SiteCode
    Now i have fields like below using the below quries 
    SThe above are the two results sets coming from the single table ,now i will use these two results /Query in my ssrs Casecade report
    1.First result set/Query will use for the first dataset and use these values in the paramet1 selection as PrimaryCodes
    2.Second result set/Query will use for the second Dataset and use these values in the parameter2 as SecondayCodes
    3.Using these two datsets and create a Casecadeing paramet in ssrs report.
    4.so using this information how can i create the Casecade report ,I have tried different ways but i didnt get the soluction
    I have done the follw but ididnt get the o/p.
    I have created two parameter and mapped to the results but while paramter selection i will able to see only the first paramet(PrimaryCodes) ,and i will not see the second paramter(SecondaryCodes) it could not show me the second paramter values in the drop
    down list.
    Note:Here i will use the Single Table to get the all the sitecodes 
    Can some one please help me out for this report.
    Thanks.

    Hi,
    Try below links for your reference:
    http://blogs.msdn.com/b/sqlforum/archive/2011/05/26/ssrs-cascading-parameter-with-optional-select-all-in-sql-reporting-services-report.aspx
    http://msdn.microsoft.com/en-us/library/dd255197.aspx
    http://blogs.msdn.com/b/psssql/archive/2010/01/29/how-to-have-a-select-all-multi-value-cascading-parameter.aspx
    sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

Maybe you are looking for

  • STATUS_READ & line item rejection reason - too complex

    Hi All,   I have to trigger an output to a smartform via an output routine. I have to do the following checks in my output routine before I decide to propose the output or decline to propose the output if conditions fail. 1. Order header can have sta

  • Blackberry Link - accessing backed up contacts

    I already backed up my BlackBerry before, how can I actually see all the contacts on my computer from the back up?

  • Webi report data aggregation problem

    Hi Gurus, I have a problem when running webi report upon BI query. In infoview, report shows as below, Material          Plant             Sales A                        001               100 A                        002               100 B          

  • Why was my Backup Deleted after installing 5.0.1?

    I was prompted to install 5.0.1. I decided to backup my ipod before the Update. There is logs for the backup but there is now no backup on my computer pre-5.0.1.

  • Changing Infinity connection (installation) to a d...

    My modem/router has a wired connection (initial setup/installation) to a desktop computer which had a CD drive but I am now planning to sell that computer and switch the main connection to a laptop. All other devices are connected to the internet wir