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
Solved

SQL Server "USE" remote server

Posted on 2008-10-01
3
129 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
  • 2
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

829 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