| Author |
Topic |
|
quickstep25
Starting Member
4 Posts |
Posted - 2004-06-09 : 14:11:49
|
| Briefing: On the project I'm involved with, there are two SQL server groups (SUN and MOON). They both have an identical database (STARS). Inside the databases there are identical tables called PLANET. So the only difference is the two sql server groups. Question: I have to write a script that will select certain records in SUN (server group) and insert those records into MOON (server group. If I am not connected to SUN server group in query analyzer by this statement: SELECT [DISTANCE]FROM [SUN].[STARS].[dbo].[PLANET]WHERE distance > 10--- I get this error:Server: Msg 7202, Level 11, State 2, Line 1Could not find server 'SUN' in sysservers. Execute sp_addlinkedserver to add the server to sysservers.How can I select data from another server group? Granted, if it is possible. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-06-09 : 14:14:15
|
| What do you mean by SQL Server groups? Is SUN a server?Tara |
 |
|
|
acollins74
Yak Posting Veteran
82 Posts |
Posted - 2004-06-09 : 14:15:01
|
| holy hw assignment.you should look up sp_addlinkedserver in BOL. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-06-09 : 14:25:43
|
| Can you paste the assignment? Or is it in a book? If so what book...Brett8-) |
 |
|
|
quickstep25
Starting Member
4 Posts |
Posted - 2004-06-09 : 14:33:28
|
| Nevermind. Figured it out. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-06-09 : 14:44:16
|
| What was the solution?Tara |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-06-09 : 15:52:45
|
| And what happens when Venus crosses in front of the SUN Server?Brett8-) |
 |
|
|
quickstep25
Starting Member
4 Posts |
Posted - 2004-06-09 : 17:16:15
|
| Well after talking to the DBA, I finally convinced him to load the "mirror" database onto the SAME server. Then we could move mass amounts of data like so:INSERT INTO [SUN].[dbo].[PLANET]SELECT *FROM [MOON].[dbo].[PLANET]Once you convince the people that hired you, that you might have a better solution.... it's all easy.Just trying to get through the day without making too many enemies. Cheers! |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-06-09 : 22:57:10
|
| Who do you work for. Sounds like an interesting database. :)MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
quickstep25
Starting Member
4 Posts |
Posted - 2004-06-10 : 08:28:23
|
| It might scare you to know that I am subcontracting for NASA. The DBA on this project, to my knowledge, came straight off the "web design" wagon. Wheeeeeeeeeeeee. People in power are usually idiots. Its the 10 million dollar question. |
 |
|
|
|