Server Administration :: Method To Execute Schema Stats?

Mar 22, 2012

When we want to gather schema statistics which method we should follow and why ?

exec dbms_utility.compile_schema('SHIKHAR');

or

BEGIN
SYS.DBMS_STATS.GATHER_SCHEMA_STATS (
OwnName => 'JACK'

[Code].....

View 3 Replies


ADVERTISEMENT

Server Administration :: Delete Stats Gather Stats

Sep 11, 2012

During STATS gather running for the table, unknowingly i deleted the old stats using EXEC DBMS_STATS.DELETE_TABLE_STATS. I would like to know will it affect the stats gather job currently running for the table and whether my stats will be gathered successfully.

View 5 Replies View Related

Server Administration :: Index And Table Rebuild Method

Jan 17, 2012

The best way to rebuild index and table and also give the reason as why we need to use this method?

View 10 Replies View Related

Server Administration :: Collect Table Stats?

Oct 10, 2013

We are running 11g (11.2.0.3)We have a "working table" that is empty at the beginning of the day.Then we start adding rows (insert) with a key column called STATE with a value of 100.At the same time, there are other apps that pickup data in state 100 , process that data and change that state to 200 or 300.There is also another app that pickup data in state 200 , process that data and change that state to 300 or 400.

So in summary, the data on that table is at the beginning empty, then all the rows are in state 100, they slowly move to different states (200, 300, etc) and by the end of the day, they are all in 400.

My question is what would be the best way to collect stats on this table?

I was thinking to create an hourly job to collect stats on that table:
exec dbms_stats.gather_table_stats (
ownname => 'SCOTT',
tabname => 'WORK_T

View 6 Replies View Related

Server Administration :: DBMS-STATS And ORA-20000?

Dec 20, 2011

I've just installed an Oracle 11.2.0.1.0 64 bit server on my windows 7 machine in order to play around while using attempting to run

exec dbms_stats.gather_table_stats('eii','v2x4e')

I get the following:
ORA-20000: Unable to analyze TABLE "EII"."V2X4E", insufficient privileges or does not exist
ORA-06512: at "SYS.DBMS_STATS", line 20327
ORA-06512: at "SYS.DBMS_STATS", line 20360
ORA-06512: at line 1

My initial google searches indicate that I need the select any table and analyze any privileges. I don't think that can be right/appropriate - but I've granted them anyway to no avail.

Select * from user_tables

returns tables in the System and sysaux tablespaces, but not my own schema/tablespace?

View 5 Replies View Related

Server Administration :: Privilege Require To Gather Stats?

May 27, 2012

what privilege is required to run dbms_stats package for gathering table and schema statistics.

SQL> show user
USER is "JACK"
SQL>
SQL> select * from user_sys_privs;

no rows selected

SQL> select * from user_role_privs;

no rows selected

SQL> select * from role_sys_privs;

no rows selected

SQL> exec dbms_stats.gather_table_stats('JACK','EN1')

PL/SQL procedure successfully completed.

I revoke all the privileges from JACK user but still i am able to gather stats for a table.what privilege is require to gather stats.

View 4 Replies View Related

Server Administration :: Remove Synonym STATS$SNAPSHOT-ID?

Sep 11, 2007

I've got to collect statistics by DBMS_STAT. For the first time, the spcreate.sql is to be called, however, it returned one error following:

If this script is automatically called from spcreate (which is the supported method), all STATSPACK segments will be created in the PERFSTAT user's default tablespace.

Using perfstat tablespace to store Statspack objects

... Creating STATS$SNAPSHOT_ID Sequence Sequence created.

create public synonym STATS$SNAPSHOT_ID for STATS$SNAPSHOT_ID
*
ERROR at line 1:
ORA-00955: name is already used by an existing object Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options

And then, I checked it again with its owner:

SQL> select owner, synonym_name
2 from dba_synonyms
3 where synonym_name='STATS$SNAPSHOT_ID';

OWNER SYNONYM_NAME
------------------------------ ------------------------------
PUBLIC STATS$SNAPSHOT_ID

Then, I checked again after dropping schema PERFSTAT:

SQL> conn /as sysdba
Connected.
SQL>
SQL> select username, account_status

[code]...

What's the STATS@SNAPSHOT_ID synonym? Can I remove it from PUBLIC owner and recreate?

View 13 Replies View Related

Server Administration :: Collect Object Stats - When Enough Of Data Has Changed

Aug 29, 2013

Quote:Oracle collects new statistics when enough of the data (about 10%) has changed.I read the above statement in the oracle documentation that Oracle collects new statistics when enough of the data (about 10%) has changed every day during 10 pm to 6am .

But still i see some object statistics are stale and empty.Do i need to collect statistics for these objects manually ? and would like to know why these objects statistics were not collected during maintenance window ?

View 4 Replies View Related

Server Administration :: Stats Gather-LAST_ANALYZED Column Not Updated

Sep 11, 2012

Using below script i run stats gather job..But LAST_ANALYZED column is not updated for the table.. Why it was not updated.. My DB version is 11.1.0.7.0

exec DBMS_STATS.GATHER_TABLE_STATS(ownname => 'XXXX', tabname => 'XXXXXX',estimate_percent =>5, method_opt => 'FOR ALL INDEXED COLUMNS SIZE AUTO', degree => 8, granularity => 'ALL',Cascade => TRUE);

View 11 Replies View Related

Server Administration :: Accessing Single Schema From Multiple Schema Logging?

May 16, 2011

A single master schema where many developers are accessing. all share same password.

now i would like to trace all the changes made by each users. so i create a individual users for all and grant permission to access that schema.do i have a possibility of auditing the changes did by each user for that particular schema

View 2 Replies View Related

Server Administration :: One Schema Versus Multiple Schema

Feb 1, 2010

single schema setup or multiple schema setups for an application development. Which option is recommended and pros and cons of these methods?

View 4 Replies View Related

Find Schema Stats Lock Or Unlock

Apr 20, 2013

How to find schema stats locked or unlocked?

View 3 Replies View Related

SQL & PL/SQL :: Efficient And Fast Method Required For Audit Trailing Tables In A Schema?

Nov 17, 2011

efficient & fast method for Audit trailing tables in a Schema for any insert /update /deletes for a table. I do not want to use db triggers because of performance issues.

presently we have as system which does audit trail as below:

1. If a user changes a column value for a table ( update/insert/delete) then we call a db package and pass the parameters like table name,col name,user, operation (ins/update/delete),old value, new value,date modified,user modified etc

2. the called package will insert a record in the audit trail table with the parameters passed

3. The audit trail table is used for report generation .

View 1 Replies View Related

Performance Tuning :: Auto-Stats Gathering Not Including Schema?

May 16, 2011

I have several databases that i've recently upgraded from 9i to 11g. With all of them, the automatic stats gathering process has worked just fine every night during the maintenance window.

However, i have this other database that i created and it seems that the only stats being gathered are on the sys and system schemas and not the actual schema that holds all of our tables.

I did some searching, but i'm not sure i was using the right search terms, because i came up empty.

BANNER
-----------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Solaris: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

View 16 Replies View Related

Server Administration :: Cannot Execute Dbms_redefinition.start_redef_table

Aug 8, 2011

Which privs do grant to user? i can not execute start_redef_table

SQL> Begin
2 Dbms_Redefinition.Can_Redef_Table(USER, 'TB_HXL_USER');
3 End;
4 /

PL/SQL procedure successfully completed.

SQL> BEGIN
2 dbms_redefinition.start_redef_table(
3 uname => USER,
4 orig_table => 'TB_HXL_USER',
5 int_table => 'TB_HXL_USER_MID',
6 options_flag => DBMS_REDEFINITION.cons_use_pk);
7 END;
8 /
BEGIN
*
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_REDEFINITION", line 52
ORA-06512: at "SYS.DBMS_REDEFINITION", line 1646
ORA-06512: at line 2

View 4 Replies View Related

Server Administration :: Privileges From One Schema To Other

Feb 10, 2012

I have 10 important schemas in my database,and i want to give only select privileges from SCHEMA PRODUSER to other 10 schemas. And also want that the new objects that are created in PRODUSER after granting the privileges are also have select privileges. Is it possible that i should directly grant select privileges from one schema to other without granting via individual objects(script to grant individual privileges from individual objects)

Details are as below:
database version: 9.2.0.8.0
OS version:
Microsoft Windows Server 2003
Standard Edition
Service Pack 2

View 1 Replies View Related

Server Administration :: Schema Comparing Tool

Apr 8, 2012

we have a two different databases at different locations and on different servers, like one in our company with SID='A' and remote database with SID='B', We have recently implemented new module in database 'A' by creating lots of tables, functions, indexes, sequences, synonyms etc and now we need to install this on 'B' but the problem is we have not documented which tables we created, first we need to create a DB link between these two and then we need a tool to compare what are all the tables that we need to create in database 'B' , is there a tool for doing all this.

View 7 Replies View Related

Server Administration :: Difference Between Table_owner And Schema?

Sep 14, 2011

a table can have many schema or just 1 schema which is the table owner?

View 5 Replies View Related

Performance Tuning :: Using Stats Table Instead Of Regular Stats To Get Plan?

Jan 27, 2011

DBMS_STATS.CREATE_STATS_TABLE
DBMS_STATS.EXPORT_SCHEMA_STATS
DBMS_STATS.GATHER_TABLE_STATS

I have used the above to get a copy of schema stats and gather new stats for specific tables into a STATS TABLE in my personal schema. What I want to do now is use this stats table to generate plans for queries where I believe stats are off. Is it even possible? To be clear, I do not want to import stats because this replaces the stats currently there. I just want to point the CBO to my stats table for generating plans.

there was a session parameter I could set to tell oracle to use my stats table when generating plans, or an explain plan clause I could use or a DBMS_XPLAN paramter I could provide that would tell these tools to use my stats table when generating a plan, or even some way to tell autotrace. But I have found none of this.

View 2 Replies View Related

SQL & PL/SQL :: Regarding Execute Immediate Passing Schema Name

Nov 12, 2010

I am using database version Oracle Database 10g Release 10.2.0.1.0 - Production. I have multiple schema's in my database and want to read the data from multiple schema's and have to insert into a single table. For that i was thinking to pass the schema name as parameter and fetch data accordingly. While creating procedure i got the below mentioned error, yet i haven't got any result on this.

ORA-00936: missing expression
ORA-06512: at "INTERNATIONAL.MPLS_PROC_TEST";, line 66
ORA-06512: at line 15

following is my procedure

CREATE OR REPLACE PROCEDURE MPLS_PROC_TEST (
P_CLIENT_CODE IN VARCHAR2,
P_VARIANT_CODE IN VARCHAR2,
P_START_DATE IN DATE,
P_END_DATE IN DATE,
P_MEDIA_CODE IN VARCHAR2,
P_SCHEMA IN VARCHAR2
[code]........

View 19 Replies View Related

Server Administration :: How To See Schema User Password In Text

Oct 1, 2012

I need to see all schema users password in a text.I am database admin,but it difficult to remember the password of all users created in single database So we also dont want to change password of all time,table to view password in text. Also we all know we can see using dba_users, but it was showing in hash value i need it in a text

View 3 Replies View Related

Server Administration :: How To Give Full Access To Other Schema

Apr 15, 2012

I want to get clear with one thing yesterday i installed oracle9i and dev 2000 to my client.

when they run one report they got stuck with pl/sql compilation errorrep-1247

when i checked that report in the report builder, in the query they are using some other table which is not belongs to that schema,then I give that schema.tablename and compiled, but this is coming for other reports also, then only i came to know that they are acceessin other schema also, how can i sort this out.

can i fix this by givin full access privilige or what privilige can i give to get full access of other schema table.

how can i check in the old database what are all the roles and privileges given to this user,

View 5 Replies View Related

Server Administration :: Difference Between A User And Schema On Oracle?

Apr 26, 2010

difference between a user and schema on Oracle.By difference, I do not mean what is a user and what is a schema.

I understand that if we create a user, the schema gets created by default for that user. Does that mean that we cannot create a user/schema alone.

What if I just want to create a user and grant him some read access on an existing schema or just want to create a schema.

View 7 Replies View Related

Server Administration :: Pooling Meta Data Into New Schema?

May 22, 2012

I have created different scripts to monitor growth planning of the database my idea was generate a simple output file to a directory and create a report and send it as mail thru mail server. but the client requested me to create new schema and population all the stats i have collected into the tables in this schema .

How to pool all the stats from different databases into this new schema efficiently.

View 3 Replies View Related

Server Administration :: Deleting Unwanted SYS Schema Objects?

May 25, 2011

I was importing one schema from Oracle 10g to 11g using traditional import. I imported as a SYS user, so all the objects created in SYS schema. how can I remove these objects and retain only default SYS objects

View 11 Replies View Related

Server Administration :: USERS Tablespace Should Not Contain Schema Objects?

Jan 31, 2012

I heard that USERS tablespace should not contain any other application schema objects.

If the above statements is true , why it should not contain other schema objects ?

View 7 Replies View Related

SQL & PL/SQL :: Execute A Procedure Present In Different Schema?

Apr 27, 2010

I have two schema SCHEMA_A and SCHEMA_B in the same Database.

I want to execute a procedure UPDATE_CONTACT() which is present in SCHEMA_A from SCHEMA_B.

let me know whether the following SQL is correct:

BEGIN
SCHEM_A.UPDATE_CONTACT();
END;

View 4 Replies View Related

Server Utilities :: Import A Schema From One Database Schema To Another Schema B?

Aug 10, 2010

I want to import a schema from one database schema to another schema b from db STBTST to STATST and from schema CMSSTAGINGB to CMSSTAGINGA

I first want to test this to my own schema (mvanmannekes) CMSSTAGINGA is filled at the moment.

So i've created a dump from STBTST-CMSTAGINGB For importing im using this statement:

impdp mvanmannekes/password schemas=cmsstagingb remap_tablespace=cmsliveb_data:cmslivea_data
remap_tablespace=cmsliveb_index:cmslivea_index
remap_schema=cmsstagingb:mvanmannekes directory=expdp_dir dumpfile=cmstagingb.dmp

I'm getting this:

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "MVANMANNEKES"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
Starting "MVANMANNEKES"."SYS_IMPORT_SCHEMA_01": mvanmannekes/********
schemas=cmsstagingb remap_tablespace=cmsliveb_data:cmslivea_data

[code]....

View 4 Replies View Related

Server Administration :: Gather Schema Stat Utility Of Oracle?

Oct 28, 2010

I have problem/misunderstanding with gather schema stat utility of oracle. Herewith i'm posting my try and output of it. My main question is why the column 'LAST_ANALYZED' of dba_tables not updated on gathering fresh schema level statistics.

SQL>select OWNER,TABLE_NAME,NUM_ROWS,AVG_ROW_LEN,BLOCKS,SAMPLE_SIZE,LAST_ANALYZED from dba_tables where owner='STO' and rownum<=10 order by LAST_ANALYZED;
OWNER TABLE_NAME NUM_ROWS AVG_ROW_LEN BLOCKS SAMPLE_SIZE LAST_ANAL

[code]...

10 rows selected.

SQL>execute dbms_stats.gather_schema_stats(OWNNAME => 'STO', OPTIONS => 'GATHER AUTO');

PL/SQL procedure successfully completed.

SQL> select OWNER,TABLE_NAME,NUM_ROWS,AVG_ROW_LEN,BLOCKS,SAMPLE_SIZE,LAST_ANALYZED from dba_tables where owner='STO' and rownum<=10 order by LAST_ANALYZED;

OWNER TABLE_NAME NUM_ROWS AVG_ROW_LEN BLOCKS SAMPLE_SIZE LAST_ANAL
------------------------------ ------------------------------ ---------- ----------- ---------- ----------- ---------
STO BILLSLIPB 7695 26 36 7695 29-MAR-10
STO BILL_CHECKING_SLIP 2634 71 28 2634 29-MAR-10
STO FACTORYBILLA 2 119 1 2 29-MAR-10

[code]...

10 rows selected. SQL>

View 4 Replies View Related

Server Administration :: How To Refresh Test Schema From Production Request

Oct 31, 2012

Steps to Refresh test Oracle 9i schema from production schema on a Windows platform..

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved