Sql Explorer Sql Command End Of Statement

Razack

New Member
Sqlexp doesn't recognize multiple sql commands with ";" .


For e.g

sqlexp -db Dbname -S 1030 -char -command "CREATE USER 'dummy', '123456'"

Works......

sqlexp -db Dbname -S 1030 -char -command "CREATE USER 'dummy', '123456'; grant DBA to dummy; commit;"


Doesn't work
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
You can run SQL Explorer without SQL statements and get to an interactive prompt where you can issue multiple statements. Alternatively, you can put your SQL statements into a SQL script file and pass it as input.

E.g.:
sqlexp -db <dbname> -S <SQL broker port no> -user <username> -pass <password> -infile myscript.sql -outfile myscript.out
 

Razack

New Member
Giving the sql statement in the file(myscript.sql) works. The reason I was trying to make this in the command line statement is to keep the complete sqlexp statement in a script and to give the user id as an argument to the script(.bat/shell).Any ideas?
 
Last edited:
Top