?
Solved

Pulling from a MSSQL 2005 db on a remote server and inserting results into our MSSQL 2005 tables

Posted on 2010-01-11
3
Medium Priority
?
309 Views
Last Modified: 2012-05-08
I'd prefer to *not* use MS Business Integration Studio.

Can I, in one stored procedure, pull data from table A in database A and then insert the results into table B in database B?

Is it as simple as using "USE" to identify the source and then the target?

Thanks
0
Comment
Question by:CubicleGuy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 10

Expert Comment

by:lof
ID: 26287132
If databases are on the same server it is as simple as using longer names of the tables

databaseA.schema.tableA
databaseB.schema.tableB

default schema is dbo.

if the database are on different servers you will need to use linked servers
0
 
LVL 10

Accepted Solution

by:
lof earned 500 total points
ID: 26287975
I have just read the title again. You say about using remote server but then in the question you ask about using simple USE.

If it is remote server than use linked servers http://msdn.microsoft.com/en-us/library/aa213778(SQL.80).aspx 

and than four part name

linkedserver.database.schema.table

if the databases are on the same instance all you need is three part name

database.schema.table
0
 
LVL 1

Author Closing Comment

by:CubicleGuy
ID: 31675715
Linked servers are new to me -- but after reading the URL, it seems to be the answer.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

There are some very powerful Dynamic Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a di…
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 …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

752 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