Microsoft ole db provider for sql server ошибка подключения hresult 80004005

I have migrated a classic ASP site to a new server and am getting the following error, message.

I have tried different connection strings but none of them work.

I am not even sure if the connection string is the problem

The new server is a Windows 2012 Server, SQL Server 2008 R2 Express machine.


Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

/scripts/dbcode.asp, line 31 

Application("C2M_ConnectionString") = "Provider=SQLNCLI10;Server=(local);Database=mysite_live;Uid=mysitec_Live;Pwd=mypass;"

Hiten004's user avatar

Hiten004

2,4171 gold badge22 silver badges34 bronze badges

asked Feb 28, 2013 at 2:52

Burt's user avatar

9

If it is an Express instance, it is most likely not a default instance, but rather a named instance. So you probably meant:

... "Provider=SQLNCLI10;Server=.SQLEXPRESS; ...
--- instead of just (local) ---^^^^^^^^^^^^

Otherwise you’ll need to show us the server properties in SQL Server Configuration Manager on that machine in order for us to be able to tell you how to correct your connection string.

answered Feb 28, 2013 at 3:27

Aaron Bertrand's user avatar

Aaron BertrandAaron Bertrand

272k36 gold badges465 silver badges487 bronze badges

3

As Aaron Bertrand mentioned it would be interesting to have a look at your connection properties (In Sql Server configuration check if the following are enabled Name Pipes and TCP/Ip).
Since you’re able to connect from SSMS i would ask to check if the Remote connection is allowed on that server Also can you tell is the Sql browser service is running?

here is a link that i keep close to me as a reminder or check list on probable connection issues on SQL Server.
Sql Connection Issues
And lastly can you try as provider «SQLNCLI» instead of «SQLNCLI10»

answered Mar 4, 2013 at 23:02

Raymond A's user avatar

Raymond ARaymond A

7631 gold badge12 silver badges29 bronze badges

2

Step-1: Enabling TCP/IP Protocol
Start >> All Programs >> Microsoft SQL Server >> Configuration Tools >> SQL Server Configuration Manager >> SQL Server Network Configuration >> Protocols for MSSQLSERVER >> right click “TCP/IP” and select “Enable”.

Step-2: change specific machine name in Data Source attributes’value to (local) will resovle the problem ni SQL SERVER 2012.

answered Sep 28, 2014 at 16:31

BALAJE's user avatar

Try pinging the server in your connection string. The server your application resides on should be able to communicate on the port you specify by credentials. If you are developing locally try specifying «localhost». If the server is clustered or you installed as an instance then you need to specify that instance. Also make sure the server is configured for mixed-mode authentication if using sql credentials.

OR Try

Data Source=localhost;Initial Catalog=DBNAME;Persist Security Info=True;User ID=MyUserName; Password=MyPassword;

answered Feb 28, 2013 at 3:00

Ross Bush's user avatar

Ross BushRoss Bush

14.6k2 gold badges31 silver badges55 bronze badges

3

It can be a permission issue , Please check is that server is connecting with same configuration detail from SQL management.
other is username / password is wrong.

answered Feb 28, 2013 at 12:00

Jinesh Jain's user avatar

Jinesh JainJinesh Jain

1,2329 silver badges22 bronze badges

5

Here is what I would do:

EDIT: Note that this SO post, a few down, has an interesting method for creating the correct connection string to use.

  1. Open SSMS (Sql Server Management Studio) and copy/paste the
    username/password. Don’t type them, copy/paste. Verify there isn’t
    an issue.
  2. Fire up the code (this is next for me b/c this would be the next
    easiest thing to do in my case) and step to line 31 to verify that
    everything is setup properly. Here is some info on how to do
    this. I understand that this may be impossible for you with this
    being on production so you might skip this step. If at all possible
    though, I’d set this up on my local machine and verify that there is
    no issue connecting locally. If I get this error locally, then I
    have a better chance at fixing it.
  3. Verify that Provider=SQLNCLI10 is installed on the production
    server. I would follow this SO post, probably the answer posted
    by gbn.
  4. You have other working websites? Are any of them classic asp? Even
    if not, I’d compare the connection string in another site to the one
    that you are using here. Make sure there are no obvious differences.
  5. Fire up SQL Server Profiler and start tracing. Connect to the site
    and cause the error then go to profiler and see if it gives you an
    additional error information.
  6. If all of that fails, I would start going through this.

Sorry I can’t just point to something and say, there’s the problem!

Good luck!

Community's user avatar

answered Mar 5, 2013 at 14:08

Mike C.'s user avatar

Mike C.Mike C.

3,0142 gold badges21 silver badges18 bronze badges

5

Have you ever tried SQL Server OLE DB driver connection string:

"Provider=sqloledb;Data Source=(local);Initial Catalog=mysite_live;User Id=mysitec_Live;Password=mypass;"

or ODBC driver:

"Driver={SQL Server};Server=SERVERNAME;Trusted_Connection=no;Database=mysite_live;Uid=mysitec_Live;Pwd=mypass;"

At least this is what I would do if nothing helps. Maybe you will be able to get more useful error information.

answered Mar 8, 2013 at 0:23

Slava's user avatar

SlavaSlava

1,0555 silver badges11 bronze badges

Have you tried to use the server IP address instead of the «(local)»?
Something like «Server=192.168.1.1;» (clearly you need to use the real IP address of your server)

In case you try to use the server IP address, check in the «SQL-Server configurator» that SQL Server is listening on the IP address you use in your connection. (SQL Server Configurator screenshot)

Other useful thing to check / try:

  • And check also if the DB is in the default SQL Server instance, or if it is in a named instance.
  • Do you have checked if the firewall have the TCP/IP rule for opening the port of you SQL Server?
  • Have you tried to connect to SQL Server using other software that use the TCP/IP connection?

Community's user avatar

answered Mar 9, 2013 at 17:56

Max's user avatar

MaxMax

7,3882 gold badges26 silver badges32 bronze badges

The SQL Server Browser service is disabled by default on installation. I’d recommend that you enable and start it. For more information, see this link and the section titled «Using SQL Server Browser» for an explanation of why this might be your problem.

If you don’t wish to enable the service, you can enable TCP/IP protocol (it’s disabled by default), specify a static port number, and use 127.0.01,<port number> to identify the server.

answered Mar 10, 2013 at 16:41

Paul Keister's user avatar

Paul KeisterPaul Keister

12.8k5 gold badges46 silver badges75 bronze badges

In line 31:

cmd.ActiveConnection = Application("C2M_ConnectionString")

How are you instantiating cmd?

Rather than the ConnectionString being wrong, maybe cmd is acting differently in the new environment.

Edited to add:

I see that you’ve gone from IIS 7 to IIS 8. To run Classic ASP sites on IIS 7 required manual changes to server defaults, such as «allow parent paths.» Is it possible that some of the needed tweaks didn’t get migrated over?

If you’re not running with Option Strict On, you should try that — it often reveals the source of subtle problems like this. (Of course, first you’ll be forced to declare all your variables, which is very tedious with finished code.)

answered Mar 5, 2013 at 23:53

egrunin's user avatar

egruninegrunin

24.6k8 gold badges49 silver badges93 bronze badges

1

You need to enable TCP/IP & Named Pipes in SQL Server Network Configuration.
enter image description here

answered Jun 15 at 17:14

Mr Kyaing's user avatar

Mr KyaingMr Kyaing

511 silver badge6 bronze badges

Пользуясь базами данных любой программы 1С, сотрудники предприятий и организаций часто сталкиваются с непредвиденными ситуациями. Пожалуй, одна из самых частых — когда работа программы внезапно завершается по причине того, что администратор разорвал контакт с сервером.

В данном случае Microsoft OLE DB Provider for SQL Server выдаёт такую информацию: «Неопознанная ошибка hresult 80004005». При этом главным признаком проблемы является невозможность выгрузить информацию в базу.

Следует отметить, что ошибки, содержащие именно код 80004005, встречаются постоянно. У них есть особая классификация, которую при желании можно найти в соответствующей литературе.

Ошибка выделения памяти hresult 80004005

Для начала нужно провести проверку конфигурации. Там может содержаться мусор (иными, словами, информация, которая является некорректной). Необходимо проверить конфигурацию с помощью соответствующей команды. Вы увидите флажок, предназначенный для того, чтобы проверить её логическую целостность. Если имеются проблемы, пользователь будет уведомлен об этом с помощью сообщения.

Данные, являющиеся неверными, система удалит в автоматическом режиме, но для этого нужно дать ей доступ, чтобы она изменила главный объект. К примеру, если вы работаете в облачном хранилище, его надо просто захватить.

