• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 102
  • Last Modified:

modify query on V$RMAN_BACKUP_JOB_DETAILS

Hello,

How can I modify the following query to add INSTANCE_NAME and HOST_NAME from v$instance

select
INPUT_TYPE,
STATUS,
START_TIME,
END_TIME
from
V$RMAN_BACKUP_JOB_DETAILS
order by STATUS

Thanks
0
bibi92
Asked:
bibi92
1 Solution
 
slightwv (䄆 Netminder) Commented:
Check out sys_context:
select
sys_context('USERENV','INSTANCE_NAME'),
sys_context('USERENV','SERVER_HOST'),
 INPUT_TYPE,
 STATUS,
 START_TIME,
 END_TIME
 from
 V$RMAN_BACKUP_JOB_DETAILS
 order by STATUS
/

Open in new window

0
 
Steve WalesSenior Database AdministratorCommented:
As an addendum to the above...

There's a whole bunch of stuff you can pull out of sys_context.

See the documentation: http://docs.oracle.com/database/121/SQLRF/functions198.htm#SQLRF06117
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now