Search code examples
sqlsql-serverssmsssms-2017

How to backup or script all the Synonyms of the database in SSMS?


How to backup or script all the Synonyms of the database in SSMS?


Solution

  • Right click your database in the object Explorer, and select "Tasks" -> "Generate Scripts...". On the Choose Objects window, select the "Select specific database objects" and tick "Synonyms" (like below):

    enter image description here

    Choose whether you want to save file to disc, clipboard or a new query window. Click Next and the next.

    Done.