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

@mauricio0015

hello, today I bring this new error, produced on a server with SO Debian 9.2 php7.1 in the function of connections to SQL SERVER on WINDOWS USING THE BOOKSTORES
«extension = sqlsrv.so» >> /etc/php/7.1/apache2/php.ini
, but at the beginning the connection to the sql server I receive the following error:
Error information:

SQLSTATE: 01000
Código: 0
Mensaje: [unixODBC] [Driver Manager] No se puede abrir lib ‘Controlador ODBC 13 para SQL Server’: archivo no encontrado

@mauricio0015
mauricio0015

changed the title
SQLSTATE: 01000 Código: 0 Mensaje: [unixODBC] [Driver Manager] No se puede abrir lib ‘Controlador ODBC 13 para SQL Server’: archivo no encontrado

Error information: SQLSTATE: 01000 Code: 0 Message: [unixODBC][Driver Manager]Can’t open lib ‘ODBC Driver 13 for SQL Server’ : file not found

Jan 27, 2018

@lilgreenbird

hi @mauricio0015,

Looks like the ODBC driver was not installed properly. The error message is from the Driver Manager, complaining that it can’t find the ODBC driver. Can you please check your odbc.ini and odbcinst.ini to make sure the ODBC driver entries are there? You should see the path of the ODBC driver in odbcinst.ini. Please make sure the path is valid and then verify your connection using isql first before attempting to connect with PHP. If isql succeeds and you’re still having connection issues, please list the entries you have in your config files and we can debug further. Thanks.

@nicdnepr

I got same problem
I use mssql on ubuntu 16.04
I removed package mssql-tools
and not can’t install
I got error
mssql-tools : Depends: msodbcsql (< 13.2.0.0) but 17.0.1.1-1 is to be installed
also php cant connect to mssql

@lilgreenbird

@nicdnepr your problem looks completely different than the one above. Are you trying to install mssql-tools? If you are using msodbcsql 17 preview then you will need to manually install the mssql-tools 17 preview which is also available in the preview folder
If you have further problems with this can you please open a new issue so we can look into this further and not hijack this one.
Thanks..

@neoacevedo

To me, odbcinst.ini has the following:

