Truncate Table in a Linked Server

  • Hi All

    We are encountering an error in one of our SP's that needs to truncate a table in a linked server

    The truncate table command is being called as follows:

    truncate table [servername].[dbname].[owner].[tablename]

    However when trying to apply this bit of code in the SP it generates the error

    Error 117: The object name 'servername.dbname.owner.' contains more than the maximum number of prefixes. The maximum is 2

    Is it possible to use the truncate table command for a tabl on a linked server?

    I have looked through BOL at the truncate table command and can see no issues mentioned there and there are no foriegn key contraints on the destination table

    Thanks in advance for any help

    Thanks

    -------------------------------------------------------
    "With great power comes great responsibility"

  • Check out the following post: http://www.sqlservercentral.com/Forums/Topic258367-23-1.aspx

  • thanks 😀

    -------------------------------------------------------
    "With great power comes great responsibility"

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

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