Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Use of statspack in a pl/sql procedure

Re: Use of statspack in a pl/sql procedure

From: Matt <matthieu.atkinson_at_eu.altria.com>
Date: 29 Jul 2004 05:33:29 -0700
Message-ID: <f683f010.0407290433.69e3a6a4@posting.google.com>


Daniel Morgan <damorgan_at_x.washington.edu> wrote in message news:<1091079046.326109_at_yasure>...
> sybrandb_at_yahoo.com wrote:
>
> > matthieu.atkinson_at_eu.altria.com (Matt) wrote in message news:<f683f010.0407280157.61f40dfe_at_posting.google.com>...
> >
> >>Hi all!
> >>I'm trying to run spreport within a pl/sql procedure so that instead
> >>of having a text file with my statistics, I insert those values in
> >>tables so that I can have some kind of history. Everything is fine
> >>apart from the call to statspack.stat_changes. Here is what I do:
> >>sql_query := 'CALL STATSPACK.STAT_CHANGES@'||v_linkname||'(:b1,:b2,:b3,:b4,:b5,:b6..all
> >>my bind variables.....:b86)';
> >>EXECUTE IMMEDIATE sql_query USING IN bid, eid, dbid, inst_num, para,
> >>OUT all my bind varibles....;
> >>
> >>And this the error I get:
> >>ERROR at line 1:
> >>ORA-06536: IN bind variable bound to an OUT position
> >>ORA-06512: at "CHECKSPACE.PERFSTAT_CHECK", line 193
> >>ORA-06512: at line 1
> >>
> >>I know that there are several versions of this package and I have
> >>checked that I have the correct number of parameters, but it still
> >>fails. Did anyone manage to do a similar thing and actually managed to
> >>get it to work? Any help GREATLY appreciated!!! Thanks, Matt.
> >
> >
> >
> > You are aware statspack maintains history in the perfstat schema?
> > What are you trying to accomplish? Are you sure you are not trying to
> > reinvent the wheel?
> >
>
> And if you are on 10g why use stats pack anymore?
> Take a look at: http://www.psoug.org/reference/awr.html

Thanks for your anwers.
First of all I'm not on 10g, I have many db between 8.1.7 and 9i. The reason I'm trying to do this is because I have around 120 databases to monitor and this would be part of a daily check. I already have this system in place for space monitoring. A script runs very early in the morning to get the infos and store it in one db and it allows me to run just one script on one database when I arrive in the morning instead of running 120 scripts on all dbs. As for the parameters I just gave you the beginning of the string as there are 86 of them. I have checked their number again this morning and I have the correct number in my procedure call. It was just to long to put here. Received on Thu Jul 29 2004 - 07:33:29 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US