Ошибка odbc sqlstate 01000 номер ошибки 0

Это обновление устраняет проблему, при которой появляется сообщение об ошибке тайм-аута. Эта проблема возникает при входе и подключитесь к экземпляру SQL Server 2012, который работает под управлением Windows Server 2012.

SQL Server 2012 Enterprise SQL Server 2012 Developer SQL Server 2012 Express SQL Server 2012 Standard SQL Server 2012 Web Еще…Меньше

Симптомы

При попытке войти в систему или подключиться к экземпляру Microsoft SQL Server 2012 устанавливается в Windows Server 2012, может появиться одно из следующих сообщений об ошибке тайм-аута:

  • Сообщение об ошибке 1

    [SQLSTATE 01000] (Сообщение 0) SQLState = 08001, NativeError = [SQLSTATE 01000] 258 ошибки (сообщение 0) = поставщик TCP [Microsoft] [SQL Server собственного клиента 11.0]: [258] ошибка истечения времени ожидания. [SQLSTATE 01000] (Сообщение 0) SQLState = 08001, NativeError = [SQLSTATE 01000] 258 ошибки (сообщение 0) = [Microsoft] [SQL Server собственного клиента 11.0] не удается завершить процесс входа в систему из-за задержки в ответ перед входом [SQLSTATE 01000] (сообщение 0) SQLState = S1T00 NativeError = 0 [SQLSTATE 01000] Ошибка (сообщение 0) = [Microsoft] [SQL Server собственного клиента 11.0] время ожидания входа истекло [SQLSTATE 01000] (сообщение 0)

  • Сообщение об ошибке 2

    <Штамп времени> -! [165] Ошибка ODBC: 0, время ожидания входа истекло [SQLSTATE HYT00]
    <Штамп времени> -! [298] Ошибка SQLServer: 258, не удается завершить процесс входа в систему из-за задержки в ответ перед входом [SQLSTATE 08001]
    <Штамп времени> -! [382] Ошибка входа с сервера «<Имя_базы_данных>» (SubSystemStepHistoryLogger)
    <Штамп времени> -! [298] Ошибка SQLServer: 258, поставщик TCP: [258] ошибка истечения времени ожидания. [SQLSTATE 08001]

Решение

Для решения этой проблемы попытайтесь сначала применить следующих обновлений Windows Server 2012 в Microsoft Knowledge Base:

2779768 Windows Server 2012 и Windows 8 накопительный пакет обновления: Декабрь 2012 г.

Причина

Эта проблема может возникнуть из-за блокировки поток, который вызывает AcceptEX вызовов в режиме ядра (драйвер AFD.sys) в Windows Server 2012. Записывать трассировку сетевого монитора, может оказаться, что некоторые сетевые пакеты достигают сервера. Однако из-за изменений, диспетчер ввода-вывода, вызов GetQueuedCompletionStatus не удается обнаружить сеть данные, полученные и в результате задержки операции сетевого приложения (в данном случае приложением является SQL Server).

Примечание. Windows Server 2012 вносит изменение в диспетчер ввода-вывода, и это изменение влияет на поведение вызова AcceptEX .

Статус

Корпорация Майкрософт подтверждает, что это проблема продуктов Майкрософт, перечисленных в разделе «Относится к».

Нужна дополнительная помощь?

RRS feed

  • Remove From My Forums
  • Question

  • In what circumstances do we get the below error. Shouldn’t it be a little more descriptive?

    The statement has been terminated. [SQLSTATE 01000]

    This is for an SQL SERVER 2005 SP2. I am running a rebuild index using a TSQL job. The rebuild runs fine for a while giving this error later.

Answers

    • Marked as answer by
      HumayunM
      Monday, December 28, 2009 9:49 AM
    • Edited by
      Kalman Toth
      Friday, September 28, 2012 7:28 PM

