MS SQL JDBC iView

Hello,
   I have the following problem. I am trying to connect to the database (MS SQL). I am following all the steps described in EP eLearning, using user mapping to login - it does not work. The error message is
   "        Failed to lookup null in Initial Context #"
   I tried to enter credentials using "Personalize", the same problem. Using, Admin user ID, Admin Password, but it says login failed for my user.
    Here are my parameters:
               User Mapping Type  = admin, type
               Connection URL     =
   jdbc:sap:sqlserver://207.203.236.136:1433;databaseName=carlos"
               Driver Class Name =
  "com.sap.portals.jdbc.sqlserver.SQLServerDriver"
   And in the end, when trying to create new iView, I receive a message:
     "Could not connect to the back-end application..."
              Can somebody help me with this message?

Hi,
These are the steps I have followed for connecting  JDBC iViews.
1. Create a JDBC system for the sqlserver in the portal. In the properties sheet provide the following values:
Connection String : jdbc:sap:sqlserver://<hostname>:1433;databaseName=<dbname>
driver : com.sap.portals.jdbc.sqlserver.SQLServerDriver
2. Create a system alias for the system.
3. In the user management part of the iView, configure it for admin or admin,user
4. Remember do perform the usermapping settings for this system in personalisation option.
Hope this helps.
Shankar

