?
Solved

SQL Server "USE" remote server

Posted on 2008-10-01
3
Medium Priority
?
134 Views
Last Modified: 2012-05-05
Is there a way in a stored procedure to connect to a remote server database with the USE statement?

Normally...

use database
go
select * from table

but if I wanted to write a script for that to a remote server?
0
Comment
Question by:lrbrister
[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 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 22619533
if the remote server is linked, you can do this:


select * from linked_server.remote_database.table_owner.table

Open in new window

0
 

Author Comment

by:lrbrister
ID: 22626207
<form name="cruiseForm" action="http://res.mydomain.com/travel/cruise/search.rvlx"
onsubmit="FormBuild('4');progress_update(); hideform(this)" method="get" style="margin: 0px">
<table width="450" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#f3eedd">
    -----SELECT / INPUT/OPTION Boxes-----
    <input type="hidden" name="TEN" value="">
    <input type="hidden" name="msiteid" value="">
    <input type="hidden" name="sitemail" value="">
    <input type="hidden" name="sitephone" value="">
    <input type="hidden" name="s[msiteid]" value="">
    <input type="hidden" name="s[TEN]" value="">
    <input type="hidden" name="s[sitemail]" value="">
    <input type="hidden" name="s[sitephone]" value="">
    <input type="hidden" name="s[sitename]" value="">
    <input type="hidden" name="s[accountid]" value="">
    <input type="hidden" name="s[CompanyName]" value="">
    ----MORE STUFF----
    <input type="submit" class="SearchButtonCruise" value="Search" width="40" name="submit2"
        onmouseover="this.style.cursor='hand';" />
</form>

bear in mind...it works when outside the content placeholder
0
 

Author Comment

by:lrbrister
ID: 22626214
AngelIII
Sorry...wrong post
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

764 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