All replies

  • This is a generic message as you have already figured out and should be preceeded by a more detailed error which should be displayed in the SQL Agent job history log. If you have a profiler trace from that time, an additional error should also be present.

    This error message can also pop up when you have some inconsistencies in the database. Could you run a dbcc checktable on the table whose index you were rebuilding and ensure that there are no inconsistencies reported.

    HTH


    This posting is provided «AS IS» with no warranties, and confers no rights.
    My Blog: Troubleshooting SQL

  • The job history log is not complete either. The errorlog also doesn’t state anything

    «. …contact your system administrator. [SQLSTATE 01000] (Message 2528)  DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Message 2528)  DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Message 2528)  DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Message 2528)  DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Message 2528)  DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Message 2528)  DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Message 2528)  DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Message 2528)  DBCC execu…  The step failed.»

    And the good part is, when I ran the proc manually it ran fine. i.e. from sql management studio

    Very perplexing behaviour

  • When you create a maintenance plan you have the option to logging the details.
    Can you check your maintenance plan and take the logging path, go to that path and open the last executuion log file to get the error. Else go the maintenance plan and right click on the plan to view the history.


    Vidhya Sagar. Mark as Answer if it helps!

  • Hi VidhyaSagar,
    I am not using maintenance plan. I am using a TSQL proc.

    Thanks

  • Hi,

    To troubleshoot the issue, could you provide us the error messages logged in the SQL Server error log files. By default, the error log is located at Program FilesMicrosoft SQL ServerMSSQL.nMSSQLLOGERRORLOG and ERRORLOG.n files.

    If there are any more questions, please let me know.
    Thanks and Merry Christmas.


    ***Xiao Min Tan***Microsoft Online Community***

  • You mention «job history log» so I infer that this is a scheduled job from SQL Agent. 

    If so, you can edit the Advanced Properties of the Job Step.   There you will see options for retaining more log information.  For instance, you can select «Log to table» which will log information from running the job into a table in msdb.

    This may provide details missing from the logs that you are examining.

    After the job runs, you can come back to the Advanced Properties tab and click the View button to see what details were recorded.  Or you can select it out as:

    SELECT j.Name, s.Step_Name, s.Step_id, l.log_size, RIGHT(l.log, 50000) AS recent_log
    FROM msdb.dbo.sysjobs j JOIN msdb.dbo.sysjobsteps s
      ON j.job_id = s.job_id
      JOIN msdb.dbo.sysjobstepslogs l
        ON s.step_uid = l.step_uid

    The RIGHT(l.log, 50000) is just to limit the output, since if you use «Append output to existing entry…» this row can grow to two gigabytes.

    RLF

    • Edited by
      SQLWork
      Friday, December 25, 2009 2:59 PM
      Corrected last line

  • Hi Russel,
    I have done that part i.e select Advanced option and log to table and log to a file also. But the error is the same
    like tail of the file is:
    DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000]
    DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000]
    DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000]
    DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000]
    DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000]
    DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000]
    DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000]
    DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000]
    DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000]
    DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000]
    The statement has been terminated. [SQLSTATE 01000]

    Hi Xiao-Min,
    There is nothing of importance in errorlog.

    ———-
    But the thing is, I can run the rebuild index proc as a query but it is only giving this error from sql agent.

    Thanks all for contributing your valuable time.

    • Edited by
      Kalman Toth
      Friday, September 28, 2012 7:28 PM
  • Hi Kalman,

    I am not using print. I am writing below the code that is used as the TSQL PROC.

    CREATE procedure [dbo].[Usp_osdeDBReIndex_2k5]
    as
    DECLARE @TableName varchar(255)

    DECLARE TableCursor CURSOR FOR
    SELECT table_name FROM information_schema.tables
    WHERE table_type = ‘base table’

    OPEN TableCursor

    FETCH NEXT FROM TableCursor INTO @TableName
    WHILE @@FETCH_STATUS = 0
    BEGIN
    DBCC DBREINDEX(@TableName,’ ‘,90)
    FETCH NEXT FROM TableCursor INTO @TableName
    END

    CLOSE TableCursor

    DEALLOCATE TableCursor

  • I was able to recreate it in SQL Server 2008 using your modified sproc.

    DBCC execution completed. If DBCC printed error messages, contact your system administrator. 
    [SQLSTATE 01000] (Message 2528) 

    As some of the links above stated, it can just be ignored.

    You can also open a bug report at Connect:
    https://connect.microsoft.com/SQLServer?wa=wsignin1.0

    Sproc:

    CREATE procedure uspDBreindex
    as 
    DECLARE @TableSchema varchar(127), @TableName varchar(255)
    
    DECLARE TableCursor CURSOR FOR
    SELECT table_schema,table_name FROM information_schema.tables
    WHERE table_type = 'base table'
    
    OPEN TableCursor
    
    FETCH NEXT FROM TableCursor INTO @TableSchema, @TableName
    WHILE @@FETCH_STATUS = 0
    BEGIN
    	SET @TableName=@TableSchema+'.'+@TableName
    	DBCC DBREINDEX(@TableName,' ',90)
    	FETCH NEXT FROM TableCursor INTO  @TableSchema,@TableName
    END
    CLOSE TableCursor
    DEALLOCATE TableCursor
    GO
    

    Kalman Toth SQL SERVER 2012 & BI TRAINING
    New Book: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2012

    • Edited by
      Kalman Toth
      Friday, September 28, 2012 7:29 PM

  • Hi Kalman,
    I can ignore it but the job fails and sends a notification. Isn’t there a way to avoid the failure of job?

    Thanks

  • 70 and then I get «The statement has been terminated». Previously I was able to run the proc fine as a query at-least but now I am getting after 70 or so [SQLSTATE 01000] msg  This error message «Msg 0, Level 11, State 0, Line 0 A severe error occurred on the current command. The results, if any, should be discarded.»

    I found one KB article http://support.microsoft.com/kb/938102. It kind of qualifies. I am indeed on SP2.
    But the errorlog doesn’t have anything

    2009-12-27 21:25:45.90 Server      The time stamp counter of CPU on scheduler id 12 is not synchronized with other CPUs.
    2009-12-27 21:33:46.00 Server      The time stamp counter of CPU on scheduler id 2 is not synchronized with other CPUs.
    2009-12-27 21:57:46.03 Server      The time stamp counter of CPU on scheduler id 13 is not synchronized with other CPUs.
    2009-12-27 22:05:46.04 Server      The time stamp counter of CPU on scheduler id 14 is not synchronized with other CPUs.
    2009-12-27 22:33:46.05 Server      The time stamp counter of CPU on scheduler id 11 is not synchronized with other CPUs.
    2009-12-27 22:41:46.05 Server      The time stamp counter of CPU on scheduler id 12 is not synchronized with other CPUs.
    2009-12-27 22:57:46.06 Server      The time stamp counter of CPU on scheduler id 4 is not synchronized with other CPUs.
    2009-12-27 23:09:46.06 Server      The time stamp counter of CPU on scheduler id 14 is not synchronized with other CPUs.
    2009-12-27 23:13:46.06 Server      The time stamp counter of CPU on scheduler id 2 is not synchronized with other CPUs.
    2009-12-27 23:29:46.07 Server      The time stamp counter of CPU on scheduler id 13 is not synchronized with other CPUs.
    2009-12-28 00:00:08.94 spid20s     This instance of SQL Server has been using a process ID of 2824 since 12/10/2009 9:29:36 PM (local) 12/11/2009 2:29:36 AM (UTC). This is an informational message only; no user action is required.
    2009-12-28 00:05:46.08 Server      The time stamp counter of CPU on scheduler id 4 is not synchronized with other CPUs.
    2009-12-28 00:09:46.08 Server      The time stamp counter of CPU on scheduler id 12 is not synchronized with other CPUs.
    2009-12-28 00:21:46.09 Server      The time stamp counter of CPU on scheduler id 2 is not synchronized with other CPUs.
    2009-12-28 00:49:46.10 Server      The time stamp counter of CPU on scheduler id 13 is not synchronized with other CPUs.
    2009-12-28 01:13:46.11 Server      The time stamp counter of CPU on scheduler id 4 is not synchronized with other CPUs.
    2009-12-28 01:17:46.11 Server      The time stamp counter of CPU on scheduler id 14 is not synchronized with other CPUs.
    2009-12-28 01:29:46.11 Server      The time stamp counter of CPU on scheduler id 12 is not synchronized with other CPUs.
    2009-12-28 01:41:46.12 Server      The time stamp counter of CPU on scheduler id 2 is not synchronized with other CPUs.
    2009-12-28 01:53:46.12 Server      The time stamp counter of CPU on scheduler id 13 is not synchronized with other CPUs.
    2009-12-28 02:41:46.14 Server      The time stamp counter of CPU on scheduler id 4 is not synchronized with other CPUs.

    So I am not sure if this is the bug I am hitting for this rebuild index job. How to find out?

  • I get the below error.
    ————————————-
    The statement has been terminated.
    Msg 0, Level 11, State 0, Line 0
    A severe error occurred on the current command.  The results, if any, should be discarded.

    • Marked as answer by
      HumayunM
      Monday, December 28, 2009 9:49 AM
    • Edited by
      Kalman Toth
      Friday, September 28, 2012 7:28 PM
  • Thanks Kalman. I will work on that.

