|
|||
Irina3gger
04.07.17 — 10:41 |
Доброго времени. Возникла такая проблема, В справочнике создала новый реквизит, но при сохранение выдает ошибку:
SQL State:HY010 Файлы sqlsrv32.dll sqlsrv32.rll odbcbcp.dll были заменены еще при установке SQL Server Подскажите в чем еще может быть проблема? |
||
Ёпрст
1 — 04.07.17 — 10:42 |
(0) только в этом |
||
Ёпрст
2 — 04.07.17 — 10:44 |
Если что, новый реквизит добавьте ручоками. |
||
Irina3gger
3 — 04.07.17 — 10:49 |
(2) Можете пожалуйста повторить еще раз что сделать? А то я не очень поняла |
||
Ёпрст
4 — 04.07.17 — 10:52 |
(3) https://msdn.microsoft.com/ru-ru/library/ms190273(SQL.90).aspx |
||
Ёпрст
5 — 04.07.17 — 10:53 |
Альтернативный вариант
1.Поставить скуль, НЕ меняя никакие библиотеки в нём. |
||
Builder
6 — 04.07.17 — 10:56 |
(5) Это самый правильный вариант. |
||
Irina3gger
7 — 04.07.17 — 10:57 |
Спасибо большое буду пробовать. |
||
Slypower 8 — 05.07.17 — 09:51 |
Или поставить ХР, на ней данная ошибка не будет проявляться. |
TurboConf — расширение возможностей Конфигуратора 1С |
ВНИМАНИЕ! Если вы потеряли окно ввода сообщения, нажмите Ctrl-F5 или Ctrl-R или кнопку «Обновить» в браузере.
Тема не обновлялась длительное время, и была помечена как архивная. Добавление сообщений невозможно.
Но вы можете создать новую ветку и вам обязательно ответят!
Каждый час на Волшебном форуме бывает более 2000 человек.
Bug #: 50003627 (SQL Hotfix)
Microsoft distributes Microsoft SQL Server 2008 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release.
Symptoms
When an application tries to insert data into a table-valued parameter (TVP) subtype in Microsoft SQL Server 2008, the call to the SQLPutData function returns the following SQL_ERROR error message:
HY010, [Microsoft][SQL Server Native Client 10.0]Function sequence error
This problem occurs if the following conditions are true:
-
The application uses the SQL Server 2008 ODBC driver to bind the TVP as data-at-execution (DAE).
-
One of the TVP’s subtypes is also bound as DAE.
Resolution
The fix for this issue was first released in Cumulative Update 2. For more information about how to obtain this cumulative update package for SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:
958186 Cumulative update package 2 for SQL Server 2008Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
956909 The SQL Server 2008 builds that were released after SQL Server 2008 was released
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.
More Information
For more information about what files are changed, and for information about any prerequisites to apply the cumulative update package that contains the hotfix that is described in this Microsoft Knowledge Base article, click the following article number to view the article in the Microsoft Knowledge Base:
958186 Cumulative update package 2 for SQL Server 2008
References
For more information about the list of builds that are available after the release of SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:
956909 The SQL Server 2008 builds that were released after SQL Server 2008 was released
For more information about the Incremental Servicing Model for SQL Server, click the following article number to view the article in the Microsoft Knowledge Base:
935897 An Incremental Servicing Model is available from the SQL Server team to deliver hotfixes for reported problems
For more information about the naming schema for SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:
822499New naming schema for Microsoft SQL Server software update packagesFor more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates
Need more help?
Содержание
- Function sequence error sql
- Answered by:
- Question
- Function sequence error sql
- Answered by:
- Question
- Answers
- All replies
- Error message when an application uses ODBC to bind a TVP and a subtype as DAE in SQL Server 2008: «HY010, [Microsoft][SQL Server Native Client 10.0]Function sequence error»
- Symptoms
- Resolution
- Status
- More Information
- References
Function sequence error sql
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
When calling SQLFetch() in our application, the error status «HY010: function sequence error» is returned when using SQL Server 2008 R2. The ODBC trace log contains these entries:
otsvcctl 1954-13bc ENTER SQLGetData
HSTMT 037BE728
UWORD 3
SWORD -8
PTR 0x02D24E1C
SQLLEN 256
SQLLEN * 0x0012BF6C
otsvcctl 1954-13bc EXIT SQLGetData with return code 0 (SQL_SUCCESS)
HSTMT 037BE728
UWORD 3
SWORD -8
PTR 0x02D24E1C [ 14] «winword»
SQLLEN 256
SQLLEN * 0x0012BF6C (14)
otsvcctl 1954-13bc ENTER SQLFetch
HSTMT 037BE728
otsvcctl 1954-13bc EXIT SQLFetch with return code -1 (SQL_ERROR)
HSTMT 037BE728
DIAG [HY010] [Microsoft][SQL Server Native Client 10.0]Function sequence error (0)
If I understand http://msdn.microsoft.com/en-us/library/ms710996(v=VS.85).aspx and http://msdn.microsoft.com/en-us/library/ms712424(v=VS.85).aspx correctly, SQLFetch() never should return HY010 if a previous SQLGetData() succeeded on the same statement handle (because SQLGetData() causes the statement handle to remain in state S6 and SQLFetch() never can return HY010 in state S6).
Is this right, or is there any condition that could cause HY010 in this case? Are there any debugging options that I could use to determine the reason of the HY010 error?
Источник
Function sequence error sql
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
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,
System Error: #1: State 42000: [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid filegroup specified.
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.
- Proposed as answer by Qiuyun Yu Microsoft contingent staff Friday, September 19, 2014 11:53 AM
- Marked as answer by Lydia Zhang Microsoft contingent staff Monday, October 6, 2014 7:23 AM
Satish Kartan http://www.sqlfood.com/
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
Satish Kartan http://www.sqlfood.com/
>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.
- Proposed as answer by Qiuyun Yu Microsoft contingent staff Tuesday, September 16, 2014 12:14 PM
SQL commands sent to to MSSQL on executing that command are :
drop table ix5687465873;
create table ix5687465873(
id int not null,
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.
What kind of app is it? Can you share the source code that is causing the error?
Is the app creating tables at runtime?
Satish Kartan http://www.sqlfood.com/
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
?=
Satish Kartan http://www.sqlfood.com/
Profiler will also give you the raw error message returned in the «User Error Message» event.
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)
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
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.
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.
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.
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%SysWOW64odbcad32.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.
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.
Источник
Error message when an application uses ODBC to bind a TVP and a subtype as DAE in SQL Server 2008: «HY010, [Microsoft][SQL Server Native Client 10.0]Function sequence error»
Bug #: 50003627 (SQL Hotfix)
Microsoft distributes Microsoft SQL Server 2008 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release.
Symptoms
When an application tries to insert data into a table-valued parameter (TVP) subtype in Microsoft SQL Server 2008, the call to the SQLPutData function returns the following SQL_ERROR error message:
HY010, [Microsoft][SQL Server Native Client 10.0]Function sequence error
This problem occurs if the following conditions are true:
The application uses the SQL Server 2008 ODBC driver to bind the TVP as data-at-execution (DAE).
One of the TVP’s subtypes is also bound as DAE.
Resolution
The fix for this issue was first released in Cumulative Update 2. For more information about how to obtain this cumulative update package for SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:
958186 Cumulative update package 2 for SQL Server 2008Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
956909 The SQL Server 2008 builds that were released after SQL Server 2008 was released
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.
More Information
For more information about what files are changed, and for information about any prerequisites to apply the cumulative update package that contains the hotfix that is described in this Microsoft Knowledge Base article, click the following article number to view the article in the Microsoft Knowledge Base:
958186 Cumulative update package 2 for SQL Server 2008
References
For more information about the list of builds that are available after the release of SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:
956909 The SQL Server 2008 builds that were released after SQL Server 2008 was released
For more information about the Incremental Servicing Model for SQL Server, click the following article number to view the article in the Microsoft Knowledge Base:
935897 An Incremental Servicing Model is available from the SQL Server team to deliver hotfixes for reported problems
For more information about the naming schema for SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:
822499New naming schema for Microsoft SQL Server software update packagesFor more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates
Источник
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Comments
I am close to getting buffered queries working in the Drupal database abstraction layer, with performance gains of ~30% (that’s huge) on a vanilla install.
But… I am seeing again the Function sequence error
It took me ages to isolate the issue this time into a sample script.
Download schema and sample script from this dropbox link:
https://www.dropbox.com/s/3nd8xdf32a7dmyz/sample_sqlsrv_may.zip?dl=0
For the error to go away, simply remove the transaction related statements:
$cnn->beginTransaction();
$cnn->commit();
So it looks like you cannot have a transaction nested in a loop while iterating on a client buffered result set.
Not sure if directly related, but I am seeing the function sequence error appear randomly on different usage scenarios.
All of them when trying to iterate over a client buffered result set.
Hi david-garcia-garcia can you explain some of the usage scenarios that are causing the sequence error. I am with the team at Microsoft that own’s this driver. I might be able to help you out.
The case was too complex and would need investigation to really isolate the steps to reproduce. But it did share something similar with the sample script I provided in the same comment:
- The error came and go intermitently (one request with error, the next one without, and so on…)
- The error appeared after previous operations on the same connection dealt with failing transactions and rollbacks.
If you could get to reproduce the error with the provided script there’s a chance that both of them are indeed the same bug.
I am seeing this error consistently on Drupal 8 — MSSQL integration (and is preventing any further development because it breaks man automated tests…).
Unluckily, the circumstances that lead to the error are so complex that I was unsuccessfull at isolating a test script. I even tried to PROXY all operations on Drupal’s database abstraction layer to later reproduce every single operation done against the PDO driver without luck, the error simply won’t reproduce.
If you are interested in helping solve this out to get D8 working on MSSQL Server, I can provide the exact steps to reproduce on a clean D8 install. You will need the -dev version of the SQL Server driver for Drupal — that I can only share privately at the moment.
I’d love to take a look at this.
Can you share the repro steps and the dev version driver?
Thanks
From: Davvid [mailto:notifications@github.com]
Sent: Monday, July 20, 2015 6:36 AM
To: Azure/msphpsql
Subject: Re: [msphpsql] SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again) (#49)
I am seeing this error consistently on Drupal 8 — MSSQL integration (and is preventing any further development because it breaks man automated tests…).
Unluckily, the circumstances that lead to the error are so complex that I was unsuccessfull at isolating a test script. I even tried to PROXY all operations on Drupal’s database abstraction layer to later reproduce every single operation done against the PDO driver without luck, the error simply won’t reproduce.
If you are interested in helping solve this out to get D8 working on MSSQL Server, I can provide the exact steps to reproduce on a clean D8 install. You will need the -dev version of the SQL Server driver for Drupal — that I can only share privately at the moment.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-122886221.
Steps to reproduce:
- Download a fresh copy of D8: git clone —branch 8.0.x http://git.drupal.org/project/drupal.git
- Setup the site on IIS (see attached phpinfo() for enabled extensions and overal configuration)
- Unzip the SQL Server driver to the root of drupal, this will show you SQL Server as an available target during the install process.
- Install on SQL Server
- Go to /admin/modules and enable the «testing» module
- Go to /admin/config/development/testing and enable the DrupalsearchTestsSearchNumbersTest inside the «Search» group.
- Set a breakpoint in line 183 of coremodulesdblogsrcControllerDbLogController.php (this is the loop where the error happens)
- Run Tests. When the breakpoint is hit use F10 (Visual Studio + PHP Tools to debug) to step through about 4 times, the exception is thrown.
I found out that completely removing transaction management from the Drupal driver prevents the error from happening.
https://drive.google.com/file/d/0B2bjxiZ1Bb4BZmxNWnd1YmFpdDg/view?usp=sharing
(zip with sqlsrv driver, phpinfo() dump and screenshot of the exception)
Good luck. At least the exception is consistently reproducible.
Greetings
Any luck with this? D8 is to be released before the end of the year, it would be nice to have it working on MSSQL shortly before that happens.
I’m looking into it. I’ll,keep you posted on that. Give me a week, since I was out of town.
Thanks
Sent from my iPad
On Aug 4, 2015, at 11:03 PM, Davvid <notifications@github.commailto:notifications@github.com> wrote:
Any luck with this? D8 is to be released before the end of the year, it would be nice to have it working on MSSQL shortly before that happens.
Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-127882620.
Do not use the latest D8 HEAD, download something from the date of my original post. Recent changes in D8 have broken the MSSQL driver for Drupal.
When I’m trying to create the SQL Server database in Drupal 8, I’m getting the following error in the PHP56 error_log file:
[11-Aug-2015 22:04:27 America/Los_Angeles] PHP Fatal error: Call to undefined function DrupalDriverDatabasesqlsrvwincache_ucache_get() in C:inetpubwwwrootdrupaldriverslibDrupalDriverDatabasesqlsrvConnection.php on line 607
Any clue?
From: Davvid [mailto:notifications@github.com]
Sent: Thursday, August 6, 2015 10:57 AM
To: Azure/msphpsql msphpsql@noreply.github.com
Cc: Luiz Fernando Santos lfsantos@microsoft.com
Subject: Re: [msphpsql] SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again) (#49)
Updated driver to fix compatiblity with latest head:
https://www.dropbox.com/s/j98z4fd8jh7wr0q/drivers2.rar?dl=0
Verified that the issue is still reproducible under the same conditions.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-128458978.
Hey Davvid,
I used the very first connector you sent me (used both versions in total) and the error below happens:
[13-Aug-2015 20:36:28 America/Los_Angeles] PHP Fatal error: Declaration of DrupalDriverDatabasesqlsrvSchema::addIndex() must be compatible with DrupalCoreDatabaseSchema::addIndex($table, $name, $fields, array $spec) in C:inetpubwwwrootdrupaldriverslibDrupalDriverDatabasesqlsrvSchema.php on line 41
From: Luiz Santos <lfsantos@microsoft.commailto:lfsantos@microsoft.com>
Date: Tuesday, August 11, 2015 at 10:09 PM
To: Azure/msphpsql <reply@reply.github.commailto:reply@reply.github.com>, Azure/msphpsql <msphpsql@noreply.github.commailto:msphpsql@noreply.github.com>
Subject: RE: [msphpsql] SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again) (#49)
When I’m trying to create the SQL Server database in Drupal 8, I’m getting the following error in the PHP56 error_log file:
[11-Aug-2015 22:04:27 America/Los_Angeles] PHP Fatal error: Call to undefined function DrupalDriverDatabasesqlsrvwincache_ucache_get() in C:inetpubwwwrootdrupaldriverslibDrupalDriverDatabasesqlsrvConnection.php on line 607
Any clue?
From: Davvid [mailto:notifications@github.com]
Sent: Thursday, August 6, 2015 10:57 AM
To: Azure/msphpsql <msphpsql@noreply.github.commailto:msphpsql@noreply.github.com>
Cc: Luiz Fernando Santos <lfsantos@microsoft.commailto:lfsantos@microsoft.com>
Subject: Re: [msphpsql] SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again) (#49)
Updated driver to fix compatiblity with latest head:
https://www.dropbox.com/s/j98z4fd8jh7wr0q/drivers2.rar?dl=0
Verified that the issue is still reproducible under the same conditions.
Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-128458978.
I verified that this is still reproducible on lateset dev of driver and core.
It just do not run
That is weird, at least you should be seeing an error of some sort. I’ve sometimes experienced the progress bar getting stuck forever, but those bugs were already fixed.
That was exactly the behavior I’ve got.
I’ll continue investigating on my end.
Thanks
From: Davvid [mailto:notifications@github.com]
Sent: Wednesday, September 2, 2015 7:06 PM
To: Azure/msphpsql msphpsql@noreply.github.com
Cc: Luiz Fernando Santos lfsantos@microsoft.com
Subject: Re: [msphpsql] SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again) (#49)
I verified that this is still reproducible on lateset dev of driver and core.
It just do not run
That is weird, at least you should be seeing an error of some sort. I’ve sometimes experienced the progress bar getting stuck forever, but those bugs were already fixed.
—
Reply to this email directly or view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fAzure%2fmsphpsql%2fissues%2f49%23issuecomment-137301281&data=01%7c01%7clfsantos%40microsoft.com%7cebe800f891614c31d06508d2b4044817%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=uvwgyq5Qcho6vWQNwUmYo7BIzX6YT5onop7xVhDlFrY%3d.
I just posted a repro script for another issue in #50.
I have the feeling that both #49 and #50 might be the same thing as they both seem to exhibit themselves when a PDO exception is thrown (and managed by the user!) while inside a transaction.
So it might be worth taking a look at #50 first given that it is an «easy» stand alone single file repro script.
I am also getting the [Microsoft][ODBC Driver Manager] Function sequence error.
$q = "SELECT * FROM ".TBL_USERS." WHERE username = '$username'"; $stmt = sqlsrv_query($this->connection, $q, array(),array( "Scrollable" => 'static' )); if(!$stmt || (sqlsrv_num_rows($stmt) < 1)){ error_log("getUserInfo failed for $username: $q",3,'error.log'); sqlsrv_free_stmt($stmt); return NULL; } else { /* Return result array */ sqlsrv_next_result($stmt); $dbrow = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC); if($dbrow === false) { error_log("dbrow is falsen",3,"error.log"); if( ($errors = sqlsrv_errors() ) != null) { foreach( $errors[0] as $key=>$error ) { error_log("$key -> $errorn",3,"error.log"); } } } elseif (is_null($dbrow)){ error_log("dbrow is NULLn",3,"error.log"); } else { error_log("dbrow is OKn",3,"error.log"); } }
It appears whenever I call the sqlsrv_fetch_array function.
@agrarian What version of driver are you using?
Hi @agrarian, I’m trying to understand your script. Why did you call sqlsrv_next_result()
before sqlsrv_fetch_array()
? Did you want to test for errors? If you drop sqlsrv_next_result()
then there shouldn’t be any problem.
Hi @david-garcia-garcia do you still have function sequence error problem? I looked at the other related issue #50 and your repro script is gone.
I am getting this error:
[unixODBC][Driver Manager]Function sequence error
On both the 4.3.0 release of sqlsrv and 5.1.0 preview. I am running a different framework that is mostly mentioned here (CodeIgniter rather than Drupal). I am afraid I don’t know where to look for the error. Is it an error in the framework, the driver, or unixOBDC? What is the bottom line as far as fixes or workarounds? Thank you.
Hello @rkevinburton
Function sequence error can be caused by various factors, so more info is required in addition to telling us you get this error. Therefore, please create a new issue by providing repro script(s), the platform and/or version of the SQL Server, etc. The more you provide the closer we can get to help answer your questions.
I will try to put together a repro script. But it happens infrequently so it may take me some time to put together a relaiable repro. In the meantime I am connecting to
Microsoft SQL Server Developer (64-bit)
Microsoft Windows NT 6.1 (7601)
NT x64
11.0.6020.0
English (United States)
8192 MB
2 (processors)
I have tried the PHP sqlsrv driver version 4.3.0 and 5.1.0preview, and I get the error on both versions. Though, the error seems to occur less frequently with 5.1.0preview.
From: Jenny Tam [mailto:notifications@github.com]
Sent: Tuesday, October 10, 2017 10:26 AM
To: Microsoft/msphpsql <msphpsql@noreply.github.com>
Cc: Kevin (Ronald) Burton <rburton@agsource.com>; Mention <mention@noreply.github.com>
Subject: Re: [Microsoft/msphpsql] SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again) (#49)
Hello @rkevinburton<https://github.com/rkevinburton>
Function sequence error can be caused by various factors, so more info is required in addition to telling us you get this error. Therefore, please create a new issue by providing repro script(s), the platform and/or version of the SQL Server, etc. The more you provide the closer we can get to help answer your questions.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#49 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AdmtTVpIWEm_hVPqAzkdDEAoYykj5Gilks5sq4yegaJpZM4EPo38>.
Hello @rkevinburton regrettably it’s still a bit vague and we won’t be able to reproduce the problem without a concrete repro scenario. For example, when you encountered this error were you doing a simple select, or update, or insert, with or without using stored procedure, transactions, etc.?
I mostly get errors that look like this:
<body>
<div id=»content»>
<h1>A Database Error Occurred</h1>
<p>Error Number: HY010</p><p>[unixODBC][Driver Manager]Function sequence error</p><p>DELETE FROM users.dbo.users_groups WHERE group_id = 1 AND user_id = 685</p><p>Filename: models/ion_auth_parent_model.php</p><p>Line Number: 1222</p> </div>
</body>
I am using CodeIgniter so admittedly the database code is buried in the MVC handling and is specific to our application.
From: Jenny Tam [mailto:notifications@github.com]
Sent: Tuesday, October 10, 2017 12:07 PM
To: Microsoft/msphpsql <msphpsql@noreply.github.com>
Cc: Kevin (Ronald) Burton <rburton@agsource.com>; Mention <mention@noreply.github.com>
Subject: Re: [Microsoft/msphpsql] SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again) (#49)
Hello @rkevinburton<https://github.com/rkevinburton> regrettably it’s still a bit vague and we won’t be able to reproduce the problem without a concrete repro scenario. For example, when you encountered this error were you doing a simple select, or update, or insert, with or without using stored procedure, transactions, etc.?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#49 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AdmtTYDLshjJzuGIHoxCnSN9amX9KhzXks5sq6Q4gaJpZM4EPo38>.
Thanks @rkevinburton. The problem likely lies in the file models/ion_auth_parent_model.php
, line 1222, as indicated in the error message. Looks like something went wrong when trying to delete a certain user? I’m guessing that the user with id 685 and group 1 doesn’t exist.
Please bring this problem to your application developers. FYI, function sequence error often occurs when ODBC functions are called out of the order required. You can check this page for different scenarios that caused HY010 error
If a record doesn’t exist then I get an error that the record doesn’t exist. I am not clear on what ‘function sequence error’ is?
This is the code that is an line 1222
$this->db->delete($this->tables[‘users_groups’], array($this->join[‘groups’] => (int)$group_id, $this->join[‘users’] => (int)$user_id));
From: Jenny Tam [mailto:notifications@github.com]
Sent: Tuesday, October 10, 2017 3:17 PM
To: Microsoft/msphpsql <msphpsql@noreply.github.com>
Cc: Kevin (Ronald) Burton <rburton@agsource.com>; Mention <mention@noreply.github.com>
Subject: Re: [Microsoft/msphpsql] SQLSTATE[HY010]: [Microsoft][ODBC Driver Manager] Function sequence error (again) (#49)
Thanks @rkevinburton<https://github.com/rkevinburton>. The problem likely lies in the file models/ion_auth_parent_model.php, line 1222, as indicated in the error message. Looks like something went wrong when trying to delete a certain user? I’m guessing that the user with id 685 and group 1 doesn’t exist.
Please bring this problem to your application developers. FYI, function sequence error often occurs when ODBC functions are called out of the order required. You can check this page <https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlfetch-function> for different scenarios that caused HY010 error
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#49 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AdmtTX9i40NUU3qG6TMqFZ50ApxZOcf3ks5sq9DTgaJpZM4EPo38>.
@rkevinburton we cannot investigate further unless we have clear steps to reproduce the problems. I’d happily help when you can provide a repro. In your example above, the error is clearly specific to your application and how the class(es) work(s) underneath.
Closing due to inactivity. Please reopen if necessary.
Question & Answer
Question
I create a connected datastore object in a servlet and then pass the connected datastore object to a method in a different servelet to perform an operation. I frequently get DKException «[IBM][CLI Driver] CLI0125E Function sequence error. SQLSTATE=HY010 «
Cause
If the same datastore object is not property synchronized in a multithreading scenario, the following error is likely to occur when performing operations on the datastore:
DKException
[IBM][CLI Driver] CLI0125E Function sequence error. SQLSTATE=HY010
Answer
This is a classic symptom of a threading problem. Most likely, the same datastore instance is used by multiple threads at the same time.
Either strictly synchronize your access to the datastore object or have each thread use its own separate connected DKDatastoreICM object.
Using separate datastore objects is the safest solution.
[{«Product»:{«code»:»SSRS7Z»,»label»:»IBM Content Manager Enterprise Edition»},»Business Unit»:{«code»:»BU053″,»label»:»Cloud & Data Platform»},»Component»:»DB2 Information Integrator for Content»,»Platform»:[{«code»:»PF002″,»label»:»AIX»},{«code»:»PF016″,»label»:»Linux»},{«code»:»PF027″,»label»:»Solaris»},{«code»:»PF025″,»label»:»Platform Independent»},{«code»:»PF033″,»label»:»Windows»}],»Version»:»8.1;8.2;8.3;8.4″,»Edition»:»All Editions;Edition Independent»,»Line of Business»:{«code»:»LOB45″,»label»:»Automation»}},{«Product»:{«code»:»SSRS7Z»,»label»:»IBM Content Manager Enterprise Edition»},»Business Unit»:{«code»:»BU053″,»label»:»Cloud & Data Platform»},»Component»:»Usage»,»Platform»:[{«code»:»PF002″,»label»:»AIX»},{«code»:»PF016″,»label»:»Linux»},{«code»:»PF027″,»label»:»Solaris»},{«code»:»»,»label»:»UNIX»},{«code»:»»,»label»:»Windows NT»},{«code»:»»,»label»:»Windows XP»},{«code»:»»,»label»:»Windows 2003″},{«code»:»»,»label»:»Windows Vista»},{«code»:»PF002″,»label»:»AIX»},{«code»:»PF010″,»label»:»HP-UX»},{«code»:»PF027″,»label»:»Solaris»},{«code»:»»,»label»:»UNIX»},{«code»:»»,»label»:»Windows NT»},{«code»:»»,»label»:»Windows Vista»}],»Version»:»8.1;8.2;8.3;8.4″,»Edition»:»All Editions;Edition Independent»,»Line of Business»:{«code»:»LOB45″,»label»:»Automation»}}]