co2tw
asked on
AS/400 DB2 linked server problem
I'm using MS-SQL management studio and added linked server on my environment.
I can use openquery for my linked server.
ex)
select * from openquery(linked_server, 'SELECT * FROM [LIB_NAME].[PF_NAME]')
It works fine.
But, I wanna know if I can change the above expression like this.
select * from [linked_server].[LIB_NAME] .[PF_NAME]
Of course, I failed.. Please let me know how this can work.
Thanks.
I can use openquery for my linked server.
ex)
select * from openquery(linked_server, 'SELECT * FROM [LIB_NAME].[PF_NAME]')
It works fine.
But, I wanna know if I can change the above expression like this.
select * from [linked_server].[LIB_NAME]
Of course, I failed.. Please let me know how this can work.
Thanks.
ASKER
I tried your query but I also failed.
please give me the descript of the 4 parts.
[linked_server].[what?].[L IB_NAME].[ PF_NAME]
[linked_server].[LIB_NAME] .[what?].[ PF_NAME]
please give me the descript of the 4 parts.
[linked_server].[what?].[L
[linked_server].[LIB_NAME]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I also tried but failed.
I'm sure that my server's machine name is correct and I also tried my ip address of the server.
But failed...
Do you have any other clue for this?
what is the exact error message you get?
ASKER
the error message is below.
An invalid schema or catalog was specified for the provider "MSDASQL" for linked server "DNA".
An invalid schema or catalog was specified for the provider "MSDASQL" for linked server "DNA".
is it possible that this is a permission issue?
can you trace the As400 DB2 and check if your request ever made it through
can you trace the As400 DB2 and check if your request ever made it through
ASKER
I didn't solve this problem yet but I'll accept the answer.
If the description for the connection 4 parts is correct, there might be a clue.
Anyway thanks.
If the description for the connection 4 parts is correct, there might be a clue.
Anyway thanks.
ASKER
It didn't solve my problem absolutely but It gives me a clue to solve.
try
select * from [linked_server]..[LIB_NAME
select * from [linked_server].[LIB_NAME]