Home > database >  Oracle statements under Linux system according to the order batch execution.
Oracle statements under Linux system according to the order batch execution.

Time:10-13

Linux environment, how to implemented according to the order quantity the three statements (create table space, create a user authorization table space, to the user permissions) (need new 10 several users, table space), whether to write a. Sh file to how to write, a great god, please consult!

The create in tablespace a datafile '/home/data/a. d. bf'
The size 100 m reuse autoextend on next 100 m maxsize unlimited

The create user a identified by a default in tablespace a

Grant connect, the resource to the
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
The create in tablespace b datafile '/home/data/b.d bf'
The size 100 m reuse autoextend on next 100 m maxsize unlimited

The create user b identified by b default in tablespace b

Grant connect, the resource to b
------------------------------------------------------------------------------

CodePudding user response:

This class only needs to execute a statement, do not recommend using shell script to execute

#!/bin/bash
Up sqlplus -s system/mima @ sh & lt;
SQL statement

The exit
EOF

CodePudding user response:

reference 1st floor js14982 response:
this class only needs to execute a statement, do not recommend using shell script to execute

#!/bin/bash
Up sqlplus -s system/mima @ sh & lt;
SQL statement

The exit
EOF



Hello, if I log in PLSQL, above how to write several statements can batch according to the order,

CodePudding user response:

In PLSQL dev execution inside, as long as behind each statement with a semicolon; As the terminator,
The create in tablespace a datafile '/home/data/a. d. bf'
Size 100 m reuse autoextend on next 100 m maxsize unlimited;

The create user a identified by a default in tablespace a;

.
  • Related