Problem using JDBC Connector

Hi,
I have problem connecting to MS SQL Server using the JDBC Connector. I have 2 main questions, one is on the DQE and the other is on user mapping.
I have a created a JDBC System Landscape using the portal component com.sap.portal.systems.jdbc.
Following are the properties I have set and also I have listed where I am finding propblems.
- User Management
User MApping Type : Admin, User
- Connection Properties
Connection Timeout: 1000
Connection URL: jdbc:microsoft:sqlserver://10.7.1.5:1433;DatabaseName=SAPEP
Driver Class Name: com.sap.portals.jdbc.sqlserver.SQLServerDriver
(Here I do not know whihc driver to use. Do I have to use the above one or this one com.microsoft.jdbc.sqlserver.SQLServerDriver. Anyway, both of them Did not work)
- Distributed Query Engine (DQE) (What is this, and what Parameters I need to pass here)
Also, While doing the user mapping, we need to provide the username and password. What username and password is that? Is it the DB user name and Password?
Any help will be well appriciated.
Thanks and regards,
Babu

Hi Babu,
Here's what's needed in the system (examples are from my system):
CONNECTION PROPERTIES:
   -- Connection URL: jdbc:sap:sqlserver://p031617:1433;DatabaseName=pubs
   -- DRIVER CLASS NAME: com.sap.portals.jdbc.sqlserver.SQLServerDriver
   -- VALIDATE CONNECTION: yes
USER MANAGEMENT:
   -- USER MAPPING TYPE: admin, user
DQE: Put in admin user/password (DQE is for distributed queries between multiple, heterogeneous databases, but you still need to use it for simple queries)
Create an alias
Go to User Administration and set user mapping for the admin user
Test connection
Each user that access the system will need user mapping.
Hope this helps.
Daniel

