Dear Kornelis,
Thanks for your responce.
I would like to say that, while configuring linked server there will be an
option to specify catelog(DatabaseName). I think there is as chance, we can
get.
as of know below query
As you told with out user there is chance to work but , I tryed that I
getting error.
select * from [linkedserver].[database]..[TableName]
gives below error.
Server: Msg 7313, Level 16, State 1, Line 1
Invalid schema or catalog specified for provider 'MSDASQL'.
OLE DB error trace [Non-interface error: Invalid schema or catalog
specified for the provider.].
Thanks and Regards,
Rajesh
[quoted text, click to view] "Hugo Kornelis" wrote:
> On Wed, 14 Sep 2005 07:57:08 -0700, Rajesha wrote:
>
> >Dear Friends,
> >Usually we call tabal and SP like given below.
> > select * from [linkedserver].[database].[dbo].[TableName]
> > EXEC [linkedserver].[database].[dbo].usp_storedprocedure
> >but I like to all with out database and username.
> >I tryed like below
> >select * from [linkedserver]...[TableName]
> >OR
> >select * from [linkedserver]..[user].[TableName]
> >
> >It's gives error
> >
> >Server: Msg 7313, Level 16, State 1, Line 1
> >Invalid schema or catalog specified for provider 'MSDASQL'.
> >OLE DB error trace [Non-interface error: Invalid schema or catalog
> >specified for the provider.].
> >
> >Please help me to achive this.
> >
> >Thasks and regards,
> >
> >Rajesh
>
> Hi Rajesh,
>
> You can't leave out the databasename. A linked server might hold more
> than one database, so you have to specify that part.
>
> I believe that you can leave out the owner, but I'm not sure, and I
> can't test that right now. However, it is recommended that you always
> include the owner. This helps SQL Server find the object more quickly,
> and it helps reduce the number of recompiles.
>
> Best, Hugo
> --
>
> (Remove _NO_ and _SPAM_ to get my e-mail address)
[quoted text, click to view] On Wed, 14 Sep 2005 07:57:08 -0700, Rajesha wrote:
>Dear Friends,
>Usually we call tabal and SP like given below.
> select * from [linkedserver].[database].[dbo].[TableName]
> EXEC [linkedserver].[database].[dbo].usp_storedprocedure
>but I like to all with out database and username.
>I tryed like below
>select * from [linkedserver]...[TableName]
>OR
>select * from [linkedserver]..[user].[TableName]
>
>It's gives error
>
>Server: Msg 7313, Level 16, State 1, Line 1
>Invalid schema or catalog specified for provider 'MSDASQL'.
>OLE DB error trace [Non-interface error: Invalid schema or catalog
>specified for the provider.].
>
>Please help me to achive this.
>
>Thasks and regards,
>
>Rajesh
Hi Rajesh,
You can't leave out the databasename. A linked server might hold more
than one database, so you have to specify that part.
I believe that you can leave out the owner, but I'm not sure, and I
can't test that right now. However, it is recommended that you always
include the owner. This helps SQL Server find the object more quickly,
and it helps reduce the number of recompiles.
Best, Hugo
--