在PL/SQL中,你可以使用以下語句來查看數據庫連接信息:
SELECT USER FROM DUAL;
SELECT INSTANCE_NAME FROM V$INSTANCE;
SELECT VERSION FROM V$INSTANCE;
SELECT SYS_CONTEXT('USERENV', 'SID') FROM DUAL;
SELECT SYS_CONTEXT('USERENV', 'IP_ADDRESS') FROM DUAL;
SELECT SYS_CONTEXT('USERENV', 'HOST') FROM DUAL;
SELECT SYS_CONTEXT('USERENV', 'CLIENT_INFO') FROM DUAL;
請注意,這些語句需要在PL/SQL中執行,并且返回的結果取決于當前連接的會話。