为飞行基线创建DDL [英] Creating a DDL for a baseline for flyway

查看:52
本文介绍了为飞行基线创建DDL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个oracle 11 XE数据库,其中包含3个模式,我想创建一个DDL文件以制作可用于flyway的基准脚本.

I've got an oracle 11 XE database, with 3 schemas in it, that I want to create a DDL file for to make a baseline script to use with flyway.

我尝试仅导出所有3个模式的DDL,但是生成的sql不包括用户的创建或表空间的创建.它只是从sql开始创建表,由于用户或表空间不存在,该表将不起作用.

I've tried to export just the DDL of all 3 schemas, but the resulting sql doesn't include the creation of the users, or the creation of the tablespaces. It just starts off with sql to create tables, which will not work as the users or the tablespaces don't exist.

是否可以使用sql-developer进行此操作,或者我在此处使用错误的工具?

Is there any way to do this with sql-developer or am I using the wrong tool for the job here?

我想我可能需要在DDL中包括所有SYSTEM对象,但是不知道如何将其导入到正在运行的oracle实例中.

I'm thinking I may need to include all the SYSTEM objects in the DDL, but no idea how importing that into a running oracle instance will work.

我将不胜感激任何提示或暗示,我开始认为该计划是不可能的. :-(

Any tips or hints I'd be grateful for, I'm starting to think this plan just isn't possible. :-(

谢谢

马特

推荐答案

当我们为模式生成ddl时,我们将获取模式对象,而不是拥有该模式的用户的定义,也不是该模式中使用的表空间

when we generate the ddl for a schema, we grab the schema objects, not the definition of the user that owns the schema, nor the tablespaces used IN the schema

尽管仍然可以得到这些,只需打开DBA面板-

you can still get those though, just open the DBA Panel -

这篇关于为飞行基线创建DDL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