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

后端 未结 8 1737
野性不改
野性不改 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:32

    In PostgreSQL, simply use the -s option to pg_dump. You can get it as a plain sql script (one file for the whole database) on in a custom format that you can then throw a script at to get one file per object if you want it.

    The PgAdmin tool will also show you each object's SQL dump, but I don't think there's a nice way to get them all at once from there.

提交回复
热议问题