If you are using SSMS you need to connect to the other server and then run the statement in the context of the correct database. First you need rights to connect to the other server, then you need rights to create/alter objects in the database.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question