我已经创建了这样的程序,这可以正常工作SYS
,SYSDBA
但是我想运行我新创建的用户帐户,DEMOUSER
请帮助我....
CREATE OR REPLACE PACKAGE E_Types as
PROCEDURE TestProc (p_recordset OUT SYS_REFCURSOR);
END E_Types;
/
CREATE OR REPLACE PACKAGE BODY E_Types IS
PROCEDURE TestProc (p_recordset OUT SYS_REFCURSOR) IS
BEGIN
OPEN p_recordset
FOR select a.TABLESPACE_NAME Tablespace
, round((1-((a.BYTES-nvl(b.BYTES,0))/a.BYTES))*100,2) Percentages
from (
select TABLESPACE_NAME
, sum(BYTES) BYTES
from sys.dba_data_files
group by TABLESPACE_NAME
) a
, (
select TABLESPACE_NAME
, sum(BYTES) BYTES
from sys.dba_free_space
group by TABLESPACE_NAME
) b where a.TABLESPACE_NAME = b.TABLESPACE_NAME (+)
order by ((a.BYTES-b.BYTES)/a.BYTES) desc
;
END;
END;
/