grant dba,connect to %user%;---改为 grant dba,resource,connect to %user%;
解决方案 »
- 求高手看看啊 几个触发器
- 数据库的问题,在线等;
- Oracle plsql中tns plsql连接超时
- 写个存储过程中调用存储过程的例子????
- ORA-00907: 缺失右括号
- 请教一句sql,谢谢
- SQL执行效率怎么这么低
- 走过,路过,请帮小弟一把:关于数据库的备份问题再次请教??
- 基于web开发,大家都使用哪些Grid(web多行的输入)开发?来者有分!!
- ORA-12541:TNS no Listener 服务启动了,监听配置删除重新配置过,依然报错
- 在创建并启动ORACLE例程的时候出现:ORA-12638 身份证明检索失败
- oracle表空间TEMP01.DBF文件改小的问题,请高手指教阿!
REM # 变量初始化
REM #######################################################
echo off
set cou=db\create_oracle_user.sql
set SummaryLog=installAPP.log
set FromUser=zf
set WxFromUser=rgp
set up0=all.sql
set up1=3.00.031.sql
set up2=3.00.032.sql
set up3=3.00.033.sql
set up4=3.00.035.sql
set up5=3.00.036.sql
set up6=3.00.038.sql
set up7=3.00.041.sql
set up8=3.00.050.sql
if not exist %SummaryLog% goto start
del %SummaryLog%
REM #######################################################
REM # 显示程序头信息
REM #######################################################
:start
cls
echo.
echo.
echo *********************************************************
echo * *
echo * 浙江省经济户口综合管理-案件管理系统 *
echo * *
echo * 数据库管理程序 V2.1 *
echo * *
echo * *
echo * 开发单位: 杭州中软安人网络通信有限公司 *
echo * 发布日期: 2004年09月20日 *
echo * *
echo *********************************************************
echo.
echo.
REM #######################################################
REM # 取得待创建或连接的用户名、口令、数据库服务名
REM #######################################################
call LogEvent GetInput user "请输入待创建或连接的数据库用户名:[例如:user]" "%TMP%\getApp.bat"
call LogEvent GetInput pwd "请输入待创建或连接的数据库用户口令:[例如:password]" "%TMP%\getApp.bat"
call LogEvent GetInput server "请输入ORACLE数据库服务名:[例如:ora81]" "%TMP%\getApp.bat"
REM #######################################################
REM # 让用户选择是新建还是升级数据库
REM #######################################################
:step1
set title=新建数据库请选[1],升级数据库请选[2]
call LogEvent GetInput Input "%title% [1 Or 2]?" "%TMP%\zzz.bat"
if /I (%Input%) == (1) goto create1
if /I (%Input%) == (2) goto upgrade
call LogEvent ECHO 您的选择不正确,请选择[1]或[2]来执行相应的操作!
goto step1
REM #######################################################
REM # 新建情况下让待创建到的表空间名
REM #######################################################
:create1
set title=生成ORACLE数据库的用户与口令
echo.
call LogEvent GetInput tablespace "请输入待创建用户所属的表空间名称:[例如:users]" "%TMP%\getApp.bat"
call LogEvent GetInput YorN "%title%吗 (yes/no)?" "%TMP%\zzz.bat"
if not exist %cou% goto create2
del %cou%REM #######################################################
REM # 在指定表空间中创建用户名
REM #######################################################
:create2
if /I (%YorN%) == (no) goto create3
echo 正在创建用户...
echo create user %user% identified by %pwd% default tablespace %tablespace%; >>%cou%:create3
echo grant dba,connect to %user%; >>%cou%
echo REVOKE UNLIMITED TABLESPACE FROM %user%; >>%cou%
echo ALTER USER %user% QUOTA 0 ON users; >>%cou%
echo ALTER USER %user% DEFAULT TABLESPACE %tablespace%; >>%cou%
echo ALTER USER %user% QUOTA UNLIMITED ON %tablespace%; >>%cou%
echo exit; >>%cou%
echo.
echo 正在转换表空间...
call LogEvent sqlplus system/manager@%server% @db\create_oracle_user.sql:create9
echo.
echo 正在创建数据库的数据对象...
imp %user%/%pwd%@%server% fromuser=%FromUser% touser=%user% file=db\ZF20040717.dmp
echo.
echo 正在初始化数据库...
call LogEvent sqlplus %user%/%pwd%@%server% @db\init.sql
goto endREM #######################################################
REM # 数据库升级部分
REM #######################################################
:upgrade
echo.
call LogEvent echo 注意:
call LogEvent echo 以下是“案件管理系统”最近8个版本的数据库升级文件,在非完全升级的情况升级时,
call LogEvent echo 一定要一个一个版本的升级,不能跳跃式的升级,否则将不能保证升级成功!
echo.
call LogEvent echo 另:有时候程序版本对应的数据库升级版本会不存在(即这个程序版本没有数据库方
call LogEvent echo 面的改动),这种情况下程序版本号将不出现在下面的列表中!echo.
call LogEvent echo [1] %up1% [2] %up2% [3] %up3% [4] %up4%
call LogEvent echo [5] %up5% [6] %up6% [7] %up7% [8] %up8%
call LogEvent echo [0] 完全升级 [9] 退出升级
set title=根据您的需要,请选择您所需要升级版本的对应号码! [0~9]
call LogEvent GetInput Input "%title% " "%TMP%\zzz.bat"
if /I (%Input%) == (0) goto u_step0
if /I (%Input%) == (1) goto u_step1
if /I (%Input%) == (2) goto u_step2
if /I (%Input%) == (3) goto u_step3
if /I (%Input%) == (4) goto u_step4
if /I (%Input%) == (5) goto u_step5
if /I (%Input%) == (6) goto u_step6
if /I (%Input%) == (7) goto u_step7
if /I (%Input%) == (8) goto u_step8
if /I (%Input%) == (9) goto u_step9
call LogEvent ECHO 您的选择不正确,请选择[0]~[9]来执行相应的操作!
goto upgrade:u_step0
if not exist db\%up0% goto notfile
call LogEvent sqlplus %user%/%pwd%@%server% @db\%up0%
goto upgrade:u_step1
if not exist db\%up1% goto notfile
call LogEvent sqlplus %user%/%pwd%@%server% @db\%up1%
goto upgrade:u_step2
if not exist db\%up2% goto notfile
call LogEvent sqlplus %user%/%pwd%@%server% @db\%up2%
goto upgrade:u_step3
if not exist db\%up3% goto notfile
call LogEvent sqlplus %user%/%pwd%@%server% @db\%up3%
goto upgrade:u_step4
if not exist db\%up4% goto notfile
call LogEvent sqlplus %user%/%pwd%@%server% @db\%up4%
goto upgrade:u_step5
if not exist db\%up5% goto notfile
call LogEvent sqlplus %user%/%pwd%@%server% @db\%up5%
goto upgrade:u_step6
if not exist db\%up6% goto notfile
call LogEvent sqlplus %user%/%pwd%@%server% @db\%up6%
goto upgrade:u_step7
if not exist db\%up7% goto notfile
call LogEvent sqlplus %user%/%pwd%@%server% @db\%up7%
goto upgrade:u_step8
if not exist db\%up8% goto notfile
call LogEvent sqlplus %user%/%pwd%@%server% @db\%up8%
goto upgrade:u_step9
goto end:notfile
echo.
call LogEvent BlankLine db目录下不存在指定版本的数据库升级文件!
echo.
goto upgrade:end
echo.
call LogEvent echo 数据库创建/升级完成,请查看日志文件installAPP.log!
Pause
echo on
Call LogEvent echo %msg%
Call LogEvent exit