Hello, guys and friends
I run this SQL on my Oracle Database Server 11.2.0.4.0 on SQL*Plus utility,
SET ECHO ON
SET HEADING ON
SET FEEDBACK ON
SET VERIFY ON
SET LINESIZE 250
SET PAGESIZE 250
SELECT
(SELECT host_name FROM v$instance)
|| ', ' ||
(SELECT value FROM v$parameter WHERE name = 'db_unique_name')
|| ', ' ||
(SELECT
start_time || ', ' ||
end_time || ', ' ||
output_device_type || ', ' ||
status || ', ' ||
input_type || ', ' ||
ltrim(input_bytes_display) || ', ' ||
ltrim(output_bytes_display) || ', ' ||
ltrim(input_bytes_per_sec_display) || ', ' ||
ltrim(output_bytes_per_sec_display) || ', ' ||
time_taken_display
FROM v$rman_backup_job_details
WHERE output_device_type = 'DISK'
-- AND To_Char(start_time,'dd-mm-yy') = To_Char(sysdate - 1,'dd-mm-yy')
)
FROM dual
/
ERROR at line 6:
ORA-01427: single-row subquery returns more than one row
This error ORA-01247 indicates that the 3rd SELECT statement for v$rman_backup_job_details should return the value of more than one row.
If I use PL/SQL how to implement this function/requirement? Thanks in advance.
Best Regards
Quanwen Zhao