Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Friday, March 30, 2012

Jump to URL - Syntax wrong?

Hello,
I realize this topic has been beaten to death but I'm still having trouble
with a report.
I'm trying to open up an asp.net page in a new window. Here is what I'm
using based on examples I've read here so far:
= "javascript:void(window.open('"http://www.mysite.com/subdir/form.aspx?ctrlnum=" & Fields!Name.Value ','_blank'))"
I do this through right clicking on a textbox and going to its advanced
navigation properties. Now the report builds fine with no errors and once
it's done building instead of giving me a preview of the report it says
something like: "Invalid URL type must use http://, https://, file://, etc.".
Is there some other way of doing this by using LinkTarget or something? I
am hoping my syntax is just wrong here. I have RS 2000 with SP2 installed.
Help!
ThanksAlso, when testing this you might need to deploy it to test it properly.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"John" <John@.discussions.microsoft.com> wrote in message
news:02B7C28C-8A74-465A-95B9-C5959F426FB7@.microsoft.com...
> Hello,
> I realize this topic has been beaten to death but I'm still having trouble
> with a report.
> I'm trying to open up an asp.net page in a new window. Here is what I'm
> using based on examples I've read here so far:
> => "javascript:void(window.open('"http://www.mysite.com/subdir/form.aspx?ctrlnum="
> & Fields!Name.Value ','_blank'))"
> I do this through right clicking on a textbox and going to its advanced
> navigation properties. Now the report builds fine with no errors and once
> it's done building instead of giving me a preview of the report it says
> something like: "Invalid URL type must use http://, https://, file://,
> etc.".
>
> Is there some other way of doing this by using LinkTarget or something? I
> am hoping my syntax is just wrong here. I have RS 2000 with SP2
> installed.
> Help!
> Thanks|||Here is one that works.
= "javascript:void(window.open('http://www.google.com','_blank'))"
Looking at yours I would say that you need to do this:
="javascript:void(window.open('http://www.mysite.com/subdir/form.aspx?ctrlnum="
& Fields!Name.Value & "','_blank'))"
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"John" <John@.discussions.microsoft.com> wrote in message
news:02B7C28C-8A74-465A-95B9-C5959F426FB7@.microsoft.com...
> Hello,
> I realize this topic has been beaten to death but I'm still having trouble
> with a report.
> I'm trying to open up an asp.net page in a new window. Here is what I'm
> using based on examples I've read here so far:
> => "javascript:void(window.open('"http://www.mysite.com/subdir/form.aspx?ctrlnum="
> & Fields!Name.Value ','_blank'))"
> I do this through right clicking on a textbox and going to its advanced
> navigation properties. Now the report builds fine with no errors and once
> it's done building instead of giving me a preview of the report it says
> something like: "Invalid URL type must use http://, https://, file://,
> etc.".
>
> Is there some other way of doing this by using LinkTarget or something? I
> am hoping my syntax is just wrong here. I have RS 2000 with SP2
> installed.
> Help!
> Thanks|||You mean I could have had it right and it would still give me that syntax
error?
"Bruce L-C [MVP]" wrote:
> Also, when testing this you might need to deploy it to test it properly.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "John" <John@.discussions.microsoft.com> wrote in message
> news:02B7C28C-8A74-465A-95B9-C5959F426FB7@.microsoft.com...
> > Hello,
> >
> > I realize this topic has been beaten to death but I'm still having trouble
> > with a report.
> >
> > I'm trying to open up an asp.net page in a new window. Here is what I'm
> > using based on examples I've read here so far:
> >
> > => > "javascript:void(window.open('"http://www.mysite.com/subdir/form.aspx?ctrlnum="
> > & Fields!Name.Value ','_blank'))"
> >
> > I do this through right clicking on a textbox and going to its advanced
> > navigation properties. Now the report builds fine with no errors and once
> > it's done building instead of giving me a preview of the report it says
> > something like: "Invalid URL type must use http://, https://, file://,
> > etc.".
> >
> >
> > Is there some other way of doing this by using LinkTarget or something? I
> > am hoping my syntax is just wrong here. I have RS 2000 with SP2
> > installed.
> >
> > Help!
> > Thanks
>
>|||What happens to me from development is I get a flash and a ding sound and
nothing happens.
No, I think you have your syntax incorrect. You are trying to assemble a
string. Look at this part: & Fields!Name.Value ','_blank'))"
it should be & Fields!Name.Value & "','_blank'))"
You want to append the two strings together. The value in your feild and the
rest of the string.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"John" <John@.discussions.microsoft.com> wrote in message
news:2C4D09B7-C68E-4BFB-AA86-B2B8D36665B2@.microsoft.com...
> You mean I could have had it right and it would still give me that syntax
> error?
> "Bruce L-C [MVP]" wrote:
>> Also, when testing this you might need to deploy it to test it properly.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "John" <John@.discussions.microsoft.com> wrote in message
>> news:02B7C28C-8A74-465A-95B9-C5959F426FB7@.microsoft.com...
>> > Hello,
>> >
>> > I realize this topic has been beaten to death but I'm still having
>> > trouble
>> > with a report.
>> >
>> > I'm trying to open up an asp.net page in a new window. Here is what
>> > I'm
>> > using based on examples I've read here so far:
>> >
>> > =>> > "javascript:void(window.open('"http://www.mysite.com/subdir/form.aspx?ctrlnum="
>> > & Fields!Name.Value ','_blank'))"
>> >
>> > I do this through right clicking on a textbox and going to its advanced
>> > navigation properties. Now the report builds fine with no errors and
>> > once
>> > it's done building instead of giving me a preview of the report it says
>> > something like: "Invalid URL type must use http://, https://, file://,
>> > etc.".
>> >
>> >
>> > Is there some other way of doing this by using LinkTarget or something?
>> > I
>> > am hoping my syntax is just wrong here. I have RS 2000 with SP2
>> > installed.
>> >
>> > Help!
>> > Thanks
>>|||Great thanks!
I will test this as soon as I can and let you know.
"Bruce L-C [MVP]" wrote:
> What happens to me from development is I get a flash and a ding sound and
> nothing happens.
> No, I think you have your syntax incorrect. You are trying to assemble a
> string. Look at this part: & Fields!Name.Value ','_blank'))"
> it should be & Fields!Name.Value & "','_blank'))"
> You want to append the two strings together. The value in your feild and the
> rest of the string.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "John" <John@.discussions.microsoft.com> wrote in message
> news:2C4D09B7-C68E-4BFB-AA86-B2B8D36665B2@.microsoft.com...
> > You mean I could have had it right and it would still give me that syntax
> > error?
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Also, when testing this you might need to deploy it to test it properly.
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "John" <John@.discussions.microsoft.com> wrote in message
> >> news:02B7C28C-8A74-465A-95B9-C5959F426FB7@.microsoft.com...
> >> > Hello,
> >> >
> >> > I realize this topic has been beaten to death but I'm still having
> >> > trouble
> >> > with a report.
> >> >
> >> > I'm trying to open up an asp.net page in a new window. Here is what
> >> > I'm
> >> > using based on examples I've read here so far:
> >> >
> >> > => >> > "javascript:void(window.open('"http://www.mysite.com/subdir/form.aspx?ctrlnum="
> >> > & Fields!Name.Value ','_blank'))"
> >> >
> >> > I do this through right clicking on a textbox and going to its advanced
> >> > navigation properties. Now the report builds fine with no errors and
> >> > once
> >> > it's done building instead of giving me a preview of the report it says
> >> > something like: "Invalid URL type must use http://, https://, file://,
> >> > etc.".
> >> >
> >> >
> >> > Is there some other way of doing this by using LinkTarget or something?
> >> > I
> >> > am hoping my syntax is just wrong here. I have RS 2000 with SP2
> >> > installed.
> >> >
> >> > Help!
> >> > Thanks
> >>
> >>
> >>
>
>|||I just wanted to say this is exactly what I needed. It still gives me a
"invalid url" error inside VS but it works fine once I deploy it and test
inside IE.
Thanks!
"Bruce L-C [MVP]" wrote:
> Here is one that works.
> = "javascript:void(window.open('http://www.google.com','_blank'))"
> Looking at yours I would say that you need to do this:
> => "javascript:void(window.open('http://www.mysite.com/subdir/form.aspx?ctrlnum="
> & Fields!Name.Value & "','_blank'))"
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "John" <John@.discussions.microsoft.com> wrote in message
> news:02B7C28C-8A74-465A-95B9-C5959F426FB7@.microsoft.com...
> > Hello,
> >
> > I realize this topic has been beaten to death but I'm still having trouble
> > with a report.
> >
> > I'm trying to open up an asp.net page in a new window. Here is what I'm
> > using based on examples I've read here so far:
> >
> > => > "javascript:void(window.open('"http://www.mysite.com/subdir/form.aspx?ctrlnum="
> > & Fields!Name.Value ','_blank'))"
> >
> > I do this through right clicking on a textbox and going to its advanced
> > navigation properties. Now the report builds fine with no errors and once
> > it's done building instead of giving me a preview of the report it says
> > something like: "Invalid URL type must use http://, https://, file://,
> > etc.".
> >
> >
> > Is there some other way of doing this by using LinkTarget or something? I
> > am hoping my syntax is just wrong here. I have RS 2000 with SP2
> > installed.
> >
> > Help!
> > Thanks
>
>|||Make sure you are running at least RS 2000 SP1 on the report server and
report designer for this to work.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"John" <John@.discussions.microsoft.com> wrote in message
news:1B63DA2A-1655-477E-BBCA-7839423DBD52@.microsoft.com...
> Great thanks!
> I will test this as soon as I can and let you know.
>
> "Bruce L-C [MVP]" wrote:
>> What happens to me from development is I get a flash and a ding sound and
>> nothing happens.
>> No, I think you have your syntax incorrect. You are trying to assemble a
>> string. Look at this part: & Fields!Name.Value ','_blank'))"
>> it should be & Fields!Name.Value & "','_blank'))"
>> You want to append the two strings together. The value in your feild and
>> the
>> rest of the string.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "John" <John@.discussions.microsoft.com> wrote in message
>> news:2C4D09B7-C68E-4BFB-AA86-B2B8D36665B2@.microsoft.com...
>> > You mean I could have had it right and it would still give me that
>> > syntax
>> > error?
>> >
>> > "Bruce L-C [MVP]" wrote:
>> >
>> >> Also, when testing this you might need to deploy it to test it
>> >> properly.
>> >>
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "John" <John@.discussions.microsoft.com> wrote in message
>> >> news:02B7C28C-8A74-465A-95B9-C5959F426FB7@.microsoft.com...
>> >> > Hello,
>> >> >
>> >> > I realize this topic has been beaten to death but I'm still having
>> >> > trouble
>> >> > with a report.
>> >> >
>> >> > I'm trying to open up an asp.net page in a new window. Here is what
>> >> > I'm
>> >> > using based on examples I've read here so far:
>> >> >
>> >> > =>> >> > "javascript:void(window.open('"http://www.mysite.com/subdir/form.aspx?ctrlnum="
>> >> > & Fields!Name.Value ','_blank'))"
>> >> >
>> >> > I do this through right clicking on a textbox and going to its
>> >> > advanced
>> >> > navigation properties. Now the report builds fine with no errors
>> >> > and
>> >> > once
>> >> > it's done building instead of giving me a preview of the report it
>> >> > says
>> >> > something like: "Invalid URL type must use http://, https://,
>> >> > file://,
>> >> > etc.".
>> >> >
>> >> >
>> >> > Is there some other way of doing this by using LinkTarget or
>> >> > something?
>> >> > I
>> >> > am hoping my syntax is just wrong here. I have RS 2000 with SP2
>> >> > installed.
>> >> >
>> >> > Help!
>> >> > Thanks
>> >>
>> >>
>> >>
>>|||It is common to get different behaviour in the dev environment than in
prod... We always go ahead and deploy and test both places before we decide
that something doesn't work.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
news:OYsFzsqqFHA.2540@.TK2MSFTNGP09.phx.gbl...
> Make sure you are running at least RS 2000 SP1 on the report server and
> report designer for this to work.
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> "John" <John@.discussions.microsoft.com> wrote in message
> news:1B63DA2A-1655-477E-BBCA-7839423DBD52@.microsoft.com...
>> Great thanks!
>> I will test this as soon as I can and let you know.
>>
>> "Bruce L-C [MVP]" wrote:
>> What happens to me from development is I get a flash and a ding sound
>> and
>> nothing happens.
>> No, I think you have your syntax incorrect. You are trying to assemble a
>> string. Look at this part: & Fields!Name.Value ','_blank'))"
>> it should be & Fields!Name.Value & "','_blank'))"
>> You want to append the two strings together. The value in your feild and
>> the
>> rest of the string.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "John" <John@.discussions.microsoft.com> wrote in message
>> news:2C4D09B7-C68E-4BFB-AA86-B2B8D36665B2@.microsoft.com...
>> > You mean I could have had it right and it would still give me that
>> > syntax
>> > error?
>> >
>> > "Bruce L-C [MVP]" wrote:
>> >
>> >> Also, when testing this you might need to deploy it to test it
>> >> properly.
>> >>
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "John" <John@.discussions.microsoft.com> wrote in message
>> >> news:02B7C28C-8A74-465A-95B9-C5959F426FB7@.microsoft.com...
>> >> > Hello,
>> >> >
>> >> > I realize this topic has been beaten to death but I'm still having
>> >> > trouble
>> >> > with a report.
>> >> >
>> >> > I'm trying to open up an asp.net page in a new window. Here is
>> >> > what
>> >> > I'm
>> >> > using based on examples I've read here so far:
>> >> >
>> >> > =>> >> > "javascript:void(window.open('"http://www.mysite.com/subdir/form.aspx?ctrlnum="
>> >> > & Fields!Name.Value ','_blank'))"
>> >> >
>> >> > I do this through right clicking on a textbox and going to its
>> >> > advanced
>> >> > navigation properties. Now the report builds fine with no errors
>> >> > and
>> >> > once
>> >> > it's done building instead of giving me a preview of the report it
>> >> > says
>> >> > something like: "Invalid URL type must use http://, https://,
>> >> > file://,
>> >> > etc.".
>> >> >
>> >> >
>> >> > Is there some other way of doing this by using LinkTarget or
>> >> > something?
>> >> > I
>> >> > am hoping my syntax is just wrong here. I have RS 2000 with SP2
>> >> > installed.
>> >> >
>> >> > Help!
>> >> > Thanks
>> >>
>> >>
>> >>
>>
>

