Hi,
Hope someone can help me with this... been struggling with this urgent (duh!) request...
Microsoft SQL
----------------
I have 2 SQL server (Server A & Server B). In the 2 servers, there is 1 database (MyData). Inside the MyData, there is 1 table (Pictures). The Pictures table contain a field called (LastChangedDateTime).
What happen is that the users will update the pictures from ServerA. But then the webserver will display the pictures fomr ServerB.
I'm trying to write a STORED PROCEDURE to synchronise the 2 tables. Normally, it's a push from ServerA to ServerB. However, I need to push only changed (LastChangeDateTime different) records.
What I'm pulling my hair over is the very basic... How do I connect to 2 different sql host in T-SQL? Once I have established connection, I am sure I can do it. But it seems so strange that I cannot connect to 2 different hosts.
I'm sure this can be done. Can someone help me please? Really pulling my hair... found something like CONNECT TO, but it doesn't seems to work on the SQL Query Analyzer... It says something like:
CONNECT TO {[server_name.]database_name} [AS connection_name] USER [login[.password] | $integrated]
But I can't seems to get this to run on SQL Query Analyzer? Please help! Thanks.
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Hope someone can help me with this... been struggling with this urgent (duh!) request...
Microsoft SQL
----------------
I have 2 SQL server (Server A & Server B). In the 2 servers, there is 1 database (MyData). Inside the MyData, there is 1 table (Pictures). The Pictures table contain a field called (LastChangedDateTime).
What happen is that the users will update the pictures from ServerA. But then the webserver will display the pictures fomr ServerB.
I'm trying to write a STORED PROCEDURE to synchronise the 2 tables. Normally, it's a push from ServerA to ServerB. However, I need to push only changed (LastChangeDateTime different) records.
What I'm pulling my hair over is the very basic... How do I connect to 2 different sql host in T-SQL? Once I have established connection, I am sure I can do it. But it seems so strange that I cannot connect to 2 different hosts.
I'm sure this can be done. Can someone help me please? Really pulling my hair... found something like CONNECT TO, but it doesn't seems to work on the SQL Query Analyzer... It says something like:
CONNECT TO {[server_name.]database_name} [AS connection_name] USER [login[.password] | $integrated]
But I can't seems to get this to run on SQL Query Analyzer? Please help! Thanks.
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-