Previous Topic

Next Topic

Book Contents

Book Index

Scripting - Use Function

This function is only used when you are running AQT in batch mode. It cannot be used in interactive AQT. It specifies the name of the database to use for subsequent SQL statements. This is only necessary if you are connected to more than one database.

The Use function takes one parameter:

Example

This batch script connects to two databases and runs queries against both:

--aqt connect,user=ora_sample,user=system,epwd=JkAlDkElDkBaBkHjHjEkEkGg

--aqt connect,user=sample

--aqt output,file=output.txt,type=csv,filemode=replace

select * from db2admin.employee;

--aqt use,dbs=ora_sample,batchonly=yes

--aqt output,file=output2.txt,type=csv,filemode=replace

select * from scott.emp;