Поддержка конфигурации требует её проверки и у поставщиков. С этой целью:

  • нужно сохранить данные о конфигурации поставщиков. Для этого используйте CF-файл;
  • теперь необходимо провести загрузку файла в обновлённую базу;
  • выполните операцию, которая описана в п.1.

При получении сообщения об исправлении ошибки имейте в виду то, что конфигурация, имеющаяся у поставщика, содержала неправильные данные. Если такое произошло, снимите свою конфигурацию с поддержки и установите её снова. При этом её надо объединить с новой (от поставщика).

Сейчас уже любой релиз, который выпускает 1С, не имеет таких сложностей.

Ошибка hresult 80004005

Сопутствующая проблема и методы её решения

С ситуацией, описанной ранее, тесно связана ещё одна, происходящая параллельно. Выглядит она так: 10007066.

Суть проблемы: когда используется СУБД MS SQL SERVER, во время записи объекта из базы с несколькими колонками (например, «Значения» и «Хранилища»), часто случается другой тип ошибки.

Выглядит она таким образом:

Ошибка СУБД:Microsoft OLE DB Provider for SQL Server: String data length mismatchHRESULT=80004005.

Когда происходит ошибка 1с hresult clr 80004005, программа завершает свою работу в аварийном режиме.

Если вы ознакомитесь во время загрузки программы со специальным журналом (речь идёт о технологическом журнале), там есть табличка, содержащая информацию об этих хранилищах.

С помощью средств MS SQL Server Query Analizer нужно найти в табличке несколько колонок image и сделать для каждой следующий запрос

