SQL Server 2005 Problem: Incorrect syntax near '{'

hi,<br>
<br>
I am using SQL Server 2005 JDBC driver from Microsoft (sqljdbc_1.0.809.102_enu.exe), there are some problem when calling stored procedure from Database Control:<br>
<br>
The following exception flow when parameters of the stored procedure were wrapped to newline :<br>
<br>
<i>weblogic.jws.control.ControlException: ControlException on control test2005DBCtrl[Incorrect syntax near '{'.]</i><br>
<br>
Here is the method that generate the above exception:<br>
<br>
/**<br>
* @jc:sql statement::<br>
* {call P_dummyProcedure<br>
     *           <b>(<br>
     *           {intValue}, {value}<br>
*           )</b> <br>
* }::<br>
*/<br>
void callStoreProcedure(int intValue, String value);<br>
<br>
But if the parameters were not wrap, the method work fine:<br>
<br>
/**<br>
* @jc:sql statement::<br>
* {call P_dummyProcedure<br>
     *           <b>( {intValue}, {value} ) </b><br>
* }::<br>
*/<br>
void callStoreProcedure(int intValue, String value);<br>
<br>
The above problem exist when I change from SQL Sever 2000 to 2005. Both methods is ok for SQL Server 2000 (both the driver from BEA and Microsoft)<br>
Do any one got the above problem or know why?<br>
<br>
cheer ~
<br>

Wiz Cheng wrote:
hi Joe,<br>
<br>
following is a snippet of the config.xml, please see if that cover what you want ~ <br>
<br>
config.xml<br>
----<br>
          <JDBCConnectionPool CapacityIncrement="5"<br>
