How to use ${PROMPT:NomeBase} in a Command-line Script sent to an SSH session?
Hello,
I’m trying to create a Command-line Script in Remote Desktop Manager that asks the user for a value using ${PROMPT:NomeBase} and then sends an expdp command to an active SSH session.
The final goal is to type a base name only once, and use it in all parameters of the export command.
Here is the command I want to run:
expdp directory=bkp \
dumpfile=${PROMPT:NomeBase}.dmp \
logfile=${PROMPT:NomeBase}_expdb.log \
JOB_NAME=${PROMPT:NomeBase} \
schemas=${PROMPT:NomeBase} \
EXCLUDE=TABLE_STATISTICS consistent=y
My doubt is:
Where exactly should I configure this command inside the Command-line entry so that ${PROMPT:NomeBase} works and the final command is properly sent to the SSH terminal?
I’m unsure whether I should use:
I also noticed that the Parameters tab with {1} {2} {3} inputs does not seem to apply to this case.
I have tried several combinations but the prompt is not triggering, or the command is not being sent correctly to SSH.
I’m attaching screenshots from the General, Parameters, and Advanced tabs for clarity.
Could you please guide me on the correct configuration for this scenario?
Thank you!
Hello albertopereira,
Thank you for reaching out to the Devolutions support team.
From what I understand, you can do it with the Terminal command entry.
In this entry, you can configure your script in a single line like this:
expdp directory=bkp dumpfile=${PROMPT:NomeBase}.dmp logfile=${PROMPT:NomeBase}_expdb.log JOB_NAME=${PROMPT:NomeBase} schemas=${PROMPT:NomeBase} EXCLUDE=TABLE_STATISTICS consistent=y
In the Event of your SSH session -> After opening, you can select this script to be run automatically when you launch the session.
https://docs.devolutions.net/rdm/kb/how-to-articles/entry-types-events-settings/#after-open
Best regards,
Patrick Ouimet