locked
Function Sequence error RRS feed

  • Question

  • Hi,

    I am migrating a application from Linux to windows 8.

    And the database of this application is migrated from  Oracle 11g database to MS SQL server 2014 using SSMA.  

    Schema and data are migrated successfully.

    Now when I run below command from application. I get this error as shown below:

    enable index Originator;

    Error: #1900068: enable index failed

    System Error: #1400000: State HY010: [Microsoft][SQL Server Native Client 11.0]Function sequence error

    Earlier I was getting below error while executing this command.

    So I added that filegroup to the database in SQL.

    I also added all required data(.mdf) and index files(.ndf) and did the schema and data migration.

    After doing this I executed this command again and started getting above error.

    Please suggest me how can I resolve this :( ?

    enable index Originator;

    Error: #1900068: enable index failed

    System Error: #1500811: Error executing SQL: create table ix5687465873(

      id int not null,

      v1 nvarchar(255))

      on <[Filegroup name]>

    System Error: #1: State 42000: [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid filegroup <'Filegroup name'> specified.

    Thanks.

    Thursday, September 11, 2014 3:40 PM

Answers

  • Here is the snippet which shows why odbc data source is used:

    For ENOVIA Studio Modeling Platform Rich Clients ...

    If this is a 3rd party application you should seek their support for proper configuration.  And you should _almost never_ be converting the database on your own.  The ISV typically has a supported SQL Server schema and supported data migration procedures for a cross-platform database migration.

    David


    David http://blogs.msdn.com/b/dbrowne/

    Friday, September 19, 2014 2:27 AM

All replies

  • The error is showing that SQL is not able to find the file group? Does the database have this file group? Is there a typo in the file group name that you specified? (BTW, can you post the exact create table statement that you are running?)

    Satish Kartan http://www.sqlfood.com/

    Saturday, September 13, 2014 3:29 AM
  • Hi Satish,

    Yes, this filegroup was not existing earlier, thats why I got this error.

    Now when I have created this filegroup, I am getting a new error as shown below.

    enable index Originator;

    Error: #1900068: enable index failed

    System Error: #1400000: State HY010: [Microsoft][SQL Server Native Client 11.0]Function sequence error

    Thanks.

    Monday, September 15, 2014 8:21 AM
  • Can you post the exact DDL that you are running to create this table? 

    Satish Kartan http://www.sqlfood.com/

    Monday, September 15, 2014 4:04 PM
  • >Can you post the exact DDL that you are running to create this table? 

    And the exact command the application is sending.  "enable index Originator;" is not a valid TSQL command, and I don't think it's valid in Oracle either.

    David


    David http://blogs.msdn.com/b/dbrowne/

    Monday, September 15, 2014 4:42 PM
  • SQL commands sent to to MSSQL on executing that command are :

    drop table ix5687465873;

    create table ix5687465873(

      id int not null,

      v1 nvarchar(255))

      on <[Filegroup name]> 

    select * from table1 where Oid=?
        ?=1
     -->select
     select Oid1,Value1 from table2 where type=?
       ?=12345
     -->select
     -->select
     insert into ix5687465873 values (?,?)
       ?=-1234567890
       ?=Abcd_test
     -->insert
     rollback

    Table is created but only 1024 lines are inserted in it and after that it does a rollback.
    However, it is not suppose to do a rollback but insert more lines. And drop and create other tables.

    Tuesday, September 16, 2014 2:14 PM
  • What kind of app is it?  Can you share the source code that is causing the error?

    Is the app creating tables at runtime?

    David


    David http://blogs.msdn.com/b/dbrowne/

    Tuesday, September 16, 2014 3:44 PM
  • It seems like you are doing multiple insert statements (a single insert statement will not insert partial records) and the transaction aborts after inserting 1024 rows - check the data you are inserting - perhaps it is out of range or invalid data type

    Satish Kartan http://www.sqlfood.com/

    Tuesday, September 16, 2014 4:08 PM
  • The application is inserting each row at a time it seems and then doing a rollback after inserting 1024 rows.

    I tried inserting all rows at once in this table manually in a single insert statement (approx. 64000 rows) in MS SQL then it is inserted successfully. 

    However, when I do it from application using command enable index then every time it is inserting 1024 rows 

    and then it does a rollback.

    For eg. like this

     insert into ix5687465873 values (?,?)
       ?=1898139624
       ?=
    -->insert
        ?=1801268155
      ?=
     -->insert
        ?=-573488584
       ?=

    ..

    ..

    <1024 rows>

    rollback


    Tuesday, September 16, 2014 4:39 PM
  • It is a java based app and this command is dropping and creating tables dynamically.
    Tuesday, September 16, 2014 4:40 PM
  • Start Profiler before you hit the "enable" button in your application and trace the insert statement that is causing the error - it should give description error on the reason (or you can run the offending statement from SSMS and it will give you the descriptive error). It is most likely application related or some connection option that is not being set properly (like QUOTED_IDENTIFIER, etc)

    Satish Kartan http://www.sqlfood.com/

    Tuesday, September 16, 2014 5:13 PM
  • Profiler will also give you the raw error message returned in the "User Error Message" event.

    David


    David http://blogs.msdn.com/b/dbrowne/

    Tuesday, September 16, 2014 6:26 PM
  • I started the profiler and then executed the enable index command.

    But I didn't see any error message in profiler.

    Also, I tried inserting the entire data manually by executing below query directly in ms sql then all 63k rows are inserted, so it doesn't look like there is any problem in data. 

     insert into ix5687465873 (id, v1)

    select Oid1,Value1 from table2 where type=12345

    Also, I tried odbc tracing which shows below error.

    Still I am unable to get what could be the cause of this error.

    mql             1224-e28 EXIT  SQLFetch  with return code -1 (SQL_ERROR)
    HSTMT               0x00000000048D78C0

    DIAG [HY010] [Microsoft][SQL Server Native Client 11.0]Function sequence error (0) 


    Wednesday, September 17, 2014 1:42 PM
  • If you see no error then your application is causing the rollback.  Profiler trace has transaction events that should show that too.

    >DIAG [HY010] [Microsoft][SQL Server Native Client 11.0]Function sequence error (0) 

    I thought this was a Java app.  In that case it shouldn't be using SQL Native Client.  It should be using the Microsoft JDBC Driver for SQL Server

    Is the app using the unsupported JDBC-ODBC bridge:

     Oracle does not support the JDBC-ODBC Bridge. Oracle recommends that you use JDBC drivers provided by the vendor of your database instead of the JDBC-ODBC Bridge

    http://docs.oracle.com/javase/7/docs/technotes/guides/jdbc/bridge.html

    It looks like you application is rolling back the transaction and then attempting to fetch from an open cursor.  This doesn't work. 

    The questions are:

    1) Why are you using ODBC in a Java app instead of the supported Microsoft JDBC Driver?

    2) Why is your application causing a rollback.

    David


    David http://blogs.msdn.com/b/dbrowne/

    Wednesday, September 17, 2014 1:56 PM
  • 1) Why are you using ODBC in a Java app instead of the supported Microsoft JDBC Driver?

    It is recommended by vendor. See page 9 on attached pdf in below link.

    http://blogs.technet.com/b/sql_server_isv/archive/2011/02/04/best-practices-for-running-dassault-syst-232-mes-enovia-on-sql-server-2008.aspx

    2) Why is your application causing a rollback.

    Thats what we are trying to figure out.

    Between I tried connecting application to a vanilla database and executing this command then it is happening successfully. In that database there is no data.

    When I try to connect to my database then only 1024 rows are getting inserted and then rollback happening.

    So trying to find the cause for rollback.

    Thursday, September 18, 2014 12:18 PM
  • Here is the snippet which shows why odbc data source is used:

    For ENOVIA Studio Modeling Platform Rich Clients such as MQL, Matrix, System, and Business, 
    the supported operating system architectures have changed. ENOVIA V6R2010x and previous 
    releases were 32-bit only, while ENOVIA V6R2011 has both 32-bit and 64-bit versions. This 
    means that for 32-bit applications running on 64-bit operating system versions, the required 
    ODBC Data Source names have to be created using the 32-bit version of the ODBC Data Source 
    Administrator found at %WINDIR%\SysWOW64\odbcad32.exe. For any other combinations (32-
    bit apps on 32-bit operating systems and 64-bit apps on 64-bit operating systems), the required 
    ODBC Data Source names must be created using the Control Panel’s ODBC Data Source 
    Administrator. 

    Thursday, September 18, 2014 8:20 PM
  • Here is the snippet which shows why odbc data source is used:

    For ENOVIA Studio Modeling Platform Rich Clients ...

    If this is a 3rd party application you should seek their support for proper configuration.  And you should _almost never_ be converting the database on your own.  The ISV typically has a supported SQL Server schema and supported data migration procedures for a cross-platform database migration.

    David


    David http://blogs.msdn.com/b/dbrowne/

    Friday, September 19, 2014 2:27 AM