Solved

How do I insert from one SQL server A to SQL server B.

Posted on 2008-10-20
3
175 Views
Last Modified: 2012-05-05
I want to run a command like this:

insert into Server_A
(
  Select * from SERVER_B where id >140213
)


The name of ServerA is -  MEDS0010\MSDE_INSTANCE
And Server B  MEDSQL

The name of the database is on both servers are GIDE and the table JOB_EXT

I am currently running SQL enterprise manager from server A

I got these error messages:
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
0
Comment
Question by:wademi
3 Comments
 
LVL 4

Accepted Solution

by:
randy_knight earned 500 total points
ID: 22760112
you need to create a linked server on server A which points to server B.

Note that this should only be used for small amounts of data.  If you are moving larger amounts of data between servers, use BCP, DTS, SSIS, etc.

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQl server restarts itself 6 40
Pivot Query Problem 9 47
How to place a condition in a filter criteria in t-sql (#2)? 10 56
Help with simplifying SQL 6 54
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

840 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