?? ?? ?? DriverName="com.microsoft.sqlserver.jdbc.SQLServerXADataSource"<br>
?? ?? ?? InitialCapacity="10" MaxCapacity="100" Name="sql2005Pool"<br>
?? ?? ?? PasswordEncrypted="{3DES}lF9SivpaSCc=" Properties="user=sa"<br>
?? ?? ?? SupportsLocalTransaction="true" Targets="cgServer"<br>
?? ?? ?? TestConnectionsOnReserve="true" TestTableName="SQL Select 1"<br>
?? ?? ?? URL="jdbc:sqlserver://svr08006\\SQL2005:1533;databaseName=SBI"<br>
?? ?? ?? XASetTransactionTimeout="true" XATransactionTimeout="300"/><br>
<br>
<JDBCTxDataSource JNDIName="JNDI_SQL_2005" Name="JNDI_SQL_2005"<br>
?? ?? ?? PoolName="sql2005Pool" Targets="cgServer"/><br>
<br>
<br>
Thanks ~ <br>
WizOk, please recreate the pool, telling the console to use the BEA driver for MS.
when it shows you the pool properties, it should show you a URL, something like:
"jdbc:bea:sqlserver://......". Please then edit the URL to add this to the end:
;spyAttributes=(log=(file)spy.log, so the URL looks like
jdbc:bea:sqlserver://......;spyAttributes=(log=(file)spy.log)
Or just make the pool, and then edit the config file.
You should then see the config entry look something like this:
<JDBCConnectionPool CapacityIncrement="5"
DriverName="weblogic.jdbcx.sqlserver.SQLServerDataSource"
InitialCapacity="10" MaxCapacity="100" Name="sql2005Pool"
PasswordEncrypted="{3DES}lF9SivpaSCc=" Properties="user=sa"
SupportsLocalTransaction="true" Targets="cgServer"
TestConnectionsOnReserve="true" TestTableName="SQL Select 1"
URL="jdbc:bea:sqlserver://......"
XASetTransactionTimeout="true" XATransactionTimeout="300"/>
Then please alter the URL line so it's like:
URL="jdbc:bea:sqlserver://......;spyAttributes=(log=(file)spy.log)"
This will generate a file in the server directory called spy.log.
Then when the server boots, please then run the code that would
have caused the problem, as simply as possible, and then send
me the spy.log file.
thanks,
Joe

Similar Messages

  • ReportViewer using SQL Query error states: Incorrect syntax near ','.

    Hello Community
        Using Visual Studio 2008 and SQL Server 2008 I created a Windows Application
    that uses SQL Server Reporting Services.  The application uses ReportViewer and
    calls a method written using SQL query.
                1-First I created the form.
                2-Next I dragged the ReportViewer (Toolbox) and Table (from DataSource) onto the form.
    The problem is that when it reaches the last line of the SQL query (ie, da.Fill(ds, "TableOne");)
    the code fails stating the error message:
                "Incorrect syntax near ','."
         The following is the code behind the form containing the query:
            private void ReportPgm1_Load(object sender, EventArgs e)
                // TODO: This line of code loads data into the 'ReportDBDataSet.TableOne' table. You can move, or remove it, as needed.
                this.TableOneTableAdapter.Fill(this.ReportDBDataSet.TableOne);  
                reportViewer1.ProcessingMode = ProcessingMode.Local;
                LocalReport ReportOneLocalReport = reportViewer1.LocalReport;
                DataSet ds = new DataSet("ReportDBDataSet.TableOne");
                pgmReportOne(FromDate, ToDate,   ds);
                ReportDataSource ds = new ReportDataSource("ReportDBDataSet.TableOne");
                ds.Value = dataset.Tables["TableOne"];
                ReportOneLocalReport.DataSources.Clear();
                ReportOneLocalReport.DataSources.Add(ds);
                this.reportViewer1.RefreshReport();
            private void pgmReportOne(DateTime FromDate, DateTime ToDate, DataSet ds)
                SqlConnection connection = new SqlConnection("Data Source=ReportDBServer;Initial Catalog=ReportDB;Uid=sa;pwd=Password");
                string sqlReportOne = "Select ([InDate], [FirstName], [LastName], [AGe]" +
                                   "from TableOne";
                SqlCommand command = new SqlCommand(sqlReportONe, connection);
                command.Parameters.Add(new SqlParameter("paramFDate", FromDate));
                command.Parameters.Add(new SqlParameter("paramTDate", ToDate));
                SqlDataAdapter da = new SqlDataAdapter(command);
                da.Fill(ds, "TableOne");
        Why does the last line throw an error?
        Thank you
        Shabeaut

    --NOTE: The statement below cannot be run on SQL Server 2012
    --If you have an earlier version and can set the compatibility
    --level to 80, it can be run.
    SELECT sso.SpecialOfferID, Description, DiscountPct, ProductID
    FROM Sales.SpecialOffer sso,
    Sales.SpecialOfferProduct ssop
    WHERE sso.SpecialOfferID *= ssop.SpecialOfferID
    AND sso.SpecialOfferID != 1
    Hi Scott
    The *= is old syntax and not compatible with SQL Server 2012 (as stated in the comments). 
    You could do something like this instead
    SELECT sso.SpecialOfferID
    ,Description
    ,DiscountPct
    ,ProductID
    FROM Sales.SpecialOffer sso
    left outer join Sales.SpecialOfferProduct ssop on sso.SpecialOfferID = ssop.SpecialOfferID
    WHERE sso.SpecialOfferID != 1

  • Crystal Report 8.5 with SQL SERVER 2005 problems

    Post Author: AREVA
    CA Forum: Data Connectivity and SQL
    Hi All !We have some problems with Crystal Reports version 8.5 with SQL Server 2005: 1) When we want to generate a report (using data in SQL Server 2005) we have a popup message error : "impossible to loaded pdssql.dll".2) If we want to use SQL Server 2005, which Crystal Reports version we must used ? Is there any restrictions with this connectivity with 8.5 version ?Please, let me known, all informations about SQL Server 2005 and Crystal Report 8.5.Thanks for all !Best regards Anthony

    Hello Kamlesh,
    There is no expectation that the ActiveX viewer (RDC?) from CR8.5 will work in any version of Visual Studio .NET. There is also no expectation that the ActiveX viewer from CR8.5 will work on a machine with a 64 bit operating system.
    You're using VS2008. You should migrate to the bundled edition of CR for VS2008 (v10.5), the ReportDocument object, and the .NET Windows form viewer or Web form viewer.
    Sincerely,
    Dan Kelleher

  • SQL server 2005 problem with service starting

    I am having a problem starting my sqlserver service. It will not start and therefore i have no access to my sql 2005 server database. This is what in the event log. This database was working fine until i had two drives kill over in a RAID configuration.
    The striping went out with a hitch and no i want to see if anyone have any ideas before i perform a restore. Do i need to run SQL server repair with the installation disk?

    Well from viewing the log it looks like i am in a pickle. Since the SQL service won't start, is there a command or script to run for a database check using powershell? Since it looks like i will be doing a restore, just curious now.
    2014-01-16 15:27:58.30 spid5s      Starting up database 'master'.
    2014-01-16 15:27:59.81 spid5s      Error: 824, Severity: 24, State: 2.
    2014-01-16 15:27:59.81 spid5s      SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:363; actual 0:0). It occurred during a read of page (1:363) in database ID 1 at offset 0x000000002d6000 in file
    'W:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf'.  Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately.
    Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
    2014-01-16 15:27:59.81 spid6s      Error: 922, Severity: 14, State: 1.
    2014-01-16 15:27:59.81 spid6s      Database 'master' is being recovered. Waiting until recovery is finished.
    2014-01-16 15:27:59.81 spid6s      System Task System Task produced an error that was not handled.  Major: 9, Minor: 22, Severity:14, State:1
    2014-01-16 15:27:59.81 spid5s      Error: 3313, Severity: 21, State: 2.
    2014-01-16 15:27:59.81 spid5s      During redoing of a logged operation in database 'master', an error occurred at log record ID (2369:160:2). Typically, the specific failure is previously logged as an error in the Windows Event Log
    service. Restore the database from a full backup, or repair the database.
    2014-01-16 15:27:59.81 spid5s      Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL
    Server Books Online.

  • Timestamp to datetime throws "Incorrect syntax near '00'"

    SQLServer 6.5 and Weblogic 6.0 SP2 on NT4.0:
    Hi All
    Can someone point me the utility which would tell me which version of
    the JDBC Driver I am using. I know I am using Type 4 JDriver for
    MSSQLServer 6.5 but I want to know the exact version to report the below
    problem.
    I am trying to insert java.sql.Timestamp values in datetime columns in a
    table via a BMP (1.1) and I get this error
    From java object
    String value =07/11/2001
    timestamp = 2001-07-11 00:00:00.0
    java.rmi.RemoteException: EJB Exception:; nested exception is:
    javax.ejb.EJBException
    - with nested exception:
    [java.sql.SQLException: Line 1: Incorrect syntax near '00'. Severity 15,
    State 1, Procedure 'QCID_SRP_DEV null', Line 1]
    Any help would be much appreciated.
    Thanks
    Madhu

    Madhusudan R Chaganthi wrote:
    >
    SQLServer 6.5 and Weblogic 6.0 SP2 on NT4.0:
    Hi All
    Can someone point me the utility which would tell me which version of
    the JDBC Driver I am using. I know I am using Type 4 JDriver for
    MSSQLServer 6.5 but I want to know the exact version to report the below
    problem.
    I am trying to insert java.sql.Timestamp values in datetime columns in a
    table via a BMP (1.1) and I get this error
    From java object
    String value =07/11/2001
    timestamp = 2001-07-11 00:00:00.0
    java.rmi.RemoteException: EJB Exception:; nested exception is:
    javax.ejb.EJBException
    - with nested exception:
    [java.sql.SQLException: Line 1: Incorrect syntax near '00'. Severity 15,
    State 1, Procedure 'QCID_SRP_DEV null', Line 1]The first answer is to run the command:
    % java weblogic.jdbc.mssqlserver4.Driver
    This will print out the exact version.
    Then, show me. I assume you're dealing with a
    java.sql.Timestamp object. If so, would you
    show me what it's .toString() method prints out?
    I just saw a difference in our 7.0 driver and our
    6.5 driver with setTimestamp(). Apparently a bug
    was fixed in one but maybe not in the other because
    of how infrequently we get 6.5 users nowadays.
    Once I see your string, I can make you a new driver.
    Joe
    Any help would be much appreciated.
    Thanks
    Madhu--
    PS: Folks: BEA WebLogic is expanding rapidly, with both entry and advanced positions
    for people who want to work with Java, XML, SOAP and E-Commerce infrastructure products.
    We have jobs at Nashua NH, Liberty Corner NJ, San Francisco and San Jose CA.
    Send resumes to [email protected]

  • ODBC error state: 60 code: 102 message: [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Incorrect syntax near

    Hi,
    I am currently receiving the following error in BI Answers when I run a query against a Microsoft SQL 2005 Server.
    View Display Error
    Odbc driver returned an error (SQLExecDirectW).
      Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 16001] ODBC error state: 60 code: 8180 message: [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Statement(s) could not be prepared.. [nQSError: 16001] ODBC error state: 60 code: 102 message: [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Incorrect syntax near 'UserName'.. [nQSError: 16002] Cannot obtain number of columns for the query result. (HY000)
    SQL Issued: SELECT 0 s_0, "SD&A_Dashboard_Test"."BORIS_ALIAS_ETMS_Users"."Id" s_1, "SD&A_Dashboard_Test"."BORIS_ALIAS_ETMS_Users"."UserName" s_2 FROM "SD&A_Dashboard_Test" WHERE ("BORIS_ALIAS_ETMS_Users"."UserName" = 'trowe') FETCH FIRST 65001 ROWS ONLY 
    I am able to connect successfully to the Data Source and run a query against the database using the NQCMD command line tool so believe I have configured the DataDirect 7.0.1 drivers correctly, also I am able to view the Table Data in the RPD Physical Layer in the BI Administration Tool. So don't understand why I am getting this error.
    I have also activated the nquery.log but that doesn't really give me any further information.
    [2015-04-28T16:37:22.000+00:00] [OracleBIServerComponent] [TRACE:4] [USER-34] [] [ecid: 4a9e440f990ba0a4:-1995d2c5:14d00d3ef04:-8000-00000000000001c6,0:1:1:5] [tid: 5f] [requestid: 6f11000b] [sessionid: 6f110000] [username: borisdev] -------------------- Query Status: [nQSError: 16002] Cannot obtain number of columns for the query result. [[
    [nQSError: 16001] ODBC error state: 60 code: 102 message: [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Incorrect syntax near 'UserName'..
    [nQSError: 16001] ODBC error state: 60 code: 8180 message: [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Statement(s) could not be prepared..
    [nQSError: 43119] Query Failed:
    I was wondering if anyone could shed any light on what could possibly be causing the [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Incorrect syntax near 'UserName'.. error ? And also provide any suggestions on how I can troubleshoot this issue further as I am now completely out of ideas of what to do next having tried numerous things i.e. setting  IDENTIFIER_QUOTE_CHAR = '' in DBFeatures.INI which I found in similar posts on the subject all to no avail
    Regards,
    Tom Rowe

    Hi Rajagopal,
    Thanks for your reply after doing some further investigations this morning I found and corrected the problem...
    The DataDirect Driver does not like double quotes in the query for some reason, testing  using the BI Answers generated SQL with the nqcmd tool below...
    With double quotes “” it fails immediately
    Give SQL Statement: select T18706."Id" as c1, T18706."UserName" as c2 from "ETMS_Users" T18706 where ( T18706."UserName" = 'trowe' )
    select T18706."Id" as c1, T18706."UserName" as c2 from "ETMS_Users" T18706 where ( T18706."UserName" = 'trowe' )
    [102][State: S1000] [DataDirect][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Incorrect syntax near 'Id'.
    Statement execute failed
    With double quotes removed for just the columns I now get the Error near ‘ETMS_Users’ which still had the double quotes
    Give SQL Statement: select T18706.Id as c1, T18706.UserName as c2 from "ETMS_Users" T18706 where ( T18706.UserName = 'trowe' )
    select T18706.Id as c1, T18706.UserName as c2 from "ETMS_Users" T18706 where ( T18706.UserName = 'trowe' )
    [102][State: S1000] [DataDirect][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Incorrect syntax near 'ETMS_Users'.
    Statement execute failed
    With all double quotes removed it works !
    Give SQL Statement: select T18706.Id as c1, T18706.UserName as c2 from ETMS_Users T18706 where ( T18706.UserName = 'trowe' )
    select T18706.Id as c1, T18706.UserName as c2 from ETMS_Users T18706 where ( T18706.UserName = 'trowe' )
    c1           c2
    42499        trowe
    Row count: 1
    Give SQL Statement:
    The solution to fix the problem is...
    In the BI Admin Tool Physical Layer Database, Properties Features tab is to delete the double quote in the Value column for IDENTIFIER_QUOTE_CHAR, setting this in the DBFeatures.INI file does not resolve the problem possibly it did in earlier versions of the product.
    Regards,
    Tom Rowe

  • [Execute SQL Task] Error: Executing the query "DECLARE_@XMLA nvarchar(3000) ,__@DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly,

    Hi
    DECLARE @XMLA nvarchar(3000)
    , @DateSerial nvarchar(35);
    -- Change date to format YYYYMMDDHHMMSS
    SET @DateSerial = CAST(GETDATE() AS DATE);
    --SELECT @DateSerial
    Set @XMLA = 
    N' <Batch xmlns="http://schemas.microsoft.com/analysis services/2003/engine">
     <ErrorConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2"
    xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200"
    xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200">
    <KeyErrorLimit>-1</KeyErrorLimit>
    <KeyNotFound>IgnoreError</KeyNotFound>
    <NullKeyNotAllowed>IgnoreError</NullKeyNotAllowed>
     </ErrorConfiguration>
     <Parallel>
    <Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2"
    xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200"
    xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300">
     <Object>
     <DatabaseID>MultidimensionalProject5</DatabaseID>
     <CubeID>giri</CubeID>
     <MeasureGroupID>Fact Internet Sales</MeasureGroupID>
     </Object>
     <Type>ProcessFull</Type>
     <WriteBackTableCreation>UseExisting</WriteBackTableCreation>
     </Process>
      </Parallel>
    </Batch>';
    EXEC (@XMLA) At SHALL-PCAdventureWorksDw ;
     iam executive the    query when iam getting below error.
      [Execute SQL Task] Error: Executing the query "DECLARE
    @XMLA nvarchar(3000)
    , @DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set
    correctly, or connection not established correctly. 
     how to solve this error;
     please help me

    What are you trying to do? What sort of data source is  SHALL-PCAdventureWorksDw?
    When you use EXEC() AT, I would execpt to see an SQL string to be passed to EXEC(), but you are passing an XML string????
    If you explain why you think this would work in the first place, maybe we can help you.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Odbc sql server driver sql server incorrect syntax near 'è'

    Hello.
    An online game I host uses ODBC and SQL.
    I'm using SQL Server Management Studio 2012.
    I had two errors suddenly appear.
    [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'è'
    and
    [Microsoft][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark after the string ".
    Can anyone explain what these are and how I can fix them please.
    Kind regards
    Zath

    Hello Zath,
    "Unclosed quotation mark after the string" means there is a Quotation mark missing, like in this query at the end:
    SELECT *
    FROM sys.objects
    WHERE Name like 'sys%
    But without knowing your queries it's difficult to say, where & why this occurs.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Migration From SQL Server 2005 to Oracle DB through Oracle SQ Dev Problem

    Hi all,
    we are trying to do a full Migration from MS SQL Server 2005 to Oracle DB 9.2 i
    we are using Oracle SQL Developer V 1.5.3,
    the capturing of the DB and the conversion to the oracle model completed succefully
    however when we try to generate the scripts from the converted model
    the script generation hangs on a sequence and no further progress is made (the script generation pop up keeps still on a certain sequence displaying its name, and thats it )
    no error messages are displayed,
    how can we know the reason for this? or atleast find a log for whats happening...
    any suggestions?
    Thank you

    Hi,
    migrating a sequence shouldn't make a problem. I did a quick test. I created this table in SQL Server:
    create table test_seq (col1 int identity(1,1),col2 char(1))
    Then I captured the table, converted the table and generated the script. There was no problem.
    CREATE SEQUENCE succeeded.
    CREATE TABLE succeeded.
    Connected
    TRIGGER test_seq_col1_TRG Compiled.
    As you see, applying the script was also successful.
    I am using Oracle RDBMS 11g, I don't know whether this makes a difference. Do you have any 11g instance available to test it?
    Can you show me one of the sequences that are causing the hang? Is the CREATE SEQUENCE statement already in the generated script, or not? Your table is for sure more complex than my simple example.
    Regards,
    Wolfgang
    Edited by: wkobargs on Jan 13, 2009 3:01 AM

  • Database Connection Problem-SQL SERVER 2005

    Dear all,
    I have been struggling with this database connection.I have installed sql server 2005 in my PC and i am trying to connect to the Database Adventity.But it is showing port 1432 invalid.I have placed sqljdbc jar in my lib folder.If i dont specify Database name then it will print hi Message..if i specify Database name then the error will come.
    MY CODE is::
    <%@page import="java.sql.*,java.io.*,java.lang.*,java.util.*,java.util.Vector,bean.*" %>
    <%
              Connection con;
              Statement stmt;
              String url= "jdbc:sqlserver://156.0.11.140:1433/Adventity";
              Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
              con = DriverManager.getConnection(url,"sa","hcl@123");
              stmt = con.createStatement();     
              out.println("hi");
    %>
    THE ERROR IS:
    javax.servlet.ServletException: The port number 1433/Adventity is not valid.
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
         org.apache.jsp.adv1_jsp._jspService(adv1_jsp.java:66)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    root cause
    PLEASE HELP ME TO GET RID OUT FROM THIS PROBLEM.
    THANKS IN ADVANCE.

    hi
    i have given what u said and it is not working but it displays blank page.even i tried to getdate..
    pls help me
    <%@page import="java.sql.*,java.io.*,java.lang.*,java.util.*,java.util.Vector,bean.*" %>
    <%
              Connection con;
              Statement stmt;
              try
              String url= "jdbc:sqlserver://156.0.11.140:1433;databaseName=test";
              Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
              con = DriverManager.getConnection(url,"sa","hcl@123");
              stmt = con.createStatement();
              String user="select getdate();"
              System.out.println(user);
         catch (Exception e) {
                   out.println(e.toString());
              } finally {
                   try {
                   } catch (Exception e) {
                        e.printStackTrace()     ;
    %>

  • SQL Server 2005 Update mechanism problem

    Hi Gurus,
          We're faced with one SQL Server 2005 update mechanism problem. Here is my problem:
          According to our requirement, an add_on interface program is designed to execute creation of production order by calling Bapi.
          There are 3 steps in this add_on program:
          Step 1: Create production order
          Step 2: Change the information of production.
          Step 3: Some other
          After the step 1 has finished immediately step 2 is called, Howerver the information which should have inserted into database table couldn't be found from database. (Maybe because the time between two steps is too short to finish inserting)
          In order to ensure the complete of the transaction, before the step 2 executed, the information in step 1 should have inserted into database.
           Is there any solution to solve this problem?
           I guess whether there is any parameter which control the time of writing buffer into database...
    Any advice is appreciated.
    Thanks & Best Regards,
    Derek Yang

    Hi
    I have the same problem, but that post didnt help me
    This is the error I have:
    My snapshot agent hangs.. waiting for a response from the server.. and timeouts.
    This only hapens for a publication that has a filter based on HOSTNAME()
    The other publications work fine
    Error messages:
    Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
    Command Text: sp_MSsetup_partition_groups
    Parameters: @publication = XXXXXXX
    Stack: at Microsoft.SqlServer.Replication.AgentCore.ReMapSqlException(SqlException e, SqlCommand command)
    at Microsoft.SqlServer.Replication.AgentCore.AgentExecuteNonQuery(SqlCommand command, Int32 queryTimeout)
    at Microsoft.SqlServer.Replication.AgentCore.ExecuteDiscardResults(CommandSetupDelegate commandSetupDelegate, Int32 queryTimeout)
    at Microsoft.SqlServer.Replication.Snapshot.MergeSnapshotProvider.SetupPartitionGroups()
    at Microsoft.SqlServer.Replication.Snapshot.MergeSnapshotProvider.DoRegularMergeSnapshotPreparations()
    at Microsoft.SqlServer.Replication.Snapshot.MergeSnapshotProvider.DoPreArticleFilesGenerationProcessing()
    at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
    at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
    at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: MSSQLServer, Error number: -2)
    Get help: http://help/-2
    Server XXXXXXXXX, Level 11, State 0, Procedure , Line 0
    Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. (Source: MSSQLServer, Error number: -2)
    Get help: http://help/-2

  • SQL Server 2005 Vista Problems

    I have 3 databases in SQL Server 2005 that I want to connect
    to. Everything works fine in XP, but when I try to set it up on
    Vista I get all sorts of problems. All software is latest version
    with all available updates installed.
    After restarting the Vista computer, the first database I
    select in CF administrator connects successfully, but the other two
    return Connection Reset error. It doesn't matter which of the 3 I
    select, just the first one connects.
    However, whichever one it is that CF confirmed was
    successful, when accessed from a CF page also returns Connection
    Reset error.
    The security settings in SQL Server are the same for each
    database.
    Anyone got any idea how to solve this problem??
    Doug

    The one that was connecting was connecting to port 1434. I
    have now locked it down and only port 1433 is available. Now I get
    the same error every time I try to make a connection:
    Error establishing socket. Connection refused: connect
    Apart from the port number (which was not 1433 on my old XP
    computer) everything else is identical.
    Is there some setting in Vista out of the box that has to be
    changed to get CF to connect to SQL Server 2005?
    Doug

  • MS SQL Server 2005 Capture Problem

    Hi Friends
    I am looking to migrate SQL Server 2005 standard edition to oracle 10g. for that I am using oracle SQL Developer workbench tool 1.5.3 but I am getting error while capturing the MS SQL Server database.
    One thing I noticed, after creating repository database that Under the repository schema the package body for MD_META* package is showing Invalid, I tried to compile it manually but still its in Invalid state I don't know the reason why it's in Invalid state.
    My Detals are as below
    Oracle 10.2g Standard edition without any patchset.
    MS SQL Server 2005 Standard Edition
    SQL Developer 1.5.3
    Please can anybody help me out in this issue ? Waiting for your reply
    Regards
    Anandkumar S.M

    Hello,
    have you tried what happens if you delete the migration repository and recreate it?
    If the problem persists:
    1. Make sure the user that you are using has the following privileges
    Roles
    CONNECT WITH ADMIN OPTION
    RESOURCE WITH ADMIN OPTION
    Privileges
    ALTER ANY ROLE
    ALTER ANY SEQUENCE
    ALTER ANY TABLE
    ALTER TABLESPACE
    ALTER ANY TRIGGER
    COMMENT ANY TABLE
    CREATE ANY SEQUENCE
    CREATE ANY TABLE
    CREATE ANY TRIGGER
    CREATE VIEW WITH ADMIN OPTION
    CREATE PUBLIC SYNONYM WITH ADMIN OPTION
    CREATE ROLE
    CREATE TABLESPACE
    CREATE USER
    DROP ANY SEQUENCE
    DROP ANY TABLE
    DROP ANY TRIGGER
    DROP TABLESPACE
    DROP USER
    DROP ANY ROLE
    GRANT ANY ROLE
    INSERT ANY TABLE
    SELECT ANY TABLE
    UPDATE ANY TABLE
    2. Run the following in SQLPLUS as the user that is being used to create the repository
    SQL> alter package md_meta compile ;
    3. If you then get a message like:
    Warning: Package altered with compilation errors.
    then issue:
    SQL> show errors
    4. If that does not show any error, what does the following query show:
    alter package md_meta compile;
    select text from dba_errors where name ='MD_META' and owner ='<your owner>' ;
    Best regards
    Wolfgang

  • Problem using production version of SQL Server 2005 JDBC drivers

    A production version of the Microsoft SQL Server 2005 JDBC driver became available on 1/20/06, and we are having some issues getting it to work with WLS 9.1. The non-XA driver works fine, but when we attempt to use the XA version, we see the error below in our logs. (Note that in the text "status:0 msg:null", the "null" is actually an unprintable character that I was not able to copy/paste.)
    We have successfully tested WLS 9.1 with the beta JDBC drivers that were released by Microsoft a number of months ago, so this appears to be a problem with the prod version only (although we had no trouble using the prod drivers with JBoss). We have actually opened a support case for this, but the response we have received thus far has been negligible at best and we really need to get this issue resolved, so I am posting the problem here as well to see if anyone else has encountered it.
    Regards,
    Sabrina
         at ourpackage.OurMDB.onMessage(OurMDB.java:184)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:426)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:332)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:288)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:3824)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:3738)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4228)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    Caused by: ourpackage.OurDBUtil.openConnection(OurDBUtil.java:130)     
         ... 11 more
    Caused by: java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XA_OK start() failed on resource 'OurXADataSource': XA_OK
    javax.transaction.xa.XAException: java.sql.SQLException: Failed to create the XA control connection. Error: xp_sqljdbc_xa_init failure, status:0 msg:null.
         at com.microsoft.sqlserver.jdbc.SQLServerXAResource.start(Ljavax.transaction.xa.Xid;I)V(Unknown Source)
         at weblogic.jdbc.jta.DataSource.start(DataSource.java:679)
         at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1160)
         at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1093)
         at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:274)
         at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:496)
         at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:428)
         at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1390)
         at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1314)
         at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:436)
         at weblogic.jdbc.jta.DataSource.connect(DataSource.java:392)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
         at ourpackage.OurDBUtil.openConnection(OurDBUtil.java:125)     
         at ourpackage.OurMDB.onMessage(OurMDB.java:184)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:426)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:332)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:288)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:3824)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:3738)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4228)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
         at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1395)
         at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1314)
         at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:436)
         at weblogic.jdbc.jta.DataSource.connect(DataSource.java:392)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
         at ourpackage.OurDBUtil.openConnection(OurDBUtil.java:125)     
         at ourpackage.OurMDB.onMessage(OurMDB.java:184)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:426)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:332)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:288)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:3824)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:3738)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4228)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
         at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1327)
         at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:436)
         at weblogic.jdbc.jta.DataSource.connect(DataSource.java:392)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
         at ourpackage.OurDBUtil.openConnection(OurDBUtil.java:125)
         ... 12 more

    SabrinaL wrote:
    A production version of the Microsoft SQL Server 2005 JDBC driver became available on 1/20/06, and we are having some issues getting it to work with WLS 9.1. The non-XA driver works fine, but when we attempt to use the XA version, we see the error below in our logs. (Note that in the text "status:0 msg:null", the "null" is actually an unprintable character that I was not able to copy/paste.)
    We have successfully tested WLS 9.1 with the beta JDBC drivers that were released by Microsoft a number of months ago, so this appears to be a problem with the prod version only (although we had no trouble using the prod drivers with JBoss). We have actually opened a support case for this, but the response we have received thus far has been negligible at best and we really need to get this issue resolved, so I am posting the problem here as well to see if anyone else has encountered it.
    Regards,
    SabrinaHi. Have you done all the XA-related install for the new MS driver? (put the XA
    dll in the DBMS environment etc)? Is your DBMS on a 32-bit machine or 64-bit machine?
    Does the driver present a dll for each of those? You can also get good JDBC help
    from MS via their microsoft.public.sqlserver.jdbcdriver newsgroup.
    Joe Weinstein at BEA
    >
         at ourpackage.OurMDB.onMessage(OurMDB.java:184)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:426)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:332)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:288)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:3824)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:3738)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4228)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    Caused by: ourpackage.OurDBUtil.openConnection(OurDBUtil.java:130)     
         ... 11 more
    Caused by: java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XA_OK start() failed on resource 'OurXADataSource': XA_OK
    javax.transaction.xa.XAException: java.sql.SQLException: Failed to create the XA control connection. Error: xp_sqljdbc_xa_init failure, status:0 msg:null.
         at com.microsoft.sqlserver.jdbc.SQLServerXAResource.start(Ljavax.transaction.xa.Xid;I)V(Unknown Source)
         at weblogic.jdbc.jta.DataSource.start(DataSource.java:679)
         at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1160)
         at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1093)
         at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:274)
         at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:496)
         at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:428)
         at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1390)
         at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1314)
         at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:436)
         at weblogic.jdbc.jta.DataSource.connect(DataSource.java:392)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
         at ourpackage.OurDBUtil.openConnection(OurDBUtil.java:125)     
         at ourpackage.OurMDB.onMessage(OurMDB.java:184)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:426)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:332)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:288)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:3824)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:3738)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4228)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
         at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1395)
         at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1314)
         at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:436)
         at weblogic.jdbc.jta.DataSource.connect(DataSource.java:392)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
         at ourpackage.OurDBUtil.openConnection(OurDBUtil.java:125)     
         at ourpackage.OurMDB.onMessage(OurMDB.java:184)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:426)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:332)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:288)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:3824)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:3738)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4228)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
         at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1327)
         at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:436)
         at weblogic.jdbc.jta.DataSource.connect(DataSource.java:392)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
         at ourpackage.OurDBUtil.openConnection(OurDBUtil.java:125)
         ... 12 more

  • MS SQL Server 2005...  Problem while executing stored procedure

    Hi.. all
    I have got a problem with sql server 2005
    When i execute any stored procedure on a remote database using
    ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY
    options, it throws SQL Exception with following message
    "A server cursor cannot be opened on the given statement or statements. Use a default result set or client cursor."
    Note: Every thing works fine, if I execute the same sp from the PC where sql server is installed, it throws this exception only when i execute sp from a computer different thn one where SQL server is installed.
    Here is d code.
    CallableStatement call = conn.prepareCall( "{call getAttributeLabelValues(?,?,?)}",
    ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY
    // set parameters.
    ResultSet rs = call.executeQuery( ) ;
    If I remove options
    ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY
    while executin SP, thn every thing works fine.
    here is d exception
    com.microsoft.sqlserver.jdbc.SQLServerException: A server cursor cannot be opened on the given statement or statements. Use a default result set or client cursor.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.sendExecute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteQuery(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(Unknown Source)
    I will appreciate any help.
    Sudhir
    http://www.jyog.com

    use sql server jdbc driver v1.2..........

Maybe you are looking for

  • Following upgrade from 2.1 to 5.0p4 server returns empty results after user logs on, why?

    With debug logging I see no errors. I verified no data goes out on the wire, after logon user is redirected to command.shtml, an HTTP OK is returned then nothing. Tried 'recovering' database with csdb, creating new users and exporting/importing data

  • VAT conditions in JINFAC

    Hi friends, can any one let me know the VAT condition types to be used in JINFAC pricing procedure? Thanks Ivy

  • Restoring iphone from backup did not recover contacts

    So I had to restore my iphone to factory.  I backed up my phone (4s with latest OS) to itunes then reset phone via the general settings menu.  I go to restore my phone from the backup and it syncs apps and music - but not settings and contacts.  I al

  • Slides and forms can't work in CS5?

    Download and install CS5 trial version but can't open flash files with flash CS5. Got error message like this: 'Slides and forms documnets are not supported in this version of Flash. Please open in a previous version.' Does full version support flash

  • Greeking in CS5

    I have been using Illustrator now for some months and all of a sudden a grey box appears when i try to resize text or drag it anywhere etc. I have done lots of digging and found that the problem is something called greeking...and it is not possible t