首页 > 代码库 > oracle 数据库批处理文件
oracle 数据库批处理文件
文件夹结构
初始化脚本
|----orcl_sql |----init_user.sql |----tab_home.sql |----TAB_USER.sql |----init.bat
init.bat
@echo off @echo --------------------------------------------------------------------- @echo ^| ^| @echo ^| 路边停车系统远程初始化数据库脚本工具 ^| @echo ^| ^| @echo --------------------------------------------------------------------- @echo ^| if exist orcl_sql/parmeter.sql ( cd orcl_sql del -p parmeter.sql cd .. ) set ip=127.0.0.1 set port=1521 set sid=orcl set managerName=system set password=admin set newUserName=test set newUserPWD=test @echo ^| ip : 127.0.0.1 @echo ^| port : 1521 @echo ^| sid : orcl @echo ^| managerName : system @echo ^| password : admin @echo ^| newUserName : test @echo ^| newUserPWD : test rem set /p ip=^| ip : rem set /p port=^| port : rem set /p sid=^| sid : rem set /p managerName=^| managerName : rem set /p password=^| password : rem set /p newUserName=^| newUserName : rem set /p newUserPWD=^| newUserPWD : @echo define userName=%newUserName%> orcl_sql/parmeter.sql @echo define password=%newUserPWD%>> orcl_sql/parmeter.sql @echo @orcl_sql/init_user.sql>> orcl_sql/parmeter.sql if not exist C:\TABLESPACE ( md C:\TABLESPACE ) sqlplus %managerName%/%password%@%ip%:%port%/%sid% @orcl_sql/parmeter.sql if exist orcl_sql/parmeter.sql ( cd orcl_sql del -p parmeter.sql cd .. ) sqlplus %newUserName%/%newUserPWD%@%ip%:%port%/%sid% @orcl_sql/tab_home.sql @echo ^| @echo --------------------------------------------------------------------- @echo ^| ^| @echo ^| 路边停车系统远程初始化数据库脚本结束 ^| @echo ^| ^| @echo --------------------------------------------------------------------- pause
init_user.sql
CREATE TABLESPACE TABLESPANCE_PARK DATAFILE 'C:\TABLESPACE\PARK.DBF' SIZE 1000M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO; CREATE USER &userName IDENTIFIED BY &password DEFAULT TABLESPACE TABLESPANCE_PARK; GRANT CREATE TABLE,CREATE VIEW,CREATE TRIGGER, CREATE SEQUENCE,CREATE PROCEDURE TO &userName; GRANT UNLIMITED TABLESPACE TO &userName; GRANT CREATE SESSION TO &userName; grant select on v_$statname to &userName; grant select on v_$sesstat to &userName; grant select on v_$session to &userName; grant select on v_$mystat to &userName; EXIT;
</pre><strong><span style="font-size:24px"></span></strong><pre name="code" class="plain">
tab_home.sql
@orcl_sql/TAB_USER.sql @orcl_sql/TAB_ROLE.sql @orcl_sql/TAB_MENU.sql ..... .....
oracle 数据库批处理文件
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。