`
michales003
  • 浏览: 397590 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

sqlplus如何执行command脚本。

    博客分类:
  • J2EE
阅读更多

打开sqlplus,file->open->command file

 


rem   文件名称: @BPEL_CALL_ERP_ALL.sql
rem   使用方法: @BPEL_CALL_ERP_ALL.sql
rem   注意事项: 1 使用前需要保证APP用户必须创建和授权,
                2 以具有dba权限的用户登录系统

prompt ============================================================
prompt 创建配置表
prompt ============================================================


@./EIP_ADMIN_CreateTable.sql;

prompt ============================================================
prompt 创建初始化数据
prompt ============================================================

prompt ====Create mip_config====
@./init_data/init_data_guizhou/init_mip_config.sql;

prompt ====Create mip_eip_flex_field_map====
@./init_data/init_data_guizhou/init_mip_eip_flex_field_map.sql;

prompt ====Create mip_erp_call_paramete====
@./init_data/init_data_guizhou/init_mip_erp_call_paramete.sql;

prompt ====Create mip_erp_flex_field_config====
@./init_data/init_data_guizhou/init_mip_erp_flex_field_config.sql;

prompt ====Create mip_srv_date_condition====
@./init_data/init_data_guizhou/init_mip_srv_date_condition.sql;

prompt ====Create mip_sys_user====
@./init_data/init_data_guizhou/init_mip_sys_user.sql;

prompt ====Create MIP_ROUTE_SRV_CONFIG====
@./init_data/init_data_guizhou/init_mip_route_srv_config.sql;

 

@./表示相对于打开的文件下面路径.

--init_mip_config.sql;

--MIP_CONFIG
DELETE FROM MIP_CONFIG;

INSERT INTO MIP_CONFIG (CONFIG_NAME, CONFIG_TYPE, CONFIG_VALUE)
VALUES ('AP_INV_SOURCE', 'VARCHAR2', 'AUTO INV');
 ...需要插入的数据的sql
COMMIT WORK;

 

 

--EIP_ADMIN_CreateTable.sql;

/*==============================================================*/
/* Database name:  MIP_ADMIN                                    */
/* DBMS name:      ORACLE Version 9i                            */
/* Created on:     2008-2-26 16:40:37                           */
/*==============================================================*/


@./tables/Full_Install/create_mip_config.sql;
@./tables/Full_Install/create_mip_eip_flex_field_map.sql;
@./tables/Full_Install/create_mip_erp_call_paramete.sql;
@./tables/Full_Install/create_mip_erp_flex_field_config.sql;
@./tables/Full_Install/create_mip_srv_date_condition.sql;
@./tables/Full_Install/create_mip_sys_user.sql;
@./tables/Full_Install/create_mip_route_srv_config.sql;
@./tables/Full_Install/create_MIP_CALLBACK_INFO.sql;

 

--create_mip_config.sql;

/*==============================================================*/
/* Table: MIP_CONFIG                                            */
/*==============================================================*/

 

drop table MIP_CONFIG cascade constraints
/

create table MIP_CONFIG  (
   CONFIG_NAME          VARCHAR2(60)                     not null,
   CONFIG_TYPE          VARCHAR2(8)                      not null,
   CONFIG_VALUE         VARCHAR2(2000)                   not null,
   constraint PK_MIP_CONFIG primary key (CONFIG_NAME)
)
/

 

直接按F8执行。

分享到:
评论
1 楼 hellas 2008-10-27  
用HOST命令不就行了,怎么会这么麻烦?

相关推荐

Global site tag (gtag.js) - Google Analytics