Sunday, February 19, 2012

Data in linked server is not updated

I linked server S2 to server S1. When I linked it, the database in S2 had
data up to 11/17/06. Users entered new data to that database since then. How
come when I ran a query using the linked database, (using select * from
[S2].dbo.dbname.tablename), the new data was not in the query result? But
when I ran the query in S2 itself I got the correct data. I refreshed the
link by right clicking the server name and hit refresh, but it didn't work. I
even deleted the link and relink it again. Still didn't work. Any suggestion?
Thanks in advance.
Lisa
lwidjaya wrote:
> I linked server S2 to server S1. When I linked it, the database in S2 had
> data up to 11/17/06. Users entered new data to that database since then. How
> come when I ran a query using the linked database, (using select * from
> [S2].dbo.dbname.tablename), the new data was not in the query result? But
> when I ran the query in S2 itself I got the correct data. I refreshed the
> link by right clicking the server name and hit refresh, but it didn't work. I
> even deleted the link and relink it again. Still didn't work. Any suggestion?
> Thanks in advance.
> Lisa
If "[S2].dbo.dbname.tablename" is truly the format that you used, you're
not looking at the proper table. The proper format would be
"[S2].dbname.dbo.tablename"
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||Hi Tracy,
thanks for your reply. It was my fault. We have the new server and a new
testing server. Since they're in different domain than S1, I used their IP
address and made aliases. I used the testing server's IP address for the S2
alias. That's why it wasn't updated. Stupid me..
"Tracy McKibben" wrote:

> lwidjaya wrote:
> If "[S2].dbo.dbname.tablename" is truly the format that you used, you're
> not looking at the proper table. The proper format would be
> "[S2].dbname.dbo.tablename"
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>

No comments:

Post a Comment