Similar Messages

  • EP 6.0 SP2 JDBC iView and Oracle Database

    Hi,
    I created Oracle system in Portal.
    Then I creted JDBC iView for the system.
    But iView always display the error:
    "No response from the backend application".
    And from portal log:
    "CGT exception: java.lang.RuntimeException: bad execution, SQL Exception:[SAP_Portals][Oracle JDBC Driver][Oracle]ORA-00904: invalid column name"
    Can anybody help me?
    Thanks.

    Dear Aviad,
    Thnx a lot for your guidance, Incidentally we found the problem. For some reason the Portal was not able to resolve the ip address 132.12.33.30, but was able to resolve the host name "newspd".
    This is the final url we created :
    jdbc:sap:oracle://newspd:1521;SID=SALES
    I'm able to create the iviews with the JDBC connection now, but the look is not so great, as there are a couple of problems :
    1. The iview's table output has the raw column names showing as column titles. Atleast in SP2 there is no way to create a alternate column name. Ex: the table row name is say "amt_1", the column name in the iview also shows as "AMT_1". Is there a alternative for this problem ??
    2. For passing parameters, the iview allows for only static parameters, but is there a way I can create a dynamic parameter allocation. Ex: In the query parameters I have a employee number as a included column, but I wish to show only his records to him, but in the portal environment, we havent a way to find the logged on employee ? Is there a way we can do that ??
    Hope you'll be able to help.
    Regards,
    Neeraj S

  • How to Change the Visible names in JDBC IView ?

    While Creating a JDBC View, in one of the steps we select the column names from a schema which we want to view in a IView.While doing so in the next step there is a text field called <b>visible names</b> which is editable to change the column names.How to change the Column aliases or visibles names as is it not getting saved when we move onto the next screen ?.How to Configure the Visible Column names while configuring a JDBC IView ?.
    Can anybody please help me !.

    Hi Abhilash
    If I'm not wrong I saw something about this here (SDN), in a technical article about how to create a JDBC iView . I tried to get the link to the article but it seems there's a problem with the site, sorry...
    By the way, I had the same problem, and according to the   article this was not possible in the version EP6 SP2 but there was a plan to implement this in newer versions. I tried also to use a SQL command with the column names I wish to display but it didn't work either.
    Try to find this article in the EP Technical Article to confirm this info, ok ?
    Rgds,
    Fernando

  • How to use a cofigured JDBC iView?

    Hello,
    I ghave configured an iView which implements a JDBC connection to my SQLServer, let's call it "myJDBC".
    Can someone please show me a simple code example
    (including relevant descriptors)of another iView which uses the JDBC iView in order to Query the Database and display the results?

    Hi,
    I assume by JDBC iView you mean that you have created a system that points to a database. <i>Not</i> JDBC iView as if you had created one of these you would already be able to configure the output at the time of the iView creation.
    What Praveen has said is correct one way is to do a custom development using JSP. (He makes it sound easy!).
    There are a number of options using the standard iViews provided out of the box rather than getting into java code.
    There are two types that are quite basic but easily configurable.
    They are JDBC Stored Procedure iView & Query iView.
    The stored procedure iView obviously requires a stored procedure on the database that provides a response.
    The iView creation wizard will enable you to be able to browse and select your stored procedure and for the query iView you should be able to select the tables etc and organise there output inside the wizard.
    If you have difficulty when creating these iViews check you configured the system correctly so make sure you follow the steps of:
    Create Alias on the system and Test connection
    Provided usrpwd details to DQE on the system.
    Configured your user mapping to the Alias using the personalize option on the portal header.
    Once you have this all working you might like to look at a bigger challenge and get unification iViews working...
    See Weblog :
    1-2-3 Drag&Relate (or D&R for dummies)

  • How to use JDBC iView to get data from MSSQL

    Hi Guru,
    I just try to follow the Demo (from SDN) to use JDBC iView. In the step of selecting query or existing function, I choose the query option to broswer the table. But the system is not display any tables. It just keep on displaying 'Loading ...'. Is there anything wrong with that?
    Thanks for your help,
    Bo

    Hi Bo,
    I got the same problem with your, do you know how to fix the problem?
    Thanks,
    Ku

  • Drag&Relate JDBC iViews

    I have 2 tables in Oracle DB called Employee and Department which are linked by Foreign Key relationship of DeptNo. Can i create JDBC iViews such that if I drag DeptNo. column from Department iView into Employee iView, it displays me all employees working for that department.

    Hi
    you can do this in two ways.
    1) Use the Unification platform.
    2) Create simply iViews and create a Drag and Drop target
    Using method number 1 you can create as many iviews based on as many different tables within many different databases. However, there is additional costs involved in using this software (check your licensing agreement).
    The other method would be to simply have the two iViews that you have developed using the Drag and Drop targets. This way you can simply drag a particular column or columns onto another iView. The target iView can then retrieve these values as they will then be parameters to the iView. You can then execute the second query using these values. Hey presto you have you drag and drop iViews. This is NOT Drag and Relate as the query is defined within your own code and has nothing to do with the actual foreign key relationships, so therefore you can be very constructive with the queries
    I hope this helps
    D

  • EP 6.0 SP4 JDBC iview for Oracle Database

    Hi,
    I have created an Oracle system in Portal. Specified the user mapping as admin,user.
    Using this system created a JDBC iview. In the step of selecting query or existing function, i selected the query option to browse the tables. But its not displaying any tables. It just keep on displaying "Loading...".
    But when i select Existing function,in the next step i am getting the list of functions.
    can anyone help me in getting the list of tables from database in the iview?
    Thanks,
    Mital

    Dear Aviad,
    Thnx a lot for your guidance, Incidentally we found the problem. For some reason the Portal was not able to resolve the ip address 132.12.33.30, but was able to resolve the host name "newspd".
    This is the final url we created :
    jdbc:sap:oracle://newspd:1521;SID=SALES
    I'm able to create the iviews with the JDBC connection now, but the look is not so great, as there are a couple of problems :
    1. The iview's table output has the raw column names showing as column titles. Atleast in SP2 there is no way to create a alternate column name. Ex: the table row name is say "amt_1", the column name in the iview also shows as "AMT_1". Is there a alternative for this problem ??
    2. For passing parameters, the iview allows for only static parameters, but is there a way I can create a dynamic parameter allocation. Ex: In the query parameters I have a employee number as a included column, but I wish to show only his records to him, but in the portal environment, we havent a way to find the logged on employee ? Is there a way we can do that ??
    Hope you'll be able to help.
    Regards,
    Neeraj S

  • Problems with Class.forName("com.sun.sql.jdbc.db2.DB2Driver")

    In sun java studio enterprise 8
    I'm able to connect to my local DB2 sample database by creating a database schema.
    But when I try to execute a java class (main) using
    Class.forName("com.sun.sql.jdbc.db2.DB2Driver"). It returns a not found condition.
    what am I doing wrong? do I have to point the classpath to some directory?

    try to add jar containing driver to
    Your project -> Properties -> Libraries -> Run list.

  • Problems with Pl/Sql JDBC

    Hello all ,
    I have the following pl/sql function
    FUNCTION NEW RETURNS NUMBER(38)
    Argument Name Type In/Out Default?
    NAME VARCHAR2 IN
    PARENT_ID NUMBER(38) IN DEFAULT
    ITEM_ID NUMBER(38) IN DEFAULT
    LOCALE VARCHAR2 IN DEFAULT
    CREATION_DATE DATE IN DEFAULT
    CREATION_USER NUMBER(38) IN DEFAULT
    CONTEXT_ID NUMBER(38) IN DEFAULT
    CREATION_IP VARCHAR2 IN DEFAULT
    ITEM_SUBTYPE VARCHAR2 IN DEFAULT
    CONTENT_TYPE VARCHAR2 IN DEFAULT
    TITLE VARCHAR2 IN DEFAULT
    DESCRIPTION VARCHAR2 IN DEFAULT
    MIME_TYPE VARCHAR2 IN DEFAULT
    NLS_LANGUAGE VARCHAR2 IN DEFAULT
    TEXT VARCHAR2 IN DEFAULT
    DATA BLOB IN DEFAULT
    RELATION_TAG VARCHAR2 IN DEFAULT
    IS_LIVE CHAR IN DEFAULT
    Now when i want to trigger this function i use the following code in
    sqlplus
    SQL> variable answer number;
    SQL> execute :answer := content_item.new (name => 'k',title => 'k is here', parent_id => 982, description => 'yahoo', content_type => 'wg_tv_program', is_live => 'Y', creation_user => 44, creation_ip => '222' );
    As you can see i don't use all argument names . And this works fine
    But to do this through jdbc i have the following code
    CallableStatement cs = con.prepareCall("{ ? = call content_item.new(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?) } ");
    cs.registerOutParameter(1, java.sql.Types.INTEGER);
    cs.setString(2,"k"); //name
    cs.setInt(3, 982); //parent_id
    cs.setInt(4,0); //item_id ??
    cs.setString(5,"mm"); //locale
    cs.setDate(6,null); // Creation_date
    cs.setInt(7,44); //Creation User
    cs.setInt(8,0); // Context_ID
    cs.setString(9,"222"); //creation_ip
    cs.setString(10,"nn"); // Item_subtype
    cs.setString(11,"wg_tv_program"); //content_Type
    cs.setString(12,"Krikor"); //title
    cs.setString(13,"hehe"); //description
    cs.setString(14,"bb"); // mime_Type
    cs.setString(15,"oo"); // nls_type
    cs.setString(16,"tt"); // text
    cs.setString(17,"ff");
    cs.setString(18,"dd");
    cs.setString(19,"Y"); //IS_LIVE
    cs.execute();
    logger.debug("WHAT DO WE HAVE HERE" + cs.getInt(1));
    So when the following code is called , i get the following
    <Couldn't create Program : ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'NEW'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    >
    And i cannot figure out what i am doing wrong ?
    Also is there a way to use the argument names so i won't have to use all the arguments.? how can i use the default values ?
    Sorry for the Mass questions
    Thank you all

    Hello, thank you for your response
    I am currenty getting stuck on entering the date Object if i do the following i get this error
    cs.setNull(6,java.sql.Types.DATE);//creation_date
    <Couldn't create Program : ORA-01400: cannot insert NULL into ("WGBH_ROCKS"."ACS_OBJECTS"."CREATION_DATE")
    ORA-06512: at "WGBH_ROCKS.ACS_OBJECT", line 68
    ORA-06512: at "WGBH_ROCKS.CONTENT_ITEM", line 138
    ORA-06512: at line 1
    >
    and if i use this
    cs.setDate(6,(java.sql.Date)new Date());
    where Date is a java util date i get the following
    <Couldn't create Program : null>
    What would be the rights choice tu use for an oracle date object.
    - As to the parameterized names that is only availabes for oracle 10g i'm using 9.2 unfortunatly
    and thanks for all the other info .

  • Change the default name of a personalizable attribute of an JDBC Iview

    Hello All,
       I created have an IView from JDBC Stored Procedure IView Template and the name for the value of the parameter was autogenerated as 'function_params_value1'. The iView is personalizable and  so are the parameters. When the iView is placed on the page and personalized by an end user, the parameter value name shows up as 'function_params_value1'.
        Is there a way to change the name of the value attribute to say for ex..'StoreId' which is the actual parameter name in the stored procedure.
      Thank you,
    Aparna

    Hi Aparna,
    Check the additional info for the function parameters in the following link:
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/a2/b59589e5a942838247493b255d5981/frameset.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/a2/b59589e5a942838247493b255d5981/frameset.htm</a>
    Hope it gives you some idea.
    Regards,
    Vivekanandan

  • Problem to establish good connection via ms sql jdbc on ms sql server expre

    Hi ,
    I had error below in testing connection on stand alone db server ms sql server 2005 express edition:
    Method=cursor;
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]End of stream
    was detected on a read.
    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Sour
    ce)
    at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Sou
    rce)
    at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown S
    ource)
    at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
    at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at Connect.getConnection(Connect.java:28)
    at Connect.displayDbProperties(Connect.java:45)
    at Connect.main(Connect.java:82)
    at Connect.main(Connect.java:82)
    Error Trace in getConnection() : [Microsoft][SQLServer 2000 Driver for JDBC]End
    of stream was detected on a read.
    Error: No active Connection
    I got this error in lauching the codes :
    import java.sql.*;
    * Microsoft SQL Server JDBC Test1 program
    public class Test1 {
    public Test1() throws Exception {
    // Get connection
    DriverManager.registerDriver(new
    com.microsoft.jdbc.sqlserver.SQLServerDriver());
    Connection connection = DriverManager.getConnection(
    "jdbc:microsoft:sqlserver://SERGE_TCHITEMBO:1433;databaseName=AutClust","autoclust","clust");
    if (connection != null) {
              System.out.println();
              System.out.println("Successfully connected");
              System.out.println();
              // Meta data
              DatabaseMetaData meta = connection.getMetaData();
              System.out.println("\nDriver Information");
              System.out.println("Driver Name: "
              + meta.getDriverName());
              System.out.println("Driver Version: "
              + meta.getDriverVersion());
              System.out.println("\nDatabase Information ");
              System.out.println("Database Name: "
              + meta.getDatabaseProductName());
              System.out.println("Database Version: "+
              meta.getDatabaseProductVersion());
    }// Test1
    public static void main (String args[]) throws Exception {
    Test1 Test1 = new Test1();
    I google this error but i did find response.
    Please could help me.
    Vovo.

    This is a database sever side forum. Your problem is client side db driver connectivity (the connection does not even reach the database from your description).
    Thus I doubt that you will have much luck in getting the problem resolved here. I suggest you try a client language/driver forum instead.
    Side note: I would add a test method to the code that takes IP/hostname and port as input, and then simply attempts a tcp socket open with these parameters. If socket connect works, close it and return a success. Else return a fail. Call this with the IP/hostname of the db server and port number of the server's listener (default 1521). Easy method to test network connectivity from client device to database server, without using any JDBC driver class and dealing with issues such as app protocol version differences and so on.

  • PL-SQL JDBC -- No more data to read from socket Exception

    I have a PL/SQL stored procedure which takes CURSOR as IN parameter.
    I want to execute this procedure by passing a ResultSet object into it.
    Below attached is the piece of code I am using.
    When I execute I am getting the following exception ,
    Thanks in advance
    java.sql.SQLException: No more data to read from socket
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:857)
    at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:731)
    at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:690)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:373)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.ja
    va:1446)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.jav
    a:1371)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
    nt.java:1900)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
    edStatement.java:363)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStat
    ement.java:407)
    at ECTTestClass.test16(ECTTestClass.java:500)
    at ECTTestClass.main(ECTTestClass.java:51)
    Statement st = con.createStatement();
    String qry = "SELECT * FROM TAB1";
    ResultSet rs = st.executeQuery(qry);
    int cntr = 0;
    while(rs.next()){
    System.out.println("USER ID " + rs.getString("USER_ID"));
    System.out.println("LICENSE " + rs.getString("LICENSE"));
    cntr++;
    System.out.println("No of rows " + cntr);
    CallableStatement cst = con.prepareCall("{call PREM_TEMP.PREM_PROC(?)}");
    cst.setObject(1,rs,OracleTypes.CURSOR);
    System.out.println("set object...... successful");
    cst.execute();
    st.close();
    cst.close();
    con.close();

    I have a PL/SQL stored procedure which takes CURSOR as IN parameter.
    I want to execute this procedure by passing a ResultSet object into it.
    Below attached is the piece of code I am using.
    When I execute I am getting the following exception ,
    Thanks in advance
    java.sql.SQLException: No more data to read from socket
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:857)
    at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:731)
    at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:690)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:373)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.ja
    va:1446)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.jav
    a:1371)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
    nt.java:1900)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
    edStatement.java:363)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStat
    ement.java:407)
    at ECTTestClass.test16(ECTTestClass.java:500)
    at ECTTestClass.main(ECTTestClass.java:51)
    Statement st = con.createStatement();
    String qry = "SELECT * FROM TAB1";
    ResultSet rs = st.executeQuery(qry);
    int cntr = 0;
    while(rs.next()){
    System.out.println("USER ID " + rs.getString("USER_ID"));
    System.out.println("LICENSE " + rs.getString("LICENSE"));
    cntr++;
    System.out.println("No of rows " + cntr);
    CallableStatement cst = con.prepareCall("{call PREM_TEMP.PREM_PROC(?)}");
    cst.setObject(1,rs,OracleTypes.CURSOR);
    System.out.println("set object...... successful");
    cst.execute();
    st.close();
    cst.close();
    con.close();

  • Date-format for MS-SQL / JDBC-Receiver

    Hallo XI-guys
    I have to implement a Szenario   abap-proxy->XI->JDBC   to a MS-SQL Database
    One datafield is a DATE Field.   MS-SQL  datetime - Format
    Is there any BLOG or Solution in the www or SDN how to do the mapping and other to-do.?
    Have somebody any Idea/Solution ?
    For a Oracle DATETIME field there is the BLOG
    /people/alessandro.berta/blog/2005/10/04/datetime-datatypes-and-oracle-database
    probably it gives the same ?
    Thanks Bernd

    Hi Bernd,
           The same kind of requirement i had develop a UDF.., Following is the UDF
    public String DateFormatConversion(String a,Container container){
    String dt = a;
    if (a.equals("00000000"))
      return("");
    else
    dt = "to_Date('" + dt + "','yyyyMMdd')" ;
    return dt;
    Input for this UDF is your Field which is contains the value as Date and the Outcome of the UDF as
    to_Date('20080430','yyyyMMdd')
    Hope it helps
    Cheers
    Veera
    >>Reward points if it is needful

  • JAMon 2.1 SQL/JDBC Monitoring now available

    For an easy way to monitor JDBC and SQL statements check out the new release of the JAMon open source project.
    JAMon 2.1 adds the ability to monitor the method calls of ANY Java interface, as well as SQL statments and JDBC calls. Both summary statistics and details of these operations will be available. For details on the release go to http://www.jamonapi.com

    On a related note, I am looking for someone who wants to adopt and extend this project: http://db-db.sourceforge.net. It's a proof-of-concept
    of using JPDA for cross-language debugging (at the moment,
    allowing single-stack stepping into a stored procedure from Java
    code calling it). The PoC is done as an Eclipse plug-in, but
    could be adapted for another IDE.

  • SQL JDBC question

    I am using the JDBC-ODBC bridge driver for my DB query app.
    I am trying to run an SQL statement in my program which has a ' ( Apostrophe ) in it.
    ie
    String query = "select * from MYTABLE where OWNER = \'Joe/'s Soap\' "
    A JDBC site tells me to escape the 's using /'s but this still gives me an error.
    Any ideas?
    Thanks .....

    I believe, if you are using Oracle, you also need to escape the ' using a ''. (Escaping in SQL, not Java)
    String query = "select * from MYTABLE where OWNER = \'Joe\'\'s Soap\' "
    String query = "select * from MYTABLE where OWNER =
    \'Joe/'s Soap\' "
    A JDBC site tells me to escape the 's using /'s but
    this still gives me an error.
    Any ideas?
    Thanks .....

Maybe you are looking for