cancel
Showing results for 
Search instead for 
Did you mean: 

Updating the statistics information on database

Former Member
0 Kudos

Hello,

It takes a long time to have the reports from MKPF table on database. I had a research through OSS db02>Detailed Analysis which says to update the table manually. I did it and it was OK. It also advised that I can do it periodically as a SQL job. When I tried it with SQL Query, the following message occurred:

The query I used : UPDATE STATISTICS MKPF [_WA_Sys_BUDAT_...]

Reply : Server: Msg 2706, Level 11, State 6, Line 1 Table 'MKPF' does not exist.

But when I tried it manually using Db02 transaction, there was no problem. Is it related with an authentication of database? SQL Enterprise user has got a full admin account. There is no problem except this.

Not: This process is valid for all tables not only for MKPF.

Best Regards

ismail Karayaka

Accepted Solutions (0)

Answers (1)

Answers (1)

clas_hortien
Active Contributor
0 Kudos

Hello,

in newer releases of R/3 the tables resides in a special schema named <sid>. So you have to switch into the schema first, before you can run this statements successful. The schema name is is the lowercase of the SAP system id, so if your system is PRD the schema name will be prd:

setuser 'prd'

update statistics ......

With

setuser

you will switch back in the origianl schema (dbo).

Regards

Clas