Question : PrivateDisk volume for Client Security Solution 8.21 on ThinkPad

It seems that Client Security Solution 8.21 don't support PrivateDisk volumes. Is there any work around solution to create a private secured volumes on ThinkPad laptop ?

THanks

Answer : PrivateDisk volume for Client Security Solution 8.21 on ThinkPad

Your code is OK, but I would recommend some changes:

There is no need of doing this:
select <ORA-00001 msg resulted from the duplicate insert above> into ERR_MSG from dual;
The error is in these variables:SQLCODE and SQLERRM, so

EXCEPTION
   WHEN DUP_VAL_ON_INDEX THEN  -- handles duplicate records error

       GrabErr(SCRT_NAME, SQLCODE||' '||SQLERRM);
      ROLLBACK;   -- I have added this because in a procedure GrabErr there ought to be AUTONOMOUS TRANSACTION

   WHEN OTHERS THEN  -- handles all other errors
       
       GrabErr(SCRT_NAME, SQLCODE||' '||SQLERRM);
   
       ROLLBACK;
END;

In the procedure GrabErr use AUTONOMOUS TRANSACTION.
You can also define your own application errors.
Here is more about exception handling:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/errors.htm#i7014

If you want to know the line where error occurs then add a variable e.g. n_debug:

DECLARE
SCRT_NAME       VARCHAR2(400) := 'InsRecOnMytable.sql';
    n_debug  PLS_INTEGER:=0;

BEGIN
    n_debug :=1;
  Insert into myschema.mytable (SCHEMA,NAME,REMARK,ORACLE_TYPE,FUNCTIONAL_TYPE,OWNER,DETAIL_OWNER,IS_DYNAMIC,DISPLAY_NAME,ENTITY_NAME)
     values ('myschema','mytable',' sample table 1','TABLE','BASIC','PRODUCT','PRODUCT',0,'Sample 1',null);

    n_debug :=2;

  Insert into myschema.mytable (SCHEMA,NAME,REMARK,ORACLE_TYPE,FUNCTIONAL_TYPE,OWNER,DETAIL_OWNER,IS_DYNAMIC,DISPLAY_NAME,ENTITY_NAME)
     values ('myschema','mytable',' sample table 2','TABLE','BASIC1','PRODUCT1','PRODUCT1',1,'Sample 2',null);

    n_debug :=3;
  commit;

 
  GrabErr(n_debug,SCRT_NAME, 'Success');

END IF;

EXCEPTION
        GrabErr(n_debug,SCRT_NAME, SQLCODE||' '||SQLERRM);
       ROLLBACK;

   WHEN OTHERS THEN  -- handles all other errors
       
       GrabErr(n_debug,SCRT_NAME, SQLCODE||' '||SQLERRM);
   
       ROLLBACK;
END;

I do it this way. You can also create a procedure with input parameter SCRT_NAME and instead of script you can use the procedure.

I hope this will be a little help for you.
Random Solutions  
 
programming4us programming4us