Oracle創建表空間、創建用戶以及授權


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服務即可


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM