on 11-16-2007 3:42 PM
Hello,
I would like to compute statistics for some specific tables in Oracle. For example I would like to compute statistics for all tables that start with A.
If I have understood the documentation, we should use the option:
-t|-table: Defines the objects to be processed by update statistics.
Input syntax: -t|-table all|all_ind|all_part|missing|harmful|dbstatc_tab|dbstatc_mon|
dbstatc_mona|[<owner>.]<table>|[<owner>.]<index>|[<owner>.]<prefix>*|<tablespace>|<object_list>|info_cubes|locked|system_stats|oradict_stats
So I have tried the following command:
brconnect -u / -c -f stats -t A* -m C
But it doesn't seem to work. If this doesn't work, is there an option for brconnect that allows us to not log the output in SAP (DB24, DB14, etc ...)
Rgds,
Youssef
Hi Youssef,
did you tried to execute the following (assuming your system runs on Unix):
$> brconnect -u / -f stats -t A\* -m C
May be you have a file with the prefix A in the current directory. Unix Shells would expand this to the file name if so.
Regards
Ralph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ralph,
Thanks for your quick answer ... The systems is indeed running under UNIX. But here is the result of the command:
BR0801I BRCONNECT 6.40 (30)
BR0805I Start of BRCONNECT processing: cdwpnlko.sta 2007-11-16 16.53.58
BR0280I BRCONNECT time stamp: 2007-11-16 16.54.02
BR0813I Schema owners found in database TR2: SAPR3CTM, SAPSDR*
BR0280I BRCONNECT time stamp: 2007-11-16 16.54.11
BR0814I Number of tables in schema of owner SAPSDR: 38406
BR0280I BRCONNECT time stamp: 2007-11-16 16.54.23
BR0815I Number of indexes in schema of owner SAPSDR: 45489
BR0825E Table/Index A* not found in database
BR0182E Checking parameter/option 'stats_table/-t' failed
BR0806I End of BRCONNECT processing: cdwpnlko.sta 2007-11-16 16.54.23
BR0280I BRCONNECT time stamp: 2007-11-16 16.54.23
BR0804I BRCONNECT terminated with errors
If I try without the "\", I have:
brconnect -u / -f stats -t A* -m C
No match.
Hello,
I think the following note answer your question:
865365 Placeholder support in BRCONNECT parameters
you should use:
brconnect -u / -f stats -t <b>"A*"</b> -m C
Note that if you want to <b>force</b> the stats to be calculated ( no threshold check ) then you have to add the option -f collect:
brconnect -u / -f stats -t "A*" -m C <b>-f collect</b>
Hello Fidel,
Thanks a lot for your very helpfull answer. I have checked note 865365 and it seems that I have to upgrade my brtools version. I am going to do that in our dev system this week to try it out.
In the mean time, I have another issue ... Is there a way to have the brconnect logs only in a file and not in SAP ? I have to launch the statistics for a lot of tables (delete + compute). If i do it now, I will have a lot of logs in the DB24 or DB14, and I don't want that ... I just want to launch it under UNIX and redirect the output in a file. I don't need any output in SAP.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.