Cli commands to start database proxy sessions

In order to start database sessions through CLI instead of dbeaver or other GUI programs, the following connection strings can be used:

  • SQL SERVER:

Use the tsql command line utility like in the following example:

tsql -vvv -H [segura_ip] -p 1433 -U "segura_credential@device_ip{sqlserver_port}"


  • Postgresql:

psql -h [segura_ip] -p 5432 -U "segura_username[segura_credential@device_ip{postgre_port}]" -d database_name


  • Oracle:

Example:
sqlplus /@mt4adm1

sqlplus /@mt4adm2

In the oracle example above, the TNS_ADMIN is set and the tnsnames.ora looks similar to the following text:

mt4adm1=
        (DESCRIPTION=
                (ADDRESS=
                        (PROTOCOL=TCPS)
                        (HOST=10.66.34.13)
                        (PORT=2484)
                )
                (CONNECT_DATA=
                        (SENHASEGURA=
                                (USERNAME=dmartijena)
                                (CREDENTIAL=mt4adm)
                                (DEVICE=10.66.34.44)
                                (PORT=2484)
                                (TOTP=000000))
                (SERVER=DEDICATED)
                (SERVICE_NAME=ORCLPDB)
                )
                (SECURITY =
                        (MY_WALLET_DIRECTORY="/home/oracle/dmartijena-wallet")
                )

        )
mt4adm2=
        (DESCRIPTION=
                (ADDRESS=
                        (PROTOCOL=TCPS)
                        (HOST=10.66.34.13)
                        (PORT=2484)
                )
                (CONNECT_DATA=
                        (SENHASEGURA=
                                (USERNAME=dmartijena)
                                (CREDENTIAL=mt4adm)
                                (DEVICE=10.66.34.44)
                                (PORT=2484)
                                (TOTP=000000))
                (SERVER=DEDICATED)
                (SERVICE_NAME=ORCLPDB)
                )
                (SECURITY =
                        (MY_WALLET_DIRECTORY="/home/oracle/dmartijena-wallet")
                )

        )
1 Like