Using SQLCMD need to SET NOCOUNT OFF for Sql Server Parallel Data warehouse (PDW) V2

Using SQLCMD to copy data to a flat file that is imported into Oracle using SQL Loader.
At the bottom of the files created by SQLCMD there’s a blank row (ALL NULLs) and then there’s a row that shows the total number of rows, e.g., (12571 rows affected).
SQL Loader allows us to remove headers (SKIP = 2), but it does not allow us to skip trailing records. Using the WHEN TABLE_ID != BLANKS command I can remove the blank row above the count marker, but SQLLDR still tries to load the count marker into the first
column, which fails the import.
When using SET NOCOUNT in the PDW I receive the error ‘NoCount is not a recognized option’.
Any suggestions on how to get around this and remove the trailing count?

Hi Waldropj,
Thank you for your question. I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
Thank you for your understanding and support.
If you have any feedback on our support, please click
here.
Elvis Long
TechNet Community Support

Similar Messages

  • Has anybody used the microsoft JDBC 2.0 driver for sql server 2000?

    Hi,
    Has anybody used the JDBC 2.0 driver for sql server 2000 downloadable from the
    microsoft website?When I try using it with WL 6.1 sp1 it says it can't load the
    driver.I try viewing the class file from the jar file using the jar utility it
    gives an unknown Zip format error.Anybody has any solution for this ?If anybody
    has managed to work with this microsoft driver i will be grateful if they provide
    me with a solution.
    Thanks
    Thomas

    Hello Thomas,
    You may want to download the driver again and install it again.
    heres a sample xml tag in the config.xml:
    <JDBCConnectionPool
    DriverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    InitialCapacity="3" MaxCapacity="12" Name="MSpool"
    Password="{3DES}fUz1bxR0zDg=" Properties="user=uid"
    Targets="myserver"
    URL="jdbc:microsoft:sqlserver://mydbserver:1433"/>
    ensure that you follow the instructions from Microsoft. For using 2000
    driver you will need to have
    Install_dir/lib/msbase.jar and Install_dir/lib/msutil.jar in addition to
    Install_dir/lib/mssqlserver.jar in the CLASSPATH.
    hth
    sree
    "Thomas" <[email protected]> wrote in message
    news:3c91ec0e$[email protected]..
    Hi,
    Has anybody used the JDBC 2.0 driver for sql server 2000 downloadable from
    the
    microsoft website?When I try using it with WL 6.1 sp1 it says it can't load
    the
    driver.I try viewing the class file from the jar file using the jar utility
    it
    gives an unknown Zip format error.Anybody has any solution for this ?If
    anybody
    has managed to work with this microsoft driver i will be grateful if they
    provide
    me with a solution.
    Thanks
    Thomas

  • Set Command Timeout For SQL Server

    Hello,
    How do you set the command timeout for the 'open' statement? I am running a Database via SQL Server and I tried the dialog box timeout statement (the check box on the advanced tab) and simply get an error. The manual shows a 'step.commandtimeout' but how is it implemented?
    Thanks,
    Kevin

    Kevin -
    I looked at the internal implementation of the CVI SQL Toolkit. The toolkit function that the step type uses is DBNewSQLStatement. Internally to the toolkit the function opens a recordset instead of a command object. The command timeout attribute is only available on a command object and not on a recordset object, so as implemented inside the toolkit the error is appropriate. I think the toolkit could have used a command object to create the recordset object and this would allow the toolkit to let you set the timeout attribute. Unfortuneately this is not the way it was done.
    For the future I may investigate to see if there is a way to bypass this limitation by using different toolkit functions, but I am not sure if there a
    re any side effects.
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

  • A trigger returned a resultset and/or was running with SET NOCOUNT OFF while another outstanding result set was active

    I have 2 servers connected over a low speed wan and we're running SQL Server 2008 with Merge replication.
    At the subscriber, sometimes when attempting to insert new rows, I get this error:
    A trigger returned a resultset and/or was running with SET NOCOUNT OFF while another outstanding result set was active.
    My database doesn't have any triggers; the only triggers are the one created by the Merge replication
    Also, whenever this error occurs it automatically rolls back the existing transaction
    I am using DataTables and TableAdapters to
    insert and update the database using transactions
    What I have checked:
    the database log file size is below 50Mb
    Checked the source code for Zombie transactions (since I wasn't able to retrieve the actual error at the beginning)
    Checked the connection between the two servers and found it congested
    Questions:
    How to avoid this behavior and why it's occurring at first place?
    Why it's cancelling the open transaction?

    did the issue happen on some specific tables or all the tables?
    I suggest to run sql server trace at publisher and subscriber when the issue happens. Please involve below events and columns
    Stored      Procedures
    RPC:Completed      
    RPC:Starting
    sp:Completed
    sp:Starting
    sp:StmtStarting      
    sp:StmtCompleted      
    TSQL
    SQL:StmtCompleted
    SQL:StmtStarting      
    SQL:BatchCompleted
    SQL:BatchStarting      
    Unprepare SQL
     ‘Errors and Warnings’
    ErrorLog
    EventLog
    Exceptoin
    attention
    columns:
     TextData ,error, LoginName, ApplicationName , StartTime ,EndTime,DatabaseName,NestLevel,ObjectName,ObjectType,ServerName,eventsequence,linenumber,cpu,reads ,writes,rowcounts,clientprocessid,spid,transactionid
    Once the issue happens, please check the trace to find which step or statement hit the error.

  • SQL Trace to detect SET NOCOUNT OFF

    I have inherited an application that has a 9000+ stored procedures.  In a previous upgrade, the publisher added "SET NOCOUNT ON" to many of the procedures, but apparently not all.  I am trying to determine which procedures don't have
    this and may need to be fixed.  Can SQL trace or profiling detect activity from a proc that is running with SET NOCOUNT OFF - ?  Or is there another approach to detect this activity?
    If this is not the correct forum, please kindly redirect me.
    Thanks
    tgoddard

    So I don't think you could filter the SPs only having NOCOUNT OFF in profiler.  Probably what you could do is a combination of the trace and the above query. 
    First you could use the  trace to capture all the activities of the server, and parse all the stored procedure names them using a T-SQL (use the SP_STARTING OR SP_COMPLETED events and the ObjectName  in the output columns while starting the trace) 
    You can later load the trace using the sql statement
    SELECT
    objectname
    FROM fn_trace_gettable('D:\TrC1.trc', 10)
    where OBJECTNAME is not null
    Now use the above query to filter out the SPs that are having NOCOUNT OFF and join it with the trace output using the object name and you can get the SPs that are getting executed in the system and have NOCOUNT OFF. 
    Select OBJECT_ID, OBJECT_NAME(object_id) From sys.objects where type= 'P' and object_id not in (
    Select object_id From sys.sql_modules where definition like '%SET NOCOUNT%')
    Does this help you?
    Satheesh
    My Blog | How to ask questions in technical forum

  • Need to set default values for the fields plant and location in ME21N

    Hi All,
    i need to set default values for the fields plant and location in ME21N tcode.
    In accout assignment if we give 'A' then we need to create asset by clicking the Asset tab,there you have the fields plant and location.
    How to resolve this?
    Thanks in Advance

    hi .
    i needed to set default strorage location and plant in personal setting  in me21n.
    i solve it with this way.
    go to program SAPLMEPERS in se38.
    create new function in output with the sample name :MODULE ZTEST_001 OUTPUT.
    in this module write:
    if MEPOITEM_PROP-WERKS is INITIAL and  MEPOITEM_PROP-LGORT is INITIAL.
    MEPOITEM_PROP-WERKS = '1000'.
    MEPOITEM_PROP-LGORT = '0032'.
    endif.
    this is the solution.
    best regards.
    maryam

  • How to burn a video produced in iMovie in iDVD: with gratitude for the advice received I used the "professional quality" setting in iDVD for a video which in iMovie is 1h 20min long.  however this also failled. where did I go wrong, please?

    how to burn a video produced in iMovie in iDVD: with gratitude for the advice received I used the "professional quality" setting in iDVD for a video which in iMovie is 1h 20min long.  however this also failled. where did I go wrong, please?
    the message sked me to alter the quality of the DVD as the content was too large for the quality sellected.
    PLEASE HELP again,
    THANK YOU VERY MUCH
    MIchael

    Check the Advanced ➙ Project Information menu option to make sure the playing time of the entire project, movie plus menu is below the 120 minute limit.
    OT

  • Using JSP & JDBC driver for SQL Server 2000 on Red Hat

    I successfully have a .jsp app running on windows server 2000 using JDBC
    driver for SQL Server 2000. Which I installed in order to the following
    Red Hat:
    http://msdn.microsoft.com/MSDN-FILES/027/001/779/install.htm
    I moved the .jsp app over to the Red Hat 9 server running Tomcat, while
    keeping the MS SQL 2000 on windows. The issue I have is setting up the
    JDBC driver for SQL Server 2000 on the Red Hat server.
    I created a folder called /usr/java/MSSQLdriver and unzipped the tar file with
    the driver for SQL Server 2000. And ran the install.ksh script.
    The /usr/java/MSSQLdriver/lib has the following files within it:
    msbase.jar, msutil.jar, & mssqlserver.jar
    I chmod 0777 each of the *.jar files.
    I then went into /etc/profile.d/tomcat.sh and adding the following:
    CLASSPATH=.;/opt/msSQLjdbc/lib/msbase.jar;/opt/msSQLjdbc/lib/msutil.jar;/opt/msSQLjdbc/lib/mssqlserver.jar
    Each time I login and pull up the termial I get the following error:
    bash: /opt/msSQLjdbc/lib/msbase.jar: cannot execute binary file
    bash: /opt/msSQLjdbc/lib/msutil.jar: cannot execute binary file
    bash: /opt/msSQLjdbc/lib/mssqlserver.jar: cannot execute binary file
    And can't connnect to the database within the .jsp app.
    Is there anyone out there using DBC driver for SQL Server 2000 on the Red Hat server?
    Michael

    Sorry, I needed to correct some information of where the drivers were installed.
    I created a folder called /usr/java/MSSQLdriver/new and untar the Microsoft file with the driver for SQL Server 2000. I ran the install.ksh script "sh install.ksh"
    installed the driver into the default directory "/opt/msSQLjdbc".
    The /opt/msSQLjdbc/lib has the following files within it:
    msbase.jar, msutil.jar, & mssqlserver.jar
    Michael

  • Cannot set up data source for SQL Server 2005

    Is it possible to use Microsoft's Beta 2 version of the SQL Server 2005 JDBC driver with WebLogic 9.0? I've downloaded the driver and added it to my server classpath, but when I try to create a new data source using the admin console, the drop-down list for Microsoft SQL Server only contains drivers for the 2000 version. If I select "Other" from the list and try to move on, I get a cryptic, page-long error on the admin console. If I just select the 2000 driver and try to manually modify the parameters on the next set of screens, I still get errors when I try to test the configuration. I've successfully used a third-party driver before, but this one does not seem to be working. Any help would be greatly appreciated.
    Regards,
    Sabrina

    SabrinaL wrote:
    Is it possible to use Microsoft's Beta 2 version of the SQL Server 2005 JDBC driver with WebLogic 9.0? I've downloaded the driver and added it to my server classpath, but when I try to create a new data source using the admin console, the drop-down list for Microsoft SQL Server only contains drivers for the 2000 version. If I select "Other" from the list and try to move on, I get a cryptic, page-long error on the admin console. If I just select the 2000 driver and try to manually modify the parameters
    on the next set of screens, I still get errors when I try to test the configuration. I've successfully used a third-party driver before, but this one does not seem to be working. Any help would be greatly appreciated.
    Regards,
    SabrinaHere I describe the steps I took to bypass the console in making a new pool.
    1 - Edit the script %DOMAIN_HOME%\bin\startWebLogic.cmd to add a line like this:
    set CLASSPATH=%CLASSPATH%;\new_ms_driver\beta2\sqljdbc_1.0\enu\sqljdbc.jar
    In other words, you have to explicitly add a third party driver's classes to
    the CLASSPATH that will be in effect for the server. Just adding the driver
    to your window's class path will do nothing.
    2 - Go to the directory %DOMAIN_HOME%\config\jdbc, where you will find
    files of the name *-jdbc.xml. Each of these represents a DataSource.
    Copy one of them, perhaps either examples-demo-jdbc.xml, or
    examples-demoXA-jdbc.xml depending on whether you want to make an XA
    or non-XA pool. Make you new file's name like the name of the DataSource,
    still ending in -jdbc.xml. Eg: MS_Beta-jdbc.xml
    3 - Edit this file to change as much as would be clear for the
    driver you want. Eg: change the driver class to the class you want,
    the user name, URL, test table etc. Also, change the pool's initial
    capacity to 0. This is so the pool can be created without making a
    connection. We need that because the password is encrypted, and
    there is no manual way for you to add the correct one yet.
    4 - go one directory up, and edit the config.xml. Find a
    jdbc-system-resource entry corresponding to the original
    resource file you copied. Make a new entry in the config file,
    like the original, but change the Datasource name to your new one.
    5 - If this all went well, reboot your server and go to your data
    source in the console, and edit it. Alter the password to what it
    really should be, and you can also change whatever else you might
    want.
    6 - shut down again, and reboot, and you should then be able to go to
    your data source in the console and test a connection.
    That's it. Here is an example of a jdbc.xml file I made, and
    the entry I made in the config.xml:
    config/jdbc/newpool-jdbc.xml:
    <?xml version='1.0' encoding='UTF-8'?>
    <jdbc-data-source xmlns="http://www.bea.com/ns/weblogic/90" xmlns:sec="http://www.bea.com/ns/weblogic/90/security"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls"
    xsi:schemaLocation="http://www.bea.com/ns/weblogic/90/domain.xsd">
    <name>newpool</name>
    <jdbc-driver-params>
    <url>jdbc:sqlserver://frogger:1433</url>
    <driver-name>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-name>
    <properties>
    <property>
    <name>user</name>
    <value>joe</value>
    </property>
    </properties>
    <password-encrypted>{3DES}cPpx2Z6faqY=</password-encrypted>
    </jdbc-driver-params>
    <jdbc-connection-pool-params>
    <initial-capacity>1</initial-capacity>
    <max-capacity>5</max-capacity>
    <capacity-increment>1</capacity-increment>
    <shrink-frequency-seconds>900</shrink-frequency-seconds>
    <test-connections-on-reserve>true</test-connections-on-reserve>
    <test-table-name>SQL select 1</test-table-name>
    <profile-type>0</profile-type>
    </jdbc-connection-pool-params>
    <jdbc-data-source-params>
    <jndi-name>newpool</jndi-name>
    <global-transactions-protocol>TwoPhaseCommit</global-transactions-protocol>
    </jdbc-data-source-params>
    <jdbc-xa-params></jdbc-xa-params>
    </jdbc-data-source>
    config.xml entry:
    <jdbc-system-resource>
    <name>newpool</name>
    <target>examplesServer</target>
    <descriptor-file-name>jdbc/newpool-jdbc.xml</descriptor-file-name>
    </jdbc-system-resource>

  • Using NIC Teaming and a virtual switch for Windows Server 2012 host networking and Hyper-V.

    Using NIC Teaming and a virtual switch for Windows Server 2012 host networking!
    http://www.youtube.com/watch?v=8mOuoIWzmdE
    Hi thanks for reading. Now I may well have my terminology incorrect here so I will try to explain  as best I can and apologies from the start.
    It’s a bit of both Hyper-v and Server 2012R2. 
    I am setting up a lab with Server 2012 R2. I have several physical network cards that I have teamed called “HostSwitchTeam” from those I have made several Virtual Network Adaptors such as below
    examples.
    New-VMSwitch "MgmtSwitch" -MinimumBandwidthMode weight -NetAdaptername "HostSwitchTeam" -AllowManagement $false
    Add-VMNetworkAdapter -ManagementOS -Name "Vswitch" -SwitchName "MgmtSwitch"
    Add-VMNetworkAdapter -ManagementOS -Name "Cluster" -SwitchName "MgmtSwitch"
    When I install Hyper-V and it comes to adding a virtual switch during installation it only shows the individual physical network cards and the
    HostSwitchTeam for selection.  When installed it shows the Microsoft Network Multiplexor Driver as the only option. 
    Is this correct or how does one use the Vswitch made above and incorporate into the Hyper-V so a weight can be put against it.
    Still trying to get my head around Vswitches,VMNetworkadapters etc so somewhat confused as to the way forward at this time so I may have missed the plot altogether!
    Any help would be much appreciated.
    Paul
    Paul Edwards

    Hi P.J.E,
    >>I have teams so a bit confused as to the adapter bindings and if the teams need to be added or just the vEthernet Nics?.
    Nic 1,2 
    HostVMSwitchTeam
    Nic 3,4,5
             HostMgmtSwitchTeam
    >>The adapter Binding settings are:
    HostMgmtSwitchTeam
    V-Curric
    Nic 3
    Nic 4
    Nic 5
    V-Livemigration
    HostVMSwitch
    Nic 1
    Nic 2
    V-iSCSI
    V-HeartBeat
    Based on my understanding of the description , "HostMgmtSwitchTeam and
    HostVMSwitch " are teamed NIC .
    You can think of them as two physical NICs (do not use NIC 1,2,3,4,5 any more , there are just two NICs "HostMgmtSwitchTeam and
    HostVMSwitch").
    V-Curric,
    V-Livemigration , V-iSCSI ,
    V-HeartBeat are just VNICs of host  (you can change their name then check if the virtual switch name will be changed )
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Using SQLBindParameter, SQLPrepare and SQLExecute to insert a Decimal(5,3) type fails with SQLSTATE: 22003 using ODBC Driver 11 for SQL Server

    Hello everyone.
    I'm using SQL Server 2014, and writting on some C++ app to query and modify the database. I use the ODBC API.
    I'm stuck on inserting an SQL_NUMERIC_STRUCT value into the database, if the corresponding database-column has a scale set.
    For test-purposes: I have a Table named 'decTable' that has a column 'id' (integer) and a column 'dec' (decimal(5,3))
    In the code I basically do:
    1. Connect to the DB, get the handles, etc.
    2. Use SQLBindParameter to bind a SQL_NUMERIC_STRUCT to a query with parameter markers. Note that I do include the information about precision and scale, something like: SQLBindParameter(hstmt, 2, SQL_PARAM_INPUT, SQL_C_NUMERIC, SQL_NUMERIC, 5, 3, &numStr,
    sizeof(cbNum), &cbNum);
    3. Prepare a Statement to insert values, something like: SQLPrepare(hstmt, L"INSERT INTO decTable (id, dec) values(?, ?)", SQL_NTS);
    4. Set some valid data on the SQL_NUMERIC_STRUCT
    5. Call SQLExecute to execute. But now I get the error:
    SQLSTATE: 22003; nativeErr: 0 Msg: [Microsoft][ODBC Driver 11 for SQL Server]Numeric value out of range
    I dont get it what I am doing wrong. The same code works fine against IBM DB2 and MySql. I also have no problems reading a SQL_NUMERIC_STRUCT using SQLBindCol(..) and the various SQLSetDescField to define the scale and precision.
    Is there a problem in the ODBC Driver of the SQL Server 2014?
    For completeness, here is a working c++ example:
    // InsertNumTest.cpp
    // create database using:
    create a table decTable with an id and a decimal(5,3) column:
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE[dbo].[decTable](
    [id][int] NOT NULL,
    [dec][decimal](5, 3) NULL,
    CONSTRAINT[PK_decTable] PRIMARY KEY CLUSTERED
    [id] ASC
    )WITH(PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON[PRIMARY]
    ) ON[PRIMARY]
    GO
    // Then create an odbc DSN entry that can be used:
    #define DSN L"exOdbc_SqlServer_2014"
    #define USER L"exodbc"
    #define PASS L"testexodbc"
    // system
    #include <iostream>
    #include <tchar.h>
    #include <windows.h>
    // odbc-things
    #include <sql.h>
    #include <sqlext.h>
    #include <sqlucode.h>
    void printErrors(SQLSMALLINT handleType, SQLHANDLE h)
        SQLSMALLINT recNr = 1;
        SQLRETURN ret = SQL_SUCCESS;
        SQLSMALLINT cb = 0;
        SQLWCHAR sqlState[5 + 1];
        SQLINTEGER nativeErr;
        SQLWCHAR msg[SQL_MAX_MESSAGE_LENGTH + 1];
        while (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO)
            msg[0] = 0;
            ret = SQLGetDiagRec(handleType, h, recNr, sqlState, &nativeErr, msg, SQL_MAX_MESSAGE_LENGTH + 1, &cb);
            if (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO)
                std::wcout << L"SQLSTATE: " << sqlState << L"; nativeErr: " << nativeErr << L" Msg: " << msg << std::endl;
            ++recNr;
    void printErrorsAndAbort(SQLSMALLINT handleType, SQLHANDLE h)
        printErrors(handleType, h);
        getchar();
        abort();
    int _tmain(int argc, _TCHAR* argv[])
        SQLHENV henv = SQL_NULL_HENV;
        SQLHDBC hdbc = SQL_NULL_HDBC;
        SQLHSTMT hstmt = SQL_NULL_HSTMT;
        SQLHDESC hdesc = SQL_NULL_HDESC;
        SQLRETURN ret = 0;
        // Connect to DB
        ret = SQLAllocHandle(SQL_HANDLE_ENV, NULL, &henv);
        ret = SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, SQL_IS_INTEGER);
        ret = SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
        ret = SQLConnect(hdbc, (SQLWCHAR*)DSN, SQL_NTS, USER, SQL_NTS, PASS, SQL_NTS);
        if (!SQL_SUCCEEDED(ret))
            printErrors(SQL_HANDLE_DBC, hdbc);
            getchar();
            return -1;
        ret = SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);
        // Bind id as parameter
        SQLINTEGER id = 0;
        SQLINTEGER cbId = 0;
        ret = SQLBindParameter(hstmt, 1, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_INTEGER, 0, 0, &id, sizeof(id), &cbId);
        if (!SQL_SUCCEEDED(ret))
            printErrorsAndAbort(SQL_HANDLE_STMT, hstmt);
        // Bind numStr as Insert-parameter
        SQL_NUMERIC_STRUCT numStr;
        ZeroMemory(&numStr, sizeof(numStr));
        SQLINTEGER cbNum = 0;
        ret = SQLBindParameter(hstmt, 2, SQL_PARAM_INPUT, SQL_C_NUMERIC, SQL_NUMERIC, 5, 3, &numStr, sizeof(cbNum), &cbNum);
        if (!SQL_SUCCEEDED(ret))
            printErrorsAndAbort(SQL_HANDLE_STMT, hstmt);
        // Prepare statement
        ret = SQLPrepare(hstmt, L"INSERT INTO decTable (id, dec) values(?, ?)", SQL_NTS);
        if (!SQL_SUCCEEDED(ret))
            printErrorsAndAbort(SQL_HANDLE_STMT, hstmt);
        // Set some data and execute
        id = 1;
        SQLINTEGER iVal = 12345;
        memcpy(numStr.val, &iVal, sizeof(iVal));
        numStr.precision = 5;
        numStr.scale = 3;
        numStr.sign = 1;
        ret = SQLExecute(hstmt);
        if (!SQL_SUCCEEDED(ret))
            printErrorsAndAbort(SQL_HANDLE_STMT, hstmt);
        getchar();
        return 0;

    This post might help:
    http://msdn.developer-works.com/article/12639498/SQL_C_NUMERIC+data+incorrect+after+insert
    If this is no solution try increasing the decimale number on the SQL server table, if you stille have the same problem after that change the column to a nvarchar and see the actual value that is put through the ODBC connector for SQL.

  • Why can't i use "INNER JOIN" in a query for SQL Server with JDBC??????

    Hi,
    I'm trying to execute some SQL queries and I just don't understand what's wrong.
    I�m using Tomcat and SQL Server in order to do this, but when I�m try to execute a query with a INNER JOIN statements Tomcat raise a SQL exception... at the very first time I thought there was a problem with database connection but I realize that a simple query to a table works pretty well. then I found out some problems with JDBC:ODBC.... so I install JDBC for SQL Server 2000 and test with the same simple query and works..... so, I come to a conclusion.... INNER JOIN or JOIN statements can't be used in JDBC..... please... somebody tell I�m wrong and give me a hand...
    I'm using TOMCAT 4 and JDK 1.4 SQL Server 2000
    Error occurs when executeQuery() is called.... not prepareStatement().... ??????
    Driver DriverRecResult = (Driver)Class.forName(driver).newInstance();
    Connection ConnRecResult = DriverManager.getConnection(DSN,user,password);
    PreparedStatement StatementRecResult = ConnRecResult.prepareStatement(query);
    ResultSet RecResult = StatementRecResult.executeQuery(); <---- Exception raise here
    So much tahnks in advance,

    That's exactly what I think, driver it's raising the exception, but I don't know why.... i test the same query with INNER JOIN directly from SQL Query Analyser and it's works perfectly, my problem ain't SQL, but JSP and JDBC 'cause i'm a newbie about these issues.
    Common sense tell me possible problems lie in SQLServer drivers 'cause i run the same pages on JRUN through jdbc:odbc and do works well, but by now i just depend on Tomcat.....
    I've installed SQL Server drivers for JDBC but i just find it doesn't work fully... could be the version of JDK i've installed? what version do i need?
    ( I'm running Tomcat 4 with JDK 1.4 & SQL Server 2000 W2K )
    thanks for reply.

  • Need java 1.6.0_4 for SQL developer 3.2 64bit, Win 7

    Hi All
    I Need java 1.6.0_4 for SQL developer 3.2 64bit, Win 7.
    SQL developer behaves weirdly sometimes. It frequently drops connection, doesn;t show compile button when i open a procedure and certain other things.... I found ver 3.0 quiet stable.
    I think it may be because of my incorrect java version (1.6.0). Please tell me how can I get this Java version 1.6.0_4. I checked oracle.com, version 35 is available there....
    Can you please help me by providing this ?
    Thanks

    >
    I Need java 1.6.0_4 for SQL developer 3.2 64bit, Win 7.
    I think it may be because of my incorrect java version (1.6.0). Please tell me how can I get this Java version 1.6.0_4.
    Can you please help me by providing this ?
    >
    No - we can't provide it. You have to download it yourself. If you have trouble with the download you should report the problem to Oracle.
    >
    I checked oracle.com, version 35 is available there....
    >
    If you checked at the Java SE Downloads page
    http://www.oracle.com/technetwork/java/javase/downloads/index.html
    Then you should have seen the 'Previous Releases' link jus above the download Icons near the top of the page.
    http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html#jre-6u1-oth-JPR
    All of the available prior versions are available at that link.
    But I strongly suggest you heed the advice given to use the latest 1.6 version of Java available unless you have a very good reason not to.

  • Permissions needed for sql server job to execute stored procedure on linked server?

    Hi all
    I have a job step which attempts to call a stored procedure on a linked server.
    This step is failing with a permission denied error. How can I debug or resolve this?
    The job owner is sysadmin on both servers so should have execute permission to the database/proc I'm calling, right?
    The error is:
    The EXECUTE permission was denied on the object 'myProc', database 'myDatabase', schema 'dbo'. [SQLSTATE 42000] (Error 229).  The step failed.
    My code is:
    EXEC [LinkedServer].myDatabase.dbo.myProc
    Also tried:
    SELECT * FROM OPENQUERY([LinkedServer], 'SET FMTONLY OFF EXEC myDatabase.dbo.myProc')
    With the same result.
    Any help appreciated.

    The job owner may be sysadmin on the remote server. The service account for SQL Server Agent may not. And it is the latter that counts, since the it the service accounts that logs in and impersonates the job owner. But the impersonation inside SQL Server
    does not count much in Windows, and it is through Windows connection is made to the other site.
    One way to resolve this is to set up a login mapping for the job owner. The login mapping must be for an SQL login on the remote server.
    You can verify the theory, but running this query from the job:
       SELECT * FROM OPENQUERY([LinkedServer], 'SELECT SYSTEM_USER')
    By the way, putting SET FMTONLY OFF in OPENQUERY is a terrible idea. This has the effect that the procedure is executed twice. (Unless both servers are SQL 2012 or higher in which case FMTONLY has no effect at all.)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Do I need to install Security Hotfix (KB2977319) after Cumulative Update 12 for SQL Server 2008 R2 SP2

    HI,
    I have installed Cumulative Update 12 for SQL Server 2008 R2 SP2 on my SharePoint instances. This was to resolve a known  issue faced with the instance. CU12 helped resolve the issue. My company is rather strict regarding security hotfixes. But I am
    not sure if this particular hotfix [Security Hotfix (KB2977319)] is required if the instance has CU12 applied.
    Tested this on a Lab server, the installation did run fine, the summary log also stated that the KB is applied. But the Build Number did not change. Hence the doubt.
    Overall summary:
      Final result:                  Passed
      Exit code (Decimal):           0
      Exit message:                  Passed
      Start time:                    2014-09-06 10:31:21
      End time:                      2014-09-06 10:55:49
      Requested action:              Patch
    Instance SPNTSQLTRN overall summary:
      Final result:                  Passed
      Exit code (Decimal):           0
      Exit message:                  Passed
      Start time:                    2014-09-06 10:48:08
      End time:                      2014-09-06 10:55:45
      Requested action:              Patch
    Package properties:
      Description:                   SQL Server Database Services 2008 R2
      ProductName:                   SQL2008
      Type:                          RTM
      Version:                       10
      SPLevel:                       2
      KBArticle:                     KB2977319
      KBArticleHyperlink:            http://support.microsoft.com/?kbid=2977319
      PatchType:                     QFE
      AssociatedHotfixBuild:         0
      Platform:                      x64
      PatchLevel:                    10.52.4321.0
      ProductVersion:                10.52.4000.0
      GDRReservedRange:              10.50.4001.0:10.50.4199.0;10.50.4200.0:10.50.4250.0
      PackageName:                   SQLServer2008-KB2977319-x64.exe
      Installation location:         e:\ac2af22d88ee645b5b32b5c178\x64\setup\
    Please inform if I need to apply the hotfix on CU12. Thanks in advance.
    John S

    Yes you must install Security update mentioned in KB 2977319 it is important for SQL Server to be patches with this security update. Without this it could allow an attacker to compromise your system and gain control over it.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Articles

Maybe you are looking for