Feeds:
Posts
Comments

Archive for May, 2013

How to copy data from one table on another machine to my local machine in sql:

INSERT INTO [mydbname].[dbo].[mytablename] SELECT * FROM [myservername\myserverinstancename].[mydbname2].[dbo].[mytablename]

EXEC sp_addlinkedserver ‘myservername\myserverinstancename’
EXEC sp_addlinkedsrvlogin ‘myservername\myserverinstancename’, ‘false’, NULL, ‘myusername’, ‘mypassword’

You might get error if you have some foreignkeys in the table, but for tables that don’t, this approach works well.

Read Full Post »