简体   繁体   English

如何在Oracle数据库11g中的同一用户下创建新架构? 还是用户只能制作一个架构?

[英]How to create new schemas under same user in oracle database 11g? Or can an user make only one schema?

I am trying to keep my school works under one user account. 我试图将我的学校作品保留在一个用户帐户下。 Currently I am making a new database user for every lab session. 目前,我正在为每个实验会话创建一个新的数据库用户。 Surely this is not the right way to go? 当然这不是正确的方法吗?

I want to create a another schema, alongside my existing schema. 我想在现有模式旁边创建另一个模式。

NB. 注意 I see a dropdown option for schema in the SQL workshop. 我在SQL Workshop中看到了模式的下拉选项。 So there might be a option to create multiple schema. 因此,可以选择创建多个架构。 But I can't find how to do it. 但是我找不到方法。 The google links all say I have to create a new user. 谷歌链接都说我必须创建一个新用户。

In Oracle user is owner of its schema. 在Oracle中,用户是其架构的所有者。 User is an account that can access database. 用户是可以访问数据库的帐户。 It depends on grants if it can access only own schema or more schemas. 如果它只能访问自己的模式或更多模式,则取决于授予。

When you create user you create schema. 创建用户时,您将创建架构。 You can't create just a schema and assign it to existing user. 您不能仅创建模式并将其分配给现有用户。 However you can create new user with schema and grant other users access to newly created schema. 但是,您可以使用架构创建新用户,并授予其他用户访问新创建的架构的权限。 In your case if you want new schema for each lab you need to create user for each lab and then grant privileges to your main user. 在您的情况下,如果您希望为每个实验室使用新的架构,则需要为每个实验室创建用户,然后将特权授予主要用户。

Here you can find some explanations: Difference between a user and a schema in Oracle? 在这里,您可以找到一些解释: Oracle中的用户和模式之间的区别?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM