Solved

How do I perform a 'Select Into" on a remote server

Posted on 2009-05-04
4
388 Views
Last Modified: 2012-08-13
I have a remote db within my local studio; configured the linked server...
I can perfrom a select on the remote db by:
select * from [192.xxx.xxx.xxx].testdb.dbo.table

What I would like to do is insert data from a local table into the remote table:

select *
into [192.xxx.xxx.xxx].testdb.dbo.table
from table
0
Comment
Question by:Glen_D
  • 2
4 Comments
 

Author Comment

by:Glen_D
ID: 24299733
forgot to add but here is my error with abover insert code:

contains more than the maximum number of prefixes. The maximum is 2.
0
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 250 total points
ID: 24299747
Hello Glen_D,

The new table created with the INTO clause does not support 4 part names. it allows only 2 part names, so you would need to create the table and then use INSERT..SELECT to populate it.

Regards,

Aneesh
0
 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 250 total points
ID: 24299749
you cannot CREATE a table on a remote server.
but you can insert:
insert into [192.xxx.xxx.xxx].testdb.dbo.table
select *
from table

Open in new window

0
 

Author Closing Comment

by:Glen_D
ID: 31577784
Thanks Gentlemen...really helped out here.  Glen
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now