ORACLE数据库安装完成后创建数据库
ORACLE数据库安装完成后创建数据库时的步骤:
1.首先使用system用户名和自己的密码链接数据库;
2.Oracle创建表空间 命令格式:
Create tablespace slisreins datafile ‘//slisreins.dbf’ size ;
Eg: Create tablespace traind datafile 'D:/oracle/product/10.2.0/oradata/traind.dbf' size 500M;
创创建用户和授权
3.创建自己的用户
命令格式:Create user 用户名 identified by 密码 default tablespace 表空间名;
Eg: Create user train identified by train default tablespace traind;
4.为用户提升权限
命令格式:Grant connect,resource,DBA to 赋予权限的用户;
Eg:Grant connect,resource,DBA to traind;
5.导入表语句
命令格式:imp 用户名/密码@sid file=dmp的文件路径 full=y;(本地需要先配置好数据库的连接 .ORA)
Eg:imp train/train@train file=G:\dmp\training.dmp full=y;
注意是imp命令是在cmd命令行下运行的,在SQLPLUS中不能执行!