Skip to main content
added 192 characters in body
Source Link
Philᵀᴹ
  • 31.9k
  • 10
  • 84
  • 108

The answer is very simple. The ! prefix in sqlplus executes the following text as a command in the local shell.

In your case it's executing the Unix hostname command locally.

Query v$instance to check the name of the machine you're connected to.

There are ways to execute local Unix commands via the database, but it's seen as a huge security hole, so I won't document them here.

ssh (assuming Unix) into the database host instead.

The answer is very simple. The ! prefix in sqlplus executes the following text as a command in the local shell.

In your case it's executing the Unix hostname command locally.

Query v$instance to check the name of the machine you're connected to.

The answer is very simple. The ! prefix in sqlplus executes the following text as a command in the local shell.

In your case it's executing the Unix hostname command locally.

Query v$instance to check the name of the machine you're connected to.

There are ways to execute local Unix commands via the database, but it's seen as a huge security hole, so I won't document them here.

ssh (assuming Unix) into the database host instead.

Source Link
Philᵀᴹ
  • 31.9k
  • 10
  • 84
  • 108

The answer is very simple. The ! prefix in sqlplus executes the following text as a command in the local shell.

In your case it's executing the Unix hostname command locally.

Query v$instance to check the name of the machine you're connected to.