none
SQL Server Agent job fails - "A connection [to a SSAS instance] cannot be made. Ensure that the server is running" RRS feed

  • Question

  • Hi!

    When I am trying to execute the SQL Server Agent job (drop a database on SSAS Tabular), I get the following error:

    [136] Job Test reported: Microsoft.AnalysisServices.Xmla.ConnectionException: A connection cannot be made. Ensure that the server is running. ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:2383 at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port) at Microsoft.AnalysisServices.Xmla.XmlaClient.GetTcpClient(ConnectionInfo connectionInfo) --- End of inner exception stack trace --- at Microsoft.AnalysisServices.Xmla.XmlaClient.OpenConnection(ConnectionInfo connectionInfo, Boolean& isSessionTokenNeeded) at Microsoft.AnalysisServices.Xmla.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession) at Microsoft.SqlServer.Management.Smo.Olap.SoapClient.Connect() at OlapEvent(SCH_STEP* pStep, SUBSYSTEM* pSubSystem, SUBSYSTEMPARAMS* pSubSystemParams, Boolean fQueryFlag)

    My question is: Why the job doesn't work when it is executed using SQL Agent job and works when I drop the same database manually? What should I do to fix the issue?

    I'll appreciate any help on this.

    Thursday, March 1, 2018 12:16 AM

All replies

  • Hi dmitriy.po,

    Thanks for your question.

    >>>A connection cannot be made. Ensure that the server is running. ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:2383.
    According to above error messages, it seems that you have problems to connect to your SSAS instance.
    Please try to connect to your SSAS instance using SSMS and make sure that the SSAS services is in running status firtly. If SSAS services is in running status, then please make sure the user you are using in SQL Agent job have admin permission to connect to your SSAS instance and delete SSAS database.You might also need to make sure to open TCP port 2383 in windows firewall of your SSAS server.


    Best Regards
    Willson Yuan
    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

    • Proposed as answer by alexander fun Thursday, March 8, 2018 11:19 AM
    Friday, March 2, 2018 9:31 AM
    Moderator