Wednesday, March 21, 2012

Joining tables in different databases

Hi

I'm working on an ASP project where the clients want to be able to
effectively perform SELECT queries joining tables from two different
databases (located on the same SQL-Server).

Does this involve creating virtual tables that link to another database, or
am I completely on the wrong track?

Any hints as to where I might find more information (buzz-words, etc.) would
be most appreciated.

ThanksTry 'four part names' :).
server.database.owner.table

MC

"Captain Nemo" <nemo@.nospam.com> wrote in message
news:6oqBf.8267$wl.3901@.text.news.blueyonder.co.uk ...
> Hi
> I'm working on an ASP project where the clients want to be able to
> effectively perform SELECT queries joining tables from two different
> databases (located on the same SQL-Server).
> Does this involve creating virtual tables that link to another database,
> or
> am I completely on the wrong track?
> Any hints as to where I might find more information (buzz-words, etc.)
> would
> be most appreciated.
> Thanks|||Use 3-part naming:

select
*
from
dbo.MyTable l
join
OtherDB.dbo.OtherTable o on o.PK = l.PK

--
Tom

----------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com

"Captain Nemo" <nemo@.nospam.com> wrote in message
news:6oqBf.8267$wl.3901@.text.news.blueyonder.co.uk ...
Hi

I'm working on an ASP project where the clients want to be able to
effectively perform SELECT queries joining tables from two different
databases (located on the same SQL-Server).

