0

I need to automate database schema dumping via scripts. I have the restriction of only having sqlcmd available, so I can not use/install mssql-scripter or other tools.

Do you know if it is possible to generate the schema files and stored procedures with plain sqlcmd?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
carpinchosaurio
  • 1,175
  • 21
  • 44
  • 2
    Does this answer your question? [Generate SQL Create Scripts for existing tables with Query](https://stackoverflow.com/questions/706664/generate-sql-create-scripts-for-existing-tables-with-query) Do note that getting it correct for all possible cases and all possible objects is so involved that I wouldn't trust any script you find without thorough testing of your own. This is one task T-SQL isn't really suited for -- installing Management Studio on a workstation and using its "script" tasks is better. – Jeroen Mostert Dec 06 '22 at 14:53

0 Answers0