Re: How can I identify the database

  • From: Jared Still <jkstill@xxxxxxxxx>
  • To: Eriovaldo Andrietta <ecandrietta@xxxxxxxxx>
  • Date: Mon, 28 Sep 2009 09:09:55 -0700

Thanks for sharing your solution.
I would like to take the opportunity that the code presented
will ignore all errors that are not ORA-00439.

This may not be what you want or intended.  Here's an
example of the code modified to raise errors other than
ora-439.

There may be other optimizations available to you,
but it is difficult to make other recommendations without
being familiar with how the code is used in the installer.

DECLARE
  v_success BOOLEAN;
  e_bitmap_not_enabled exception;
  pragma exception_init (e_bitmap_not_enabled, -439);
BEGIN
  v_success := TRUE;
  BEGIN
    EXECUTE IMMEDIATE 'CREATE BITMAP INDEX idx_f1 ON PODEAPAGAR(COLUNA1)
TABLESPACE tbsind';
  EXCEPTION
    WHEN e_bitmap_not_enabled THEN
        v_success := FALSE;
        DBMS_OUTPUT.PUT_LINE(SQLERRM);
        DBMS_OUTPUT.PUT_LINE('Resource not available');
      END IF;
    WHEN  OTHERS THEN RAISE;
  END;
  IF NOT v_success THEN
    EXECUTE IMMEDIATE 'CREATE INDEX idx_lot_f1 ON PODEAPAGAR(COLUNA1)
TABLESPACE tbsind';
  ELSE
    DBMS_OUTPUT.PUT_LINE('BITMAP index successfuly created');
  END IF;
END;


Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
Oracle Blog: http://jkstill.blogspot.com
Home Page: http://jaredstill.com


On Fri, Sep 25, 2009 at 11:48 AM, Eriovaldo Andrietta <ecandrietta@xxxxxxxxx
> wrote:

> Friends,
>
>  Here is the script that I did.
>  This will solve my issue. I hope that it can help someone in the future.
> :)
>
>
> DECLARE
>   v_success BOOLEAN;
> BEGIN
>   v_success := TRUE;
>   BEGIN
>     EXECUTE IMMEDIATE 'CREATE BITMAP INDEX idx_f1 ON PODEAPAGAR(COLUNA1)
> TABLESPACE tbsind';
>   EXCEPTION
>     WHEN OTHERS THEN
>       IF SUBSTR(sqlerrm, 1, 9) = 'ORA-00439' THEN
>         v_success := FALSE;
>         DBMS_OUTPUT.PUT_LINE(SQLERRM);
>         DBMS_OUTPUT.PUT_LINE('Resource not available');
>       END IF;
>   END;
>   IF NOT v_success THEN
>     EXECUTE IMMEDIATE 'CREATE INDEX idx_lot_f1 ON PODEAPAGAR(COLUNA1)
> TABLESPACE tbsind';
>   ELSE
>     DBMS_OUTPUT.PUT_LINE('BITMAP index successfuly created');
>   END IF;
> END;
>
> Thanks a lot .
> Regards
> Eriovaldo
>
>
>
> On Fri, Sep 25, 2009 at 8:36 AM, Gints Plivna <gints.plivna@xxxxxxxxx>wrote:
>
>> >     I found that the BITMAP index is a payed resource, that for running
>> it
>> > is required LICENSE.
>> Since when? And where it is written?
>> That's not true.
>> See licensing guide
>>
>> http://download.oracle.com/docs/cd/E11882_01/license.112/e10594/editions.htm#BABDJGGI
>> for complete info what is and what isn't extra cost option.
>>
>> Actually from installed instance with extra cost options (which are
>> available only for enterprise edition) you CANNOT understand whether
>> option is legally installed and used or not. This information you have
>> to find in some adminsitration and licensing docs between your
>> organization and reseller. There is no way to get to know that from
>> installed instance because installation process has nothing to do with
>> license documents.
>>
>> Gints Plivna
>> http://www.gplivna.eu
>>
>
>

Other related posts: