Developer SQL connected to a DB SQL Server (problem with "INSERT an IDENTITY")

I use developer SQL to connect to a DB in SQL Server by using the jTDS jar file.

Problem is that when I try to run the "SET IDENTITY_INSERT < TABLE >;" SQL Developer has told me that he skips the command.
Error message in the console: "SQLPLUS Command ignored: set IDENTITY_INSERT < TABLE > WE.

I am running:
Developer SQL v3.2.09 (Build HAND-09: 30 pm)
JTDS - jtds - 1.2.6.jar
JAVA jdk1.7.0_05

Any idea why this might be happening?

NOTE: I know that if the 'IDENTITY_INSERT' is already activated, then it could happen, but believe me, it isn't. Because, if I try to run a command "INSERT IN...» ", I get the error that the"INSERT an IDENTITY' is DISABLED for the table.

Published by: Ali-Star August 29, 2012 11:22

Set identity_insert is a command to SQL Server that is not managed by SQL Developer. You must pass the set command as it is on the SQl Server using the / * sqldev:stmt * /, for example:

drop table test1;
-Online moved as test1 table.

create table test1 (col1 int identity (1,1));
-Online table TEST1 created.

Insert into test1 (col1) values (10);
=> Error from line 4 on order:
-Online insert into test1 (col1) values (10)
-Online error in the command line: 4 column: 0
=> Error report:
-Online SQL error: cannot insert an explicit value for identity in the table 'test1' column when IDENTITY_INSERT is set to OFF.

When I use the sqldev:stmt setting now I can place an order directly to SQL Server:

/ * sqldev:stmt * / set identity_insert test1;
-Online set IDENTITY_INSERT succeeded.

Insert into test1 (col1) values (11);
-Online 1 lines inserted.

Tags: Database