Does this involve creating virtual tables that link to another database, or
am I completely on the wrong track?

Any hints as to where I might find more information (buzz-words, etc.) would
be most appreciated.

Thanks|||The OP said the two DB's were on the same server. Therefore, 3-part naming
is sufficient.

--
Tom

----------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com

"MC" <marko_culo#@.#yahoo#.#com#> wrote in message
news:dr5cc8$bue$1@.magcargo.vodatel.hr...
Try 'four part names' :).
server.database.owner.table

MC

"Captain Nemo" <nemo@.nospam.com> wrote in message
news:6oqBf.8267$wl.3901@.text.news.blueyonder.co.uk ...
> Hi
> I'm working on an ASP project where the clients want to be able to
> effectively perform SELECT queries joining tables from two different
> databases (located on the same SQL-Server).
> Does this involve creating virtual tables that link to another database,
> or
> am I completely on the wrong track?
> Any hints as to where I might find more information (buzz-words, etc.)
> would
> be most appreciated.
> Thanks|||"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:LBqBf.4368$ft2.109590@.news20.bellglobal.com.. .
> The OP said the two DB's were on the same server. Therefore, 3-part
naming
> is sufficient.
> --
> Tom

It sure is! I've just tried it out. Where I went wrong was thinking that
2-part naming would do it (omitting the 'dbo').

Thanks, Tom|||Agreed, but why not provide a more complete info since theres a little
difference? He may need to pull data from two servers tomorrow...

MC

"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:LBqBf.4368$ft2.109590@.news20.bellglobal.com.. .
> The OP said the two DB's were on the same server. Therefore, 3-part
> naming
> is sufficient.
> --
> Tom
> ----------------
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> "MC" <marko_culo#@.#yahoo#.#com#> wrote in message
> news:dr5cc8$bue$1@.magcargo.vodatel.hr...
> Try 'four part names' :).
> server.database.owner.table
>
> MC
>
> "Captain Nemo" <nemo@.nospam.com> wrote in message
> news:6oqBf.8267$wl.3901@.text.news.blueyonder.co.uk ...
>> Hi
>>
>> I'm working on an ASP project where the clients want to be able to
>> effectively perform SELECT queries joining tables from two different
>> databases (located on the same SQL-Server).
>>
>> Does this involve creating virtual tables that link to another database,
>> or
>> am I completely on the wrong track?
>>
>> Any hints as to where I might find more information (buzz-words, etc.)
>> would
>> be most appreciated.
>>
>> Thanks
>>
>>|||There's often a performance difference.

--
Tom

----------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com

"MC" <marko_culo#@.#yahoo#.#com#> wrote in message
news:dr5eu2$s5q$1@.magcargo.vodatel.hr...
Agreed, but why not provide a more complete info since theres a little
difference? He may need to pull data from two servers tomorrow...

