IT_ETL
asked on
Run master SQL scripts in UNIX environment
I got two create table scripts. I will combine the create table scripts below and create a master script (master_script.sql). The database server is in UNIX. So, the master script needs to run at the UNIX command prompt and at the end of run both of these tables will be created in database under schema name "TEST".
Do I need to write a shell script in oreder to execute this master_script.sql? Is there another option. Please provide an example.......
CREATE TABLE TEST.TABLE_A
(
LOGIN_ID NUMBER(9),
PASSWORD VARCHAR2(8),
CREATE_DATE DATE
);
CREATE TABLE TEST.TABLE_B
(
MEMBER_ID NUMBER(9),
MEMBER_STATUS VARCHAR2(2 BYTE),
CHANGE_METHOD_CODE VARCHAR2(5 BYTE)
);
Do I need to write a shell script in oreder to execute this master_script.sql? Is there another option. Please provide an example.......
CREATE TABLE TEST.TABLE_A
(
LOGIN_ID NUMBER(9),
PASSWORD VARCHAR2(8),
CREATE_DATE DATE
);
CREATE TABLE TEST.TABLE_B
(
MEMBER_ID NUMBER(9),
MEMBER_STATUS VARCHAR2(2 BYTE),
CHANGE_METHOD_CODE VARCHAR2(5 BYTE)
);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
So let's try this:
You need to connect to the database somehow to execute those commands.
Typically you do this with SQL*Plus. On UNIX you can do a quick 'here' script and don't even need the master SQL file:
Open in new window