Thanks for the quick response. I referred that site before.
I am trying to do the following:
//get the source database from source server
Database srcdb = SourceServer. Databases.Item("master",null);
//add it to the destination server
This gives me an error saying that the object already exists in a collection. So is there a way to copy a database form one server to another.