Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 insert from one sql server to another

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-09-06 : 05:45:14
i have to sql server 2005 on 2 different servers.
how can I insert from one server into the second server in sql code.
(I want to do in a stored procedure)

cat_jesus
Aged Yak Warrior

547 Posts

Posted - 2009-09-06 : 09:45:40
See linked server in BOL.



An infinite universe is the ultimate cartesian product.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-09-06 : 13:49:59
or use ssis export import task
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-09-07 : 03:58:33
I am trying to add a linked server. i have done this before to an access database but in sql it seems to only let me put the server name.
Where do I put the table name of the linked server?
and what about the username and password?
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-09-07 : 04:08:57
To create a linked server you don't have to give a table name.
Once the linked server is created (for example MyOtherServer) you can use this server in a query.
select * from [MyOtherServer].[MyDatabase].dbo.[MyTable]



No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-09-08 : 01:26:25
but there is no where to put in the username and password of the other server?
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-09-08 : 01:36:16
If you go with ssms to create a linked server and you have the window "New Linked Server" opened then there you can select Security page on the left side of the window.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

rajasekhar857
Constraint Violating Yak Guru

396 Posts

Posted - 2009-09-08 : 01:54:19
use the tool scriptgen it is very helpful to you
Go to Top of Page
   

- Advertisement -