• Very good correct Lowell!

    Here's one that is slicker:

    EXEC LinkedServer.yourdb.sys.sp_executesql N'DROP USER myuser'

    Not the least is this one slick, if any of the items are variable:

    DECLARE @sp_executesql nvarchar(1024) =

    quotename(@server) + '.' + quotename(@db) + '.sys.sp_executesql'

    EXEC @sp_executesql N'DROP USER myuser'

    Key here is that EXEC accepts a variable for the procedure name, and a system procedure always executes in the context of the database from which it is invoked.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]