Solved

SQL Server "USE" remote server

Posted on 2008-10-01
3
124 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 142

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

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

17 Experts available now in Live!

Get 1:1 Help Now