ora-cmd - Oracle interactive and batch query command-line tool »

Download ora-cmd Free Trial »

Run sql scripts from command or file

Run scripts from command

example:

ora-cmd > select * from media_messages;


Run scripts from file

In interactive mode:

ora-cmd>source #sqlfile#;

example:

ora-cmd > source e:\temp\tables\insert_data.sql


In batch mode:

ora-cmd dsn="username:password@host:port/dbname" task=source sqlfile=#sqlfile#

example:

ora-cmd dsn="pan:withdata@192.168.0.102::1521/test" task=source sqlfile=e:\temp\tables\insert_data.sql