[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-17.0.so.1.1
UsageCount=1

But I’m getting exactly the same issue on openSUSE, running PHP CLI commands.

@david-puglielli

@neoacevedo Could you provide a repro script and the output you are getting?

@neoacevedo

good, I am just using yii migrate with the following configuration:

'db' => [
            'class' => 'yiidbConnection',
            'dsn' => "sqlsrv:Server=external-or-local-server,1433;Database=mydatabase",
            'username' => 'SA',
            'password' => 'the-password',
            'charset' => 'utf8',
            'enableQueryCache' => false
        ],

On Server I use localhost with exactly the same results as if it were Amazon or Azure RDS.
The output is just like

$ php yii migrate
PHP Fatal error:  Uncaught PDOException: SQLSTATE[01000]: [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 13 for SQL Server' : file not found in /home/nestor/public_html/myproject/vendor/yiisoft/yii2/db/Connection.php:660

Although in local I can’t connect via sqlcmd, on remote I can do it without problems.

@david-puglielli

@neoacevedo The latest version of the pdo_sqlsrv driver defaults to ODBC driver 17, so if you are seeing an error message saying that ‘ODBC Driver 13 for SQL Server’ is not found, you are probably using an older version of the pdo_sqlsrv driver. Please try the latest preview by running pecl install pdo_sqlsrv-5.2.0RC1 or getting the binary from the release page and let us know if the problem is fixed. Thanks!

@neoacevedo

Following this comment I uninstalled the latest pdo_sqlsrv and sqlsrv drivers and installed the 5.2.0RC1 and now the error changes to SSL Provider: [error:140A90A1:SSL routines:SSL_CTX_new:library has no ciphers]’ so I will check for any issue related to this.

@dhawkshaw

Hi, I’ve been having the same problems on this using Leap 42.3. In my case I reverted back to to the previous versions of the driver and tools in zypper. ie msodbcsql.13.1.9.2-1 and mssql-tools.14.0.6.0-1 and that at least allows me to keep working. In the meantime, I’ve disabled the ms repo so that I don’t get any further updates.

@AnnoyingTechnology

I had this issue too, as the file libmsodbcsql did exist, I looked at its dependencies

root@Mespilus:/opt/microsoft/msodbcsql/lib64# readelf -d libmsodbcsql-13.1.so.9.2 | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libodbcinst.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libcrypto.so.1.0.0]
 0x0000000000000001 (NEEDED)             Shared library: [libkrb5.so.3]
 0x0000000000000001 (NEEDED)             Shared library: [libgssapi_krb5.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libcurl.so.4]
 0x0000000000000001 (NEEDED)             Shared library: [libssl.so.1.0.0]
 0x0000000000000001 (NEEDED)             Shared library: [libuuid.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

And checking if each library was present on the system. This one was missing
0x0000000000000001 (NEEDED) Shared library: [libssl.so.1.0.0]
The package build by microsoft doesn’t seem to reference/require/install the proper libssl.
It references libssl1.0.0 while debian 9 seems to have >1.0.0 installed.
Installing libssl1.0.0 from debian jessie fixed it. for me

@artemik

@AnnoyingTechnology Where could I find the libssl.so.1.0.0 for Ubuntu?
I installed it via wget and dpkg. Is there a better way of doing this?

Many thanks for the fix!

@AnnoyingTechnology

@nenetto

I leave this scripts that worked for me.

My problem was pretty similar yours and I tested all the options such as changing the driver location, making a symbolic link, modify /etc/*.ini files, etc… nothing worked.

My problem, running python 3.6, pyodbc package in a docker container from alpine was the library libssl1.0.0

Here you will find my installation script for pyodbc Debian 8 (alpine) docker image using the driver v13

DRIVER={ODBC Driver 13 for SQL Server}

The command I run for database connection was:

import pyodbc
connection_string = 'DRIVER={ODBC Driver 13 for SQL Server};'
connection_string += 'SERVER={0};DATABASE={1};UID={2};PWD={3};'.format(host,dbname,user,pwd)
connection = pyodbc.connect(connection_string)

@J4VMC

Hello, I have the same issue running a Debian 8 docker container with PHP7.2 and Nginx. I’ve installed the MSSQL ODBC 13.1 drivers but I still get the

SQLSTATE [01000, 0]: [unixODBC][Driver Manager]Can't open lib '/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.2' : file not found

As others have suggested, I ran readelf -d libmsodbcsql-13.1.so.9.2 | grep NEEDED and then ldconfig -p | grep libraryname for each of the libraries, but to my surprise, all the needed libraries are available.

My odbcinst.ini contains the right path for the libmsodbcsql file, which also has the right permissions.

My Dockerfile looks like:

FROM php:fpm

RUN apt-get update 
    && apt-get install -y --no-install-recommends vim curl libssl libc6 debconf subversion git apt-transport-https apt-utils 
    build-essential locales acl mailutils wget zip unzip 
    gnupg gnupg1 gnupg2

ENV ACCEPT_EULA=Y

# Microsoft SQL Server Prerequisites
RUN apt-get update 
    && curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 
    && curl https://packages.microsoft.com/config/debian/8/prod.list 
        > /etc/apt/sources.list.d/mssql-release.list 
    && apt-get install -y --no-install-recommends 
        locales 
        apt-transport-https 
    && echo "en_GB.UTF-8 UTF-8" > /etc/locale.gen 
    && locale-gen 
    && apt-get update 
    && apt-get -y --no-install-recommends install 
        msodbcsql 
        unixodbc-dev

RUN docker-php-ext-install mbstring pdo pdo_mysql 
    && pecl install sqlsrv pdo_sqlsrv xdebug 
    && docker-php-ext-enable sqlsrv pdo_sqlsrv xdebug

COPY php.ini /etc/php/latest/php.ini
COPY php-fpm-pool.conf /etc/php/latest/pool.d/www.conf

RUN curl -sSk https://getcomposer.org/installer | php -- --disable-tls && 
   mv composer.phar /usr/local/bin/composer

RUN groupadd dev -g 999
RUN useradd dev -g dev -d /home/dev -m

RUN rm -rf /var/lib/apt/lists/*

WORKDIR /var/www/symfony

EXPOSE 9000
CMD ["php-fpm"]

What could be the problem if the libraries exist and the path is correct?

@nenetto

Hey!

Did you try this line?
RUN DEBIAN_FRONTEND=noninteractive apt-get install libssl1.0.0

I think this a key problem when installing MSSql Drivers
Take a look and let me know, please

@J4VMC

@nenetto

@J4VMC Anywhere after apt-get update? Just add it to after your RUN command for MSQL:

# Microsoft SQL Server Prerequisites

RUN DEBIAN_FRONTEND=noninteractive apt-get install libssl1.0.0

;)

@J4VMC

@nenetto this is what I get when I run docker-compose up -d:

E: Package 'libssl1.0.0' has no installation candidate

And my Dockerfile looks like:

FROM php:fpm

RUN apt-get update 
    && apt-get install -y --no-install-recommends vim curl libc6 debconf subversion git apt-transport-https apt-utils 
    build-essential locales acl mailutils wget zip unzip 
    gnupg gnupg1 gnupg2

ENV ACCEPT_EULA=Y

# Microsoft SQL Server Prerequisites
RUN apt-get update 
    && curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 
    && curl https://packages.microsoft.com/config/debian/8/prod.list 
        > /etc/apt/sources.list.d/mssql-release.list 
    && apt-get install -y --no-install-recommends 
        locales 
        apt-transport-https 
    && echo "en_GB.UTF-8 UTF-8" > /etc/locale.gen 
    && locale-gen 
    && apt-get update 
    && apt-get -y --no-install-recommends install 
        msodbcsql 
        unixodbc-dev

RUN DEBIAN_FRONTEND=noninteractive apt-get install libssl1.0.0

RUN docker-php-ext-install mbstring pdo pdo_mysql 
    && pecl install sqlsrv pdo_sqlsrv xdebug 
    && docker-php-ext-enable sqlsrv pdo_sqlsrv xdebug

COPY php.ini /etc/php/latest/php.ini
COPY php-fpm-pool.conf /etc/php/latest/pool.d/www.conf

RUN curl -sSk https://getcomposer.org/installer | php -- --disable-tls && 
   mv composer.phar /usr/local/bin/composer

RUN groupadd dev -g 999
RUN useradd dev -g dev -d /home/dev -m

RUN rm -rf /var/lib/apt/lists/*

WORKDIR /var/www/symfony

EXPOSE 9000
CMD ["php-fpm"]

@nenetto

@J4VMC ,

I check your docker image and you built it from php:fpm link here. This image is built from debian:stretch-slim link here.

This means that your image is debian based on the version 9.4 link here.

In summary, you should install following the instructions for Debian 9. However, you are installing drivers for debian 8
curl https://packages.microsoft.com/config/debian/8/prod.list -> From your Dockerfile.

So, my suggestion is the following Dockerfile for your problem

FROM php:fpm

RUN apt-get update 
    && apt-get install -y --no-install-recommends vim curl libssl libc6 debconf subversion git apt-transport-https apt-utils 
    build-essential locales acl mailutils wget zip unzip 
    gnupg gnupg1 gnupg2

ENV ACCEPT_EULA=Y

# Microsoft SQL Server Prerequisites
RUN apt-get update 
    && curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 
    && curl https://packages.microsoft.com/config/debian/9/prod.list 
        > /etc/apt/sources.list.d/mssql-release.list 
    && apt-get install -y --no-install-recommends 
        locales 
        apt-transport-https 
    && echo "en_GB.UTF-8 UTF-8" > /etc/locale.gen 
    && locale-gen 
    && apt-get update 
    && apt-get -y --no-install-recommends install 
        msodbcsql 
        unixodbc-dev

RUN echo "deb http://security.debian.org/debian-security jessie/updates main" >> /etc/apt/sources.list && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install libssl1.0.0

RUN docker-php-ext-install mbstring pdo pdo_mysql 
    && pecl install sqlsrv pdo_sqlsrv xdebug 
    && docker-php-ext-enable sqlsrv pdo_sqlsrv xdebug

COPY php.ini /etc/php/latest/php.ini
COPY php-fpm-pool.conf /etc/php/latest/pool.d/www.conf

RUN curl -sSk https://getcomposer.org/installer | php -- --disable-tls && 
   mv composer.phar /usr/local/bin/composer

RUN groupadd dev -g 999
RUN useradd dev -g dev -d /home/dev -m

RUN rm -rf /var/lib/apt/lists/*

WORKDIR /var/www/symfony

EXPOSE 9000
CMD ["php-fpm"]

@J4VMC

@nenetto what php-fpm image can I use that is based on Debian 8? I think that will help with the issue.

@nenetto

I have no idea right now, take a look at dockerhub — php.

Anyway, in my last response I changed the debian repositories already. Test that image first and cross the fingers.

@J4VMC

@nenetto still throws the E: Unable to locate package libssl error. I’ll try and build a custom image based on Ubuntu 16.04. Thanks for your help

@sprankle

@yitam

@sprankle the name change applies to ODBC 17+
For those who want ODBC 13.1 the name remains the same

Перейти к контенту

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 .

Статус

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

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

  • 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

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 .

Статус

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

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

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.

ODBC Error Messages

SQLERROR returns SQLSTATE values as defined by the X/Open and SQL Access Group SQL CAE specification (1992). SQLSTATE values are strings that contain five characters. The following table lists SQLSTATE values that a driver can return for SQLError.

The character string value returned for SQLSTATE consists of a two-character class value followed by a three-character subclass value. A class value of 01 indicates a warning and is accompanied by a return code of SQL_SUCCESS_WITH_INFO. Class values other than 01, except for the class IM, indicate an error and are accompanied by a return code of SQL_ERROR. The class IM is specific to warnings and errors that derive from the implementation of ODBC. The subclass value 000 in any class is for implementation defined conditions within the given class. The assignment of class and subclass values is defined by SQL-92.

Note  Although successful execution of a function is indicated typically by a return value of SQL_SUCCESS, the SQLSTATE 00000 also indicates success.

SQLSTATE ODBC API (Driver Manager) error
00000 Success
01000 General warning
01002 Disconnect error
01004 Data truncated
01006 Privilege not revoked
01S00 Invalid connection string attribute
01S01 Error in row
01S02 Option value changed
01S03 No rows updated or deleted
01S04 More than one row updated or deleted
01S05 Cancel treated as FreeStmt/Close
01S06 Attempt to fetch before the result returned the first rowset
07001 Wrong number of parameters
07006 Restricted data type attribute violation
07S01 Invalid use of default paramater
08001 Unable to connect to data source
08002 Connection in use
08003 Connection not open
08004 Data source rejected establishment of connection
08007 Connection failure during transaction
08S01 Communication link failure
21S01 Insert value list does not match column list
21S02 Degree of derived table does not match column list
22001 String data right truncation
22002 Indicator variable required but not supplied
22003 Numeric value out of range
22005 Error in assignment
22008 Datetime field overflow
22012 Division by zero
22026 String data, length mismatch
23000 Integrity constraint violation
24000* Invalid cursor state
25000 Invalid transaction state
28000 Invalid authorization specification
34000 Invalid cursor name
37000 Syntax error or access violation
3C000 Duplicate cursor name
40001 Serialization failure
42000 Syntax error or access violation
70100 Operation aborted
IM001 Driver does not support this function
IM002 Data source name not found and no default driver specified
IM003 Specified driver could not be loaded
IM004 Driver’s SQLAllocEnv failed
IM005 Driver’s SQLAllocConnect failed
IM006 Driver’s SQLSetConnectOption failed
IM007 No data source or driver specified; dialog prohibited
IM008 Dialog failed
IM009 Unable to load translation DLL
IM010 Data source name too long
IM011 Driver name too long
IM012 DRIVER keyword syntax error
IM013 Trace file error
S0001 Base table or view already exists
S0002 Base table not found
S0011 Index already exists
S0012 Index not found
S0021 Column already exists
S0022 Column not found
S0023 No default for column
S1000 General error
S1001 Memory allocation failure
S1002 Invalid column number
S1003 Program type out of range
S1004 SQL data type out of range
S1008 Operation canceled
S1009 Invalid argument value
S1010 Function sequence error
S1011 Operation invalid at this time
S1012 Invalid transaction operation code specified
S1015 No cursor name available
S1090 Invalid string or buffer length
S1091 Descriptor type out of range
S1092 Option type out of range
S1093 Invalid parameter number
S1094 Invalid scale value
S1095 Function type out of range
S1096 Information type out of range
S1097 Column type out of range
S1098 Scope type out of range
S1099 Nullable type out of range
S1100 Uniqueness option type out of range
S1101 Accuracy option type out of range
S1103 Direction option out of range
S1104 Invalid precision value
S1105 Invalid parameter type
S1106 Fetch type out of range
S1107 Row value out of range
S1108 Concurrency option out of range
S1109 Invalid cursor position
S1110 Invalid driver completion
S1111 Invalid bookmark value
S1C00 Driver not capable
S1DE0 No data at execution values pending
S1T00 Timeout expired

* In SQL Server Enterprise Manager, you may receive the «Invalid cursor state» error message when Microsoft® SQL Server™ runs out of resources while attempting to save selected tables or a database diagram. This error is returned because of insufficient space in your database or transaction log to complete the save process. To correct this problem, check to see if the database or the transaction log is full. If so, increase the size of the database to accommodate the change. Check other system resources or contact your system administrator.

In addition to the standard ODBC error messages located in your ODBC programmer’s reference documentation, the SQL Server ODBC driver can return error messages for certain SQLSTATE values, as shown in this table.

SQLSTATE SQL SERVER DRIVER ERROR Description
01000 %ld rows sent to SQL Server. Total sent: %ld. A batch size of rows have been sent to SQL Server using the BCP API.
01000 %ld rows successfully bulk-copied to host-file. Total received: %ld. A batch size of rows have been written to the host file using the BCP API.
01000 Access to database configured in the DSN has been denied. Default used. Either the database does not exist or the user does not have permission to access the database. The default database configured for the login ID was used.
01000 An error has occurred during an attempt to access the log file, logging disabled. The log file for driver statistics or long-running queries could not be used. The logging of driver statistics or long-running queries has been disabled.
01000 Connected to backup server. The SQL Server primary server was not available, so the connection was made to the fallback server.
01000 Language configured in the DSN is not supported. Default used. Either the language name is invalid or the language is not installed on the server. The default language configured for the login ID was used.
01000 Null bit data forced to zero. A bit field containing a NULL is being loaded to a server that does not support NULL bit data. The field was set to zero.
01000 Procedure executed with ‘EXEC’. No output parameters returned. The procedure could not be executed as an RPC and output parameters were specified. Because the procedure had to be executed with EXEC, no output parameters will be stored.
01000 SQL Debugging disabled. SQL Debugging could not be enabled, probably because the SQL Server is not configured for SQL debugging.
01000 The ODBC catalog stored procedures installed on server %s are version %s; version %02d.%02d.%4.4d or later is required to ensure proper operation. Please contact your system administrator. Install the ODBC catalog stored procedures by executing MsqqlInstallInstcat.sql.
01000 Zero length data forced to length 1. A zero-length binary or character field is being loaded, but zero-length data is not supported. The field was forced to a 1 byte blank or binary zero.
01S02 Cursor concurrency changed. The application requested a concurrency that could not be honored because of the type of request or query. A different concurrency was used instead.
01S02 Cursor type changed. The application requested a cursor type that could not be honored because of the type of request or query. A different cursor type was used instead.
01S02 Packet size change not honored by server, server size used. The application requested a nondefault packet size that could not be supported by SQL Server. The server default size was used instead.
01S02 Packet size changed. The application requested a nondefault packet size that was outside of the limits of allowable size. Either the smallest or largest packet size was used instead, depending if the requested size was too small or too large.
01S02 Login timeout changed. The application requested a login time-out that was too large. The maximum login time out was used instead.
07006 Conversions not allowed using bcp_moretext. The application using bcp_moretext must have the same field type as it does the column type.
08004 Server rejected the connection; Access to selected database has been denied. Either the database does not exist or the user does not have permission to access the database.
08004 Server rejected the connection; Language specified is not supported. Either the language name is invalid or the language is not installed on SQL Server.
HY024 Database is invalid or cannot be accessed. Either the database does not exist or the user does not have permission to access the database.
IM006 Packet size change not supported by server, default used. The application requested a nondefault packet size that SQL Server does not support. The client default size was used.
HY000 All bound columns are read-only. There must be an updatable column to use SQLSetPos or SQLBulkOperations to change or insert a row.
HY000 An old netlib (%s) has been detected. Please delete it and restart the application. The netlib that was being loaded was out of date. The driver requires a newer netlib.

The problem could be a netlib in the current directory of the application, which is being loaded instead of the one in the system directory, or it could be that the netlib was not installed properly or is corrupted. If the netlib specified in the error text exists elsewhere than in the Windows system directory, delete it. If the netlib exists only in the system directory, install the client utilities on the client and restart the application.

HY000 Attempt to bulk-copy a NULL value into a Server column which does not accept NULL values. The field contains a NULL value, but the column does not allow NULL values.
HY000 Attempt to bulk-copy an oversized column to the SQL Server. The length supplied for a column is larger than the column definition in the table.
HY000 Attempt to read unknown version of BCP format file. The header line in the bcp format file was not a recognized version.
HY000 Bad bulk-copy direction. Must be either IN or OUT. The bcp_init call did not specify a valid direction for the eDirection parameter.
HY000 Bad terminator. The terminator string supplied in bcp_bind is invalid.
HY000 Bcp host-files must contain at least one column. No columns were selected to be loaded.
HY000 Cannot generate SSPI context. The driver could not obtain an SSPI context required for integrated security. The native error will contain the Win32 error code.
HY000 Cannot initialize SSPI package. The driver could not obtain an SSPI context required for integrated security. The native error will contain the Win32 error code.
HY000 Communication module is not valid. Driver has not been correctly installed. The network library .dll is corrupted. Install the client utilities on the client and restart the application.
HY000 Connection is busy with results for another hstmt. The SQL Server ODBC driver allows only one active hstmt. For more information, see Using Default Result Sets.
HY000 Connection is not enabled for BCP. The application using the BCP API must set the SQLSetConnectAttr or SQL_SS_COPT_BCP attribute before connecting.
HY000 Failure during closing of connection. The ConnectionClose function in the network library failed. This problem is typically caused by a network or SQL Server problem.
HY000 For BCP, all variable-length data must have either a length-prefix or a terminator specified. bcp_bind was called with SQL_VARYLEN_DATA, but neither a prefix length nor a terminator was specified.
HY000 Host-file columns may be skipped only when copying into the server. A bcp out format file specified that a column should be skipped. This is not allowed. Either create a view containing only the desired columns and bcp out from that view, or use the -Q flag to provide a SELECT statement selecting only the desired columns.
HY000 Incorrect host-column number found in BCP format-file. The format file contains a column number greater than the number of columns in the table.
HY000 I/O error while reading bcp data-file.  
HY000 I/O error while reading BCP format file.  
HY000 I/O error while writing bcp data-file.  
HY000 I/O error while writing bcp error-file.  
HY000 Invalid option. The eOption parameter to bcp_control was not valid.
HY000 Non-default parameter not allowed after default parameter. Parameters to a stored procedure cannot have a non-default value after any preceding parameter has been specified with the default value.
HY000 Not enough columns bound. For a bcp out, not all columns of the table were bound. Either create a view which contains only the desired columns and bcp out from that view or, use the -Q flag to provide a SELECT statement selecting only the desired columns.
HY000 ODBC BCP/Driver version mismatch. The Sqlsrv32.dll and Odbcbcp.dll .dlls do not have identical versions. Install the client utilities on the client and restart the application.
HY000 Protocol error in TDS stream. The TDS stream from the server is invalid. This problem is typically caused by a SQL Server problem. Check the SQL Server error log.
HY000 Table contains less rows than first row count. A starting row number was supplied, but the table on the server did not contain that number of rows. No rows were copied to the host-file.
HY000 Table contains less rows than last row count. An ending row number was supplied, but the table on the server did not contain that number of rows.
HY000 Table has no text/image columns. bcp_moretext was called, but the table does not contain any text or image columns.
HY000 TDS buffer length too large. The TDS stream from the server is invalid. This problem is typically caused by a SQL Server problem. Check the SQL Server error log.
HY000 Text column data incomplete. The summation of the lengths supplied by bcp_moretext did not match the length supplied in bcp_bind or bcp_collen.
HY000 The BCP host-file contains less rows than first row count. A starting row number was supplied, but the host-file did not contain that number of rows. No rows were loaded.
HY000 The row length exceeds SQL Server’s maximum allowable size. The summation of the data lengths for a row is larger than the maximum row size.
HY000 The stored procedure required to complete this operation could not be found on the server (they were supplied with SQL Server). Please contact your system administrator. Install the ODBC catalog stored procedures by executing MsqqlInstallInstcat.sql.
HY000 Unable to load communication module. Driver has not been correctly installed. The network library .dll specified for the connection does not exist on this client. Install the client utilities on the client and restart the application.
HY000 Unable to open BCP host data-file. The file name specified in the bcp_init call does not exist or is opened by another application.
HY000 Unable to open BCP error-file. The error file name specified in the bcp_init call does not exist or is opened by another application.
HY000 Unable to read driver version. The driver was unable to read the version block in its .DLL. Install the client utilities on the client and restart the application.
HY000 Unexpected EOF encountered in BCP data-file. During a bcp in operation, end-of-file was detected on the data file while in the middle of processing the last row. This is typically caused by having a different number of columns, types, nullability, or sizes between the original table and the table being loaded.
HY000 Unicode conversion failed. An error occurred during conversion to or from a Unicode string. The native error will contain the Win32 error code.
HY000 Unicode conversion failed. The code page of the SQL server must be installed on the client system. The server code page must exist on the client for proper operation. Either clear the Auto Translate check box for the DSN or install the code page of the server on the client. The server code page can be determined by running EXEC sp_server_info 18.
HY000 Unknown token received from SQL Server. The TDS stream from the server is invalid. This error is typically caused by a problem on the server. Check the SQL Server error log.
HY000 Warning: Partial insert/update. The insert/update of a text or image column(s) did not succeed. A failure during insertion or update of a text, image, or ntext column occurred. That column will not contain the proper data. Roll back the transaction, if possible.

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.

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.

  • Ошибка oct на частотнике
  • Ошибка ocr на частотнике
  • Ошибка ocl на частотнике шнайдер altivar 212
  • Ошибка ocf частотник шнайдер 312
  • Ошибка ocf на частотном преобразователе schneider