现在我有一个数据库的脚本,存成txt文件(代码比较多,几百行,主要是建表空间,表,视图什么的),我想在SQL*PLUS中把他执行完成。请问各位如何实现
简单基本如下:
-----------------------------------------------------
-- Export file for user DBUSRHQ --
-- Created by Administrator on 2009-8-28, 22:25:57 --
-----------------------------------------------------spool dbusrhq.logprompt
prompt Creating table BAS_BILLDEFAULT
prompt ==============================
prompt
create table DBUSRHQ.BAS_BILLDEFAULT
(
BILLID VARCHAR2(12) not null,
EMPLNO VARCHAR2(8) not null,
BILLCLASS VARCHAR2(12) not null
)
tablespace DATA_SPC
pctfree 30
initrans 1
maxtrans 255
storage
(
initial 512K
minextents 1
maxextents unlimited
);
简单基本如下:
-----------------------------------------------------
-- Export file for user DBUSRHQ --
-- Created by Administrator on 2009-8-28, 22:25:57 --
-----------------------------------------------------spool dbusrhq.logprompt
prompt Creating table BAS_BILLDEFAULT
prompt ==============================
prompt
create table DBUSRHQ.BAS_BILLDEFAULT
(
BILLID VARCHAR2(12) not null,
EMPLNO VARCHAR2(8) not null,
BILLCLASS VARCHAR2(12) not null
)
tablespace DATA_SPC
pctfree 30
initrans 1
maxtrans 255
storage
(
initial 512K
minextents 1
maxextents unlimited
);
或者 @脚本路径+名字
我是这样写的
sql>start c:\dbusrhq\dbusrhq.txt
没有任何反应,我用的是Oracle Database 10g Express Edition 的SQL 工具