方法一:创建表空间;创建用户;授权用户
步骤一:
运行CMD,输入 sqlplus 回车;
然后输入用户名:system as sysdba
密码:***
点击回车键连接成功。
如下图
![f3c3658c98a72715acd9436196ad2993.png](https://img-blog.csdnimg.cn/img_convert/f3c3658c98a72715acd9436196ad2993.png)
步骤二:
《输入创建表空间命令符》
Create tablespace 表空间名称
datafile '表空间路径名称.dbf'
size 200M autoextend on next 5M;
点击回车键后系统提示“表空间已创建”。
如下图:
![a8ae85ee6ba72f93f97ddbb9e25a29a1.png](https://img-blog.csdnimg.cn/img_convert/a8ae85ee6ba72f93f97ddbb9e25a29a1.png)
步骤三:
《输入创建表用户命令符》
create user 用户名
identified by 用户密码
default tablespace 表空间名称
temporary tablespace temp;
点击回车键后系统提示“用户已创建”。
如下图:
![0ee43cf03a6a07d682695ae96429c44a.png](https://img-blog.csdnimg.cn/img_convert/0ee43cf03a6a07d682695ae96429c44a.png)
步骤四:
《用户授权》
grant connect to 用户名;
点击回车键后系统提示“授权成功”
如下图:
![4e803b900023e268fe6edaf475ce5c2f.png](https://img-blog.csdnimg.cn/img_convert/4e803b900023e268fe6edaf475ce5c2f.png)
grant dba to 用户名;
点击回车键后系统提示“授权成功”
如下图:
![0a7052d60957ab392a48d44e9a5f8c3b.png](https://img-blog.csdnimg.cn/img_convert/0a7052d60957ab392a48d44e9a5f8c3b.png)
方法二:创建表空间;创建用户;授权用户
步骤一:
用sqldeveloper客户端,登上用户名system,如下图:
![4602cfb1653288687d4505abca30a353.png](https://img-blog.csdnimg.cn/img_convert/4602cfb1653288687d4505abca30a353.png)
步骤二:
《输入创建表空间命令符》
Create tablespace 表空间名称
datafile '表空间路径名称.dbf'
size 200M autoextend on next 5M;
点击回车键后系统提示“表空间已创建”。
步骤三:
《输入创建表用户命令符》
create user 用户名
identified by 用户密码
default tablespace 表空间名称
temporary tablespace temp;
点击回车键后系统提示“用户已创建”。
步骤四:
《用户授权》
grant connect to 用户名;
点击回车键后系统提示“授权成功”
grant dba to 用户名;
点击回车键后系统提示“授权成功”
如下图:
![1c5783078c48615d9133c112e79f8ead.png](https://img-blog.csdnimg.cn/img_convert/1c5783078c48615d9133c112e79f8ead.png)