Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to create dbms_stast.gather_table_stats script
Hi Max,
Gee, don't know where to start with this.
As a starting point, may I suggest you have a really good read of the PL/SQL Supplied Packages manual and learn how to use the dbms_stats package before attempting to write fancy dynamic SQL. If can't get dbms_stats to work on it's own, you really are going to have problems progressing any further.
Hint. Checkout the parameter names and give yourself a chance.
Good Luck
Richard
"M.a.x G.e.decke" <spam_at_gedecke.de> wrote in message
news:ak4nbk$r7a$1_at_redenix.uni-muenster.de...
> hey ng,
>
> i want to create a script which creates a script with all tables. thats
the
> way it looks at the moment:
>
> spool dbmsstats_all.sql
>
> SELECT 'EXECUTE DBMS_STATS.GATHER_TABLE_STATS(ownname=>upper(''AZUBI''),'
||
> table_name || ');' FROM user_tables;
>
> spool off
>
> @dbmsstats_all.sql
>
> but it isn't working. thats the error message:
>
> ORA-06550: Zeile 1, Spalte 61:
> PLS-00357: Table-, View- oder Sequence-Referenz 'SV_BEZEICHNUNG' in diesem
> Kontext nicht g³ltig
> ORA-06550: Zeile 1, Spalte 7:
> PL/SQL: Statement ignored
>
> thanks for your help
>
> max
>
>
Received on Fri Aug 23 2002 - 02:55:47 CDT
![]() |
![]() |