Solved

SQL Server "USE" remote server

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
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…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

895 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

14 Experts available now in Live!

Get 1:1 Help Now