简体   繁体   English

如何在Oracle SQL Developer中创建数据库

[英]How to create Database in Oracle SQL Developer

My Background is MySQL/PhpMyAdmin and there I can create easily new database by entering the name in Phpmyadmin, But I'm facing problem to creating database in Oracle SQL Developer... I already connected HR_ORACLE default database and test the connection. 我的背景是MySQL / PhpMyAdmin,我可以通过在Phpmyadmin中输入名称来轻松创建新数据库,但是我在Oracle SQL Developer中创建数据库时遇到问题...我已经连接了HR_ORACLE默认数据库并测试了连接。 But I don't know how to create new database? 但我不知道如何创建新的数据库?

You usually only have one database (=instance) in Oracle. 您通常在Oracle中只有一个数据库(= instance)。 A database in Oracle is something completely different than a database in MySQL. Oracle中的数据库与MySQL中的数据库完全不同。 Actually MySQL calls databases "schemas" and that's what they are best mapped to in Oracle. 实际上,MySQL调用数据库“模式”,这是他们在Oracle中最好的映射。

To create a new schema in Oracle, you create a new user. 要在Oracle中创建新架构,请创建新用户。 Those two things are more or less the same (there are some subtle differences, but as you are a beginner just assume that it's the same for now). 这两件事情或多或少是相同的(有一些微妙的差异,但是因为你是初学者只是假设它现在是相同的)。

To create a new user, you need to connect as a privileged user (typically SYSTEM or SYS) and run the CREATE USER command. 要创建新用户,您需要以特权用户(通常为SYSTEM或SYS)进行连接,并运行CREATE USER命令。

I don't use SQL Developer but I think it has some DBA tools built-in that can probably help you with that. 我不使用SQL Developer,但我认为它内置了一些DBA工具,可以帮助你。 Just seach for "user management" or something similar. 只需搜索“用户管理”或类似的东西。 You do not want to create a new database if you have Oracle up and running. 如果已启动并运行Oracle, 则不希望创建新数据库。

Further reading: 进一步阅读:

Edit (as you seem to be confused about the new user): 编辑 (因为你似乎对新用户感到困惑):

Each user can (by default) only access the tables that were created under that user (the ones that user owns). 每个用户(默认情况下)只能访问在该用户下创建的表(用户拥有的表)。 So if you create a second user NEWBIE and log in with that user, you won't be able to access the tables of the user (schema) HR_ORACLE . 因此,如果您创建第二个用户NEWBIE并使用该用户登录,您将无法访问用户(架构) HR_ORACLE If you create a new table as NEWBIE that table is created in the schema NEWBIE and is owned by the user NEWBIE . 如果您创建一个新表作为NEWBIE ,该表在模式NEWBIE创建并由用户NEWBIE拥有。 The user HR_ORACLE can not access the tables owned by NEWBIE (unless given the necessary grants) 用户HR_ORACLE无法访问NEWBIE拥有的表(除非获得必要的授权)

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

相关问题 如果hr数据库仍然存在,如何在oracle sql developer中创建新数据库? - how to create a new database in oracle sql developer if hr database is still there? 适用于SQL Developer的Oracle数据库 - Oracle Database for SQL Developer 如何使用Oracle SQL Developer连接到数据库 - How to connect to a database with Oracle SQL Developer 如何在 Vagrant 中创建 Oracle 数据库并在我的本地 Rails 应用程序和 SQL Developer 中连接到它? - How to create an Oracle database inside Vagrant and connect to it in my local Rails app and SQL Developer? 在Oracle Developer中创建一个新数据库 - Create a new database in Oracle Developer 如何在 SQL developer 上连接到新创建的 Oracle 数据库 - How to connect to a newly created Oracle database on SQL developer 如何从 Oracle SQL Developer 的数据库差异中排除 ISEQ$$ 值? - How to exclude ISEQ$$ values from a Database Diff in Oracle SQL Developer? 如何使用sql developer备份和还原数据库(oracle 9i) - how to backup and restore database(oracle 9i ) using sql developer Oracle SQL Developer一步一步复制数据库 - Oracle SQL Developer copy database step by step 在Oracle SQL Developer中连接到迁移的数据库时出现问题 - Problem connecting to migrated database in Oracle SQL Developer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM