Re: v$abc.. table names - nightmare
From: Sybrand Bakker <sybrandb_at_gmail.com>
Date: Mon, 16 May 2011 23:25:07 +0200
Message-ID: <6953t61p9qk9e80pso0q4r9qv7ra8q48lm_at_4ax.com>
On Mon, 16 May 2011 10:55:24 -0700 (PDT), neilsolent <n_at_solenttechnology.co.uk> wrote:
Sybrand Bakker
Senior Oracle DBA Received on Mon May 16 2011 - 16:25:07 CDT
Date: Mon, 16 May 2011 23:25:07 +0200
Message-ID: <6953t61p9qk9e80pso0q4r9qv7ra8q48lm_at_4ax.com>
On Mon, 16 May 2011 10:55:24 -0700 (PDT), neilsolent <n_at_solenttechnology.co.uk> wrote:
>Why oh why did Oracle decide to make table names with special symobols
>in them, like v$database?
>This makes it a nightmare in shell scripts wrapping sqlplus for
>example!
>Try writing a shell script that su's to oracle and executes sqlplus to
>get data from v$database..
>Is there any workaround to avoid the dollars, such as aliases?
>
>thanks,
>Neil
Many attributes of v$database, which is for privileged users, are
available unprivileged via sys_context('userenv','<attribute>')
for instance 'db_name".
Usually to know that some manual reading is required. Most people
don't read documentation, and this results in unjustified rants like
you posted above.
Sybrand Bakker
Senior Oracle DBA Received on Mon May 16 2011 - 16:25:07 CDT