Can I just say,
SELECT *
FROM ServerA.DatabaseA.SchemaA.TableA
UNION
SELECT *
FROM ServerB.DatabaseB.SchemaB.TableB
Without explicitly creating a "linked server" ?
--
Peace & happy computing,
Mike Labosh, MCSD MCT
Owner, vbSensei.Com
"Escriba coda ergo sum." -- vbSensei
I am unable to test right now but I imagine that you have two servers handy
hence the question. My first instinct is a no. I am fairly confident in that
no also. Without a linked server you don't have any security context defined
and have not setup any connection method to the second server.
The best answer will come with a quick test. Try it and see the results. It
should not work. Most likely.
"Mike Labosh" <mlabosh_at_hotmail_dot_com> wrote in message
news:eb4VuJxoHHA.596@TK2MSFTNGP06.phx.gbl...
> Can I just say,
> SELECT *
> FROM ServerA.DatabaseA.SchemaA.TableA
> UNION
> SELECT *
> FROM ServerB.DatabaseB.SchemaB.TableB
> Without explicitly creating a "linked server" ?
> --
> Peace & happy computing,
> Mike Labosh, MCSD MCT
> Owner, vbSensei.Com
> "Escriba coda ergo sum." -- vbSensei
"Mike Labosh" <mlabosh_at_hotmail_dot_com> wrote in news:eb4VuJxoHHA.596
@TK2MSFTNGP06.phx.gbl:
> Can I just say,
> SELECT *
> FROM ServerA.DatabaseA.SchemaA.TableA
> UNION
> SELECT *
> FROM ServerB.DatabaseB.SchemaB.TableB
> Without explicitly creating a "linked server" ?
But see OPENDATASOURCE and OPENROWSET in BOL.
e.g.
SELECT *
FROM OPENDATASOURCE('provider_nameA',
'provider_stringA').DatabaseA.SchemaA.TableA
UNION
SELECT *
FROM OPENDATASOURCE('provider_nameB',
'provider_stringB').DatabaseB.SchemaB.TableB