将所有对象从 Oracle 导入到 Visual Studio 数据库项目

发布于 2024-12-27 18:12:18 字数 585 浏览 2 评论 0原文

我有一个从 Visual Studio 2010(Oracle 开发工具)连接到的 Oracle 数据库。我现在在“服务器资源管理器”窗口中拥有数据库,可以看到所有表、视图、函数等。

现在我想在我的数据库项目解决方案中拥有所有这些对象(我想使用 TFS 的版本控制,这就是我想要解决方案中的所有对象的原因)。我可以右键单击一个单个函数并选择“生成创建脚本到项目”,然后它将完全执行我想要的操作,它会在数据库项目的“函数”文件夹中创建一个新脚本,其中与函数同名。

问题:
如果我选择两个或多个函数并使用“生成创建脚本到项目”功能,那么我必须为脚本选择一个名称,它将在一个脚本中写入所有函数。但我想要每个脚本一个文件。

问题:
是否可以以某种方式从 oracle 数据库导出所有对象并将它们作为脚本导入到 Visual Studio 数据库项目中?

如果我使用不同的驱动程序 (devart),那么我就可以做到这一点,但我们想使用 ODT,但我找不到一种简单的方法来完成该任务。
编辑:刚刚注意到,devart 项目与源代码管理不兼容,所以我们绝对必须使用 ODT。

I have a Oracle database to which I connect from Visual Studio 2010 (Oracle Developer Tools). I now have the database in the "Server Explorer" window and can see all Tables, Views, Functions, etc.

Now I want to have all those objects in my database project solution (I want to use the version control of TFS, that's the reason I want all objects in my solution). I can right click a single function and choose "Generate Create Script to Project", then it will do exactly what I want, it creates a new script in the "Functions" folder of the database project, with the same name as the function.

Problem:
If I select two or more functions and use the "Generate Create Script to Project" function, then I have to choose a name for the script and it will write all the functions in one script. But I want a single file per script.

Question:
Is it somehow possible to export all objects from the oracle database and import them as script in the Visual Studio database project?

If I use a different driver (devart), then I am able to do it, but we want to use the ODT and I couldn't find an easy way to complete that task there.
Edit: Just noticed, that the devart project is not compatible with source control, so we absolutely have to go with ODT.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文