Similar Questions

  • Oracle <>- MS SQL server, problem with DATE

    HS current options are:

    HS_FDS_TRACE_LEVEL = 255

    HS_FDS_SHAREABLE_NAME=/usr/lib64/libodbc.so

    HS_FDS_FETCH_ROWS = 1

    HS_FDS_SQLLEN_INTERPRETATION = 32

    The following image contains 2 screenshots.

    http://maslovd.no-IP.org/public/doc/date_problem.PNG

    1. selection of table of MS SQL server.

    2 selection in Oracle DB link.

    Any suggestions?

    I asked here, that is why the DateForm column are returned as data type-(9)SQL_WVARCHAR).

    Could you please post the SQL Server table definition?

    What's the FreeTDS version and on which platform did you configure DG4ODBC?

    - Klaus


  • java.sql.SQLException: problems with the native/lack of loading methods library

    Hi all

    Please let me know how to fix the exception "java.sql.SQLException: problems with the native/lack of loading methods library: no ttJdbc in java.library.path".

    Thank you
    Prabhu

    Published by: Nina Prabhu on November 20, 2012 02:12

    Hi Prabhu,

    Probably, you must specify the LD_LIBRARY_PATH variable. Like the following:

    export LD_LIBRARY_PATH=$TIMESTEN_HOME/ttoracle_home/instantclient_11_1
    

    Best regards
    Gennady

  • Get the message "This Mac cannot connect to iCloud due to a problem with my Id, open Preferences to solve iCloud iCloud" after entering my password which is accepted and then after a minute or two messages is.

    Get the message "This Mac cannot connect to iCloud due to a problem with my Id, open Preferences to solve iCloud iCloud" after entering my password which is accepted and then after a minute or two messages is.

    I'm your pain ptapp!

    Through my research for an answer that solves this problem, I have found that not even Apple knows how to solve this problem of password to iCloud.

    All 4 of my devices constantly ask my password because of some problems with xyz account.

    Then I enter the password only to be told that iCloud cannot check my password.

    Then after several repetitions of this I get locked and have to go to the site apple id to change my password.

    I didn't spend $6 000 on these beautiful devices so I could spend countless hours dealing with support (with no positive result) and find themselves just beyond myself in frustration. I have a Mac Pro, 2 iPads, 2 iPhones and an iPod touch. All are behaving this way, no matter what it is I'm doing at the time.

    Apple needs to fix this problem, if they have any idea how to.

  • My cloud of Adobe installer is unable to connect to the animated. No problems with internet... Help, please

    My cloud of Adobe installer is unable to connect to the animated. No problems with internet... Help, please

    Hello

    Thank you for using https://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html > and all the steps in "troubleshooting connectivity issues.

    If necessary, and for any other question, click on through http://helpx.adobe.com/contact.html and so "open" Please use the chat, I to can I part had the best experiences. An employee of Adobe Preran I quote: the chat button is enabled as soon as there is an available to help agent.

    Hans-Günter

  • Failed to connect to the SQL Server integrated with foglight

    Hi all

    I try to connect with MS SQL Server embedded foglight Management Server and failed to do so due to the error below. Could someone help me on this ASAP:

    org.springframework.beans.factory.BeanCreationException: error creating bean with name "foglight-core-services" defined in the URL [jar:file:/E:/Quest_Software/Foglight/server/default/tmp/deploy/tmp7024790750014228181foglight.sar!/com/quest/nitro/service/core-beanref.0.ctx.xml]: instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: error creating bean with name 'exporting' defined in the [com/quest/nitro/service/common.ctx.xml] class path resource: calling the init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: error creating bean with name "com.quest.nitro:service = Licensing" defined in the [com/quest/nitro/service/core-services.0.ctx.xml] class path resource: calling the init method failed; nested exception is org.hibernate.exception.DataException: could not execute the query

    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

    to org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$ 1.run(AbstractAutowireCapableBeanFactory.java:409)

    at java.security.AccessController.doPrivileged (Native Method)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

    to org.springframework.beans.factory.support.AbstractBeanFactory$ 1.getObject(AbstractBeanFactory.java:264)

    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)

    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)

    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)

    at org.springframework.context.access.ContextSingletonBeanFactoryLocator.initializeDefinition(ContextSingletonBeanFactoryLocator.java:141)

    at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:384)

    ... more than 165

    Caused by: org.springframework.beans.BeanInstantiationException: could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: error creating bean with name 'exporting' defined in the [com/quest/nitro/service/common.ctx.xml] class path resource: calling the init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: error creating bean with name "com.quest.nitro:service = Licensing" defined in the [com/quest/nitro/service/core-services.0.ctx.xml] class path resource: calling the init method failed; nested exception is org.hibernate.exception.DataException: could not execute the query

    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)

    to

    Kind regards

    Shiva

    Hello

    It is probably part of a larger battery error (if you can download the zipped file of complete log we can see if something is visible).

    This is a new installation or and upgrade or displacement of FMS? What version do you use?

    Have you tried to stop the foglight server, make sure that the DB is down too and then restart?

    There are articles describing errors as part of a larger pile of errors.

    This article KB https://support.quest.com/SolutionDetail.aspx?id=SOL64412 talks to ip in the hosts file is not wrong

    Other articles describing similar problems:

    There is an article describing a bug that has been fixed at https://support.quest.com/SolutionDetail.aspx?id=SOL63134

    Another speaks of a problem with the Storage Manager service https://support.quest.com/SolutionDetail.aspx?id=SOL73892

    With the attached log file we can see more information, I recommend also the opening of a case of pension because they can help solve the problem in a more interactive way.

    I hope this helps.

    Golan

  • Connection to SQL server 2012 (with Alwayson) of BI Publisher

    How to connect to SQL Server BI publisher 2012 using a headset and connect to a readonly database. I need to know if we can use the 'ApplicationIntent ReadOnly ="parameter. Also, can I install Microsoft SQL Server jdbc 4 on WLS? Please let me know

    I am able to do this work by installing the MS sqljdbc4 on weblogic and specifying the readonly parameter.

  • Integration of SQL Server 2005 with OBIEE 11g

    Dear gurus,

    Is there documentation on how to use SQL Server 2005 as datasource combined with OBIEE 11 g?
    Clear steps with pictures will be very useful.

    Thank you very much

    Concerning

    JOE

    Hello

    Please see this link.

    http://rnm1978.WordPress.com/2009/08/21/querying-SQL-Server-from-OBIEE-running-on-UNIX/

    Re: How to connect Linux OBIEE repository to SQL Server 2005 database

    Hope this helps

    Thank you
    Satya

  • Pilot SQL Server problem

    I just got a new computer and had to reload all of my software, including SQL Server and Cold Fusion. I put everything in place now, but for some reason, I can not Cold Fusion to access the database at all. I get the message "connection failed for user"dwright". Reason: not associated with a SQL Server trusted connection. "The ID exists and is set up with the appropriate privileges.

    Anyone know why I get this error?

    Thank you

    DW

    Check that your SQL Server mixed mode authentication. This is disabled by default in SQL 2005 (and possibly 2008, if I'm wrong, someone correct me please).

  • Problem installing SQL Server 2014 with the language of the OS

    I installed a new 2012 french windows server essentials.

    Then I tried to install sql server 2014 standard (English version). But, it is not possible. I get the message "this SQL server installation media does not support the language of the operating system, or does not have the SQL Server installation files English version.» Use the correspondent... ».

    Then I tried several solutions provided on different forums on the web. Now my system is set to English (United States), but the message still appears at the beginning of the installation of SQL.

    Any suggestion will be fine... I'm tired of installation problems.

    BB

    Hello

    You can post your question Server 2012 Server TechNet forums, that your question is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    Please repost your question about SQL Server in the SQL Server TechNet Forums.

    https://social.technet.Microsoft.com/forums/SQLServer/en-us/home?category=SQLServer

    See you soon.

  • SQL Server problem at startup - States of error SQLEVN70. RLL corrupt... How do I uninstall this driver & run Setup again?

    This error appears only in the beginning upward... I can clear the error by pressing close. It does not seem to cause any problems with any of my applications, but it is annoying when I turn on my computer and this error message. Your help would be appreciated if someone can give me the steps to correct this.

    Hello

    The problem is with SQL server, I suggest you to send your request from the link and check.

  • What are the versions of SQL Server supported with Appvolumes 2.9?

    According to the release notes: only SQL Server 2008 and SQL Server 2012 are supported: App Volumes 2.9 Release Notes

    According to the user's Guide: SQL Server 2008 R2 SP1, SP1 of SQL Server 2012 and 2014 of SQL Server are supported: https://www.vmware.com/pdf/app-volumes-29-users-guide.pdf

    My customer wants to switch to SQL Server 2014? Is this supported? Is this work?

    Hello

    Thank you for discovering the incompatibility.

    Versions SQL mentioned in the release note is correct and the user's guide is incorrect. Server SQL 2014 is not yet supported.

  • SQL Server VM with vCenter database storage migration

    vCenter Server 5 and ESXi 5.

    Hi all. Have vcenter server on a physical machine. The database server is VM with SQL Server 2008R2. Need recommendation of migrating data to another store. The storage systems are different. And can not be shared beetwen 2 servers. HP MSA 2012 SAS Enclouser and HP EVA 6500.

    I think you only good option is to take note of the host in which your VCDB VM is saved. Turn off vCenter (it won't work anyway once the DB is taken offline).  Then use VMware Converter to migrate the virtual computer from the data store either.  Once the VM has been upsized, turn the VCDB VM, turn on vcenter, ensure that everything works and then destroy the 'old' VCDB VM.

  • Selecting a SQL Server 2005 with names of long columns (&gt; 30 characters)

    Hello

    I was able to put in place a db Oracle 11.2.0.1 link to SQL Server 2005 using DG4ODBC.

    My problem is that some column names in Sql Server are more than 30 tanks and trying to select gives me the ORA-00972: identifier is a mistake too long.

    If I omit those select columns succeeds.
    I know that I can create a view in sql server and query it instead of the original table, but I was wondering if there is a way to overcome it with sql.

    My selection looks like this:
    select "good_column_name" from sometable@sqlserver_dblink -- this works
    select "good_column_name","very_long_column_name>30 chars" from sometable@sqlserver_dblink -- ORA-00972
    Thank you

    No there is no other way then using a view in SQl Server and select in the view rather than the table. The reason is that the Oracle database has a restriction that the column names must be 30 or fewer characters.

  • SQL loader, problem with the POSITION &amp; EXTERNAL

    Hi gurus of the Oracle.

    I have problem with position and external.

    I have the data file with the data of 1 million records

    data delimiter is to and eventually closed by «»

    some lines are not loaded due to errors of data, i.e. data contains some «»

    now, we decided to use the position & external. am unable to write the control file.

    any help would be much appreciated

    The table name is person_memo, 4 columns

    ID_PERSONVARCHAR2 (9 bytes)
    TX_MEMOVARCHAR2 (1000 bytes)
    ID_USERVARCHAR2 (20 bytes)
    TM_STAMPTIMESTAMP (6)

    my control file is

    DOWNLOAD THE DATA

    ADD THE PERSON_MEMO TABLE

    FIELDS TERMINATED BY ' |'

    SURROUNDED OF POSSIBLY "" "

    TRAILING NULLCOLS

    (

    ID_PERSON POSITION (1) "CUT (: ID_PERSON).

    , TX_MEMO POSITION (10) TANK (1000) "CUT (: TX_MEMO).

    , POSITION (1012) ID_USER "TRIM (: ID_USER).

    , TM_STAMP POSITION (1031) EXTERNAL (26) ' DECODE (: TM_STAMP, NULL, NULL, TO_TIMESTAMP (: TM_STAMP, ' YYYY-MM-DD - HH24.MI.)). SS. "(FF')).

    )

    specimen of data file

    "04725813" | "aka"Little Will"" "|" " 095TDEAN «|» 2013-02-21 - 11.13.44.632000

    "05599076" | "" FIRST NAME - ADDED A 'T' AS ON THE REG MAP | ' 016DDEAL ' |. ' 2014-04-11 - 10.06.35.598000

    Thanks and greetings

    REDA

    In your control file, EXTERNAL (26) must be INTEGER EXTERNAL (26).

    Unfortunately, this forum destroyed the spacing, so I can't say whether or not your data are positionnelles.  If it is positional, you can then use positions, but you need start and end positions.  The positions that you posted have nothing to do with the data you've posted.  If you use positions, you can eliminate the delimiters and the beginning and the end of citations using these positions.

    If your data are not positionnelles and you have quotes in your data in quotes, but you don't have the pipe delimiters in your data, then you can only use the delimiters and trim the quotes start and final data.

    I have demonstrated the two methods below, using test1.ctl for the positional method and test2.ctl for the defined method.

    Scott@orcl12c > host type test.dat

    "04725813" | "aka"Little Will"" | "" 095TDEAN «|» 2013-02-21 - 11.13.44.632000

    "05599076" | "" FIRST NAME - ADDED A 'T' AS ON THE REG MAP | ' 016DDEAL ' |. ' 2014-04-11 - 10.06.35.598000

    Scott@orcl12c > type host test1.ctl

    DOWNLOAD THE DATA

    ADD THE PERSON_MEMO TABLE

    FIELDS TERMINATED BY ' |'

    TRAILING NULLCOLS

    (ID_PERSON POSITION (02:10))

    , TX_MEMO POSITION (14:59)

    POSITION ID_USER (63:82)

    , TM_STAMP POSITION (85:110) EXTERNAL INTEGER (26) ' DECODE (: TM_STAMP, NULL, NULL,).

    TO_TIMESTAMP (: TM_STAMP, ' YYYY-MM-DD - HH24.MI.) SS. "(FF')).

    )

    Scott@orcl12c > type host test2.ctl

    DOWNLOAD THE DATA

    ADD THE PERSON_MEMO TABLE

    FIELDS TERMINATED BY ' |'

    TRAILING NULLCOLS

    (ID_PERSON "TRIM ("------"" FROM: ID_PERSON ")")

    , TX_MEMO CHAR (1000) "TRIM ("------"" FROM: TX_MEMO ").

    , ID_USER "TRIM ("------"" FROM: ID_USER ").

    , TM_STAMP INTEGER EXTERNAL (26) ' DECODE (: TM_STAMP, NULL, NULL,).

    TO_TIMESTAMP (: TM_STAMP, ' YYYY-MM-DD - HH24.MI.) SS. "(FF')).

    )

    Scott@orcl12c > create table person_memo

    2 (ID_PERSON VARCHAR2 (9 bytes)

    3, TX_MEMO VARCHAR2 (1000 bytes)

    4, ID_USER VARCHAR2 (20 bytes)

    5, TM_STAMP TIMESTAMP (6))

    6.

    Table created.

    Scott@orcl12c > host sqlldr scott/tiger control = test1.ctl data = test.dat log = test1.log

    SQL * Loader: release 12.1.0.1.0 - Production Thursday, May 15, 10:53:11-2014

    Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

    Path used: classics

    Commit the point reached - the number of logical records 2

    Table PERSON_MEMO:

    2 rows loaded successfully.

    Check the log file:

    test1.log

    For more information on the charge.

    Scott@orcl12c > select * from person_memo

    2.

    ID_PERSON

    ---------

    TX_MEMO

    --------------------------------------------------------------------------------

    ID_USER

    --------------------

    TM_STAMP

    ---------------------------------------------------------------------------

    04725813

    aka "Little Will"

    095TDEAN

    21 FEBRUARY 13 11.13.44.632000 AM

    05599076

    FIRST NAME - ADDED A 'T' AS ON THE REG MAP

    016DDEAL

    11 APRIL 14 10.06.35.598000 AM

    2 selected lines.

    Scott@orcl12c > truncate table person_memo

    2.

    Table truncated.

    Scott@orcl12c > host sqlldr scott/tiger control = test2.ctl data = test.dat log = test2.log

    SQL * Loader: release 12.1.0.1.0 - Production Thursday, May 15, 10:53:11-2014

    Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

    Path used: classics

    Commit the point reached - the number of logical records 2

    Table PERSON_MEMO:

    2 rows loaded successfully.

    Check the log file:

    test2.log

    For more information on the charge.

    Scott@orcl12c > select * from person_memo

    2.

    ID_PERSON

    ---------

    TX_MEMO

    --------------------------------------------------------------------------------

    ID_USER

    --------------------

    TM_STAMP

    ---------------------------------------------------------------------------

    04725813

    aka "Little Will"

    095TDEAN

    21 FEBRUARY 13 11.13.44.632000 AM

    05599076

    FIRST NAME - ADDED A 'T' AS ON THE REG MAP

    016DDEAL

    11 APRIL 14 10.06.35.598000 AM

    2 selected lines.

Maybe you are looking for

  • Satellite Pro L10: Recovery disk is not available

    HELO,I lost my disc of recovery for Toshiba Satellite Pro L10.Service in Poland say my only: Toshiba do not have this disc now.am I to do now? I need to reinstall my system. Model number PSL15E-00x009PL, serial number 55016672W Sorry, my English is b

  • On MT4.

    Why don't have a Meta Trader 4 Mac app?

  • Ask a "output file name" appears when I try to print

    I am ready to print something and a small box will appear asking you a name of output file, I have no idea what it means. Can you help me please? Original title: printer problems From Internet Explorer

  • List of contacts from blackBerry Smartphones freezes the whole system

    When I try to use my list of contacts that I can scroll the name I want, but as soon as I press the cursor of the entire system freezes and I can not escape to the contact page or the information I'm looking for. I restart the phone by pressing the o

  • PP CC 2015.1 Crash

    PP keeps crashing. What will happen is I opened the project and it would work for a few minutes (he said he had instructed all the media and it was not consistent, but there was a lot of activity on the media player).  I tried to delete the Max and w