Oracle Database batch processing files and oracle Database Batch Processing

Source: Internet
Author: User

Oracle Database batch processing files and oracle Database Batch Processing

Directory structure

Initialization Script
 |----orcl_sql|----init_user.sql|----tab_home.sql        |----TAB_USER.sql |----init.bat


Init. bat

@ Echo off @ echo success @ echo ^ | database script tool remotely initialized by the roadside parking system ^ | @ echo success @ echo ^ | if exist orcl_ SQL/parmeter. SQL (cd orcl_sqldel-p parmeter. sqlcd ..) set ip = 127.0.0.1set port = 1521 set sid = orclset managerName = systemset password = adminset newUserName = testset 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: testrem 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. sqlif not exist C: \ TABLESPACE (md C: \ TABLESPACE) sqlplus % managerName %/% password % @ % ip %: % port %/% sid % @ orcl_ SQL/parmeter. sqlif exist orcl_ SQL/parmeter. SQL (cd orcl_sqldel-p parmeter. sqlcd ..) sqlplus % newUserName %/% newUserPWD % @ % ip %: % port %/% sid % @ orcl_ SQL/tab_home. SQL @ echo ^ | The End Of The remote database initialization script of the roadside parking system | @ 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..........



Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.