[英]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. 我认为,执行以下步骤将对您有所帮助。
Login as sysdba in oracle developer. 在oracle developer中以sysdba身份登录。
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;
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;
Verify schema creation. 验证架构创建。 For example, use the following query for new user smith:
例如,对新用户smith使用以下查询:
SELECT username, account_status FROM dba_users WHERE username = 'SMITH';
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.