Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have tried to figure out through google and found the following query but its not worth for me.

SQL
SELECT * FROM db.sys.columns WHERE object_id = OBJECT_ID('db.SchemaName.table1')


I am using sql server 2005 and i am not using any linked database concept ,i can say one is server db and another is client DB . Both database are with same name and same structure but in different machine . i just need to mirror one database into another . For that reason first i need to check whether there is any new record in one DB.
Posted
Updated 17-Apr-13 1:25am
v4
Comments
CHill60 17-Apr-13 6:28am    
Firstly - Use the Improve question link to post the version of SQL Server that you are using as there are more tools available in later versions.
Secondly - have you set up either of the databases as a Linked Database to the other?

1 solution

To query across the Database servers you need to have linked server setup, if you cannot set the linked server.

You can load data from both server into once common server, then compare using SET operators like UNION, NOT EXISTS, alternatively you can use PowerPivot do to the same.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900