0

I tried to export synonyms table from my server database to excel using SMSS, I choose database, then I choose export, and manage source and dest, then I choose Excel File and I rename sheet 1 to name of synonyms table.

The base table that the synonym points to is on another server and another database, but I just handle db server with table synonym, I just want to use the synonym to pull data across the linked server.

when I execute, I got error about table x don't exist but I have synonyms :)m and I can choose it from export wizard, anyone know about how to export data from table of synonyms to excel file?

3
  • Have you tried exporting from the base table directly, rather than via the synonym?
    – AMtwo
    Sep 17, 2022 at 20:26
  • Base table from another server and another database, but I just handle db server with table synonym, I just want to do it in synonym, have any solution? Sep 17, 2022 at 22:17
  • That's a very important detail! I'm not sure how BCP works across a linked server like that.
    – AMtwo
    Sep 17, 2022 at 22:32

1 Answer 1

0

You'll have to use a SQL Query, as synonyms don't show up in the list of tables and views Excel (Power Query) retrieves from the server. EG

enter image description here

2
  • I think he's going the other way around and trying to use the SSMS Export Wizard (Database Task) to export the Table to an Excel file.
    – J.D.
    Sep 18, 2022 at 3:33
  • it work, it detect the synonyms table by query, maybe, for export data using synonyms, I use power query excel, but takes a long time because I export 5.5 Million row, first I use it, I got timed out, I retry, and run, thanks for you help Sep 18, 2022 at 9:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.