Toad World® Forums

Is it able to launch Toad for DB2 4.7 and make connection to designated database from DOS command line?


#1
  • Version: Toad for DB2 4.7 on Win 10, DB2 Server on AIX ,

  • Purpose: We are implementing PAM (Privilege Account Management ) so the goal is to launch Toad for DB2 4.7 and make connection to designated database with all the credentials been provided by PAM, no entry required for operators.

  • What have tried: Searched on internet and all information I got are for Toad for Oracle, and it seems many people are using that way:
    Toad.exe -c $Username/$Password@$Database or
    Toad.exe connect=$Username/$Password@$Database
    ($parameters will be substituted by PAM)

  • when using above commands in DOS command line with real credentials the Toad for DB2 just started with an empty editor window and no connection was made, and no error message.

So I wonder if launch a connection by command line is feasible for Toad for DB2?


#2

BTW,
arguments like:

Toad.exe -c Username/Password@Server:Port/Database

has also been tried in command line with real user credentials and database parameters.


#3

Hello,

Toad for DB2 version 4.7 is not supported on Windows 10. Also, this version is no longer supported. I am not sure if this is possible in version 4.7, but in the current version, there is following procedure.

You can use the command line to start Toad for IBM DB2 and automatically open a connection. You must first create a .tcs file that contains the connection information. Then you can use the command line to start Toad and call this .tcs file to provide the connection information and encrypted password.

To create a .tcs file containing connection information

  1. Open the connection in Toad and ensure the connection is selected in the connection drop-down list in the Connection/Navigation Manager.
  2. Click on the Navigation/Connection Manager pane to ensure it is the active window.
  3. Then select File | Save File As.
  4. In the Save As dialog, select a location and enter a name for the .tcs file.
  5. Click Save As. This action creates a .tcs file containing the connection information for the active connection. The saved password is encrypted in the .tcs file.

To use the command line to start Toad with a connection open

  1. Open the Command Prompt window.
  2. Enter the following to start Toad and call the .tcs file you created in the previous procedure.

\toad.exe <.tcs file path>\MyConn.tcs

For example: C:\Program Files (x86)\Quest Software\Toad for IBM DB2\toad.exe C:temp\MyConn.tcs

Regards

Ondrej


#4

You could also use the ‘connect on startup’ option within your connection profile properties as shown below: