I have some linked servers which, when I make the statement,
exec sp_linkedservers
in SQL server shows up as:
SRV_NAME SRV_PROVIDERNAME SRV_CAT
SERVER1 IBMDASQL INICAT1
SERVER2 IBMDASQL INICAT1
I've been able to access another linked server with the same provider name using:
SELECT * FROM OPENQUERY(SERVER3,'SELECT * FROM INICAT1.Schema3.Table')
I don't know the specifics of the two other servers, only that they have the same value on SRV_CAT
.
Does anyone know how one can find table information from a server using IBMDASQL
as serverprovider?
What I've tried is to use the "regular" ways of finding the information, i.e. for instance using:
exec sp_tables_ex SERVER1
but this only shows an empty result set.
Using openquery()
one can use:
SELECT * FROM OPENQUERY(LINKED_SRV,
'SELECT * FROM SYSTEM.TABLES WHERE Table_Schema LIKE ''TableofInterest''
order by Table_Name')