如何在 Oracle 11g 中创建和访问多个数据库?
我最近购买了 Oracle 11g,我希望我所有的开发人员都使用它。显然我不能为每个人购买不同的许可证。那么我是否可以为每个开发人员创建一个数据库?据推断,我知道这是可能的。
但是,我找不到如何做到这一点。我用谷歌搜索。对于这种特殊情况,没有明确的指导。你能指出正确的资源吗? 或者您能列出实现这一目标的步骤吗? 我将永远感激不已。
-
谢尔顿
I have bought a Oracle 11g recently and I wanted all my developers to use it. Obviously I can't buy different licenses for each. So is it possible for me to create one database for each of the developers?. By inference I know it is possible.
However, I couldn't find how I can do it. I googled. There was no definite guide for this particular case. Can you point to the right resource?
Or could you list down the steps to achieve this?
I would ever be grateful.
-
Sheldon
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
当您在 Oracle 中创建用户时,您正在创建一个架构。架构是特定于该架构的表和相关对象(视图、函数、存储过程等)的集合。因此,每个开发人员都可以拥有自己的用户/架构,并且彼此独立工作。可以授予其他用户访问权限,并且可以创建公共同义词以确保 YOUR_TABLE 指向特定架构中的 YOUR_TABLE,而无需指定该架构。但这会占用空间......
如果有共享开发,可能最好有一个单一的模式,这样每个人都在同一个副本上工作。
When you create a user in Oracle, you're creating a schema. A schema is a collection of tables and related objects (views, functions, stored procedures, etc) specific to that schema. So each developer could have their own user/schema, and work independently of one another. Access to other users can be granted, and public synonyms can be created to ensure that YOUR_TABLE points to a YOUR_TABLE in a specific schema, without the need to specify that schema. But this can eat space...
If there is shared development, might be best to have a single schema so everyone is working on the same copy.
创建一个数据库并为每个开发人员提供自己的架构(用户名/密码)。
Create one database and give each developer it's own schema (username/password).
只要您的所有数据库实例都位于同一服务器上,您就可以构建任意数量的数据库实例,而无需支付任何费用。对于更多实例,性能可能会成为一个问题,具体取决于实例的使用程度。
你没有提到你的平台。
在 Windows 上,以下是如何使用 数据库配置助手(DBCA)。我认为 *nix 上也很相似。
这样创建的每个数据库都有不同的名称。要访问它们,只需使用 tnsnames.ora 文件,其中服务器上的每个实例都有不同的条目。
As long as all your database instances are on the same server you can build as many as you want without paying any more. Performance might become an issue with more instances depending on how heavily used they are.
You don't mention your platform.
On windows, here's how to use the Database Configuration Assistant (DBCA). I think it's pretty similar on *nix as well.
Each database so created has a different name. To access them it's simply a matter of using a tnsnames.ora file with different entries for each instance on the server.
您可以为每个开发人员购买 Oracle 个人版本并将其安装在他们的台式机/笔记本电脑上。据 shop.oracle.com 称,每位用户的费用为 460 美元。这样你就可以让每个人都完全访问Oracle并省去很多麻烦。开发人员可以更快地学习 Oracle,提高工作效率,而 DBA 不必担心他们会导致服务器瘫痪。
或者,如果您的程序尚未投入生产,您甚至可以免费使用它。 Oracle 开发人员许可证可让您:
You can buy Oracle personal edition for each developer and install it on their desktop/laptop. According to shop.oracle.com it's $460 per user. This way you can give everyone full access to Oracle and save a lot of trouble. Developers can learn Oracle more quickly and be more productive, and DBAs won't have to worry about them bringing down the server.
Or possibly you could even use it for free if your program is not in production yet. The Oracle Developer license lets you: