建立表空间
create tablespace OPET_MU_DATA datafile ‘/data/oracle/data/OPEN/OPET_MU_DATA.dbf‘ size 10G;
create tablespace OPET_MU_INDX datafile ‘/data/oracle/data/OPEN/OPET_MU_INDX.dbf‘ size 1G;
建用户
-- Create the user
create user OPENET_MU identified by "openet9688"
default tablespace OPET_MU_DATA
temporary tablespace TEMP01
--profile DEFAULT
--quota unlimited on opet_bk_data
--quota unlimited on opet_bk_indx;
3.给用户授权
-- Grant/Revoke object privileges
grant execute on DBMS_LOCK to OPEN_MU;
--Create directory OPENETLOG AS ‘/data/oracle/openetlog/‘;
grant read, write on directory OPENETLOG to OPEN_MU;
grant execute on UTL_FILE to OPEN_MU;
-- Grant/Revoke role privileges
grant connect to OPEN_MU;
grant resource to OPEN_MU;
-- Grant/Revoke system privileges
grant create procedure to OPEN_MU;
grant create table to OPENET_MU;
4.用plsql导出原来数据,再导入新的数据库,检查一下有没有缺对象
Select object_name from user_objects order by 1;
linux下切换到oracle下
root登陆进去后,su - oracle
sqlplus / as sysdba
数据库基本操作
标签: