Is there a tool to generate a full database DDL for SQL Server? What about Postgres and MySQL?

后端 未结 8 1961
野性不改
野性不改 2021-02-18 22:11

Using Toad for Oracle, I can generate full DDL files describing all tables, views, source code (procedures, functions, packages), sequences, and grants of an Oracle schema. A g

8条回答
  •  天命终不由人
    2021-02-18 22:44

    In addition to the "Generate Scripts" wizard in SSMS you can now use mssql-scripter which is a command line tool to generate DDL and DML scripts.

    It's an open source and Python-based tool that you can install via: pip install mssql-scripter.

    Here's an example of what you can use to script the database schema and data to a file. mssql-scripter -S localhost -d AdventureWorks -U sa --schema-and-data > ./adventureworks.sql More guidelines: https://github.com/Microsoft/sql-xplat-cli/blob/dev/doc/usage_guide.md

    And here is the link to the GitHub repository: https://github.com/Microsoft/sql-xplat-cli

提交回复
热议问题