Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Miscellaneous > Problem with a ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 9 Topic 6820 of 6998
Post > Topic >>

Problem with a procedure

by mowinom@[EMAIL PROTECTED] Apr 8, 2008 at 09:26 AM

Hi all,

I have two tables; vpd_tabell_v and USER_POLICIES.

vpd_tabell_v contains all the table names that we plan to secure with
VPD while the table USER_POLICIES has all the tables that have already
been secured with VPD. What I am trying to do is find out in
vpd_tabell_v which tables have not been secured yet then print them
out.

I've written the procedure below to assist in achieving this. It
compiles fine but when I run it, it does not supply the desired
result. Any help is greatly appreciated.

--
Mark


CREATE OR REPLACE PROCEDURE p_add_vpd_34
IS
   CURSOR kk
   IS
     SELECT object_name FROM  USER_POLICIES;
   ka              kk%ROWTYPE;
BEGIN
   OPEN kk;
   LOOP
      FETCH kk
       INTO ka;
for x in ( SELECT table_name FROM vpd_tabell_v ) loop
         IF x.table_name NOT IN (ka.object_name)
         THEN
            DBMS_OUTPUT.put_line ('Table name: '||x.table_name);
         END IF;
	End loop;
         EXIT WHEN kk%NOTFOUND;
     END LOOP;
     CLOSE kk;
END;


SQL> exec p_add_vpd_34
Table name: Person
Table name: Dept
Table name: Section
Table name: Location
Table name: Hr
Table name: Deployment

....
....

Table name: Salaries

BEGIN p_add_vpd_34; END;

*
Error on line 1 1:
ORA-20000: ORU-10027: buffer overflow, limit of 2000 bytes
ORA-06512: at "SYS.DBMS_OUTPUT", line 32
ORA-06512: at "SYS.DBMS_OUTPUT", line 97
ORA-06512: at "SYS.DBMS_OUTPUT", line 112
ORA-06512: at "P_ADD_VPD_34", line 16
ORA-06512: at line 1
 




 9 Posts in Topic:
Problem with a procedure
mowinom@[EMAIL PROTECTED]  2008-04-08 09:26:45 
Re: Problem with a procedure
"fitzjarrell@[EMAIL   2008-04-08 10:06:43 
Re: Problem with a procedure
Ed Prochak <edprochak@  2008-04-08 11:53:16 
Re: Problem with a procedure
mowinom@[EMAIL PROTECTED]  2008-04-09 00:41:14 
Re: Problem with a procedure
Frank van Bortel <fran  2008-04-09 13:32:43 
Re: Problem with a procedure
mowinom@[EMAIL PROTECTED]  2008-04-09 06:11:19 
Re: Problem with a procedure
Ed Prochak <edprochak@  2008-04-09 06:49:41 
Re: Problem with a procedure
mowinom@[EMAIL PROTECTED]  2008-04-09 07:11:49 
Re: Problem with a procedure
mowinom@[EMAIL PROTECTED]  2008-04-09 07:15:18 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Wed Jul 9 1:08:44 CDT 2008.