select top 10 DATALENGTH(_Fld4044 from _InfoReg4038  order by DATALENGTH(_Fld4044) desc

При этом, со стороны стандартных проверок, проводимых платформой (chdbfl), поступит информация о том, что база полностью в порядке.

Ошибка выделения памяти hresult 80004005 (на английском это out of memory for query result 1с) может происходить вследствие различных причин, имеющей общую черту. Для системы 1С это, прежде всего, недостаток оперативной памяти. Если говорить точнее, речь идёт о некорректном применении возможностей памяти, поэтому для решения задачи лучше использовать несколько косвенных алгоритмов.

Необходимо сделать рестарт (перезапуск) сервера. Таким образом памяти, которая доступна для работы, временно станет больше. Также есть возможность воспользоваться сервером в 64 разряда, содержащем приложения.

Исходя из опыта, ошибка СУБД hresult 80004005 чаще определяется двумя факторами:

  • данные хранятся в хранилище значений (реквизите);
  • в таблице конфигураций содержатся двоичные данные объёмом более 120 мегабайт.

Когда советы от сотрудников 1С не приносят результата (ошибка 1с hresult 80004005 остаётся), попробуйте воспользоваться другой пошаговой инструкцией:

Наши постоянные клиенты по 1С:

Корона Лифт

Гознак

Накфф

Рембаза

Rozara

  • используйте все базы, включив у них все фоновые задачи;
  • в 8.1.11. должен появиться переключатель о запрете на фоновые задачи (во время создания базы);
  • сделайте перезапуск сервера.

Имеет смысл проверки работоспособности. Тем не менее вследствие утечек памяти проблема может возникнуть снова — после перезапуска. В этом случае целесообразно:

  • воспользоваться инструментами sql и сделать бэкап;
  • снять базу с поддержки;
  • выгрузить  cf.

Во время любых действий следует копировать файлы в резерв, так как в любой момент может возникнуть необходимость возвращения к исходному статусу информации. Далее надо убрать в менеджменте консоли (config) запись «более 120 мегабайт» и провести загрузку конфигурации (не объединять, а загрузить).

Есть ещё один способ, с помощью которого неопознанная ошибка субд hresult 80004005 может быть исправлена. Нужно открыть конфигуратор и снять конфигурацию, не сохраняя её. Далее, сохранив, нужно поместить её в отдельный файл без сохранения её изменённого вида.

Выполните в SQL операцию, предназначенную для конкретной базы:

DELETE FROM dbo.Config WHERE DataSize > 125829120

После выполнения этой команды проведите загрузку сохранённой конфигурации.

Что касается радикальных шагов, используемых в особо трудных ситуациях, иногда помогает такая схема:

  • удалите таблицу config из базы данных, воспользовавшись менеджментом консоли DROP TABLE [dbo].[Config];
  • проведите загрузку конфигурации (не «объединить»,а именно «загрузить»).

После проведения проверки проблема должна уйти.

  • Стоимость работ специалистов IT Rush — 2000 руб./час
  • Абонемент от 50 часов в месяц – 1900 руб./час
  • Абонемент от 100 часов в месяц – 1800 руб./час

Нам доверяют:

  • Remove From My Forums
  • Question

  • Hi,

    I am trying to connect to a a SQL Server database using «Microsoft OLE DB Provider for SQL Server» and SQL Server Authentication since I understand from the following thread that Microsoft OLE DB Provider for SQL Server connection manager is more reliable
    than Microsoft Native Client for SQL Server connection manager; —

    http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/fab0e3bf-4adf-4f17-b9f6-7b7f9db6523c/

    When I try and connect using SQL Server Authentication I get the following; —

    What is the best way to authenticate for a process accessing a SQL Server database which may execute at 3am every morning using Microsoft OLE DB Provider for SQL Server connection manager.

    Any help would be greatly appreciated.

    Kind Regards,

    Kieran.


    If you have found any of my posts helpful then please vote them as helpful. Kieran Patrick Wood MCTS BI, PGD SoftDev (Open), MBCS, MCC http://uk.linkedin.com/in/kieranpatrickwood

    • Edited by

      Thursday, October 6, 2011 2:47 PM

Answers

    • Marked as answer by
      Kieran Patrick Wood
      Monday, March 12, 2012 8:44 PM

RRS feed

  • Remove From My Forums
  • Question

  • What does error code 0x80004005 mean?

Answers

  • Karimullah,

    It’s unclear from your post if you’re even using SQL Server or Integration Services.  If you’re experiencing an issue with Norton, you should contact the vendor for assistance.  This forum is for questions and issues on SQL Server Integration Services.

All replies

  • What are you trying to do? 0x80004005 could mean a variety of things from a failed login to an Access database that is exclusively locked by another process. Please provide additional details about your scenario.

  • At random places in my packages, I randomly (not always) get this general netwrok error (I am including the first line just to show the line right above the error line):

    Information: 0x400490F4 at Data Flow Task — my task 1, Lookup — my lookup task 1 [234]: component «Lookup — my lookup task 1» (234) has cached 13312 rows.

    Error: 0xC0202009 at Data Flow Task — my task 1, Lookup — my lookup task 1 [234]: An OLE DB error has occurred. Error code: 0x80004005

    An OLE DB record is available. Source: «Microsoft OLE DB Provider for SQL Server» Hresult: 0x80004005 Description: «[DBNETLIB][ConnectionRead (WrapperRead()).]General network error. Check your network documentation.»

    Error: 0xC020824E at Data Flow Task — my task 1, Lookup — my lookup task 1 [234]: OLE DB error occurred while populating internal cache. Check SQLCommand and SqlCommandParam properties.

    Error: 0xC004701A at Data Flow Task — my task 1, DTS.Pipeline: component «Lookup — my lookup task 1» (234) failed the pre-execute phase and returned error code 0xC020824E.

    FYI — I am using June CTP.

    thanks,
    Nitesh

  • i am trying to update my norton internet security antivirus

    but it is unable to update

    when i search for that one command is there to resolve when in run the command it is saying that code

    the command is         regsvr32 %windir%system32msxml3.dll

    error is call to dllregisterserver is failed with erro code 0x80004005

  • Karimullah,

    It’s unclear from your post if you’re even using SQL Server or Integration Services.  If you’re experiencing an issue with Norton, you should contact the vendor for assistance.  This forum is for questions and issues on SQL Server Integration Services.

  • Hi David,

    I am having a problem updating a fresh install of Windows XP SP2.  I was successful in the fresh install and the subsequent update to XP3.  Unfortunately I seem to be having issues now.  The updates download  with no problem. Unfortunately none are installed.  It basically freezes at the attempt to install,  when the dialogue box indicated initializating the install.
    The information, screen shots and copy of windows update log are at this location for your perusal.
    http://www.dslreports.com/forum/r20768460-XP-Pro-MS-Update-Not-Initializing

    All to say that error code in the title is the error code I am seeing in the windows update log!!

    Any suggestion or help you can give would be appreciated.

    Thanks!

  • Hello,

    Have you solve your issue ? I’m facing the same problem with my Integration services job since i did the upgrade on Visual Studio 2010, on the lookup specially.

    I have been searching for a while, but can’t find a solution.

   ZZeRRo

30.06.09 — 12:36

От чего может вылетать вот такая вот ошибка (полный текст):

Сеанс работы завершен администратором.

по причине:

Соединение с сервером баз данных разорвано администратором

Microsoft OLE DB Provider for SQL Server: Ошибка подключения

HRESULT=80004005

Ошибка проявляется по разному. Последний раз пользователь просто менял элемент справочника, правил таб часть и бабах… Разок было при перепроведении документов.

   ТелепатБот

1 — 30.06.09 — 12:36

   ZZeRRo

2 — 30.06.09 — 12:37

ТелепатБот, не попал )))

   OFF

3 — 30.06.09 — 12:40

   elvi

4 — 30.06.09 — 12:50

перезапустить кластер серверов

   ZZeRRo

5 — 30.06.09 — 13:58

(3) именно эту ошибку там не нашел

(4) а толку

   asady

6 — 30.06.09 — 14:23

(0) Я эту ошибку победил путем отказа от типовых ролей пользователей и разработки своих. Причину даже искать не стал — просто пересаживал постепенно юзверей на новые роли.

   EasyRider

7 — 30.06.09 — 14:25

(0)А какой релиз платформы?

   OFF

8 — 30.06.09 — 14:26

(5) какой полный текст ошибки

   Лефмихалыч

9 — 30.06.09 — 14:29

(0) у меня такое практически всегда связано с тем, что rphost отъел больше гига оперативы. Частично победил увеличением количества рабочих процессов до 4-х — теперь юзеры продолжают отваливаться, но в 4 раза реже и в 4 раза меньше юзеров за час

   bcel

10 — 30.06.09 — 14:32

Я сделал так: создал копию базы, зашел через SQL в таблицу dbo.Config, нашел там несколько строчек с большим размером и с не стандартным FileName, удалил их, выгрузил из 1с конфигурацию этой базы, сравнил их с реальной, различий не было. Удалил их в реальной базе, и уже работаю 3 мес, пока ничего не происходит.

   EasyRider

11 — 30.06.09 — 14:34

(9)Была такая же фигня.Избавился

   ZZeRRo

12 — 30.06.09 — 15:45

Только что тот же пользователь, у которого была вышеописанная ошибка, опять вылетел, но в этот раз вообще небыло никаких сообщений. 1Ска просто закрылась и все. Все же с чем это может быть связано, остальные вроде бы тьфу тьфу тьфу работают нормально.

   ZZeRRo

13 — 30.06.09 — 15:47

(7) 8.1.13.41

(8) в (0) написано, это полный

   ZZeRRo

14 — 30.06.09 — 15:51

(10) эт так как у гилева написано?

   ZZeRRo

15 — 30.06.09 — 15:52

Мне интересно все же с чем это связано.

   EasyRider

16 — 30.06.09 — 15:56

(15)Если 32-битная система,то наверно с тем что процессы сервера переполняются,как у (9).Можно увеличить количество рабочих процессов,установить поддержку 3 ГБ памяти и обновиться до 13-го релиза.Либо использовать 64-битный 1с-сервер.

   d_Fedor

17 — 30.06.09 — 16:12

Вообще причин может быть много… универсальные советы:

Обновление платформы до последней. Это как минимум…

А вообще эта ошибка может проявлятся например при попытке отбора по времени 23:59:59, когда имеются записи с таким же временем, это ошибка 2005 скуля.

Можно перезапускать процессы сервера…

Может проблема в сети между SQL сервером и 1С сервером.. Словом не хватает информации, на чем работаем, версии скуля и платформы…

   ZZeRRo

18 — 30.06.09 — 16:28

Платформа 1С 8.1.13.41, Скуль 2005, «сервак» под кластер серверов 1с канечно совсем не фонтан: 2гига оперативы, ХП 32 бит, работает 1 рабочий процесс

Вот и думаю стоит ли на нем второй процесс запускать, пользователей максимум может работать 20, а так в среднем 13-15

   Demiurg

19 — 30.06.09 — 17:44

(18) это зависит не от количества пользователей, от объема памяти rphost

   Demiurg

20 — 30.06.09 — 17:44

покажи технологический журнал

   Demiurg

21 — 30.06.09 — 17:45

  

alegator666

22 — 10.07.09 — 10:41

(16) Подскажите плиз, а где делается увеличение количенства процессов?

  • Microsoft ole db provider for odbc drivers ошибка 80004005
  • Microsoft office сообщение об ошибке
  • Microsoft office ошибка файла при сохранении
  • Microsoft office ошибка установки выполняется откат изменений
  • Microsoft office ошибка при установке компонента сборки