Database stats in 10g
please anyone give me the command to gather stats for whole database
HI,
You can check this part of Oracle document http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/stats.htm#PFGRF30102 also note. and ORACLE - DBA Tips Corner
Enabling Automatic Statistics Gathering Automatic statistics gathering is enabled by default when a database is created, or when a database is upgraded from an earlier database release. You can verify that the job exists by viewing the DBA_SCHEDULER_JOBS view:
SELECT * FROM DBA_SCHEDULER_JOBS WHERE JOB_NAME = 'GATHER_STATS_JOB';
In situations when you want to disable automatic statistics gathering, the most direct approach is to disable the GATHER_STATS_JOB as follows:
BEGIN DBMS_SCHEDULER.DISABLE('GATHER_STATS_JOB'); END; /
How to run Gather Stats For Whole Database. - General Questions
Thank you
Similar Messages
-
To create standby database using oracle 10g standared edition
my producation database is oracle 10G standard edition .Can i implement a oracle dataguard or standby database using standard edition licenses.if standby database is possiable in standard edition .what are the steps for creating a standby database using oracle 10g standard edition.
General answer is http://download.oracle.com/docs/cd/B19306_01/license.102/b14199/editions.htm#BABJICBB.
For Data Guard you cannot :
- use instance parameters to automatically send archived redo logs
- use instance parameters to resolve archived redo logs gaps
- create a logical standby
- use SQL statements to do switchover / failover
- use Data Guard Broker. -
Collecting database statistics in 10g
Hi,
We are using Oracle database 10.2.0.4 on hp os . As we know in 10g AWR automatically collect stats after 1 hour . is there any need to collect database stats agin manualy by using dbms_stats ...?
is there any difference betweencollecting stats by AWR and dbms_stats ... ?
"execute sys.dbms_stats.gather_system_stats('Start') ;
execute sys.dbms_stats.gather_schema_stats( ownname=>'pc01', cascade=>FALSE, degree=>dbms_stats.default_degree, estimate_percent=>100);
execute dbms_stats.delete_table_stats( ownname=>'pc01', tabname=>'statcol');
execute sys.dbms_stats.gather_system_stats('Stop');"
any idea ...?Hello...
Thanks a lot ...
Some of our production systems ...those are running on oracle10g ....they are collecting database stats once in a month...manualy...
by using dbms.stats... to improve performance of system ....
so is there any need to collect stats manauly.....?
As per my understanding ...no need to collect it manualy ...because AWR is doing this ...
am i right ...? -
Migrating from MS SQL Server 2005 database to Oracle 10g
Hello,
I wanted the full procedure or steps to Migrate the MS SQL Server 2005 database to Oracle 10g. Is there a known procedure to do this or is there a tool which is used?
I have not done migration of database from MS SQL Server to Oracle. Any help is appreciated. Thanks a lot for the time.
Regards,
RPSWrong forum, go to the database forum!
cu
Andreas -
Alter database statement in anonymous pl/sql block
Is it possible to include an alter database statement in an anonymous pl/sql block?
When I execute this code to query user_tables for all table names, disable their constraints and drop the table, I got the following error:
***MY CODE
-- DECLARE VARIABLE(S)
DECLARE
v_TABLE_NAME TABLE_NAME.USER_TABLE%TYPE;
-- DECLARE AND DEFINE CURSOR
CURSOR c_GETTABLES is
SELECT TABLE_NAME from USER_TABLES;
BEGIN
OPEN c_GETTABLES;
LOOP
FETCH c_GETTABLES into v_TABLE_NAME;
EXIT when c_GETTABLES%notfound;
ALTER TABLE v_TABLE_NAME DISABLE PRIMARY KEY CASCADE;
DROP TABLE v_TABLE_NAME;
END LOOP;
CLOSE c_GETTABLES;
END;
***RESPONSE FROM SERVER
ALTER TABLE v_TABLE_NAME DISABLE PRIMARY KEY CASCADE;
ERROR at line 15:
ORA-06550: line 15, column 1:
PLS-00103: Encountered the symbol "ALTER" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge
<a single-quoted SQL string> pipe
ThanksWhen you want to perform ddl statements in a (anonymous) PL/SQL block, you have to use dynamic SQL because ddl is not possible in pl/sql.
Dynamic sql means that you sort of execute ddl statements in a sql manner. To use dynamic sql, two options exist:
- dbms_sql package : for oracle before 8i. To use this package is not always easy. Read about it carefully first before using.
- Native Dynamic SQL : implemented in 8i and very easy to use. An example would be :
declare
lv_statement varchar2(32676);
begin
lv_statement := 'ALTER TABLE MY_TABLE DISABLE CONSTRAINT MY_TABLE_CK1';
execute immediate lv_statement;
lv_statement := 'ALTER TABLE MY_TABLE ENABLE CONSTRAINT MY_TABLE_CK1';
execute immediate lv_statement;
end;
Good luck.
Edwin van Hattem -
Can i create a standby database in oracle 10g standared edition ?
what are the steps required for creating a standby database using oracle 10g standard edition. or Any other feature for mirroring database in oracle 10g standared edition
Dear mithun,
Please read the following online documentation;
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14239/standby.htm
+"+
+2.3.2 Oracle Software Requirements+
+The following list describes Oracle software requirements for using Data Guard:+
+* Oracle Data Guard is available only as a feature of Oracle Database Enterprise Edition. It is not available with Oracle Database Standard Edition. This means the same release of Oracle Database Enterprise Edition must be installed on the primary database and all standby databases in a Data Guard configuration.+
+Note:+
+It is possible to simulate a standby database environment with databases running Oracle Database Standard Edition. You can do this by manually transferring archived redo log files using an operating system copy utility or using custom scripts that periodically send archived redo log files from one database to the other. The consequence is that this configuration does not provide the ease-of-use, manageability, performance, and disaster-recovery capabilities available with Data Guard.+
+"+
Hope That Helps.
Ogan -
Create an Object in Logical standby database in Oracle 10G
Hi,
I have logical standby database in oracle 10g R2 for reporting purpose.Now i want to create procedure in logical standby which is use to create new temp table in logical standby and contained data generated from select operation on existing table.
Can i create a new user in logical standby database,add new tablespace in logical standby which can insert,update and delete data in standby database base table?
kindly provide me the steps to implement all this.What will be effect if i set guard_Status in v$database is NONE in logical standby?
Thanks,
Shital PatelHi Shital,
Guard_status protects the data from being changed.
ALL- By default it is not possible for a non-privileged user to modify data on a data guard SQL apply database. This is because the database guard is automatically set to ALL.
With this level of security, only SYS user can modify the data.
STANDBY- When you set this level of security, users are able to modify data that is not maintained by the Logical apply engine.
NONE permits any users to access the standby database as long as they have correct privileges. This is the normal security for all data in the database.
You can change the guard status value from ALL to NONE in order to allow non-privileged users to modify data and Yes you can create user and extra tablespace in logical standby database..this is what the one of advantage of using Logical standby database.
SQL> ALTER DATABASE GUARD NONE;
Thanks -
Installing Discoverer with Database Version Oracle 10g Express Edition
Hello,
Is it possilbe to install Discoverer with database version Oracle 10g Express Edition? I have Oracle Fusion Middleware 11.1.1.1.0 on my Windows XP machine as well. If so, can someone please provide me a link to the Discoverer download.
Regards,
KellyNote that the Personal Edition of the database is 'the most powerful' version, in that it contains all features and options of the Enterprise Edition (expect RAC and Enterprise Manager packs)
As such, the Personal Edition, at a mere USD$400-500 is one of the most cost effective for-fee products that Oracle has in it's inventory. It is targeted at the developer. And it comes with the complete set of Sample Data, whereas XE has a very limited subset (since it does not support all functionality).
Express Edition is indeed free, but it is not supported, and can not be patched. OTOH it does have a lighter footprint.
Again, I am not sure whether Disco 11g is compatible with Express Edition. (It's on my schedule for December ...) -
Why i can't not create new database in oracle 10g express
why i can't not create new database in oracle 10g express?
should i use oracle 11g standard edition?
thanksIn Oracle a schema is what a 'database' is in Sqlserver.
And if you would have been aware about the limitations of XE, you would have known you can only create *1* (one) database using Oracle XE.
However, probably you don't need a new database at all, and a schema will suffice.
Sybrand Bakker
Senior Oracle DBA -
How do l create a new database in Oracle 10g Express
How do l create a new database in Oracle 10g Express, other than the one that is created on installation?
Hello,
You cannot create a second XE database on the same server.
But, Oracle database can support as many Schema as you want.
"Oracle database" is like "SQL Server Instance" and "Oracle Schema" is like "SQL Server database". I means by this shortcut that for
the end users accessing to different Schemas looks like accessing to different databases.
You can have several applications on the same database. Each application has its own Schema and Datafile (Tablespace) structure.
So on your XE database you can add a new Tablespace and create a new User/Schema as follows:
sqlplus /nolog
connect / as sysdba
create tablespace {color:red}new_tablespace_name{color}
extent management local autoallocate
SEGMENT SPACE MANAGEMENT AUTO
datafile '{color:red}complete_datafile_name{color}' size 100M autoextend on next 10M maxsize unlimited;
create user {color:red}new_schema_name{color} identified by {color:red}password{color}
default tablespace {color:red}new_tablespace_name{color}
temporary tablespace TEMP
quota unlimited on {color:red}new_tablespace_name{color}
grant connect, resource to {color:red}new_schema_name{color};Then you can connect to this new User/Schema as you defined it and create your new structure and load datas.
Hope it can help.
Best regards,
Jean-Valentin -
Importing all tables and users from Oracle 8i database to Oracle 10g
Hi friends,
It would be highly appreciated if someone would kindly advise steps needed to
import full Oracle 8i database ( with all users, tables, table spaces
and other components ) to Oracle database 10g .
Thanks and regardshi
ur exp ur database from oracle 10g. from exp cmd instead of expdp cmd bcoz oracle 10g. expdp cmd is not compitable with oracle 8.
simple give cmd>exp cmd if u want exp complete database from oracle 10g..
if u have any problem go reference oracle database utilities ....
and then imp in oracle 8 using imp cmd cmd>imp cmd bcoz here u want imp complete database....
i hope u do ur work successfully...
regards
Mohammadi -
Manipulate databases in Oracle 10g XE R2
Hi all,
I need to create and manipulate databases in Oracle 10g XE R2 using perl DBI:1.607
please can someone help me with some documentation
thank you in advanceuser10984468 wrote:
Hi all,
I need to create and manipulate databases in Oracle 10g XE R2 using perl DBI:1.607
please can someone help me with some documentation
thank you in advanceThis does not appear to be an issue with documentation. (Note the title of the forum.)
It does appear to be a request for documentation. Your question is best asked in the Database category - go to http://forums.oracle.com, scroll down to Databases, expand that category (click on More...), look for Express Edition.
The XE docs are at http://www.oracle.com/pls/xe102/homepage
Much more info about XE is at http://www.oracle.com/technology/products/database/xe/index.html -
Migrate Oracle 9i Database to Oracle 10g Solaris Platform
Hi DBAs,
Thank you very much all of you, you helped me in RMAN Duplicate Database, There was a problem in my backupset and now it has been resolved.
I have now following task.
I want to migrate Oracle 9i Database to Oracle 10g ASM, both are on Solaris platform. Please provide me step by step solution. I have very big Database about 250G Database.In the "Complete checklist for manual upgrades to 10gR2" is written:
PREREQUISITES
=============
+ Install Oracle 10g Release 2 in a new Oracle Home.
+ Install the latest available patchset from Metalink.
+ Install the latest available Critical Patch Update.
... so "Install the latest available Critical Patch Update" step is that for the Oracle 10g database Oracle Home or Oracle 9i database Oracle Home ? I think that is for the 10g database/ Oracle Home ...
after applying the CPU pacht there is some "Post Installation Instructions":
3.3.5 Post Installation Instructions which demande a connection to the database:
3. For each database instance running out of the ORACLE_HOME being patched, connect to the database using SQL*Plus as SYSDBA and run catcpu.sql as follows:
cd %ORACLE_HOME%\CPU\CPUJan2007
sqlplus /nolog SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catcpu.sql
SQL> QUIT
My question is ... If I want to upgrade a 9i database to 10g and I apply this CPU before the upgrade is done (to 10g Oracle Home), how could I connect to an instance which is not present to run this script ? ... is this step mandatory or is optional ?
Thanks,
P. -
Query regarding standby database state when primary is down or un-reachable
Hi
I want to know if there is any reflection on the standby database states when it's primary is down or not reachable? I want to use this information from standby node to determine if I can programatically execute (dgmgrl) failover operation or not? This is considering that the broker configuration has no fast-startfailover and no observer enabled/configured.
Thanks,
Yojana989192 wrote:
Hi
I want to know if there is any reflection on the standby database states when it's primary is down or not reachable? I want to use this information from standby node to determine if I can programatically execute (dgmgrl) failover operation or not? This is considering that the broker configuration has no fast-startfailover and no observer enabled/configured.
Thanks,
YojanaYou don't have exactly such option,
But you have alternate for it. Whenever standby is unreachable to primary then from standby alert log file you can see informational messages as RFS: Possible network disconnect with primary database , So you can write a script to grep those contents and to mail alert, so that you can sense whether any issue with primary database.
HTH. -
Standby Database on Oracle 10g Standard Edition ?
Hi All,
Is it possible to do Oracle Stand By Database on Oracle 10g SE ?
I read somewhere in this group that we can do standby database even in SE by writing a script that copy the archive log to the secondary server.
Is this approach reliable enough to be done in production ?
Does anybody have sample of the script ?
Thank you for your help,
xtantoHi,
Well, I think I'd beter put the scripts right there. Remember, they have been tested under MY environment, using MY releases, MY O.Ses. It's up to you to check whether the're valid for you. They are provided as is, for sample.
There are 4 files:
. generic.sh : you can duplicate this file in order to set up as many standby as needed, etc. It calls other scripts in order to:
. archivemove.sh : Get the archived redo logs to the standby host
. recover.sh : Synch the standby
. getrecid.sql : get the maximum progess point on the Manual Standby (used by archivemove.sh)
These scripts are used from the standby host. Remember to throughly check it before relying on it for production.
generic.sh
#!/bin/sh
# Be sure environment variable are set. If not, then it might fail!
# These environment variables are those for the Manual Physical Standby host
export ORACLE_HOME=/logical/oracle/Ora9i
export ORACLE_BASE=/logical/oracle
export ORACLE_STANDBY=tns_alias
export ORACLE_STANDBY_SYSDBA_PASS=change_on_install
export PATH=$ORACLE_HOME/bin:$PATH
export SOURCE_HOST=primary_host
export SOURCE_DRIVE=/primary/absolute/path/to/archived/redo/logs
export LOCAL_ARC_PARTH=/path/to/logical/archive/dest
# Check the date command usage depending on the platform
dateexec=`date "+%Y-%m-%d-%H-%M"`
# copy archived redo logs from main database
archivemove.sh > $dateexec.generic.log
# recover/sync the Manual Standby Database
recover.sh >> $dateexec.generic.log
archivemove.sh
#!/bin/sh
echo ----------------------------------------------------------------
echo ----------------------------------------------------------------
echo Get what log has last been applied to: $ORACLE_STANDBY
echo ----------------------------------------------------------------
sqlplus /nolog @getrecid.sql $ORACLE_STANDBY
echo ----------------------------------------------------------------
maxval=`tail -1 recid.log`
echo maxval=$maxval
rm recid.log
echo ----------------------------------------------------------------
# Check source drive to see what we're missing locally (source = primary)
for filename in `remsh $SOURCE_HOST 'ls $SOURCE_DRIVE' | sort`
do
# get archive number.
# WARNING here I'm based on MY archived redo log name format! Put yours for the cut
filename_parsed=`echo $filename | cut -c12-16`
# Check if the number is after the last one applied to standby
if [ $filename_parsed -gt $maxval ]
then
# grab it!
echo $filename
rcp $SOURCE_HOST:$SOURCE_DRIVE/$filename $LOCAL_ARC_PARTH
fi
done
echo ----------------------------------------------------------------
echo Removing old files
echo ----------------------------------------------------------------
# Check in local directory
for filename in `ls $LOCAL_ARC_PATH | sort`
do
# WARNING again about filename format
filename_parsed=`echo $filename | cut -c12-16`
# Check the arc number...
if [ $filename_parsed -lt `expr $maxval - 15` ]
then
# Delete it!
echo $filename
rm -f $LOCAL_ARC_PATH/$filename
fi
done
echo ----------------------------------------------------------------
echo end archivemove.sh
echo ----------------------------------------------------------------
recover.sh
#!/bin/sh
echo ----------------------------------------------------------------
echo Traitement de la base $ORACLE_STANDBY
echo ----------------------------------------------------------------
sqlplus /nolog << EOF
connect sys/$ORACLE_STANDBY_SYSDBA_PASS@$ORACLE_STANDBY as sysdba
SELECT MAX(RECID) "Log id now" FROM V\$LOG_HISTORY;
RECOVER AUTOMATIC DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE
CANCEL
SELECT MAX(RECID) "Log id after recover" FROM V\$LOG_HISTORY;
exit;
EOF
echo ----------------------------------------------------------------
echo End of recovery process
echo ----------------------------------------------------------------
getrecid.sql
connect sys/change_on_install@&1 as sysdba
SET HEAD OFF FEEDBACK OFF VERIFY OFF TERMOUT ON ECHO OFF TRIMSPOOL ON SERVEROUTPUT OFF
SPOOL recid.log
SELECT MAX(RECID) FROM V$LOG_HISTORY;
SPOOL OFF
exitHTH building your own scripts.
Yoann.
Maybe you are looking for
-
Enhancement settings not workin in my lumia 520
I could.nt able equalize my audio settings when earphones are in use...i need suggestions to enhance that...
-
I'm not sure what I've done but I need help please
Hi everyone. I seem to have done something really stupid. In the finder window, I renamed the 'folder' that has the house next to it, from Michaellastname just to Mike. Following that, I went into Front Row to watch a movie saved in my "Movie" folder
-
could anyone help me?
-
Solution Manager 4.0 Solution Monitoring User -Roles-Profiles for Satellite
Hi All, I have installed Solution Manager 4.0 (OS -Linux ,Database - DB2) . Now i need to connect solution manager to the R/3 4.6C Satellite Systems (DEV, QAS ,PRD) for Solution Monitoring and Service level Reporting . I have read the configuration g
-
My MacPro feels slow lately, OS X 10.6.8
Hello my MacPro feels slow lately I check and repair all the permits the Other day and today I check them again and again disk utility found lots Of errors what el se can I try? reset PRam? Thankyou