• Instead of doing a self-referencing linked server, you can directly call sp_ExecuteSQL within the context of any database using three-part naming:

    [mydatabase].sys.sp_ExecuteSQL (N'...')