Return-Path: <oracle-l-bounce@freelists.org>
X-Original-To: oracle-l@orafaq.com
Delivered-To: oracle-l@orafaq.com
Received: from smtp-ab.freelists.org (smtp-ab.freelists.org [34.228.148.125])
 by malta2546.startdedicated.com (Postfix) with ESMTPS id 43BD8100313C68
 for <oracle-l@orafaq.com>; Tue, 12 Dec 2023 19:06:54 +0100 (CET)
Received: from turing.freelists.org (turing [10.0.0.164])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by smtp-ab.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 731BA4068B;
 Tue, 12 Dec 2023 18:06:53 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Postfix) with ESMTP id 54727408DD;
 Tue, 12 Dec 2023 18:06:53 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org;
 s=turing; t=1702404413;
 bh=aW45dyMVp+/+6oQ1qRCp7OBiaMQ2W0V3VEu7V5TNkM8=;
 h=From:Sender:Sender:From;
 b=R64dFh9Tcz4KtqBeepfy+ERB9UTsxwiQcytaNRv0CluuaNhuJvEJlZHoC+92cevPf
	 8bJRc7j46HM6vDFVm4nfe/tQCqohHiSq8+tt1FXSJw3gxewN9dXnAKagM9bEd8hFFo
	 WgjdvbgPLRtZy905LjC1Rh40imTYF6oPGTxrKs+g=
X-Virus-Scanned: by FreeLists at turing.freelists.org
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 9w0DqVFGTYzn; Tue, 12 Dec 2023 18:06:53 +0000 (UTC)
Received: from turing.freelists.org (localhost [127.0.0.1])
 by turing.freelists.org (Postfix) with ESMTP id 345553FC89;
 Tue, 12 Dec 2023 18:06:07 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org;
 s=turing; t=1702404411;
 bh=aW45dyMVp+/+6oQ1qRCp7OBiaMQ2W0V3VEu7V5TNkM8=;
 h=From:Sender:Sender:From;
 b=ER4tH4CYYNHvA9PgC/dv1wAuYzILrgKk6RWff51YzoNVAsKEdtlAFHvfBPd967R2j
	 NlEiFQQCQ7lvi6dAzUz8hOrZG3lRDmuB4wvMDO4UtC1owPF//tAUgJXgWNOBAY4wwE
	 ThA5PMK0DXM6eV4+CKhtBID1aY7UoLarqub/uP6s=
Received: with ECARTIS (v1.0.0; list oracle-l); Tue, 12 Dec 2023 18:05:22 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Postfix) with ESMTP id 015B242B5C
 for <oracle-l@freelists.org>; Tue, 12 Dec 2023 18:05:22 +0000 (UTC)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id t3dNLGR17yKO for <oracle-l@freelists.org>;
 Tue, 12 Dec 2023 18:05:21 +0000 (UTC)
Received: from wp021.webpack.hosteurope.de (wp021.webpack.hosteurope.de [80.237.132.28])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by turing.freelists.org (Postfix) with ESMTPS id C35A840D39
 for <oracle-l@freelists.org>; Tue, 12 Dec 2023 18:05:21 +0000 (UTC)
Received: from app19-neu.ox.hosteurope.de ([92.51.170.153]); authenticated
 by wp021.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 id 1rD78C-0008T4-Hy; Tue, 12 Dec 2023 19:05:20 +0100
Date: Tue, 12 Dec 2023 19:05:20 +0100 (CET)
From: Stefan Koehler <contact@soocs.de>
To: oracle.developer35@gmail.com, Oracle L <oracle-l@freelists.org>
Message-ID: <1901730334.2076893.1702404320469@ox.hosteurope.de>
In-Reply-To: <CAEjw_fgc-MN=hzi_o6rnsgWmze5VArECfpKNi0mc0ZEYFcfX3w@mail.gmail.com>
References: <CAEjw_fgc-MN=hzi_o6rnsgWmze5VArECfpKNi0mc0ZEYFcfX3w@mail.gmail.com>
Subject: Re: Finding stats gather
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Originating-IP: 88.78.154.11
X-Originating-Client: open-xchange-appsuite
X-Originating-Sender: stefan@soocs.de
X-bounce-key: webpack.hosteurope.de;contact@soocs.de;1702404321;c132f6a9;
X-HE-SMSGID: 1rD78C-0008T4-Hy
X-archive-position: 84704
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: contact@soocs.de
Precedence: normal
Reply-To: contact@soocs.de
List-Help: <mailto:ecartis@freelists.org?Subject=help>
List-Unsubscribe: <mailto:oracle-l-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: oracle-l <oracle-l.freelists.org>
X-List-ID: oracle-l <oracle-l.freelists.org>
List-Subscribe: <mailto:oracle-l-request@freelists.org?Subject=subscribe>
List-Owner: <mailto:>
List-post: <mailto:oracle-l@freelists.org>
List-Archive: <https://www.freelists.org/archive/oracle-l>
X-list: oracle-l

Hello Pap,
I guess the easiest way would be to audit DBMS_STATS usage for a short period of time.

-- Set audit_trail to "db,extended", if not already done
SQL> alter system set audit_trail=db,extended scope=spfile;
-- Restart database (only needed, if audit_trail needs to be set)
SQL> audit execute on sys.dbms_stats;
SQL> select * from dba_audit_object where obj_name = 'DBMS_STATS';


Best Regards
Stefan Koehler

Independent Oracle performance consultant and researcher
Website: www.soocs.de
Twitter: @OracleSK

> Pap <oracle.developer35@gmail.com> hat am 12.12.2023 13:48 CET geschrieben:
> 
> 
> Hi All,
> We have a customer database in which restore_table_stats gets triggered(as we see it from dba_optstat_operations) and we want to find where exactly it's getting triggered from. Basically the source(which might be app code) of this command. We don't see it in gv$sql or dba_hist_sqltext and can't tie it up with ASH/AWR views. Is there any way to find this out?
> 
> 
> Regards
> Pap
--
http://www.freelists.org/webpage/oracle-l