Similar Messages

  • Any reported problems using jdbc over a WAN?

    If im trying to connect to a Database that's on a WAN will I experience any issues in using jdbc to connect and execute queries to that database?
    I know problems would come up if my wan network is slow, but has jdbc been able to handle long distance database queries? timeout values?

    but why?
    is it because of security? If a company had a database with your personal info hanging out on the Web for anyone to query without any validation or security, how would you feel about it?
    design pattern issues? It's just good layered design.
    just doesnt make sense?Not in my opinion.
    have u experienced/heard of any problems of
    connecting to a database over a WAN and executing
    queries?You don't say anything about who the client is. If the database is behind a firewall, outside clients shouldn't be able to access the port where the listener is running. Only port 80 should be open on that firewall.
    So you either write a servlet that listens on port 80 for HTTP requests from a browser-based client OR you ask your firewall admin to punch a hole in the firewall and open up the port on which your database is listening for queries and use a Swing client.
    If s/he agrees to do it, quit immediately. It means your company doesn't know anything about security.
    %

  • Problem using JDBC to connect to WBEM ODBC driver

    Hello,
    I've got a problem to connect to WBEM ODBC driver using JDBC. The error is:
    exception due a la requetejava.sql.SQLException: [Microsoft][WBEM ODBC Driver]Unable to connect
    When I try to connect to a MS access database, replacing only the ODBC source name, it's working. I can access to the MS access db. But when I put the WMI ODBC source name, WMI, I've got this error.
    Does anybody know what could happened? Is it possible to access to WMI through JDBC? With MS access, accessing WMI ODBC is working !
    Thanks very much for your help.
    Here is the part of the source code :
    import java.sql.*;
    import java.io.*;
    public class Main_1 {
    /** Creates a new instance of Main_1 */
    public Main_1() {
    * @param args the command line arguments
    public static void main(String[] args) {
    try {
    String url = "jdbc:odbc:WMI";
    Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection(url);     
    String query = "Select * from Win32_Processor";
    //String query = "Select * from test;";
    ResultSet results;
    Statement stmt = con.createStatement();
    results = stmt.executeQuery(query);
    //System.out.println (results);
    catch(Exception e){
         System.out.println("exception due a la requete" + e);
    e.printStackTrace();
    }

    you have to first start the network listener before you can run the program
    start TNSLSNR before running the jdbc program

  • Problems Using JDBC

    Hi,
    I am trying to connect to a database using JDBC. But I get the invalid logon error. The surprising thing is that I can use the exact same username ("sys as sysdba") and the same password to login using SQLPlus. Anybody have any ideas why this might be happening?
    Cheers
    Suchit

    A couple points
    1) Your JDBC application should almost certainly not be trying to connect to an Oracle database using the SYS account (unless you're building a replacement for OEM). The SYS account is the most powerful account in the database and should not be used except for a handful of administrative actions. SYS is special-- there are a number of rules that don't apply to it that are likely to cause you frustration over time because things like the recycle bin work differently for SYS than for other users.
    2) Your application should never create tables in the SYS schema. That is a no-no, it's unsupported, and generally no good will come of it.
    So it is probably a good thing that your application started having problems connecting as SYS-- that should just reinforce the habit of creating new users, assigning those users appropriate privileges, and installing your application tables in that new schema. There are any number of things that you might have changed that would cause problems-- you're probably better off not trying to debug this problem. If you're still curious, can you post the exact Oracle error you are getting and the exact JDBC connection string you are using?
    Justin

  • Problem using Jdbc-Odbc Bridge

    Hi,
    I am using Java 2 SDK and I am trying to access MS Access database on my machine using Jdbc-Odbc bridge. I have set up the DSN in ODBC. But I get the following error when I run my program -
    'No Suitable Driver'
    Here's my code snippet-
    Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    String dsn = "jdbc:odbc:DriverInfoDB";
    Connection con = DriverManager.getConnection(dsn,"","");
    con.setAutoCommit(false);
    Statement stmt;
    String query = null; // SQL select string
    ResultSet rs; // SQL query results
    stmt = con.createStatement();
    .....etc etc...
    Where is the error in this code??
    Help Needed!!
    Thanks
    Vivek.

    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection(dsn,"guest","guest");
    OR DriverManager.getConnection(dsn);
    System.out.println("Conection's opened");
    catch(ClassNotFoundException cnfe)
    System.err.println(cnfe);
    catch(SQLException sqle)
    System.err.println(sqle);
    try that code and double check you DSN Name . it's a good practice to greate a system DSN.
    i hope that helps.
    FEEL FREE TO ASK. WON'T BITE U
    ABDUL

  • Problem using JDBC driver with JSP

    Hi, I am trying to connecto to my mysql server via a JSP page, but it seems that there is a problem with the driver call or something in my configuration that unables me to connect. I have the mysql-connector-java-3.0.7-stable driver.
    This is how my classpath looks like:
    CLASSPATH=/home/hooper/Sources/mysql-connector-java-4.0.7-stable/lib:/home/hooper/Sources/mysql-connector-java-3.0.7-stable/com:/home/hooper/Sources/mysql-connector-java-3.0.7-stable/mysql-connector-java-3.0.7-stable-bin.jar:/usr/java/j2sdk1.4.1_02:.:/usr/java/j2sdk1.4.1_02/lib/tools.jar:/usr/java/j2sdk1.4.1_02
    And this is my JSP page code:
    <%@ page language="java" import= "java.sql.*"%>
    <%
    Connection con = null;
         String userName = "hooper";
         String password = ""; //No password
         String url = "jdbc:mysql://localhost/test";
         //Load the Driver class file
         Class.forName("com.mysql.jdbc.Driver");
         //Make a connection to the MySQL database
         con = DriverManager.getConnection (url, userName, password);
         out.println ("Database connection established");
              if (con != null){
                   //Close the connection
                   con.close();
    %>
    And this is the error I get from Tomcat4.1.18:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: com.mysql.jdbc.Driver
    root cause
    javax.servlet.ServletException: com.mysql.jdbc.Driver
    I hope someone can help me with this.
    Thanks,
    Luis

    Hi..
    Try using this way
    String userName = "hooper";
    String password = ""; //No password
    String url = "jdbc:mysql://localhost:3306/test";
    Class.forName("org.gjt.mm.mysql.Driver");
    try to download the driver for mysql and add it to your classpath
    Hope this works
    Regd
    Vasi

  • Problem using JDBC and MS SQL Server

    I got a problem trying to acces a database on my SQL Server. I created the table and my connection seems ok, but when i try to get some data from a table, this happens (see below).
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'players'.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3065)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute (JdbcOdbcStatement.java:338)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:253)
    at Team.<init>(Team.java:18)
    at Simulator.main(Simulator.java:5)
    here's the code that i used to access the db with:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conn = DriverManager.getConnection
    ("jdbc:odbc:BRAIN2WINXPPJH","sm","sm");
    Statement stm = conn.createStatement();
    String query = "Select * from players where teamnr = " + nr +
    " order by squadnr";
    ResultSet rs = stm.executeQuery(query);
    any help is more than welcome
    tnx
    Jo

    If all the tables are in the same database, you can use
    Connection.setCatalog("db-name")
    to change the current database. But the suggestion to include the database name in the SQL statement is safer, because you do not need to worry about changing the database at the right point.
    Thomas

  • Problem using SAP Connector in Win 2k3 x64 - No Data is returned on BAPIs

    Hi,
    During the tests of migration to a 64 bits environment we encountered some problems with the connection to the SAP server.
    The first problem was that the librfc32.dll library was a 32 bit library, so application could not run in x64 mode.
    We downloaded the official x64 library from the Support Portal (https://websmp206.sap-ag.de/support > Downloads >
    Support Packages and Patches > Entry by Application Group > Additional Components > SAP Kernel > SAP KERNEL 64-BIT > SAP KERNEL 6.40 64-BIT >
    SAP KERNEL 6.40 64-BIT > Windows Server on x64 64bit > #Database independent >  librfc_66-20001176.sar, and extracting file librfc32.dll a x64 dll).
    Using this x64 dll we finally could test the application in 64-bits mode (the purpose of the migration) testing its runtime behavior,
    where my current problem is.
    When connecting to the SAP server all BAPI's we test are always returning an empty data results.
    We have no errors nor exceptions from the SAP .NET connector, only the results come empty when they shouldn't.
    When testing the same application but linked to the SAP 32 bits library (application runs in 32-bit mode), invoking the same BAPI's
    (using the exactly the same code and parameters) we got the correct response from the BAPI, i.e., non empty results.
    We already tested a set of BAPIs and always with the same result, in x64 we got no data, in 32-bits we got the information.
    Does anybody know what can be causing this misbehavior? What can we do to make application run correctly in x64 mode?
    Here some additional information about the Operating System: Microsoft Windows Server 2003, Standard x64 Edition, Service Pack 2 (with all windows updates installed).
    Best regards,
    João Portela on behalf of Manuel Dias

    Maybe your application isn´t run in x84
    #Go to properties of your project ->Build -> changed platform target of "Any CPU" to "x86"
    #Copy these libraries from our 32-bit environment :
    *SAP.Connector.dll
    *SAP.Conector.Rfc.dll
    *librfc32.dll
    *msvcp71.dll
    *msvcr71.dll
    In 64 bits environment:
    1. librfc32.dll to C:WINDOWSsystem
    2. msvcp71.dll to C:WINDOWSsystem32
    3. msvcp71.dll and  msvcr71.dll to C:WINDOWSSysWOW64
    4. SAP.Connector.dll and SAP.Conector.Rfc.dll to C:WINDOWSassembly (DRAG)

  • Problem with jdbc connector

    Hi everyone,
    I am trying to access an Oracle database through the JCA framework in the portal.  however, I have not had too much success.
    This is what I have done so far:
    1. created a system in the portal called tempdb with a connection url of:
    jdbc:sap:oracle://mtlclu01aw.cit.canadair.ca:1545;SID=TEMPDB
    and a driver:
    com.sap.portals.jdbc.oracle.OracleDriver
    I have given this object usermapping of user/admin.
    I have created a system alias for this object of tempdbalias
    I have mapped the group of everyone to log in with one username/password, and I have given everyone permission to read write.
    The sql statement of "select vendorname from vendor" should give me 2 results, it gives me no results.
    The code is as follows:
    IConnectorGatewayService cgService =(IConnectorGatewayService) PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
    if (cgService == null) {
    throw new ConnectorException("Error in get Connector Gateway Service");
    ConnectionProperties cp =new ConnectionProperties(request.getLocale(),request.getUser());
    IConnection conn = cgService.getConnection("tempdbalias", cp);
    conn = getJDBCConnection("testdbalias", request);
    INativeQuery query = conn.newNativeQuery();
    ResultSet result = (ResultSet)query.execute("select vendorname from vendor");
    The result is always empty, meanwhile there are records in the db.
    Please help!!!!
    Mariana

    Are you getting any exception? Did you try to see if got any data by using standard Query iView delivered by SAP that connects to database defined via System defintion?

  • Problem using JDBC Thin driver with Oracle 8i Personal Edition

    Hi all, I have an issue I have been unable to figure out. In order to make my code as portable as possible I am using the JDBC thin driver to access my database. I have been able to connect to an instance of Oracle 8i on a Sun box by hardcoding the following string into getConnection() call:
    conn = DriverManager.getConnection("jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(COMMUNITY=tcp.world)(PROTOCOL=TCP)(Host=<myhostname>)(Port=1521))(ADDRESS=(COMMUNITY=tcp.w orld)(PROTOCOL=TCP)(Host = <myhostname>)(Port = 1526)))(CONNECT_DATA = (SID = <mysidname>)))", <myuser>, <mypassword>);
    My problem is that I cannot figure out what string to use to connect to my local instance of Oracle 8i Personal. I used the following string (the sid I got from the looking at the init.ora file):
    conn = DriverManager.getConnection("jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(COMMUNITY=tcp.world)(PROTOCOL=TCP)(Host=localhost)(Port=1521))(ADDRESS=(COMMUNITY=tcp.world)(PRO TOCOL=TCP)(Host = localhost)(Port = 1526)))(CONNECT_DATA = (SID = orcl)))", "scott", "tiger");
    That didn't work, so I took the only entry found in my tnsnames.ora file in as:
    conn = DriverManager.getConnection("jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0)))(CONNECT_DATA = (SID = PLSExtProc)(PRESENTATION = RO)))", "scott", "tiger");
    I am not knowing what is wrong, but that didn't work neither. Any suggestions would be highly appreciated.
    Thanks....
    null

    try this:
    conn = DriverManager.getConnection("jdbc:oracle:thin:scott/tiger:@hostname:1521:sid");
    or use system/manager as username/passward
    null

  • Problem using JDBC connection

    I'am using 9iAS R2 and I have a entity bean using a DataSource with out any problem, but I also have a client program using the same datasource. I can lookup the datasource without any problems, I get a connection, but when I try to createStatement() on the connection I get an Exception see below.
    I hope some one can help me!
    Regards
    Morten
    java.lang.NullPointerException
         at com.evermind.sql.OrionPooledDataSource.addUsedConnection(OrionPooledDataSource.java:539)
         at com.evermind.sql.OrionPooledDataSource.getPooledInstance(OrionPooledDataSource.java:290)
         at com.evermind.sql.OrionCMTConnection.setConnection(OrionCMTConnection.java:189)
         at com.evermind.sql.OrionCMTConnection.intercept(OrionCMTConnection.java:127)
         at com.evermind.sql.FilterConnection.getMetaData(FilterConnection.java:75)
         at com.evermind.sql.FilterConnection.getMetaData(FilterConnection.java:76)
         at dk.modulus.regelmaskine.RegelParamDAO.getRegelParametre(RegelParamDAO.java:33)

    Hi Morten,
    Have you tried running OC4J in "debug" mode? This web page has more details:
    http://kb.atlassian.com/content/atlassian/howto/orionproperties.jsp
    You may also like to try "P6Spy"
    http://www.theserverside.com/home/thread.jsp?thread_id=8337
    And here is a web page from Oracle's "Technet" site regarding debugging
    OC4J:
    http://otn.oracle.com/tech/java/oc4j/htdocs/oc4j-logging-debugging-technote.html
    Hope this helps you.
    Good Luck,
    Avi.

  • Problem using JDBC (JNDI) DataSource and data-sources.xml w/ OC4J

    I have a JClient application developed in JDev X. It works fine when using a JDBC URL for the connection (which then writes the connection into the BC4J.xcfg files, one for each application module). However, I would like the app to retrieve the data source from the server's data-sources.xml file. However, when, on the configurations tab of the application module I set the connection type to JDBC DataSource, and give it the JNDI name, it does not work, either with the embedded OC4J or the stand-alone OC4J. Any suggestions???
    In the stand alone OC4J I verified that the data source exists (using java -jar admin.jar ormi://nemethzoltan3 admin welcome -application adatklinika -testDataSource -location jdbc/adatklinikaCoreDS) ... so the data source is defined in the data-sources.xml. Of course the error I get is JBO-30003.
    If I just try to "test" the data source in Jdeveloper (using the context menu of the app module, and setting it to use the adatklinikaCoreDS) I get a JNDI error: unable to lookup data source and at level 3 a "javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial". I checked, the data source is defined under tools->embedded OC4J properties->data sources.
    If I try to run the main form, simply nothing happens.
    Please help!!!

    Ok, figured out why running from jdeveloper wasn't working: the embedded OC4J server wasn't started (start it by running an html page from your project or something...and make sure you don't have a stand-alone oc4j running). AND more importantly it didn't have the library "embedded oc4j client" library included (project properties -> profiles -> development -> libraries)...which is needed for whatever reason.
    Now to try and get it working with the stand-alone OC4J...

  • BI - JDBC connector for remote database.

    Hi,
    I am trying to use my portal oracle database in VC applications. I have successfully connected to the database using JDBC connector as well as BI-JDBC connector. However when I try to use this BI-JDBC system in SQL editor I cannot see any tables. I have created JDBC and BI-JDBC system objects in the portal and the connection test is successful for both the systems.
    I am using BI-JDBC connector so that I can see the tables and write select queries which I can use in VC applications. Using JDBC connector I can see only the stored procedures. So tried using BI-JDBC connector.
    Is there anyway I can see the tables and views in the oracle database in the VC applications.
    Thanks in advance.
    Aamod.

    Hi,
    The DB user which I am using, can query the database from SQL PLUS. So he can see the tables and everything. But when the same user is used for mapping with portal user the tables cannot be seen.
    When I select the system in VC and click on "Browse Table Catalog" I get the following structure.
    BI-JDBC
       |- 0
          |- 1.
    And below 1 theres nothing. When I select "Tables" and search *, it says "Search returned no result".
    Please advice.
    Regards,
    Aamod.

  • BI JDBC Connector

    I am evaluating the option of using BI JDBC connector to connect BI7 to a different source system. I would like to know the application requirements for that.What are the tools that needs to be installed and where?
    A Step by guide for configuration steps in JDBC connector and steps in BW would be of great help too.
    I primarily need the tools require to enable UDI using JDBC Connector.
    Thanks and regards
    Ramesh

    Hi,
    Check these,
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/e35b3315bb2d57e10000000a422035/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/93/8aea385252494d9b1eb92e0b7f1bad/frameset.htm
    Hope this helps...

  • JDBC connector problem

    Hi All,
    I installed SAP BW 3.5 by following Installation Seqence in the mySAP ERP 2004 SR1 master guide,
    there are two servers under Visual Administator -> Cluster -> sapsid: one is "Server 0 10_37758"(I think this is Central Instance), another is "Server 0 12_93726" (it maybe dialog instance). The first server is empty, and I can see JDBC Conncetor, Connector Container and etc.
    In the runtime tab of JDBC Connector, the Drivers only inculdes System_Driver, is it correct?
    and the status of the connector jdbc, odbo, smla and sapq in the Connector Container, Connector 1.0 display as sap.com/com.sap.ip.bi.sdk.dac.connector.sapq/null
    sap.com/com.sap.ip.bi.sdk.dac.connector.xmla/null
    sap.com/com.sap.ip.bi.sdk.dac.connector.odbo/null
    sap.com/com.sap.ip.bi.sdk.dac.connector.jdbc/null
    and they are not activity. what problem are these?
    I tried to add JDBC Driver in JDBC Connector, the problem can't be fixed, please help me.
    I install all ECC IDES 5.0 and java components and database on same host which is windows 2003 with Oracle9i

    Hi there,
    Do i have to to put mysql.connecto.jar to the
    j2dk\lib\ext? I have not copy the files maybe this is
    a problem with the connector. What do you think?Good God, no. Your code does not belong there.
    You have to add the MySQL Connector JAR to your CLASSPATH when you run. If you're running on the command line, that means using the -classpath option on java.exe. If you're using an IDE, that means adding the JAR to your CLASSPATH using the mechanism provided by the IDE. If you're using an app server, that means packaging the JAR with your app.
    %

Maybe you are looking for

  • Can anyone help decipher my etresoft report...please! mac slow as heck with yosemite!

    Macbook pro is so slow with yosemite (startup take 50 secs and programs lag/ spinning wheels, it's endless), Can anyone help with me decipher my etresoft report...please! I've tried all the resets and re-installs, nothing worked a bit! Much appreciat

  • Using an emac as a monitor for a mac mini

    Hi, Sorry if the question was already asked, but a quick search in the forum brought no answer. I have an emac (OS9) and a mac mini(OSX). I'd like to use the emac as a monitor for the mac mini. Is it possible? How? (Both are G4, although I don't thin

  • Problem with fm REUSE_ALV_LIST_DISPLAY with more than 450K records!!!

    Hi guys!!! Now here's is my problem. I've been trying to display in a program wih fm REUSE_ALV_LIST_DISPLAY, aproximately 450,000 records. But the fact is that after 10 or 15 minutes the system stops the process. This case is not the same when I disp

  • IP over OTN or IP over DWDM?

    these are two main trend in IP core Network construction. The core different between them is how to dealing with the TDM service or other small granularity service in electrical layer. in Router or in OTN? What is your opinion? I find many expert or

  • Hwnd in windows 7

    Shivels Hi guys and gals, I have a strange issue I can't seem to figure out.  I have some subvis which I downloaded from the fourm.  The subvis allow you to paste the output of a cmd prompt into an indicator on the LabVIEW front panel.  The subivs r