Home » Infrastructure » Unix » Unix shell scripts
Unix shell scripts [message #97984] Wed, 27 August 2003 03:28 Go to next message
Shrikanth
Messages: 16
Registered: April 2002
Junior Member
Hello,

Need a small favour guys.. I need a small shell scripts which will invoke oracle Loader in it. i wanted to use loader from shell scripts and execute and insert records into table..

Please provide me a small shell scripts to do so..

thanks in advance..

regards

shrikanth.R
Re: Unix shell scripts [message #97987 is a reply to message #97984] Wed, 27 August 2003 08:19 Go to previous messageGo to next message
Nitin
Messages: 35
Registered: July 1999
Member
# Datebase Part
# It will connect to the oracle instance e.g. dev123
inst instancename
#It will open sqlplus & connect to the databse

sqlplus -s username/password <<EOF
# then u can issue u r select,insert statment...

Insert into TABLE_NAME
(COLUMN1,COLUMN2,COLUMN3) values ('1234','abc','asd');

commit;
exit
EOF
Re: Unix shell scripts [message #97988 is a reply to message #97987] Wed, 27 August 2003 09:25 Go to previous message
Michele
Messages: 77
Registered: December 2000
Member
Hi,

you can also use sql loader to load text files into your table. You would need to navigate to your bin directory in the oracle home directory to launch sqlldr.

ie: on the command line, you would type

$ORACLE_HOME/bin/sqlldr username/password@service_name control=name.ctl log=name.log data=filename.txt

the control and data files will exist in the home directory of the logged in user..

Hope that Helps
Previous Topic: backup+recovery on different architecture
Next Topic: installing 9i on AIX 4.3.3 troubles at the begining !!
Goto Forum:
  


Current Time: Wed Sep 23 12:21:23 CDT 2020