I've read this page:
Toad TSR, Best Tip Ever?? (toadworld.com)
it say that: Toad Script Runner is a small script execution utility that can run in the background or from the command line.
But I haven't find a way to call it from a command line.
I would like to do something like that form powershell.
TSR installpackage.sql
It's all detailed here in Toad Help
I'm not sure that I understand this documentation.
it say that : Use the Command Line with TSR
-c "user/pwd@mydb" -f "c:\myfile.sql" -h "MyOracleHome" -n
It look like the arguments after a command.
I've in powershell
TSR -c "user/pwd@mydb" -f "c:\myfile.sql" -h "MyOracleHome" -n
it failed.
i've tried that too:
-c "user/pwd@mydb" -f "c:\myfile.sql" -h "MyOracleHome" -n
it failed.
I've searched how to install TSR command in powershell but I've found nothing
see screen shots. Use QSR if you want a GUI. Use TSR if you want command line, like SQL*Plus.
Notes:
- the Oracle Home part of it is optional.
- I am in the same folder as qsr.exe (or tsr.exe), otherwise I would have specified the full path to those files.
- Double-quotes are optional if your paths don't contain any spaces
Thanks it's what I needed
1 Like
I've tried to run TSR in the same directory as in the example it works.
Now I try to run TSR outside this directory.
It doesn't work. I've added the directory name in the path.
I can run the command TSR but it fails because the dll (QSE.dll) isn't found.
I've asked in stackoverflow :
powershell - How to call an executable with Dll from a directory without this dll - Stack Overflow
Somebody in a comment say that it the dll is in the same directory that directory added to the path, it should work.
But it doesn't work.
Do you have this problem when you try to execute TSR outside its directory?
I can reproduce that and it seems like a bug in TSR. I will investigate that.
I can get QSR to work this way:
"C:\Program Files\Quest Software\Toad for Oracle 16.2\qsr.exe" -c "jdorlon/jdorlon@azure_19c_plug" -f "c:\temp\test.sql" -o "c:\temp\output.txt" -e
in my example, -o specifies the output file name and -e tells it to run w/o showing the gui and to exit when done.