In order to install and run BMC_DEBUG, you'll need to do some preparation to setup the environment into which the software will be installed.
First, you will need an Oracle database which is running version 10.2 or later (such as 11.1, 11.2 or 12c).
Then you will need to create a user into which you will install the packages and tables. The following steps should be run after logging in to your database as a user with DBA privilege, such as SYSTEM, or you may need to ask someone with DBA privilege to run them on your behalf.
To create the user, you would run the command :-
SQL> CREATE USER dbg_owner IDENTIFIED BY secret DEFAULT TABLESPACE users TEMPORARY TABLESPACE temps QUOTA UNLIMITED ON users; User created.
So here we are creating the user called DBG_OWNER which has a password 'secret', and which stores its tables in the USERS tablespace, and uses the TEMPS tablespace for temporary work (NOTE - The tablespace names in your database may be different, so change them as required).
Once the user has been created, we need to grant them the privileges required to use BMC_DEBUG, by running the following statements :-
SQL> GRANT CREATE SESSION, CREATE TABLE, CREATE PROCEDURE TO dbg_owner; Grant succeeded.
These statements grant our new user the ability to login to the database, and to create tables and procedures. This is all that is needed for the installation to succeed, but if possible you should also run the following GRANT statements, for which you will need to be connected as the SYS user :-
SQL> GRANT SELECT ON v_$mystat TO dbg_owner; Grant succeeded. SQL> GRANT SELECT ON v_$statname TO dbg_owner; Grant succeeded. SQL> GRANT SELECT ON v_$session_event TO dbg_owner; Grant succeeded. SQL> GRANT SELECT ON v_$sess_time_model TO dbg_owner; Grant succeeded.
These grant the necessary privileges to allow BMC_DEBUG to collect statistics about code execution. They are not absolutely required, but will enable a lot of extra functionality if you can grant them.
That is all we need to do as a DBA user, so now you can go to the Files page and download the latest bmcdebug-nnn.zip file, and copy it to the machine from which you can run SQL*Plus to access your database user.
Unzip the file, which in Linux you do like this :-
$ unzip bmcdebug-143.zip Archive: bmcdebug-143.zip inflating: bmcdebug.plb inflating: bmcdebug.pls inflating: bmcerror.plb inflating: bmcerror.pls inflating: bmcx.pls inflating: cre.sql inflating: LICENSE.txt inflating: README.txt $ ls -l total 312 -rw-r--r-- 1 oracle dba 50685 Nov 16 13:22 bmcdebug-143.zip -rwxr-xr-x 1 oracle dba 177033 Nov 16 12:10 bmcdebug.plb -rwxr-xr-x 1 oracle dba 8894 Nov 16 09:22 bmcdebug.pls -rwxr-xr-x 1 oracle dba 26891 Nov 15 23:59 bmcerror.plb -rwxr-xr-x 1 oracle dba 2999 Nov 15 23:58 bmcerror.pls -rwxr-xr-x 1 oracle dba 7217 Nov 15 23:57 bmcx.pls -rwxr-xr-x 1 oracle dba 13977 Nov 15 23:57 cre.sql -rw-r--r-- 1 oracle dba 1522 Nov 15 20:38 LICENSE.txt -rw-r--r-- 1 oracle dba 171 Nov 15 20:40 README.txt
So you now have the installation files, you can launch SQL*Plus to login as your new user and run the scripts. The commands you need to run, and the output you should see are as follows :-
$ sqlplus dbg_owner/secret SQL*Plus: Release 10.2.0.5.0 - Production on Sun Nov 16 13:25:48 2014 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options SQL> @cre.sql Table created. Index created. Table created. NOTE - There is more output from cre.sql, but it is not included here for brevity SQL> @bmcx.pls Package created. No errors. SQL> @bmcerror.pls Package created. No errors. SQL> @bmcdebug.pls Package created. No errors. SQL> @bmcerror.plb Session altered. Package body created. No errors. SQL> @bmcdebug.plb Session altered. Package body created. No errors.
So each of the scripts is run by prefixing it with the @ sign in SQL*Plus. None of the scripts should display any error messages which start ORA- (unless you did not grant the SELECT privileges on the V$ tables as detailed above, in which case cre.sql will show the error ORA-942 twice, which is expected).
If you did encounter any errors, other than the one detailed above, please re-read the setup instructions and ensure you have completed all of the steps as a user with the appropriate privilege, and that the statements you used to create and setup your user all ran without errors.
If your installation succeeded, you can go to Why Instrumentation? and start reading about the functionality of BMC_DEBUG, and running the provided code examples.