SQL Agent job step outcome mentions "This security ID may not be assigned as the owner of this object."

techresearch7777777 1,801 Reputation points
2024-06-17T18:41:45.6+00:00

Hello, I created a SQL 2016 Agent job which copies & replaces .bak files from Source Files Location to a Network Disk Share Target Files Location that are 1 day old as follows:

robocopy G:\Source_Files_Location \Network_Disk_Share\Target_Files_Location\ /mov /MAXAGE:1 /COPY:datso

This SQL Agent job looks like does complete copy & replace the .bak files that are 1 day old but overall SQL Agent job shows yellow Warning and within that step it mentions:

"This security ID may not be assigned as the owner of this object."

I ensured the SQL Agent service domain account its running as has full permissions to both Source and Target locations...(but seems like unable to make the Target Files Folder Location the Owner if that's the case)

I've researched around many sites and tried using PowerShell command instead but can't seem to get this SQL Agent job to go perfectly smooth so outcome shows overall green Success.

Am willing to try any other commands like PowerShell again brainstorming using to start with 'net use' perhaps or something else...can anyone provide me script that can do this please?

Thanks in advance.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,366 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MikeyQiaoMSFT-0444 1,925 Reputation points
    2024-06-18T09:14:17.0233333+00:00

    Hi,techresearch7777777

    The issue is likely related to permissions. You might want to refer to this thread. Although the permissions involved are probably different, you could try giving the domain user more permissions.

    User's image

    I look forward to the results of your attempt.