| Author |
Topic |
|
Sep410
Posting Yak Master
117 Posts |
Posted - 2008-05-05 : 17:44:18
|
| Hi all,I need your help.I have 2 different databases. One of them is in the SQL Server 2000 and the other on is in the SQL Server 2005. I need to make a query out of these 2 databases.Is there any way that I can do this?Thanks, |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-05-05 : 17:49:14
|
| What? You mean join. |
 |
|
|
Sep410
Posting Yak Master
117 Posts |
Posted - 2008-05-05 : 17:55:02
|
| I mean I have 2 database one of them in sql Server 2000 and the other one in sql server 2005.First database has a table A and Second database has a table name B.I need to create a view joining A and B. |
 |
|
|
karuna
Aged Yak Warrior
582 Posts |
Posted - 2008-05-05 : 18:00:10
|
| You will need to create a linked server either in one of the servers to achieve this. Once you create the linked server, you should be able to access the table in the other database server.ThanksKarunakaran |
 |
|
|
Sep410
Posting Yak Master
117 Posts |
Posted - 2008-05-05 : 18:07:49
|
| Thanks Karunakaran But I don't know how to do that.Please help me. |
 |
|
|
Sep410
Posting Yak Master
117 Posts |
Posted - 2008-05-05 : 18:10:29
|
| Thanks Karunakaran But I don't know how to do that.Please help me. |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-05-05 : 18:14:25
|
| can't you export that specific table to SQL 2005 server and do regular join? |
 |
|
|
Sep410
Posting Yak Master
117 Posts |
Posted - 2008-05-05 : 18:22:39
|
| No There are So many tables that I should use in this view. Is there any way I can link these servers? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-05-05 : 18:27:27
|
| Yes via a linked server as karuna mentioned already. If you don't know how to create one, then read about them in SQL Server Books Online.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Database maintenance routines:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx |
 |
|
|
Sep410
Posting Yak Master
117 Posts |
Posted - 2008-05-05 : 18:57:40
|
| So you mean I should create Linked Server in sql server 2000?The reason that I am asking is I didn't find Linked Server in Sql Server 2005. |
 |
|
|
karuna
Aged Yak Warrior
582 Posts |
Posted - 2008-05-05 : 19:02:04
|
| If you go to Server Objects in SSMS (Sql Server 2005), you should be able to see Linked Servers. But to add a linked server in 2005, I believe you have to part of sysadmin group.ThanksKarunakaran |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-05-05 : 20:07:17
|
| Don't have to be sysadmin, Setup admin can also create and manage LS. Check books online for how to set it up. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-05-05 : 20:51:32
|
quote: Originally posted by Sep410 So you mean I should create Linked Server in sql server 2000?The reason that I am asking is I didn't find Linked Server in Sql Server 2005.
It doesn't matter which system that you create the linked server on. Just pick one. On the system where the linked server exists, run the query there and reference the remote object using the four-part naming convention.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Database maintenance routines:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx |
 |
|
|
|