I am not completely clear on what you are trying to achieve (well, more of I'm not 100% sure of your setup).
If I understand correctly, you have two databases - however I am going at assume that due to your mention of a linked server that one database is on one SQL server instance (let's call that Server A) and the other is on another SQL server instance (let's
call that Server B).
With the above assumption (and assuming that you've already created the linked server on SQL Server), you can do the following on Server B:
SELECT *
INTO [DB2].[dbo].[new_table]
FROM [ServerA].[DB1].[dbo].[original_table]
rajender.pon...
None
0 Points
44 Posts
Linked Server in Local Machine and for the same server
May 10, 2012 08:42 AM|LINK
Hi,
I m using Sqlserver Database, I have 2 databases Namely DB1, DB2 in my localmachine.
And now i want to dump data from DB1 to DB2 using LinkedServer.
How can i do this...Please provide the process for this..
Thanks,
Raj
shree_ars
Participant
1395 Points
776 Posts
Re: Linked Server in Local Machine and for the same server
May 10, 2012 10:27 AM|LINK
I too in the same senario, but my Database is in remote system.
I have created the linked server of that database(mysql). But i cant able to query on that linked server database, even all database operations.
Help needed. If anyone come across it. Thanks in advance.
Mandeep Joon
Participant
1570 Points
386 Posts
Re: Linked Server in Local Machine and for the same server
May 10, 2012 10:37 AM|LINK
Hi,
if you are using same instance of sql server then you can use generate scripts with data(if using sql server 208 or grater).
if you are using another instance then you can use export data tool in SSMS.
Mark this as answer if it is usefull.
Mandeep Joon
Blog:- Hightechnology.
ramiramilu
All-Star
95503 Points
14106 Posts
Re: Linked Server in Local Machine and for the same server
May 10, 2012 10:49 AM|LINK
try this option - http://social.msdn.microsoft.com/Forums/en-US/transactsql/thread/ce1fbf33-7784-4cc6-8ede-cf4a1f297ad6/
Thanks,
JumpStart
danjackson10...
Member
88 Points
14 Posts
Re: Linked Server in Local Machine and for the same server
May 10, 2012 10:58 AM|LINK
I am not completely clear on what you are trying to achieve (well, more of I'm not 100% sure of your setup).
If I understand correctly, you have two databases - however I am going at assume that due to your mention of a linked server that one database is on one SQL server instance (let's call that Server A) and the other is on another SQL server instance (let's call that Server B).
With the above assumption (and assuming that you've already created the linked server on SQL Server), you can do the following on Server B: