Oracle SQL Developer导出源以进行版本控制 [英] Oracle SQL Developer export sources for version control

查看:164
本文介绍了Oracle SQL Developer导出源以进行版本控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的数据库很大,东西很多,我想使用版本控制(Git)来管理更改. 有很多文章介绍如何逐步进行,但是我缺少其中的一篇. 整个数据库(不包括数据)的文件结构是否有标准或推荐的方法,以及如何从现有数据库中获取文件结构?

We have big database with a lot of stuff and I want to use version control (Git) to manage changes. There are a lot of articles how to do it step by step but one piece is missing for me. Is there standard or recommended way for file structure of whole database (data excluded) and how it can be obtained from existing database?

有很多资源,过程,功能,程序包等. 版本控制文章显示了如何从版本控制的角度管理少量文件.但是他们建议应选择每个文件并将其分别保存到文件系统中.

It is a lot of sources, procedures, functions, packages, etc. Version control articles show how to manage few files from version control perspective. But they suggest that each file should be selected and saved to file system separately.

是否可以将所有内容导出/导入到某种预先组织的结构中? 好的IDE具有由语言或产品定义的结构.但是在我看来,SQL Developer没有. 我还发现SQL Developer可能只有一个存储库.没有可以将不同数据库合并或合并为单独单元的项目的概念.

Is there way to export/import all stuff to maybe some preorganized structure? Good IDEs have such structures defined by languages or products. But it looks for me that SQL Developer doesn't have one. It also looks for me that SQL Developer may have only one repository. No concept of projects which can combine or unite different databases in separate units.

我应该发明整个结构并使用类似的东西

Should I invent my whole structure and use something like

**project/Abc/DB1/Packages/packzgeXyz/source1.sql**

每个来源?当然可以,但是我担心可能会遗漏一些东西. 有什么建议吗?

for each source? Sure I can do this but I worry that may miss something. Any advise?

推荐答案

是的,SQL Developer可以为您将模式卸载到文件中.然后,您可以将此类文件带入SVN或Git项目.

Yes, SQL Developer can unload a schema to files for you. And then you could take such files to your SVN or Git projects.

工具-数据库导出.

我将输出设置为多个目录-因此,一个目录用于模式对象类型.

I set the output to multiple directories - so one directory for schema object type.

然后我设置我的应用程序架构,然后继续完成/确定.

Then I set my application schema, then proceed to FINISH/OK.

输出如下:

查看全文

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