Home » SQL & PL/SQL » SQL & PL/SQL » Use of ALTER SESSION in procedure?
Use of ALTER SESSION in procedure? [message #47090] |
Thu, 22 July 2004 00:41  |
Klaus
Messages: 2 Registered: February 2003
|
Junior Member |
|
|
Hello all together,
I try to create a procedure which should generate the statistc histogramms from the db tables. As I found, I have to ALTER the session first to avoid a bug in dbms_stats.
Now I have no idea, how I can alter the session in this function. If I try the code below, I always get the error, that ALTER is not allowd after the keyword BEGIN.
Any ideas??
I use oracle 9i with patchset 4.
�Thanks in advance
�
Klaus
�
BEGIN
-- wegen Bug von dbms_stats
ALTER SESSION SET NLS_NUMERIC_CHARACTERS='.,';
�dbms_stats.gather_schema_stats(
ownname => 'IFADMIN',
-- ESTIMATE_PERCENT => 10, /* sample von 10% */
ESTIMATE_PERCENT => NULL, /* alle Daten */
method_opt => 'FOR ALL INDEXED COLUMNS SIZE 254',
degree => 1,
cascade => TRUE);
END;
/
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sat May 17 14:27:40 CDT 2025
|