MC

"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:LBqBf.4368$ft2.109590@.news20.bellglobal.com.. .
> The OP said the two DB's were on the same server. Therefore, 3-part
> naming
> is sufficient.
> --
> Tom
> ----------------
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> "MC" <marko_culo#@.#yahoo#.#com#> wrote in message
> news:dr5cc8$bue$1@.magcargo.vodatel.hr...
> Try 'four part names' :).
> server.database.owner.table
>
> MC
>
> "Captain Nemo" <nemo@.nospam.com> wrote in message
> news:6oqBf.8267$wl.3901@.text.news.blueyonder.co.uk ...
>> Hi
>>
>> I'm working on an ASP project where the clients want to be able to
>> effectively perform SELECT queries joining tables from two different
>> databases (located on the same SQL-Server).
>>
>> Does this involve creating virtual tables that link to another database,
>> or
>> am I completely on the wrong track?
>>
>> Any hints as to where I might find more information (buzz-words, etc.)
>> would
>> be most appreciated.
>>
>> Thanks
>>
>>|||Do you mean that actually specifing servername slows down the query? Could
you explain why?

MC

"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:dRsBf.4433$ft2.115520@.news20.bellglobal.com.. .
> There's often a performance difference.
> --
> Tom
> ----------------
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> "MC" <marko_culo#@.#yahoo#.#com#> wrote in message
> news:dr5eu2$s5q$1@.magcargo.vodatel.hr...
> Agreed, but why not provide a more complete info since theres a little
> difference? He may need to pull data from two servers tomorrow...
>
> MC
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:LBqBf.4368$ft2.109590@.news20.bellglobal.com.. .
>> The OP said the two DB's were on the same server. Therefore, 3-part
>> naming
>> is sufficient.
>>
>> --
>> Tom
>>
>> ----------------
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>> SQL Server MVP
>> Columnist, SQL Server Professional
>> Toronto, ON Canada
>> www.pinpub.com
>>
>> "MC" <marko_culo#@.#yahoo#.#com#> wrote in message
>> news:dr5cc8$bue$1@.magcargo.vodatel.hr...
>> Try 'four part names' :).
>> server.database.owner.table
>>
>>
>> MC
>>
>>
>> "Captain Nemo" <nemo@.nospam.com> wrote in message
>> news:6oqBf.8267$wl.3901@.text.news.blueyonder.co.uk ...
>>> Hi
>>>
>>> I'm working on an ASP project where the clients want to be able to
>>> effectively perform SELECT queries joining tables from two different
>>> databases (located on the same SQL-Server).
>>>
>>> Does this involve creating virtual tables that link to another database,
>>> or
>>> am I completely on the wrong track?
>>>
>>> Any hints as to where I might find more information (buzz-words, etc.)
>>> would
>>> be most appreciated.
>>>
>>> Thanks
>>>
>>>
>>
>>
>>
>|||MC (marko_culo#@.#yahoo#.#com#) writes:
> Do you mean that actually specifing servername slows down the query? Could
> you explain why?

If the server name use is @.@.servername, SQL Server will shortcut, and
there is no overhead.

But if the linked server is defined a true loopback, so that there is a
new connection made, there is obviously an overhead, as data is first
passed to SQL Server, to the OLE DB provider on one connection, and then
the OLE DB provider passes the data back to another connection.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Thank you for that, I assumed engine would 'optimize' that and never
checked. Just when I think I actually know something ;)....

MC

"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns9756F1F84A0F4Yazorman@.127.0.0.1...
> MC (marko_culo#@.#yahoo#.#com#) writes:
>> Do you mean that actually specifing servername slows down the query?
>> Could
>> you explain why?
> If the server name use is @.@.servername, SQL Server will shortcut, and
> there is no overhead.
> But if the linked server is defined a true loopback, so that there is a
> new connection made, there is obviously an overhead, as data is first
> passed to SQL Server, to the OLE DB provider on one connection, and then
> the OLE DB provider passes the data back to another connection.
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||MC (marko_culo#@.#yahoo#.#com#) writes:
> Thank you for that, I assumed engine would 'optimize' that and never
> checked. Just when I think I actually know something ;)....

As I mentioned, it does optimize when the server is @.@.servername, which
it can recognize. But it does not analyse connection strings.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx