JDBC with SQL Server

Hi,
I am trying to connect to a SQL server database by giving table name in (SPVC) database as spvc.dbo.tablename.. If i want to access another database (SPVC_D), how can i do it without changing my java code?? Can i be able to add the database name to the connection string and i can remove the hard coding (spvc.dbo.) from my java code?? How shall i be able to do that..
Please let me know.. I am very new with JDBC with SQL server..
Thanks
Praveen Padala

In the MS SQL Server that I use, the following syntax
spvc.dbo.tablename
Breaks done as follows...
<database>.<user>.<tablename>
However connections are always to a database. Thus when one uses the above syntax it basically runs 'in' the one database and accesses another.
Depending on various attributes of the tables, if and only if, a table called 'tablename' exists in a database called 'spvc_d' then if you connect to 'spvc_d' then you can access 'tablename' just by using 'tablename'.
So if that is what you are doing you will not have a problem.

Similar Messages

  • Error connecting jdbc with SQL server

    Hi,
    I get the following error when I try to run a sample program to connect SQLserver with JDBC . The driver I used to connect is " com.microsoft.jdbc.sqlserver.SQLServerDriver ".
    I have registered the driver properly but have problem in connecting to JDBC.
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Unable to connect. Invalid URL.
    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at Test.main(Test.java:12)
    pls help
    Thanks in advance

    Well there is something wrong with your database URL you are giving to the driver. You should lookup the documentation for the driver and see what format the URL should be in.
    Here is an open source driver you could try too -- http://jtds.sourceforge.net/

  • JDBC with Sql Server 2005 Express

    Hi,
    I need some help on this. I have a java web application that ran on Tomcat using sql server 2000 db. In my configuration file the driver and server url were
    dbDriver="com.inet.tds.TdsDriver"
    dbServerUrl="jdbc:inetdae7:ECCOLWXPSDE:1433?database=eclife"
    Now this worked fine.
    Now i am using Sql server 2005 express, so i changed the configurations to the following
    dbDriver="com.inet.tds.TdsDriver"
    dbServerUrl="jdbc:inetdae7:ECCOLWXPSDE\\SQLEXPRESS:1433?
    database=eclife"
    But it doesnt work. It doesnt create a connection. Gives a No Connection Exception when trying to use
    connection = DriverManager.getConnection(dbServerUrl, username, password);
    Please tell me what else needs to be done. Or is there a problem connecting to express via jdbc and sprinta.
    Thankyou for your time
    Shirantha.

    Both my Tomcat and Express 2005 are in the local machine. There is not networking involved. What i want to know is what is the different thing that is to be done from sql server 2000 to express 2005.
    In sql server 2000, i have it like :
    theDbDriver=com.inet.tds.TdsDriver
    theDbServer=jdbc:inetdae7:ECCOLWXPSDE:1433?database=eclife
    and this works FINE
    Now i have uninstalled it and installed sql server 2005 EXPRESS, i have it like :
    theDbDriver=com.inet.tds.TdsDriver
    theDbServer=jdbc:inetdae7:ECCOLWXPSDE\\SQLEXPRESS:1433?database=eclife
    and connection is not happening.
    thanks for your time
    Shirantha

  • Who can help me?I have a question about JDBC with SQL Server 2000.

    import java.sql.*;
    import java.util.*;
    public class sqltest{
    static public void main(String args[]){
    try{
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    }catch(Exception e){
    e.printStackTrace();
    return;
    try{
    Connection conn=DriverManager.getConnection("jdbc:microsoft:sqlserver://CE800:1181;UseDatabaseName=supermarket;user=sa;Password=");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("select * from customers");
    while(rs.next()){
    System.out.println(rs.getString("username"));
    conn.close();
    }catch(Exception e){
    e.printStackTrace();
    return;
    when I run it,error occured:
    D:\MyJava\sql>java sqltest
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'customers'.
    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.processErrorToken(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest.processReplyToken(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
    at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
    at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)
    at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
    at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
    at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
    at com.microsoft.jdbc.base.BaseStatement.executeQuery(Unknown Source)
    at sqltest.main(sqltest.java:15)
    Please help me,thanks a lot!

    Your code seems ok, you probably end up in another Database than you expect.
    Not sure about the the UseDatabaseName=supermarket clause in your connection string.
    You can confirm that get a connection to another database by changing your query to:
    SELECT * FROM supermarket.dbo.customers
    if this works you probably get a connection to master and should look closer at the UseDatabaseName=supermarket clause.
    You did try to run the query in the Query Analyzer i take it?
    Rgds

  • How to establish a trusted connection with JDBC for SQL SERVER 2000

    Hi!I am using jdk 1.4 and eclipse 3.3.
    I create a servlet in eclipse with in-build tomcat.
    When I run it ,it was working perfectlly has it was suppose to work.
    In this servlet I connect to a sql 2000 database using jdbc-odbc bridge driver.
    But when I tried to deploy the servlet on tomcat 5.5 manully on the same machine ,it gave me error saying
    [Microsoft][SQLServer JDBC Driver][SQLServer]Login failed
    for user 'sa'
    I searched around some post and found that ok ,I need trusted connection
    But I have 2 Questions
    1). Why was in eclipse I was able to connect to the SQL server and why not in the servlet which I deployed manully on tomcat.
    2). How do I create a trusted connection with JDBC for SQL server 2000
    Thnaks for your help in advance.

    Hi! duffymo ,QussayNajjar ,dvohra09 .
    Thank for help.
    The ideas are really great.
    I am trying generate reports for my company.
    When I used eclipse the code worked perfectly.
    below is code which I used
    out.println("Calling For Class Name<br>");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    out.println("Calling For Class Name success Now calling database <br>");
    1). jdbcConnection = DriverManager.getConnection("jdbc:odbc:SQLJasper");
    2). jdbcConnection = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=ServerName;Database=tempdb");
    3). jdbcConnection = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=ServerName;Database=tempdb","UID=UserName","Password=Password");
    out.println("connecting to database success<br>");
    I had tried to connect the database using this three way.
    In 1st I tried using DSN name .
    Next 2 self explainer for expert like you.
    I used to 2nd variant to connect in eclipse and it worked fine.
    I not an expert in java ,I just doing some research on jasperReport.
    My best guest is that eclipse is using some library files of which I have no clue.
    Thank's for your help,I appretiate it.
    Once again thank a billion.
    Sorry for the messy righting.

  • Error JDBC - Connect java instance with sql server

    We are working with SAP Netweaver 7.0 SP 18 and we need to upgrade to SP 23.
    The XML generated contains only ABAP Stack but the SUM also load the Java tab.
    This part of Java is giving me several problems Connection with SQL Server database 2005. Add image of the last error.
    To continue forward I am evaluating the following:
    1. How I can validate data Connection jdbc to connect to the database? How valid username and password that you use? Where
    Best Regards!

    Hi Hidalgo,
    The XML generated contains only ABAP Stack but the SUM also load the Java tab.
    Please check for the following
    1) Existence of  j2ee related profile parameters in SAP profiles ( default, instance and start )
    2) Existence of j2ee related folders on the SAP server
    If you system is only ABAP stack, please remove information identified in option(1) and (2).
    Hope this helps.
    Regards,
    Deepak Kori

  • Jdbc driver with SQL Server

    i have used type 2 driver for connectin to my SQL Server. Its working fine with normal java program. but when i used the same driver in my servlet its returning null pointer exception. i.e. Connection is null
    here is the code i have used:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conn =DriverManager.getConnection("jdbc:odbc:mydsn",
                             "username",
                             "password");

    That is THE type 1 driver by the way.
    Anyway who knows. Have you considered using a type 4 (pure Java driver) instead? There are several available that work with SQL server including one from microsoft (not recommended) and one from sourceforge http://jtds.sourceforge.net/ (recommended)
    I would strongly consider using a type 4 driver instead because the problem likely has something to do with it can't find the DSN or the bridge is not available on your servlet platform etc etc
    FInally if your connection is null it suggests that you are swallowing an exception somewhere because DriverManager.getConnection will throw an exception if it can't connect (which appears to be the case).

  • Toplink with sql server

    I have sucessfully used Toplink with Oracle. ow I have to use it with MS SQL server and I am having problems. First of all, in the Mapping Worbench, the only SQL server driver listed is weblogic.jdbc.mssqlserver4.Driver. Why can't I use the regular ms sql driver, com.microsoft.jdbc.sqlserver.SQLServerDriver? Why should the mapping workbench be tied to Weblogic? If one did not have Weblogic, would it be impossible to use Toplink with SQL server? Well, I have Weblogic, so I tried using the weblogic driver with the url jdbc:microsoft:sqlserver://<host ip>:1433;DatabaseName=<db name>. When I try to connect, a dialog box appears that says: "java.sql.SQLException $$$$$$$$$$ License Exception $$$$$$$$$$ Missing license for: WebLogic Server 6.1. $$$$$$$$$$ License Exception $$$$$$$$$$ Username or password could be invalid." I have weblogic.jar in the classpath. I tried adding the line SET WLS61_HOME=M:\bea610\wlserver6.1 to workbench.cmd. It didn't help. Any suggestions?

    I already tried this. It does not work. I put the following jars in the classpath in workbench.cmd: msbase.jar;mssqlserver.jar;msutil.jar. Then I start workbench. When I try to enter com.microsoft.jdbc.sqlserver.SQLServerDriver as the driver, I get an exception. Here is the stacktrace:
    Exception occurred during event dispatching:
    java.lang.ClassCastException: com.webgain.openapi.foundation.uitools.WGDefaultListModel
         at com.webgain.workbench.ui.db.BldrLoginInfoPanel.actionPerformed(Unknown Source)
         at com.webgain.openapi.foundation.uitools.WGListChooser.fireActionEvent(WGListChooser.java:664)
         at com.webgain.openapi.foundation.uitools.WGListChooser$ListDataHandler.contentsChanged(WGListChooser.java:473)
         at javax.swing.AbstractListModel.fireContentsChanged(Unknown Source)
         at com.webgain.openapi.foundation.uitools.WGDefaultListModel.setSelectedItem(WGDefaultListModel.java:740)
         at com.webgain.openapi.foundation.uitools.WGListChooser.setSelectedItem(WGListChooser.java:1446)
         at com.webgain.openapi.foundation.plaf.basic.WGBasicListChooserUI$ListChooserModel.setSelectedItem(WGBasicListChooserUI.java:527)
         at javax.swing.JComboBox.actionPerformed(Unknown Source)
         at javax.swing.plaf.basic.BasicComboBoxUI$EditorFocusListener.focusLost(Unknown Source)
         at java.awt.AWTEventMulticaster.focusLost(Unknown Source)
         at java.awt.AWTEventMulticaster.focusLost(Unknown Source)
         at java.awt.Component.processFocusEvent(Unknown Source)
         at javax.swing.JComponent.processFocusEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.setFocusRequest(Unknown Source)
         at java.awt.Container.proxyRequestFocus(Unknown Source)
         at java.awt.Container.proxyRequestFocus(Unknown Source)
         at java.awt.Container.proxyRequestFocus(Unknown Source)
         at java.awt.Container.proxyRequestFocus(Unknown Source)
         at java.awt.Container.proxyRequestFocus(Unknown Source)
         at java.awt.Container.proxyRequestFocus(Unknown Source)
         at java.awt.Container.proxyRequestFocus(Unknown Source)
         at java.awt.Container.proxyRequestFocus(Unknown Source)
         at java.awt.Component.requestFocus(Unknown Source)
         at javax.swing.JComponent.grabFocus(Unknown Source)
         at javax.swing.JComponent.requestFocus(Unknown Source)
         at javax.swing.text.DefaultCaret.mousePressed(Unknown Source)
         at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
         at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
         at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at com.webgain.openapi.foundation.uitools.WGPasswordField.processMouseEvent(WGPasswordField.java:99)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    If I ignore the exception and try to connect to the database anyway, it tries to use the weblogic driver.
    Next I manually edited the database xml file and put in the driver name automatically. When I bought up the mapping workbench again, it again threw an exception. However, the correct driver name was in the file, so it did finally let me connect to the database. So it seems there IS a bug, although it has to do with the GUI and not SQL server per se.

  • Connecting with SQL Server

    Dear All,
    I m new to JDeveloper and want to make a connection with SQL Server 2008 but in Connection Dialogue with following Settings :-
    Connection Type: SQL Server
    UserName: sa
    Password: ******
    HostName: EServer
    DatabaseName: DBName
    PortNumber: 1430
    Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
    Library:
    As I Press Test Connection it gives following error:
    Test failed: Driver class not found.
    Verify the Driver location
    Pls suggest

    Download sqljdbc.jar and Add it to the Viewcontroller Libraries and Classpath (Project Properties of ViewController)

  • Problem in Creating a JDBC System - SQL Server

    Hi All
    I failed in creating a JDBC System(SQL Server).  I am using SAP EP 7.0 SP 9.  I tried to create the JDBC system with the following properties:
    I am listing them Category wise:
    Connection Properties:
    1. Connection Timeout: 300
    2. Connection URL: jdbc:sap.sqlserver://<server name> : <port name>; DatabaseName=master
    3. Driver Class Name: com.sap.portals.jdbc.sqlserver.SQLServerDriver
    4. Validate Connection: Yes
    UserManagement Properties:
    5. User Mapping Type: admin;user
    Please help me out in making this work. And let me know if any changes to incorporated.
    Regards,
    Vijay.

    Hi vijay,
    I have tried this thing sometime back. But when i create a JDBC system, I never give the <b>Connection Timeout</b> and change the<b> Validate Connection</b> from No to Yes. I just give the <b>Connection URL</b> and the <b>Driver Class Name</b> in the Connection Properties dropdown.
    Try making these changes and check whether the user mapping is done correctly. Also check whether the Connection URL and the Driver Class Name are correct or not. Have a look at the following link:
    <a href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/VC/JDBC%2bConnection%2bSetup">https://www.sdn.sap.com/irj/sdn/wiki?path=/display/VC/JDBC%2bConnection%2bSetup</a>
    Let me know if this works.
    Bye
    Ankur
    Reward points if it helps!!

  • Connection pooling with SQL Server 2008 and Tomcat 6.0

    Hello Everybody,
    I'm creating a web application using struts 2.0 , tomcat 6.0 and sql server 2008.
    Everything works fine but i'm unable to create connection pooling with sql server 2008.Please help me to solve this issue.
    Code for this is as foolows:
    in my META-INF/context.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/spas" docBase="spas"
    debug="5" reloadable="true" crossContext="true">
    <Resource
    name="jdbc/spas_new"
    auth="Container"
    type="javax.sql.DataSource"
    maxActive="20"
    maxIdle="10"
    maxWait="-1"
    user="spas_user"
    password="spas123"
    driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
    url="jdbc:sqlserver://HGL-0053\dbo:1433;databaseName=spas_new;responseBuffering=adaptive;"/>
    </Context>
    in my web.xml
    <resource-ref>
    <description>SQL Server Datasource</description>
    <res-ref-name>jdbc/spas_new</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    and in my ConnectionThread.java file i've used:
    Context ctx = new InitialContext();
    if(ctx == null )
    throw new Exception("Sorry! No Context Exception");
    DataSource ds = (DataSource)ctx.lookup("java:/comp/env/jdbc/spas_new");
    System.out.println("ds:"+ds);
    conn=ds.getConnection();
    Following is the exception:
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Login failed for user ''.)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at login.V_SPAS_ConnectionThread.getConnection(V_SPAS_ConnectionThread.java:87)
    at org.apache.jsp.login.v_005fspas_005flogin_005fpage_jsp._jspService(v_005fspas_005flogin_005fpage_jsp.java:95)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
    at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
    at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
    at org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1023)
    at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:345)
    at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
    at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:694)
    at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:665)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:54)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at login.V_SPAS_SecurityCheckFilter.doFilter(V_SPAS_SecurityCheckFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user ''.

    Hi Karthikeyan,
    This is not the issue at all. I can open the management studio by the same login id and password and also i can make the database jdbc connection from plain java file.
    It does not give me any problem by them.
    I'm unable to find the actual problem. May be i'm missing something in connection pooling.
    Please help.
    Regards
    Mina

  • ODI 10.1.3.5 with SQL Server 2005

    Good afternoon,
    We recently installed 10.1.3.5, in a Windows environment with SQL Server 2005 and Hyperion Essbase/Planning/HFM 11.1.1. We were following John Goodwin's infamous blog (thanks, John!), but ran into a number of snags.
    For instance, when we set-up interfaces with flat files as the source, loading metadata either to Planning or Essbase, ODI errors out when:
    1) our header name in the flat file has spaces (using double quotes didn't work)
    2) our header name in the flat file is different than the reverse property name from Essbase/Planning.
    Also, we're now seeing an issue in our Flat file to Essbase metadata interface where the SQL used in the IKM seems to be incorrect. Below is the error message we're receiving:
    "org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 20, in ?
    com.microsoft.sqlserver.jdbc.SQLServerException: An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements,
    look for empty alias names. Aliases defined as "" or [] are not allowed. Add a name or single space as the alias name."
    We are thinking that the culprit may be either the wrong .jar or .jre we're using with SQL Server 2005, as there seem to be inherent issues with the SQL generated in the LKM and IKM. Our questions to you:
    1. What sqljdbc.jar driver version are you using?
    2. What .jre version are you using?
    3. What environment does the above work correctly in? (perhaps an earlier version of ODI against an earlier version of Hyperion?)
    FYI - We have tried sqljdbc 1.0 and 2.0, with .jre 1.6.0_10.
    Thanks in advance!
    -O
    Edited by: Alapat on Jan 22, 2009 8:04 AM

    Thank you very much for responding!
    After a 2 week battle, we are now finally coming to a close on our issues (although we cannot say for sure what all of the causes were).
    Here is what we discovered about our questions, through other threads:
    1. John Goodwin was using JRE 1.6.x, so we ruled that out as a culprit.
    2. Others are using SQL Server 2005 just fine with ODI, so we ruled this out too. We chose to keep the sqljdbc 2.0 driver.
    Here are some issues we did uncover during our investigation:
    1. We were having issues with our agent, specifically regarding the HFM technology. We created a new one, added a few extra parameters, compiled the agent, and are now back up and running. We realized the problem when we switched to "Local (No Agent)" and saw that we were not having as many issues.
    2. We went into the physical agent and pressed "Update Scheduling". We do not know if this had any effect, but we suddenly noticed that our flat file header issues were resolved.
    3. The Essbase issue was due to a configuration error with our Hyperion Essbase physical technology. We went into that technology and changed a setting on the "Languages" tab, called "Object Delimiter". It had double-quotes in it - we removed that parameter and instantly saw a change in the SQL being executed.
    4. Some of the mappings in our interfaces needed to be executed on different environments. i.e. - We needed to switch to "staging" when the flat file header was different than the target column name. Newbie mistake - we thought ODI had built-in intelligence to choose correctly for us.
    5. When doing a reverse on Essbase models, we noticed that the Essbase columns would populate with an "Undefined" datatype, instead of the expected CHAR. We have to manually define all column datatypes after every Essbase reverse now. Must be a bug.
    6. We also noticed when doing a flat file reverse that all columns auto-populate with datatype STRING, length 50. We have to manually personalize that option for different Hyperion applications, based on need. i.e. - some require numeric datatypes, or smaller/larger lengths. This was obviously a newbie error. :)
    Thank you for your tip on the MS SS2005 JDBC drivers - we will look into your other options - IMHO, JTDS, etc.
    -O

  • Error with Sql Server and Java App

    Hi i have a java based multithread application which comunicate with SQL SERVER via DSN bridge , some time my application crashes with this error any idea what its happend and how to remove it .
    Thanks
    ************* Exception ********************************8
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77F87EEB
    Function=RtlEnterCriticalSection+0xB
    Library=F:\WINNT\system32\ntdll.dll
    Current Java thread:
    at sun.jdbc.odbc.JdbcOdbc.numResultCols(Native Method)
    at sun.jdbc.odbc.JdbcOdbc.SQLNumResultCols(JdbcOdbc.java:4625)
    at sun.jdbc.odbc.JdbcOdbcStatement.getColumnCount(JdbcOdbcStatement.java:1235)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:352)
    - locked <04DC3EE0> (a sun.jdbc.odbc.JdbcOdbcStatement)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(JdbcOdbcStatement.java:288)
    at advcomm.advrad.DBParams.Ltht(Unknown Source)
    at advcomm.advrad.DBParams.BDhb(Unknown Source)
    at advcomm.advrad.DlkhlHz.run(Unknown Source)
    Dynamic libraries:
    0x00400000 - 0x00406000 F:\j2sdk1.4.1_03\bin\java.exe
    0x77F80000 - 0x77FFC000 F:\WINNT\system32\ntdll.dll
    0x7C2D0000 - 0x7C335000 F:\WINNT\system32\ADVAPI32.dll
    0x7C570000 - 0x7C623000 F:\WINNT\system32\KERNEL32.dll
    0x77D30000 - 0x77DA8000 F:\WINNT\system32\RPCRT4.dll
    0x78000000 - 0x78045000 F:\WINNT\system32\MSVCRT.dll
    0x75030000 - 0x75044000 F:\WINNT\system32\WS2_32.DLL
    0x75020000 - 0x75028000 F:\WINNT\system32\WS2HELP.DLL
    0x6D340000 - 0x6D46B000 F:\j2sdk1.4.1_03\jre\bin\client\jvm.dll
    0x77E10000 - 0x77E79000 F:\WINNT\system32\USER32.dll
    0x77F40000 - 0x77F7C000 F:\WINNT\system32\GDI32.dll
    0x77570000 - 0x775A0000 F:\WINNT\system32\WINMM.dll
    0x6D1E0000 - 0x6D1E7000 F:\j2sdk1.4.1_03\jre\bin\hpi.dll
    0x6D310000 - 0x6D31E000 F:\j2sdk1.4.1_03\jre\bin\verify.dll
    0x6D220000 - 0x6D239000 F:\j2sdk1.4.1_03\jre\bin\java.dll
    0x6D330000 - 0x6D33D000 F:\j2sdk1.4.1_03\jre\bin\zip.dll
    0x6D260000 - 0x6D26B000 F:\j2sdk1.4.1_03\jre\bin\JdbcOdbc.dll
    0x1F7A0000 - 0x1F7DA000 F:\WINNT\system32\ODBC32.dll
    0x71710000 - 0x71794000 F:\WINNT\system32\COMCTL32.dll
    0x7CF30000 - 0x7D175000 F:\WINNT\system32\SHELL32.dll
    0x70A70000 - 0x70AD6000 F:\WINNT\system32\SHLWAPI.dll
    0x76B30000 - 0x76B6E000 F:\WINNT\system32\comdlg32.dll
    0x1F840000 - 0x1F857000 F:\WINNT\system32\odbcint.dll
    0x1F9C0000 - 0x1FA27000 F:\WINNT\System32\SQLSRV32.dll
    0x41090000 - 0x410BD000 F:\WINNT\System32\SQLUNIRL.dll
    0x77800000 - 0x7781E000 F:\WINNT\System32\WINSPOOL.DRV
    0x76620000 - 0x76631000 F:\WINNT\system32\MPR.DLL
    0x77820000 - 0x77827000 F:\WINNT\system32\VERSION.dll
    0x759B0000 - 0x759B6000 F:\WINNT\system32\LZ32.DLL
    0x779B0000 - 0x77A4B000 F:\WINNT\system32\OLEAUT32.dll
    0x7CE20000 - 0x7CF0F000 F:\WINNT\system32\ole32.dll
    0x7CDC0000 - 0x7CE13000 F:\WINNT\System32\NETAPI32.dll
    0x77980000 - 0x779A4000 F:\WINNT\System32\DNSAPI.dll
    0x75050000 - 0x75058000 F:\WINNT\System32\WSOCK32.dll
    0x751C0000 - 0x751C6000 F:\WINNT\System32\NETRAP.dll
    0x77BF0000 - 0x77C01000 F:\WINNT\System32\NTDSAPI.dll
    0x77950000 - 0x7797B000 F:\WINNT\system32\WLDAP32.DLL
    0x7C340000 - 0x7C34F000 F:\WINNT\System32\SECUR32.DLL
    0x75150000 - 0x75160000 F:\WINNT\System32\SAMLIB.dll
    0x769A0000 - 0x769A7000 F:\WINNT\system32\NDDEAPI.DLL
    0x1FA30000 - 0x1FA46000 F:\WINNT\System32\sqlsrv32.rll
    0x1F7F0000 - 0x1F80A000 F:\WINNT\system32\odbccp32.dll
    0x74CB0000 - 0x74CCA000 F:\WINNT\system32\DBNETLIB.DLL
    0x75500000 - 0x75504000 F:\WINNT\system32\security.dll
    0x782D0000 - 0x782F2000 F:\WINNT\system32\msv1_0.dll
    0x7C740000 - 0x7C7CC000 F:\WINNT\system32\CRYPT32.dll
    0x77430000 - 0x77441000 F:\WINNT\system32\MSASN1.dll
    0x77340000 - 0x77353000 F:\WINNT\system32\iphlpapi.dll
    0x77520000 - 0x77525000 F:\WINNT\system32\ICMP.DLL
    0x77320000 - 0x77337000 F:\WINNT\system32\MPRAPI.DLL
    0x773B0000 - 0x773DF000 F:\WINNT\system32\ACTIVEDS.DLL
    0x77380000 - 0x773A3000 F:\WINNT\system32\ADSLDPC.DLL
    0x77830000 - 0x7783E000 F:\WINNT\system32\RTUTILS.DLL
    0x77880000 - 0x7790E000 F:\WINNT\system32\SETUPAPI.DLL
    0x7C0F0000 - 0x7C154000 F:\WINNT\system32\USERENV.DLL
    0x774E0000 - 0x77514000 F:\WINNT\system32\RASAPI32.DLL
    0x774C0000 - 0x774D1000 F:\WINNT\system32\rasman.dll
    0x77530000 - 0x77552000 F:\WINNT\system32\TAPI32.dll
    0x77360000 - 0x77379000 F:\WINNT\system32\DHCPCSVC.DLL
    0x74CD0000 - 0x74CD8000 F:\WINNT\system32\DBmsLPCn.dll
    0x0B990000 - 0x0B9E6000 F:\WINNT\system32\MSVCR71.dll
    0x6D2E0000 - 0x6D2EE000 F:\j2sdk1.4.1_03\jre\bin\net.dll
    0x782C0000 - 0x782CC000 F:\WINNT\System32\rnr20.dll
    0x777E0000 - 0x777E8000 F:\WINNT\System32\winrnr.dll
    0x777F0000 - 0x777F5000 F:\WINNT\system32\rasadhlp.dll
    0x74FD0000 - 0x74FEE000 F:\WINNT\system32\msafd.dll
    0x75010000 - 0x75017000 F:\WINNT\System32\wshtcpip.dll
    0x77920000 - 0x77943000 F:\WINNT\system32\imagehlp.dll
    0x72A00000 - 0x72A2D000 F:\WINNT\system32\DBGHELP.dll
    0x690A0000 - 0x690AB000 F:\WINNT\system32\PSAPI.DLL
    Local Time = Wed Mar 08 17:24:41 2006
    Elapsed Time = 9294
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.1_03-b02 mixed mode)
    #

    I'm having the same problem.
    One potential solutions is to use a custom SQL server JDBC driver instead of going through the ODBC bridge. This will minimize dependencies and should also improved performance. Hope this helps.
    - Joe

  • Report with sql server database

    hi
    i m trying to create a report for sql server database
    first time it was developed successfully but when i tried to run it next time it throws error
    REP-4100 : Failed to execute data source
    JDBCPDS -62008 : SQL Server Error:
    S1000 [Microsoft SQL Server Driver] Connection is busy with results for another hstmt
    now today when i tried to develop a new report it shows two new errors:
    1.
    REP-4100 : Failed to execute data source
    JDBCPDS -62008 : SQL Server Error:
    S0002[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
    2.
    REP-4100 : Failed to execute data source
    JDBCPDS -62008 : SQL Server Error:
    08S01[Microsoft][ODBC SQL Server Driver]Communication link failure

    Srini,
    yes you can use report Buider with Sql Server through jdbc driver.
    When you define the report datasource, you just have to set the JDBC conection infos.
    Patrick.

  • Error while Installing WAS with SQL server

    Hi all,
       I am trying to install WAS with SQL server as Database. I am getting error at "Register SDM targets"  section. We have given SQL server authentication mode to install WAS.
    Following is the error Log....
    Exception: [DataDirect][SQLServer JDBC Driver][SQLServer]Cannot open database requested in login 'HCL'. Login fails.
         at com.ddtek.jdbc.base.BaseExceptions.createException(Unknown Source)
         at com.ddtek.jdbc.base.BaseExceptions.getException(Unknown Source)
         at com.ddtek.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
         at com.ddtek.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
         at com.ddtek.jdbc.sqlserver.tds.TDSLoginRequest.processReplyToken(Unknown Source)
         at com.ddtek.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
         at com.ddtek.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
         at com.ddtek.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
         at com.ddtek.jdbc.base.BaseConnection.open(Unknown Source)
         at com.ddtek.jdbc.base.BaseDriver.connect(Unknown Source)
         at com.sap.sql.jdbc.NativeConnectionFactory.createNativeConnection(NativeConnectionFactory.java:149)
         at com.sap.sql.connect.OpenSQLDataSourceImpl.createConnection(OpenSQLDataSourceImpl.java:472)
         at com.sap.sql.connect.OpenSQLDataSourceImpl.getConnection(OpenSQLDataSourceImpl.java:253)
         at com.sap.sdm.serverext.servertype.dbsc.extern.DBSCConnectionManager.createSDMVendorConnection(DBSCConnectionManager.java:214)
         at com.sap.sdm.serverext.servertype.dbsc.extern.DBSCConnectionManager.createSDMConnections(DBSCConnectionManager.java:77)
         at com.sap.sdm.serverext.servertype.dbsc.ConnectionManagerDecorator.createSDMConnections(ConnectionManagerDecorator.java:73)
         at com.sap.sdm.serverext.servertype.dbsc.DatabaseTargetSystem.connect(DatabaseTargetSystem.java:140)
         at com.sap.sdm.serverext.servertype.dbsc.DBSCDeploymentActionProcessor.executeAction(DBSCDeploymentActionProcessor.java:115)
         at com.sap.sdm.app.proc.deployment.impl.PhysicalDeploymentActionExecutor.execute(PhysicalDeploymentActionExecutor.java:58)
         at com.sap.sdm.app.proc.deployment.impl.DeploymentActionImpl.execute(DeploymentActionImpl.java:181)
         at com.sap.sdm.app.proc.deployment.controllers.internal.impl.DeploymentExecutorImpl.execute(DeploymentExecutorImpl.java:51)
         at com.sap.sdm.app.proc.deployment.states.eventhandler.ExecuteDeploymentHandler.executeAction(ExecuteDeploymentHandler.java:84)
         at com.sap.sdm.app.proc.deployment.states.eventhandler.ExecuteDeploymentHandler.handleEvent(ExecuteDeploymentHandler.java:61)
         at com.sap.sdm.app.proc.deployment.states.StateBeforeNextDeployment.processEvent(StateBeforeNextDeployment.java:78)
         at com.sap.sdm.app.proc.deployment.states.InstContext.processEventServerSide(InstContext.java:88)
         at com.sap.sdm.app.proc.deployment.states.InstContext.processEvent(InstContext.java:74)
         at com.sap.sdm.app.sequential.deployment.impl.DeployerImpl.doPhysicalDeployment(DeployerImpl.java:121)
         at com.sap.sdm.app.sequential.deployment.impl.DeployerImpl.deploy(DeployerImpl.java:90)
         at com.sap.sdm.control.command.cmds.Deploy.execute(Deploy.java:162)
         at com.sap.sdm.control.command.decorator.AssureStandaloneMode.execute(AssureStandaloneMode.java:54)
         at com.sap.sdm.control.command.decorator.AssureOneRunningSDMOnly.execute(AssureOneRunningSDMOnly.java:61)
         at com.sap.sdm.control.command.decorator.SDMInitializer.execute(SDMInitializer.java:52)
         at com.sap.sdm.control.command.decorator.GlobalParamEvaluator.execute(GlobalParamEvaluator.java:60)
         at com.sap.sdm.control.command.decorator.AbstractLibDirSetter.execute(AbstractLibDirSetter.java:46)
         at com.sap.sdm.control.command.decorator.ExitPostProcessor.execute(ExitPostProcessor.java:48)
         at com.sap.sdm.control.command.decorator.CommandNameLogger.execute(CommandNameLogger.java:49)
         at com.sap.sdm.control.command.decorator.AdditionalLogFileSetter.execute(AdditionalLogFileSetter.java:65)
         at com.sap.sdm.control.command.decorator.AbstractLogDirSetter.execute(AbstractLogDirSetter.java:52)
         at com.sap.sdm.control.command.Command.exec(Command.java:42)
         at SDM.main(SDM.java:21)
    Thanks in Advance
    Regards
    Vasu

    Hi Vasudevan,
    Does you password contain any special characters?
    Try using a simple password.
    Regards
    Daniel

Maybe you are looking for

  • Getting the file name it originated from

    hi people.. In php/perl and others there is a predefined variable __SELF__ that can return the name of the file it originated from. does java have such a thing? thanks

  • I think someone stole my ipod.. What do I do to find it? I looked everywhere.

    HELPPPP!

  • Corrupted IP config file?

    Hi I have a broadband cable connection in our building. Im not sure of the exact setup as I just plug an ethernet cable into my mac and I have internet. (The broadband company serves the whole residential building and the modem or router isnt accessi

  • Banshee and streaming .pls files

    Hey fellas. I'm trying to stream some .pls internet radio stations through Banshee 1.4.2 (on GNOME 2.24.3 on Arch64) with no success, but Banshee 1.4.3 under Ubuntu 8.10 on my netbook can stream the station fine. The Banshee website states that Bansh

  • Error installing LabVIEW Toolkit

    I am trying to install the National Instruments Developer Suite Toolkit Software CD (May 2006) and I get the following error, any ideas on what could be causing this problem? is there a newer version of the toolkit for LV8.2.1? Thanks, Attachments: e