truncate a table on a linked server

  • Hi

    I’m trying to truncate a table on a linked server. I’ve given myself all possible permissions on the linked server.

    I can run:

    SELECT * FROM linkedServer.import.dbo.SafetyStockTime

    But when I run:

    TRUNCATE TABLE linkedServer.import.dbo.SafetyStockTime

    I get the error:

    Cannot find the object "SafetyStockTime" because it does not exist or you do not have permissions.

    So I know it exists, and I’ve assigned myself all possible permissions. Any help as to what I'm missing??

    Thanks

  • found answer.

    EXEC Myserver.import.sys.sp_executesql N'TRUNCATE TABLE dbo.SafetyStockTime'

Viewing 2 posts - 1 through 1 (of 1 total)

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