Re: Specifying which SQL Server to use
- From: "Arnie Rowland" <arnie@xxxxxxxx>
- Date: Fri, 6 Oct 2006 10:02:46 -0700
Check out "Linked Server" and [sp_AddLinkedServer] in Books Online. (instead
of the "Lined Server" Andrew mentioned) ;-)
Then use the 'four-part' object naming convention:
[ServerName].[DbName].[Owner/SchemaName].[ObjectName]
You are currently using a three-part name: Admin..Cases, with the two dots
assuming that the object is 'owned' by the current user. It would be
stronger to specifically itemize the 'owner/schema', as in: Admin.dbo.Cases
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Andrew J. Kelly" <sqlmvpnooospam@xxxxxxxxxxxx> wrote in message
news:%23Nf$wIV6GHA.2248@xxxxxxxxxxxxxxxxxxxxxxx
If you need to be able to query from one server to another you would have
to create a Lined Server and access that or use OpenQuery(). Both are
detailed in BOL. But if you simply need to run a query against each one
individually you can open a Query Analyzer window for each server. The ..
is outlined in BOL under the index entry for "object names" and then
"Object Visibility and Qualification Rules".
--
Andrew J. Kelly SQL MVP
"Todd Cary" <todd@xxxxxxxxxxxxxxxxxx> wrote in message
news:45265929.8020703@xxxxxxxxxxxxxxxxxxxxx
Under SQL Server Group, I have three registered servers:
(local) (Windows NT)
192.168.100.5 (Windows NT)
2K-SERVER (Windows NT)
Each server contains a database named "Admin" and each "Admin" database
has a table, "Cases".
In the following query, how would I specify the Server:
SELECT * FROM Admin..Cases
Second question:
Where in SQL Server Books online is the ".." as used above discussed as
well as other ways of specifying a database/table combination?
Todd
.
- References:
- Specifying which SQL Server to use
- From: Todd Cary
- Re: Specifying which SQL Server to use
- From: Andrew J. Kelly
- Specifying which SQL Server to use
- Prev by Date: Re: Specifying which SQL Server to use
- Next by Date: RE: Use Windows Integratd security
- Previous by thread: Re: Specifying which SQL Server to use
- Next by thread: Connection Problem
- Index(es):
Relevant Pages
|
Loading