I’ve installed ignite 2.7 , nginx, php7.0-fpm.

I also installed unixodbc, unixodbc-dev, libtool, automake, libssl-dev, and m4.

The odbc installation looked at the official homepage and followed up, but there was a problem.

cat odbc.ini // odbcinst.ini // .odbc.ini (all same)

[Apache Ignite]
Description=Apache Ignite
DSN=Apache Ignite
Driver=/usr/local/lib/libignite-odbc.so
Setup=/usr/local/lib/libignite-odbc.so
DriverODBCVer=03.00
FileUsage=0
UsageCount=1

tail /etc/profile

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export LD_LIBRARY_PATH=/usr/local/lib/

ldd /usr/local/lib/libignite-odbc.so

linux-vdso.so.1 =>  (0x00007ffef07c0000)

libignite-binary-2.7.0.33575.so.0 => /usr/local/lib/libignite-binary-2.7.0.33575.so.0 (0x00007fd8b8d4d000)

libodbcinst.so.2 => /usr/lib/x86_64-linux-gnu/libodbcinst.so.2 (0x00007fd8b8b3b000)

libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd8b87b9000)

libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd8b83ef000)

libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd8b81d9000)

libignite-common-2.7.0.33575.so.0 => /usr/local/lib/libignite-common-2.7.0.33575.so.0 (0x00007fd8b7fc2000)

libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007fd8b7db8000)

libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd8b7b9b000)

libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd8b7892000)

/lib64/ld-linux-x86-64.so.2 (0x00007fd8b9227000)

libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd8b768e000)

ex.php

<?php

try {
    // Connecting to Ignite using pre-configured DSN.
    $dbh = new PDO('odbc:Driver=Apache Ignite;ADDRESS=127.0.0.1:10800;Cache    =default');

    // Changing PDO error mode.
    $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

    // Preparing query.
    $dbs = $dbh->prepare('INSERT INTO city (id, name) VALUES (?, ?)');

    // Declaring parameters.
    $key = 777;
    $firstName = "James";

    // Binding parameters.
    $dbs->bindParam(1, $key);
    $dbs->bindParam(2, $firstName);

    // Executing the query.
    $dbs->execute();

} catch (PDOException $e) {
    print "Error!: " . $e->getMessage() . "n";
    die();
}

?>

localhost/ex.php

Error!: SQLSTATE[01000] SQLDriverConnect: 0 [unixODBC][Driver Manager]Can’t open lib ‘/usr/local/lib/libignite-odbc.so’ : file not found

I do not know what to try.
Thank you for your help.

  • Remove From My Forums
  • Question

  • Hi

    When I run a query like below against one remote SQL Server then it works fine and returns the required data;

    SELECT * FROM [ODBC;Driver=SQL Server;SERVER=Server1.com;DATABASE=MyDatabase;UID=MyUser;PWD=MyPass].MyTable

    However when I run the same query against a second remote SQL Server it gives me below error;

    Connection failed:
    SQLState: ‘01000’
    SQL Server Error: 14
    [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid Instance()).
    Connection failed:
    SQLState: ‘08001’
    SQL Server Error: 14
    [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid connection.

    I can otherwise access the second SQL Server fine. So it would seem there is something minor missing in the second server configuration that blocks running the query in this way. What is it I need to do on the problematic SQL Server to have me run the query
    fine?

    Many Thanks

    Regards

    • Edited by

      Tuesday, February 7, 2012 4:34 AM

Answers

  • «Invalid instance» seems to indicate you are trying use the default instance but you should specify a specific instance. For example not «Server=myMachine» but «Server=myMachineSQL2008». If you use SSMS to browse for servers, it will show all servers
    and their instance names.


    -Tom. Microsoft Access MVP

    • Marked as answer by
      Y a h y a
      Tuesday, February 7, 2012 7:10 PM

  • Remove From My Forums
  • Question

  • Hi

    When I run a query like below against one remote SQL Server then it works fine and returns the required data;

    SELECT * FROM [ODBC;Driver=SQL Server;SERVER=Server1.com;DATABASE=MyDatabase;UID=MyUser;PWD=MyPass].MyTable

    However when I run the same query against a second remote SQL Server it gives me below error;

    Connection failed:
    SQLState: ‘01000’
    SQL Server Error: 14
    [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid Instance()).
    Connection failed:
    SQLState: ‘08001’
    SQL Server Error: 14
    [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid connection.

    I can otherwise access the second SQL Server fine. So it would seem there is something minor missing in the second server configuration that blocks running the query in this way. What is it I need to do on the problematic SQL Server to have me run the query
    fine?

    Many Thanks

    Regards

    • Edited by

      Tuesday, February 7, 2012 4:34 AM

Answers

  • «Invalid instance» seems to indicate you are trying use the default instance but you should specify a specific instance. For example not «Server=myMachine» but «Server=myMachineSQL2008». If you use SSMS to browse for servers, it will show all servers
    and their instance names.


    -Tom. Microsoft Access MVP

    • Marked as answer by
      Y a h y a
      Tuesday, February 7, 2012 7:10 PM

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Ошибка no bootable device на ноутбуке acer что делать
  • Ошибка od off хендай акцент
  • Ошибка no bootable device is detected system will enter the bios setup utility как исправить
  • Ошибка ocf на частотнике
  • Ошибка no boot filename received

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии