简体   繁体   English

我正在尝试在Oracle SQL Developer中创建新的架构

[英]I am trying to create new schema in Oracle SQL Developer

I am trying to create a new schema in SQL Developer: 我正在尝试在SQL Developer中创建新的架构:

CREATE USER admindba
  IDENTIFIED BY pwd4dba
  DEFAULT TABLESPACE tbs_perm_01
  TEMPORARY TABLESPACE tbs_temp_01
  QUOTA 20M on tbs_perm_01;

I am getting error 我遇到错误

SQL Error: ORA-00959: tablespace 'TBS_PERM_01' does not exist SQL错误:ORA-00959:表空间“ TBS_PERM_01”不存在
00959. 00000 - "tablespace '%s' does not exist" 00959. 00000-“表空间'%s'不存在”

What is wrong? 怎么了? Can anyone clear the error? 谁能清除错误?

You have to create the tablespace first. 您必须首先创建表空间。 Example: 例:

create tablespace tbs_perm_01 datafile '/path/to/data/mydatafile01.dbf' size 1G autoextend on; 创建表空间tbs_perm_01数据文件'/path/to/data/mydatafile01.dbf'大小1G自动扩展;

You will likely have create the temporary tablespace too. 您可能还会创建临时表空间。 Then you can create the user that will use those tablespaces. 然后,您可以创建将使用这些表空间的用户。

I think, following steps will help you. 我认为,执行以下步骤将对您有所帮助。

  1. Login as sysdba in oracle developer. 在oracle developer中以sysdba身份登录。

  2. Execute the create user statement. 执行创建用户语句。 For example, create a new user named smith with a password of password as follows: 例如,创建一个名为smith的新用户,其密码为password ,如下所示:

     CREATE USER smith IDENTIFIED BY password; 
  3. Grant specific access to the new schema user. 向新的模式用户授予特定的访问权限。 For example: 例如:

     GRANT CREATE TABLE TO smith; 

    (Or this one to give all privileges to this user ) (或者将此权限授予该用户所有权限)

     GRANT ALL PRIVILEGES TO smith; 
  4. Verify schema creation. 验证架构创建。 For example, use the following query for new user smith: 例如,对新用户smith使用以下查询:

     SELECT username, account_status FROM dba_users WHERE username = 'SMITH'; 
  5. Then login as smith 然后以史密斯身份登录

I refer from this link 我从这个链接参考

connect as sys to your server and check tablespaces it looks that the tablespace TBS_PERM_01 is missing 以sys身份连接到服务器并检查表空间,看是否缺少表空间TBS_PERM_01

select * from dba_tablespaces

select * from dba_tablespaces where tablespace_name = 'TBS_PERM_01'

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

相关问题 为 oracle sql 开发人员创建模式 - Creating schema for oracle sql developer 为什么我会收到这些 Oracle SQL 开发人员错误 - Why am I getting these Oracle SQL Developer errors 我正在尝试在 oracle pl/sql 中创建一个过程,但不能真正为我正在尝试做的事情输入确切的逻辑 - I am trying to create a procedure in oracle pl/sql but cant really put in the exact logic for what I am trying to do 我正在尝试使用 sql 开发人员在我的 oracle 云中创建一个表,但我收到错误报告 ORA-02270 - I'm trying to create a table in my oracle cloud using sql developer but I receive error report ORA-02270 在 Oracle SQL 开发者中创建触发器 - Create Trigger in Oracle SQL Developer 嗨,我在 mysql 中编写了一个查询(有效),我想在 oracle sql 开发人员上执行,所以我试图在 pl/sql 中编写它 - Hi I've written a query in mysql (that works) that I'd like to execute on oracle sql developer, so I am trying to write it in pl/sql 如何修复 oracle sql 开发人员中的“创建”错误? - how could i fix “create” error in oracle sql developer? 我正在尝试使用具有可变 FK 的模式创建表(订单) - I am trying to create a table (Order) using schema with mutable FK SQL Developer创建一个新用户 - SQL Developer create a new user Oracle SQL Developer-尝试按季度退还产品 - Oracle SQL Developer - Trying to return products by quarter
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM