Метод loadfromsqlserver обнаружил код ошибки ole db 0x80004005

  • Remove From My Forums
  • Question

  • В журнале все планы обслуживания выпадают с ошибкой: «Не удалось загрузить пакет «Maintenance PlansPRELOAD» из-за ошибки 0xC0014062. Описание:
    Метод LoadFromSQLServer обнаружил код ошибки OLE DB 0x80004005 (Ошибка связи). Ошибка запущенной инструкции SQL» «
    Не удалось загрузить пакет «Maintenance PlansMyPlan» из-за ошибки 0xC0014062«.
    План обслуживания так же не могу изменить, при попытке изменить выпадает в ошибку: «Ошибка 1 Ошибка загрузки «MyplanBZ — sa» : Метод
    LoadFromSQLServer обнаружил код ошибки OLE DB 0x80004005 (Ошибка связи). Ошибка запущенной инструкции SQL. «

Answers


  • Avis de non-responsabilité:
    Mon opinion ne peut pas coïncider avec la position officielle de Microsoft.

    Bien cordialement, Andrei …

    MCP

    • Proposed as answer by

      Saturday, May 22, 2021 7:02 PM

    • Marked as answer by
      Иван ПродановMicrosoft contingent staff, Moderator
      Thursday, June 3, 2021 2:54 PM

  • Здравствуйте

    Посмотрите пригодится ли Вам нижеперечисленное:

    1. Change the host file

    Which is generally located at “C:WINDOWSsystem32driversetchost” add server name and an ip address.

    This could solve your problem.

    1. Change the “Delay” setting in package property , package property ->Control flow delay.

    And the third one which generally would be the best alternative and will mostly solve this issue is

    1. Change the number of retry for the specific job to greater number (eg. 5 or more) and also can change the retry interval to (0). This way if this job fails with delay in connection, will retry again till specified number of times and mostly it gets succeeded.

    Мнения, высказанные здесь, являются отражением моих личных взглядов, а не позиции корпорации Microsoft. Вся информация предоставляется «как есть» без каких-либо гарантий.

    • Proposed as answer by
      Иван ПродановMicrosoft contingent staff, Moderator
      Saturday, May 22, 2021 7:02 PM
    • Marked as answer by
      Иван ПродановMicrosoft contingent staff, Moderator
      Thursday, June 3, 2021 2:54 PM

I have this error:

LoadFromSQLServer method has encountered OLE DB error code 0x80004005 (Login timeout expired). The SQL statement that was issued has failed

And here is my code, what is wrong?

DECLARE @FileName VARCHAR(50); 
DECLARE @VendorID VARCHAR(50); 
DECLARE @sql VARCHAR(2000); 
DECLARE @Local_File_FullPath VARCHAR(100);   

SET @FileName = 'Extgt_skinny_file.txt.pgp' 
Set @VendorID = 'ET' 

Select @Local_File_FullPath = dw03_path  FROM GMAC_META.dbo.VENDOR_XFER_METADATA where vendor_id = @VendorID 

SET @sql = 'dtexec /SQL "EMAP_FTP_XFER_CHECK" /SET Package.Variables[User::FileName].Properties[Value];"' 
+ @FileName+'" /SET Package.Variables[Local_File_FullPath].Properties[Value];' 
+ @Local_File_FullPath+' /SERVER "hqgmdw02/dw_dev"   /CHECKPOINTING OFF /REPORTING E'


 exec xp_cmdshell @sql 

Yaroslav's user avatar

Yaroslav

6,45810 gold badges48 silver badges89 bronze badges

asked Sep 6, 2012 at 20:15

user1653113's user avatar

Try the following:

GRANT exec ON xp_cmdshell TO '<somelogin>'. Please refer to xp_cmdshell (Transact-SQL).

Check to see if you are using a 32-bit DTExec on a 64-bit machine.

Ensure that the users that will run the SSIS package have sufficient permissions. I take that you run is under SSIS in a SQL Server Agent or you might run it manually. The service account running SQL Agent and your account must have permissions to execute the job. Please see Error in executing SSIS package through Agent

answered Sep 6, 2012 at 20:55

Conrad Lotz's user avatar

Conrad LotzConrad Lotz

8,1003 gold badges23 silver badges27 bronze badges

1

As the OP mentioned, the server routes (for parameter /SERVER) should use backslashes and not common slashes. The error being displayed is a little misleading for this occasion, as the login times out because the server path is incorrect.

So change

/SERVER "hqgmdw02/dw_dev"

for

/SERVER "hqgmdw02dw_dev"

answered May 10, 2018 at 9:41

EzLo's user avatar

EzLoEzLo

13.7k10 gold badges33 silver badges38 bronze badges

RRS feed

  • Remove From My Forums
  • Question

  • Hello,

    I have imported an SSIS package to package store of SQL Server 2014. When I call it from c# application, I am getting error «The LoadFromSQLServer method has encountered OLE DB error code 0x80004005 (Login timeout expired)». Please help.


    Aakash Rajput

All replies

  • Hi Aakash,

    It seems like it indeed times out. So it must be a slow network.

    But I do not know how to reproduce your error to help any further.


  • Hi Aakash,

    Can you check the server name which you used to call the package? You should use the dbserver name where the package is installed.
    Please refer to : SSIS Package Timeout issue

                            «Login
    timeout expired» prevents package deployment

    Regards,
    Zoe


    MSDN Community Support
    Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
    MSDN Support, feel free to contact MSDNFSF@microsoft.com

  • Hi Zoe,

    I have checked the dbserver name and it is correct.

    Thanks,
    Aakash


    Aakash Rajput

  • Hi Aakash,

    please tell us how to reproduce this issue.


    • Proposed as answer by

      Tuesday, June 25, 2019 2:54 AM

  • Hello,

    I am getting the same issue «The LoadFromSQLServer method has encountered OLE DB error code 0x80004005 (Login timeout expired)» while launching package. I have imported package in MSDB of SQL Server 2014 and launching from c# code as below:

    Microsoft.SqlServer.Dts.Runtime.Application app = new Microsoft.SqlServer.Dts.Runtime.Application();

    using (Package package = app.LoadFromSqlServer(string.Format(«{0}{1}», @»\», «Package»), «SERVER», null, null, null))

    { 

    DTSExecResult result = package.Execute();

     }

    Please let me know what might be the reason. It was working properly in SQL Server 2012.

    Thanks,

  • Hi,

    Any updates on my query. I am using the same what Rajesh has posted, hope that will help in replicating the issue.

    Thanks,
    Aakash


    Aakash Rajput

  • Hi Zoe,

    Any updates on my query. I am using the same what Rajesh has posted, hope that will help in replicating the issue.

    Thanks,
    Aakash


    Aakash Rajput

  • Hi Aakash,

    After using his method, has your problem been solved?

    Regards,
    Zoe


    MSDN Community Support
    Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
    MSDN Support, feel free to contact MSDNFSF@microsoft.com

  • Hi Zoe,

    The problem still persists. I am having the exact same code which he has posted and getting the «Login timeout expired» error.

    Thanks,
    Aakash


    Aakash Rajput

  • Hi Aakash,

    Sorry, no progress has been made through our efforts. Maybe you can try to work it in SQL Server 2012 as Rajesh said before.

    Regards,
    Zoe


    MSDN Community Support
    Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
    MSDN Support, feel free to contact MSDNFSF@microsoft.com

В журнале все планы обслуживания выпадают с ошибкой: «Не удалось загрузить пакет «Maintenance PlansPRELOAD» из-за ошибки 0xC0014062. Описание: Метод LoadFromSQLServer обнаружил код ошибки OLE DB 0x80004005 (Ошибка связи). Ошибка запущенной инструкции SQL»
План обслуживания так же не могу изменить, при попытке изменить выпадает в ошибку: «Ошибка 1 Ошибка загрузки «MyplanBZ — sa» : Метод LoadFromSQLServer обнаружил код ошибки OLE DB 0x80004005 (Ошибка связи). Ошибка запущенной инструкции SQL. »


  • Вопрос задан

    более двух лет назад

  • 160 просмотров

   mzelensky

03.09.12 — 11:34

Доброго всем!

Настроил план обслуживания базы на СКЛ. Проверил его в пятницу — вроде все работало. Сегодня с утра результатов обслуживания не увидел. Полез в СКЛ менеджер, открываю там вкладку «Плантс», тыкаю в мой план и получаю эту ошибку:

Error    1    Error loading ‘Zup’ : The LoadFromSQLServer method has encountered OLE DB error code 0x80004005 (Login timeout expired).  The SQL statement that was issued has failed.  .    server=s2;package=Maintenance PlansZup;    1    1    

Попытался поискать в инете — особых результатов не дало. Что это за лажа и как бороться?

   mzelensky

1 — 03.09.12 — 11:35

(0) пока надеюсь, что после перезапуска сервера все уйдет, но с такой ошибкой сталкиваюсь первый раз.

   mzelensky

2 — 03.09.12 — 11:39

апну

   Sammo

3 — 03.09.12 — 11:40

   mzelensky

4 — 03.09.12 — 11:43

(3) я находил эту статью + обсуждение моей траблы на еще каком-то форуме, где аналогично давали это ссылку — как я понял это не решение.

Они там просто таймаут увеличили и все.

   mzelensky

5 — 03.09.12 — 11:56

ну и где гении ИТ-мира?

   mzelensky

6 — 03.09.12 — 12:08

,ele fgfnm ^(

   Axel2009

7 — 03.09.12 — 12:10

а к SSMS подключиться под этим пользователем нормально получается?

   Axel2009

8 — 03.09.12 — 12:12

пользователи у служб SQL Server и Agent одинаковые?

   mzelensky

9 — 03.09.12 — 12:29

(8) пользователи одинаковые…вроде. Ща перепроверю

   mzelensky

10 — 03.09.12 — 12:31

(7) к самому менеджеру «SQL Server Management Studio» подключается. Операции над базами тоже проходят. Косяк ток с планами.

   mzelensky

11 — 03.09.12 — 12:33

(9) + да, было под одним пользователем, точнее все под системной ролью

   Axel2009

12 — 03.09.12 — 12:34

(10) ну планы это Agent. значит косяк в нем.

под кем запускается задание, что выполняет?

   mzelensky

13 — 03.09.12 — 12:36

(12) все должно быть под системной ролью

   mzelensky

14 — 03.09.12 — 12:37

(12) + выполняет стандартные действия — реиндексация, бекапы…

Фишка в том, что в пятницу проверял — все работал, а на выходных какой-то глюк произошел. Сейчас минут через 30 перезапущу сервер, может уйдет :(

   ДенисЧ

15 — 03.09.12 — 12:38

мммм….

Как бэ… Login timeout expired

   mzelensky

16 — 03.09.12 — 12:41

(15) ииииии…о чем это говорит?

   mzelensky

17 — 03.09.12 — 12:50

(15) завис??? или диагноз малюешь?

  

mzelensky

18 — 03.09.12 — 13:10

Ну, после рестарта все заработало. Хотя хотелось бы разобраться, что это за трабл был.

Понравилась статья? Поделить с друзьями:
  • Метлицкая ошибка молодости аннотация
  • Мерседес спринтер ошибка p029f
  • Метафоры про ошибки
  • Мерседес спринтер ошибка p025113
  • Метатель запустил изогнутый бумеранг где ошибка