You need to setup Linked Server and use 4 part Notation, ex: LinkedServer.Database.Schema.Table in your queries.
Search Google for Linked Server in SQL Server and you will find plenty of example how to setup.
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty