TheTwoArmedMan
TheTwoArmedMan

Reputation: 135

Getting A Connection String From An Existing Connection

I have an Oracle database installed on my computer, and I can connect to it with both Oracle Developer and SQL*Plus. Using either of these tools, is there any way to determine the connection string used for the existing connection?

Upvotes: 0

Views: 1017

Answers (1)

Andrew Sayer
Andrew Sayer

Reputation: 2336

In sql*plus, it stores the safe things (not the password) in _USER, _CONNECT_IDENTIFIER and _PRIVILEGE defined variables. By default, you can access them like:

prompt &_USER.@&_CONNECT_IDENTIFIER &_PRIVILEGE

Upvotes: 1

Related Questions