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..

Similar Messages

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Request parameter are not stored in database through Java Bean

    Hi,
    I want to store the request parameter in database through Java Bean.Allthough program are properly run but value are not store in DB.
    Here My code:
    Login.html:<html>
    <head>
    <title>A simple JSP application</title>
    <head>
    <body>
    <form method="get" action="submit.jsp" >
    Name: <input type="text" name="User">
    Password: <input type="password" name="Pass">
    <input type="Submit" value="Submit">
    </form>
    </body>
    </html>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 implements java.io.Serializable{
    private String User="";
    private String Pass="";
    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 void show()
         try
    System.out.println("Printed*************************************************************");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Loading....");
    Connection con=DriverManager.getConnection("jdbc:odbc:Ex11dump");
    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();
    System.out.println("Your logging is saved in DB *****************");
    catch(Exception e)
    e.printStackTrace();
    }submit.jsp:
    <jsp:useBean id="obj" class="co.SimpleBean"/>
    <jsp:setProperty name="obj" property="*" />
    <jsp:getProperty name="obj" property="User" /> <br>
    <jsp:getProperty name="obj" property="Pass" /> <br>
    <% obj.show();%>
    <%
    out.println("Ur data is saved in DB");
    %>Please Help me.
    Thanks.

    The issue is in the naming of your fields.
    Change User -> user and Pass->pass
    Name: <input type="text" name="user">
    Password: <input type="password" name="pass">

  • How to pass input parameter (parameterized mapping) to java mapping program

    Hello
    I have a question about the parameterized mapping with Java (PI 7.1).
    In the operation mapping (using Java-class) I defined a inputer parameter (string). I think I am supposed to retrieved the value using:
                    arg0.getInputParameters().getString("myInputParameterName");
    where arg0 is the TransformationInput object.
    However I am not able to get the value, I got runtime exception saying the inputer parameter doesn't exit.
    Then I figured out maybe I need to bind the OM input parameter to Java mapping parameter, just like in case of message mapping, you need to bind OM parameter to MM parameter. However there is no way to define input parameter for the java mapping program.
    Anybody has done java mapping with parameterized mapping?
    Anybody can give any hint for this?
    Thanks
    Jayson

    InputParameters params = container.getInputParameters();
    DynamicConfiguration conf = (DynamicConfiguration) params.getValue(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");
    http://help.sap.com/saphelp_nwpi71/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
    Edited by: Anand on Dec 10, 2008 4:13 PM

  • How to give input parameter to Bapi when executing a method.

    Hi All,
    I have 1 input field and 1 button.I've defined a model node and inside that model attribute in my view.If I enter something in the Input field the value should go to the particular model attribute I defined.How to pass that input parameter.I have a action like this....
    public void onActionGetDateDetails(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionGetDateDetails(ServerEvent)
        wdThis.wdGetGetDateDetailsCustController().execute_Bapi_Get_Date_Details("");
    // while executing the above method I have to pass the input parameter typed in the input field.
    Structure of my context :
    Bapi_Date_Details
    >Network List(Model Node)
                                          |
                                          -->Network (Model Attribute)
         //@@end
    Help me to solve this.
    Thankx in advance.
    Regards,
    Karthick.K.E

    Hi Karthick,
    You can associate an input field's value to a BAPI in two ways:
    1) binding the input UI element's 'value' directly to the BAPI's input attribute that you want to set. This is the methos Noufal suggested. In this method, make sure you initialize the attribute through the following lines of code in the doInit() method, else, the input field will be disabled.
    <b><Bapi_name>Input input = new <Bapi_name>Input();
    input.set<Attribute_name>(new <dataType>);</b>
    2) The second method is settting the input's 'value' to some other attribute(say 'abc') and giving this value to the input parameter just before calling the RFC.
    input.set<Attribute_name>(wdContext.currentContextElement.getAbc());
    Hope this helps,
    Best Regards,
    Nibu

  • Dynamic structure creating based on the input parameter

    Hi all,
                 How to create a dynamic structure based on the input parameter given in the selection screen. I have a file path given and it contains three fields in common, but after that depending upon the input given the fields get changed. For example, i have 0002 infotype given in the selection screen, my file path structure should contain pernr begda endda and PS0002 structure, if the infotype is changed the PS structure has to be changed dynamcially.
    Thank you,
    Usha.

    Ans

  • Trying to get the input parameter of a web service fxn based on table value

    Hello--
    I am new to ADF and Jdev 11g (I am a forms developer). I had created a web service from a pl/sql stored db package. I can successfully execute a function with an input parameter from ADF Faces.
    Instead of the input parameter being enterable by the user, I would like it to be based on a selected ADF table column value. How would I correlate the selected row column value as the function input parameter?
    I played with an ADF output text based on the ADF table column with the PartialTriggers value set to the ADF table...which updates the output text based on the column selected. Do I use some sort of partial trigger on the input parameter?
    From a forms point of view, I am looking for the "Copy Value from Item" property :)

    Hi,
    Not sure if this would help you.
    But if your table is bound to a ViewObject, it will be easier to get the current selection.
    Supose your table is bound to iterator1.
    In your backBean code:
    DCBindingContainer dcBindings = (DCBindingContainer)getBindings();
    DCIteratorBinding iterator =dcBindings.findIteratorBinding("iterator1");
    Row row = iterator.getCurrentRow();
    Object selectedValue = row.getAttarbute(<value of the column you are looking for>);
    public BindingContainer getBindings() throws Exception {
    try {
    if (this.bindings == null) {
    FacesContext fc = FacesContext.getCurrentInstance();
    this.bindings =
    (BindingContainer)fc.getApplication().evaluateExpressionGet(fc,
    "#{bindings}",
    BindingContainer.class);
    return this.bindings;
    } catch (Exception ex) {
    displayMessage("Error occurred. Please contact your IT Adminstrator.");
    return this.bindings;
    Let me know if this helps.
    -Makrand

  • How to create an Oracle DATABASE through Java Programming Language.. ?

    How to create an Oracle DATABASE through Java Programming Language.. ?

    Oracle database administrators tend to be control freaks, especially in financial institutions where security is paramount.
    In general, they will supply you with a database, but require you to supply all the DDL scripts to create tables, indexes, views etc.
    So a certain amount of manual installation will always be required.
    Typically you would supply the SQL scripts, and a detailled installation document too.
    regards,
    Owen

  • How we can create Oracle 9i Database through Commands.

    How we can create Oracle 9i Database through Commands.
    We need step by step process and all the scripts.

    CREATE DATABASE
    Caution:
    This statement prepares a database for initial use and erases any data currently in the specified files. Use this statement only when you understand its ramifications.
    Note Regarding Security Enhancements:
    In this release of Oracle and in subsequent releases, several enhancements are being made to ensure the security of default database user accounts.
    To provide guidance for configuring Oracle9i in a secure manner, Oracle Corporation provides a security checklist. Oracle Corporation recommends that you read this checklist and configure your database accordingly. The security checklist can be found at the following URL:
    http://otn.oracle.com/deploy/security/oracle9i/pdf/9iR2_checklist.pdf
    Examples
    Creating a Database: Example
    The following statement creates a database and fully specifies each argument:
    CREATE DATABASE sample
    CONTROLFILE REUSE
    LOGFILE
    GROUP 1 ('diskx:log1.log', 'disky:log1.log') SIZE 50K,
    GROUP 2 ('diskx:log2.log', 'disky:log2.log') SIZE 50K
    MAXLOGFILES 5
    MAXLOGHISTORY 100
    MAXDATAFILES 10
    MAXINSTANCES 2
    ARCHIVELOG
    CHARACTER SET AL32UTF8
    NATIONAL CHARACTER SET AL16UTF16
    DATAFILE
    'disk1:df1.dbf' AUTOEXTEND ON,
    'disk2:df2.dbf' AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
    DEFAULT TEMPORARY TABLESPACE temp_ts
    UNDO TABLESPACE undo_ts
    SET TIME_ZONE = '+02:00';
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_55a.htm#SQLRF01204
    Joel P�rez

  • Change the input parameter in Check Status screen

    Hi,
    I have a requirment to change the input parameter option in the check status screen. Currently when we search the SC using the date and staus from the extended search it picks the SC created date and displays the SC, my requirement is to make the date as the approved date insted of SC created date with the status as aprpoved.
    Please suggest if this is possible with the help of any Badi.
    Regards
    GGL

    I managed to find the solution myself. If anyone is interested, just follow those steps here:
    http://apple.stackexchange.com/questions/44913/make-a-custom-keyboard-layout-the -system-default-even-for-the-login-screen
    (terminal skills required tho)

  • 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

  • Method to Get the INPUT parameter CONTENT byte length

    method to get the INPUT parameter CONTENT byte length

    Dear "clown of forums",
    Please read the forum rules and ask understandable questions -> one thread per properly formulated question after having searched.
    Thread locked.

  • How to pass Cascading Parameter in SSRS using Java

    How to pass Cascading Parameter in SSRS using Java---
    We are having a problem with dependent parameters.There are three drop down--
    1.first dropdown is of Country.When we select a country--Accordingly next dropdown(State)will populate
    2.Second dropdown is of State. When we select a state--Accordingly next dropdown(City)will populate.
    I have three data sources are
    CountryList-
    SELECT CountryRegionCode, Name
    FROM Person.CountryRegion
    ORDER BY Name
    StateList
    SELECT StateProvinceID, StateProvinceCode, CountryRegionCode
    FROM Person.StateProvince
    WHERE CountryRegionCode = @CountryRegionCode
    ORDER BY StateProvinceCode
    CityList
    SELECT StateProvinceID, City
    FROM Person.Address
    GROUP BY StateProvinceID, City
    HAVING (StateProvinceID = @StateProvinceID)
    ORDER BY City
    Ihave to show report that has been deployed on server on the besis of these parameters
    I am using ReportViewer in JSP Page through url--
    http://192.168.90.149/ReportServer/Pages/ReportViewer.aspx?%2fReport+Project1%2fCascading_Parameters&rs:Command=Render&rs:parameter=true&Country="+Country+"&State="+State;
    But it is not accepting parameter if they are cascaded.It is working fine if Both parameters are independent.
    Edited by: kaushlee on May 11, 2010 9:22 PM

    Take a look at set_custom_property:
    public static final ID SETTEXT = ID.registerProperty("SETTEXT");
    public boolean setProperty(ID pid, Object value)
        if (pid == SETTEXT)
    String text = value.toString();
    and in forms
    set_custom_property('beans.bean_item', 1, 'SETTEXT', 'some text');
    cheers

  • How can I compact a MSAccess database with java?

    Hi.
    I have a question (Please Help!!!):
    How can I compact a MSAccess database with java-jdbc? Is it posible?
    Thanks

    MS Access database has a max length limitation of 2.14GB for Access 2000( 1.07G for Access 97), and won't recycle basically space for update/delete sql so tha it's a good idea to use MS Access database for program, which need update/delete frequent ly data. The programmers of HXTT Access(www.hxtt.net) are writing code for CREATE TABLE/DATABASE sql now. If you need a pure Java solution for PACK TABLE/DATABSE urgently in your project, you should send such a requirement to the Support page of www.hxtt.net so that they can schedule complementing such a fucntion. Otherwise, you should pack your databae manually or visit C++ code for Compact an Access Database Programmatically at
    http://www.codeguru.com/Cpp/data/mfc_database/microsoftaccess/article.php/c4327/ , or use Easy Microsoft Access MDB MDE Compactor at http://www.easyhr.com.au/software/easy_mdb_mde_compactor.htm.

  • How can i send and recieve mail through java

    HI All,
    plz let me know how can i send and receive mail through java.
    Regards:
    sachin kakkar
    http://www.datamansoftwares.com

    Using java mail API..
    try to search the forum for java mail... you find many question and answer.
    use the left search textfield

Maybe you are looking for