If it\'s a regular database, i can simply use this query to get a list of all table names and their column names of the database.
use [my_database_name]
GO
Fully qualify your linked server in your FROM
and JOIN
, and alias them.
SELECT lst.name AS Table_Name,
lsc.name AS Column_Name,
lsc.max_length,
(schema_id) As Schema_name
FROM [SERVER].[DB].[sys].[tables] lst
INNER JOIN [SERVER].[DB].[sys].[columns] lsc
ON lst.OBJECT_ID=lsc.object_id
ORDER BY schema_name, lst.name, lsc.name