利用root用户登录数据库服务器,创建存放表空间文件的文件夹/home/rf_crm/data 并赋权777(chmod 777 rf_crm chmod 777 data);

    利用oracle用户登录数据库服务器并利用sqlplus登录数据库,如下所示:
    Su - oracle
    Sqlplus /nolog
    connect /as sysdba
    显示connected表示连接成功

    select distinct tablespace_name from dba_segments where owner=’数据库用户名’;
    使用语句查看融丰绩效用户使用的表空间,与下图CRM所使用的表空间进行对比,已存在的表空间不必创建,没有用到的表空间需要使用创建数据表空间语句创建表空间

    —创建表空间

    CREATE TEMPORARY TABLESPACE CRM_TEMP
    TEMPFILE ‘/home/rf_crm/data/CRM_TEMP.dbf’
    SIZE 40g
    autoextend on
    NEXT 10M MAXSIZE UNLIMITED
    EXTENT MANAGEMENT LOCAL
    UNIFORM SIZE 1M;

    create tablespace GDM_CRM_DT_01
    logging
    datafile ‘/home/rf_crm/data/GDM_CRM_DT_01.dbf’
    size 20G
    autoextend on
    next 32m
    extent management local;

    -
    create tablespace
    表空间名
    logging
    datafile ‘/home/rf_crm/data/
    表空间名**.dbf’
    size 10G
    autoextend on
    next 32m
    extent management local;

    — Create the user 创建用户
    create user *
    identified by *
    default tablespace GDM_CRM_DT_01
    temporary tablespace CRM_TEMP
    profile DEFAULT
    quota unlimited on GDM_CRM_DT_01;

    — Grant/Revoke role privileges 授予角色
    grant dba to rf_crm;
    — Grant/Revoke system privileges 授予权限
    grant create procedure to rf_crm;
    grant create public synonym to rf_crm;
    grant create sequence to rf_crm;
    grant create session to rf_crm;
    grant create table to rf_crm;
    grant create view to rf_crm;
    grant drop public synonym to rf_crm;
    grant select any table to rf_crm;
    grant delete any table to rf_crm;
    grant insert any table to rf_crm;
    grant unlimited tablespace to rf_crm;

    利用plsql登陆数据库,在命令窗口导入用户对象user_object.sql
    打开命令窗口选择需要导入的文件,如下图所示:

    导入对象的数据文件放在(/数据库对象数据)文件夹中。

    1.利用plsql登录数据库,在命令窗口导入以下文件(文件在(/初始化数据)文件夹中):
    Sql导入
    (1) 初始化数据.sql
    (2) SYS_ROLE_AUTH.sql
    2.用rf_crm用户登陆调度服务器用命令进行数据跑批(该部分数据在调度部署完之后操作
    将需要导入的数据文件包上传到调度服务器的目录/home/rf_crm/tar下
    在调度部署完成后从当天的数据开始跑批。