30 July 2010

Parametrized view

Following is an example which shows use of parametrized view:

CREATE OR REPLACE VIEW test_vw AS
SELECT empno,ename,sal
FROM emp
WHERE empno = to_number(userenv('client_info')) ;

In Stored Procedure, will have to call following procedure before executing the View query, as in following example:

exec dbms_application_info.set_client_info(7934);

select * from test_vw ;

And the output is:

EMPNO ENAME SAL
---------- ---------- ----------
7934 MILLER 13040

05 July 2010

Installation Oracle 10g on Slackware 13.1 Linux

The reason for this actions could be an error has been gotten while installing Oracle on Slackware.
Error description: Failure OS verification
Action: create a file - /etc/redhat-release for OS verification and add something like "Red Hat Enterprise Linux AS release 3 (Taroon)".