分两步
1。建立bat文件,内容如下:
@echo off
title 代开系统数据库搭建
sqlplus system/systemmanager@oracle @createCompareDB.sql
pause
2。建立sql文件,内容如下:
DROP USER NXCOMPARE CASCADE;
/
DROP TABLESPACE COMPARE INCLUDING CONTENTS AND DATAFILES;
/
COMMIT;
CREATE TABLESPACE "COMPARE"
LOGGING
DATAFILE 'D:\ORACLE\ORADATA\ORACLE\COMPARE.ora' SIZE
512M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
/
CREATE USER "NXCOMPARE" PROFILE "DEFAULT"
IDENTIFIED BY "64compare" DEFAULT TABLESPACE "COMPARE"
TEMPORARY TABLESPACE "TEMP"
QUOTA UNLIMITED
ON "COMPARE"
ACCOUNT UNLOCK
/
GRANT "CONNECT" TO "NXCOMPARE"
/
--用户表==================================================
create table NXCOMPARE.USERS(
userID varchar2(10) ,
userName varchar2(50),
password varchar2(20),
purview varchar2(5),
userCode varchar2(20),
step char(1),
dk_pc_ip varchar2(20),
creator varchar2(10),
creatDate timestamp,
updater varchar2(10),
updateDate timestamp,
primary key (userID)
)
/
posted on 2011-09-14 16:28
kxbin 阅读(1376)
评论(0) 编辑 收藏 所属分类:
ORACLE