Friday, April 27, 2012

How import/export data from sqlserver to mdf file in visual studio.

I dont have time to write detailed explanation but I will try and get that done today or tomorrow.

I used sql management studio.
I connect to sql server using to connect to source.
Then I connected to destination by connecting to mdf file inside visual studio project.

Then I tried to look into import and export by right clicking on tables but my efforts went in vain. Now I tried something different.

I tried and used
sp_addlinkedserver 'myservername'

then I was able to this below

insert into [dbo].[Taxonomy]
select * from [server].[Omni].[dbo].[Taxonomy]
 after then I removed the server

sp_dropserver 'myservername'

I will try and post the images so that it will be easy for others to read.

No comments:

Post a Comment