Unable to execute SQL commands as steps in SQL Agent

  • We are in the process of moving from one production server to another. In doing so we have a particular SQL Job that has many steps. some of these steps require the execution of SQL commands. The SQl code basically sets up some date variables, determines the data and passes that into the variables and then call an SSIS package. It specifies the dates to be used based on the variables and

    then executes the package.

    In the transfer to the new server, I have apparently not made the transfer of how this code is to be executed as it is generating the following errors when we try to run the code in a query analyzer.

    An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E4D Description: "Login failed for user 'RKO1\PRDSQL1$'.".

    Description: Failed to acquire connection "Testing_OperData". Connection may not be configured correctly or you may not have the right permissions on this connection.

    I am guessing I need to change the settings somewhere as to what these SQL commands run as. The login 'RKO1\PRDSQL1$' does not exist and I am not sure why it generated this.

    Can someone please explain what I need to do inorder to configure my logins correctly to execute these SQL command steps in SQL Agent? If I haven't provided enough information, I do apologize, and will furnish any other info required.

    Thank you in advance......

    Dave

  • This might help....

    Running SQL Server 2008 R2

  • Need more info. Do you reference linked servers?

    Jared
    CE - Microsoft

  • It looks like you are running SQL Server Agent as Network Service. RKO1\PRDSQL1$ is the machine account (that's why you don't see a login).

    Either change SQL Agent to run as a domain account, grant access for the machine account or create a credential and proxy and run the job step as that proxy.



    Shamless self promotion - read my blog http://sirsql.net

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply