When you connect to a DBMS and you use the DBPROMPT= option in the LIBNAME statement, the DBPROMPT window opens when the libref is used for the first time. If the LIBNAME statement is running in a remote SAS session, the following error will appear:
ERROR: No terminal connected to the SAS session.
This problem occurs because there is no terminal connected to the SAS session because it is a remote session. Your only option is to specify the options in the LIBNAME statement and not use the DBPROMPT= option.