1175429393wljblog

Oracle创建表空间、创建用户以及授权

SQL*Plus: Release 11.2.0.1.0 Production on 星期二 11月 10 12:13:22 2020

Copyright (c) 1982, 2010, Oracle.  All rights reserved.
请输入用户名:  sys as sysdba
输入口令:

连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> create temporary tablespace db_temp tempfile \'d:\app\Administrator\oradata\
db_temp.dbf\' size 32m autoextend on next 32m maxsize unlimited extent management
 local;

表空间已创建。
SQL> create tablespace db_data logging datafile \'d:\app\Administrator\oradata\db
_data.dbf\' size 32m autoextend on next 32m maxsize unlimited extent management l
ocal;

表空间已创建。
SQL> create user zs identified by zs account unlock default tablespace db_data
 temporary tablespace db_temp;
create zs identified by zs account unlock default tablespace db_data temp
orary tablespace db_temp
            *1 行出现错误:
ORA-01920: 用户名 \'ZS\' 与另外一个用户名或角色名发生冲突


SQL> drop user zs cascade;

用户已删除。

SQL> create user zs identified by zs account unlock default tablespace db_data
 temporary tablespace db_temp;

用户已创建。

SQL> grant connect,resource,dba to zs;

授权成功。

SQL> create user ls identified by ls ;

用户已创建。

SQL> grant connect,resource,dba to ls;

授权成功。

SQL>
注意:oracle出现The Network Adapter could not establish the connection的问题
可能是监听文件product\11.2.0\dbhome_1\NETWORK\ADMIN的listener.ora中的localhost没有更改,
这里localhost改成你的数据库安装电脑的名字就可以了,修改过程中要先停止oracle的各个服务,之后修改,修改完成保存在重启oracle服务即可

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-08
  • 2021-12-12
  • 2021-12-22
  • 2022-12-23
  • 2021-10-09
  • 2021-12-18
相关资源
相似解决方案