Press enter to see results or esc to cancel.

Insert Data into a Remote server (SQL) from with in SQL server


It is one of the most useful and powerful feature of SQL server.,to access an external server from residing server

 

steps :

1. create a linked server

http://www.meabi.com/create-a-linked-server-in-sql-2008/

2. say server = [sql.meabi.com]

 

SELECT * FROM [sql.meabi.com].[db_name].[db_owner].[table_name]

3. To insert data in to table1 on db1 with owner dbo of structure as below

 

create table dbo.table1

(

c_id int,

c_name varchar(100)

)

insert into [sql.meabi.com].[db1].[dbo].[table1] values(1,’name’)



Comments

Comments are disabled for this post