Find sequence and thread number of Oracle 10g Database
Hallo!I am a newbie Oracle DBA studying for OCP.I am trying various methods of performing flashback of the database.
Out of these options there is one that uses the sequence and thread numbers of the database as below
RMAN> FLASHBACK DATABASE
2> TO SEQUENCE=223 THREAD=1;
How can I find out current sequence and thread numbers of the db to enable me implement such a flashback strategy?
Thanks.
Current sequence# is the one with status = CURRENT
SELECT group#, thread#, sequence#, status FROM v$log;Lukasz
Similar Messages
-
What is the function of _xdb and _xpt services in oracle 10g database.
what is the function of xdb and xpt services in oracle 10g database.?
Hi,
If you are troubleshooting check the below link too:
Issues installing. Listener not working
Best regards,
Rafi.
http://rafioracledba.blogspot.com/ -
MBRC and SYSTEM STATISTICS in Oracle 10g database.
Hi All,
I am performing database upgrade from Oracle 8i Solaris to Oracle 10g HP-UX using exp/imp method.
But i do have some doubts regarding MBRC and System statistics.
MBRC in Oracle 10g is automatically adjusted if MBRC parameter is not set, but i found value 128 as shown below.
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for HPUX: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL> sho parameter multi
NAME TYPE VALUE
db_file_multiblock_read_count integer 128Also i performed one simple full table scan to test it...but db file scattered read is performing on 128 blocks. So i dont think 128 is suitable and is automatic, i mean MBRC is not set accrodingly it always uses 128.
Does this MBRC value affects whole database performance?
Regarding SYSTEM STATISTICS i found below result:
SQL> select * from AUX_STATS$
SNAME PNAME PVAL1 PVAL2
SYSSTATS_INFO STATUS COMPLETED
SYSSTATS_INFO DSTART 11-09-2009 04:59
SYSSTATS_INFO DSTOP 11-09-2009 04:59
SYSSTATS_INFO FLAGS 1
SYSSTATS_MAIN CPUSPEEDNW 128.239557
SYSSTATS_MAIN IOSEEKTIM 10
SYSSTATS_MAIN IOTFRSPEED 4096
SYSSTATS_MAIN SREADTIM
SYSSTATS_MAIN MREADTIM
SYSSTATS_MAIN CPUSPEED
SYSSTATS_MAIN MBRC
SYSSTATS_MAIN MAXTHR
SYSSTATS_MAIN SLAVETHRNow whether NOWORKLOAD or WORKLOAD is better, and this server is still under building process....so how can i collect WORKLOAD stats as high load on this server can't be performed?? Is it really require to gather system statistics, what will happen with NOWORLOAD stats?
I have not seen single database where system stats are gathered in our organisation having more than 2000 databases.
-YasserMaybe this article written by Tom Kite helps:
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:499197100346264909 -
Oracle 10g database as Resource manager and heuristic transaction decision
Hi,
I have read in documents about distributed tarnsaction that resource manager like oracle databasecthat are involved in distributed transaction can take heuristic decision(unilateral decision) and can either rollback or commit the transaction associated with itself without having confirmation from the transaction manager.
I want to know how a resource manager take this unilateral decision and can we set this as parameter either in resource manager or in application server.
Thanks in advanceHi,
Following are some links to documents.
Handling Heuristic Completions
http://edocs.bea.com/wls/docs81/ConsoleHelp/jta.html
A heuristic completion (or heuristic decision) occurs when a resource makes a unilateral decision during the completion stage of a distributed transaction to commit or rollback updates. This can leave distributed data in an indeterminate state. Network failures or resource timeouts are possible causes for heuristic completion. In the event of an heuristic completion, one of the following heuristic outcome exceptions may be thrown:
HeuristicRollback—one resource participating in a transaction decided to autonomously rollback its work, even though it agreed to prepare itself and wait for a commit decision. If the Transaction Manager decided to commit the transaction, the resource's heuristic rollback decision was incorrect, and might lead to an inconsistent outcome since other branches of the transaction were committed.
HeuristicCommit—one resource participating in a transaction decided to autonomously commit its work, even though it agreed to prepare itself and wait for a commit decision. If the Transaction Manager decided to rollback the transaction, the resource's heuristic commit decision was incorrect, and might lead to an inconsistent outcome since other branches of the transaction were rolled back.
HeuristicMixed—the Transaction Manager is aware that a transaction resulted in a mixed outcome, where some participating resources committed and some rolled back. The underlying cause was most likely heuristic rollback or heuristic commit decisions made by one or more of the participating resources.
2. Understanding EJB Transaction
http://www2.sys-con.com/itsg/virtualcd/Java/archives/0504/tyagi/index.html
Unilateral Decisions
The transaction manager allows certain heuristic or speculative decisions to be made based on the state of all participating resources in a transaction and the underlying two-phase commit protocol. A heuristic decision occurs when one of the resources in the transaction unilaterally decides to commit or roll back the transaction without permission from the transaction manager
3. Oracle® Containers for J2EE
http://download.oracle.com/docs/cd/B31017_01/web.1013/b28958.pdf
Heuristics
To achieve consensus, two-phase commit is a blocking protocol. This means that, if a coordinator fails before delivering the final phase messages, the participants must remain blocked, holding onto resources. Modern transaction systems add heuristics to two-phase commit, which allows such participants to make unilateral decisions about whether they will commit or rollback. If a participant makes a choice that turns out to be different from the one taken by other participants, then non-atomic behavior occurs.
I got this problem while trying to do a distributed J2EE tarnsaction with two XA (one MQ and other Oracle 10g database XA) and one non-xa (oracle 10g database). According to above docs a resource manager can decide tarnsaction final state unilaterally and that can result in unatomic transaction.
Do oracle also make such decision and if yes then on what ground it takes decision? Can we change this according to our requirement either always rollback/commit anywhere as parameter setting?
Thanks -
Where can I find the deployed EJB files in Oracle 10g AS(904)
Hello All,
Where can I find the deployed ejb files, stubs and skels in the Oracle 10g (904)
When I try to run my ejb application I m getting following exception:
com.evermind.server.rmi.OrionRemoteException: Error (de-)serializing object: org.apache.log4j.Logger
I am not sure what is causing this error. I am not using any logging in my EJB. But the logging framework is configured in the application server.
Your input would be a great help to me
Thank youThanks Carty,
I am not creating Connection from EJB. I have a POJO called DBManager that looks for the DB Connection and return that to either EJB or other POJO that requests for Connection.
I am having a private method that get the connection from the DBManager because while writing UnitTest cases I can mockup getting Connection as my Unit test case will be a POJO again..
I have a question here regarding making DBManager as Singleton class. In my current project, I have configured my database in the application server as getting the connection by lookup for datasource through JNDI. It internally maintains all logical connection and always have one physical connection. In such scenario how implementing singleton will be beneficial?
Thank you for answering all my questions. -
Export and import Oracle 10G database
Hello all
Can anyone tell me once for all how can i backup oracle 10G database and restore it in other computer (export and import)
thanks alot
RonDo you can access to metalink?
If not, I copy an paste this doc's....
Doc ID: Note:10767.1
Subject: How to perform FULL System Export/Imports
Type: BULLETIN
Status: PUBLISHED
Content Type: TEXT/X-HTML
Creation Date: 18-APR-1994
Last Revision Date: 30-AUG-2002
Purpose
This article highlights some important points to consider when performing
a Full System Export and Import.
Scope and Application
It is intended to assist users performing FULL System Exports and Imports.
A Full System Export and Import is a useful way to replicate or clean up
a database. Please note the following guidelines when performing a Full
System Export and Import:
1. When performing the import, ensure you are pointing at the correct
instance. Always check values for the SID and two task driver before
proceeding.
*Note: On Unix systems, just entering a sub-shell, such as using
C-shell, can change the database that the import would work
against.
2. When possible, it is advisable to take a physical copy of the
exported database and the database you intend to import into before
starting the import. This ensures any mistakes are reversible.
3. NEVER run a FULL SYSTEM IMPORT on a machine that has more than one
database UNLESS you are 100% sure all tablespaces have been
pre-created. A full import will create any undefined tablespaces
using the same datafile names as the exported database. There are
situations where this is very dangerous:
-> If the datafiles belong to ANY other database, they will be
CORRUPTED. This is especially true if the exported database is
on the same machine, because its datafiles will be re-used by
the database you are importing into.
-> If the datafiles have names that clash with existing operating
system files.
4. When exporting, it is advisable to also produce a report showing
information you may need before / after the import:
-> List the tablespaces and datafiles
-> List the rollback segments
-> List a count, by user, of each object type such as tables,
indexes, etc.
This enables you to ensure that tablespaces have been pre-created
and to check the success of the import after it is complete.
5. If you are creating a completely new database from an export, remember
to create an extra rollback segment in SYSTEM, and make this available
in the init.ora file before proceeding with the import.
6. There are some versions of export that do not retain sequence numbers
correctly. It is advisable to select next_value for each sequence
after the export so that these can be checked after import.
Following these guidelines will help you to avoid major problems.
Doc ID: Note:174226.1
Subject: How To Copy an Oracle Database To Another Machine
Type: HOWTO
Status: PUBLISHED
Content Type: TEXT/X-HTML
Creation Date: 12-OCT-2001
Last Revision Date: 01-OCT-2003
goal: How to copy an Oracle database to another machine
fact: Oracle Server - Enterprise Edition
fix:
Pre-requisites: The copy is between 2 machines, both have to be on the same OS
and have to have exactly the same database version installed.
1. Make sure the database you want to copy was closed with a SHUTDOWN IMMEDIATE,
SHUTDOWN NORMAL or SHUTDOWN TRANSACTIONAL.
2. Copy init.ora and control files to create instance and be able to go in
mount mode. Check the init.ora for the locations where the controlfiles have
to be, if those locations are not valid on the machine put the control files on
different places and adjust the init.ora accordingly.
3.a. Copy the datafiles (all of them).
b. Copy the redo-logfiles (all of them).
4.a. (Unix only) Set the environment variables:
ORACLE_SID - set to the database name you wish to create
ORACLE_HOME - set to full pathname of the Oracle system home directory
PATH - needs to include $ORACLE_HOME/bin
b. (NT/2000 only) Do 'set ORACLE_SID=<SID>'
Use oradim to create the service for the instance. For more information
on oradim please refer to (the part that refers to creating a new instance):
Note:68720.1 Creating a new 7.3, 8.0, 8.1 Instance/Database
5. Use servermanager (check the name to use for your version of oracle) or
sqlplus (version 9i and above) to startup the database in mount mode.
Do
CONNECT INTERNAL/<PASSWORD>
then
STARTUP MOUNT
Then do a rename of the copied datafiles if they are not in the same path as on
the other machine. For all the files that are in the result of the query:
SELECT NAME FROM V$DATAFILE;
do
ALTER DATABASE RENAME FILE '<oldfullpath>\<filename>' to <
newfullpath>\<filename>';
6. Query the datadictionary for the old location of the redolog files using:
SELECT MEMBER FROM V$LOGFILE;
If the new place is not the same as the old do:
ALTER DATABASE RENAME FILE '<oldfullpath>\<redologfilename>' to &
lt;newfullpath>\<redologfilename>';
7. Now open the database:
ALTER DATBASE OPEN;
****************************************************************** -
How to store photo images and thumbimpressions in oracle 10g database
Hi all
I have an web application running in Oracle 10g rel 1 database server in RHEL3. It has application server with forms and j2ee component as middle tier. I need to store centrally photo images and thumb impressions and use it in our application without any overhead on retrieval and performance of web application. what will be optimized method of storage of photo and thumb impressions. Awaiting your valuable suggestions.
Regards
Vijay KumarHi Vijay,
How to store photo images and thumbimpressions in oracle 10g database I have working code here for storing photos in Oracle tables that you may find useful:
http://www.dba-oracle.com/t_storing_insert_photo_pictures_tables.htm
Hope this helps . . .
Donald K. Burleson
Oracle Press author
Author of "Oracle Tuning: The Definitive Reference"
http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm -
Questions about free Download Oracle 10g, Database and Developer suite
Hi everyone, got some questions..
1) Is it possible to download free Oracle 10g and Developer suite? is a 30 day license trial or something like that?
2) On windows systems which are the minimun requirements?, for example in a Pentium 4, 512Mb RAM, Windows XP Home edition is OK?
3) Should I download Standard Edition? Personal?
4) If I am trying to update my Oracle Developer knowledge (I was developer on 1999 with Oracle 7.3 and Developer 2000) what products do I have to install?? Oracle DB 10g, Developer Suite,Application Server too?, what else?
Thanks guys!
J.My answer you could find here Questions about free download Oracle 10g, Developer Suite
-
How to install NW2004s abap and/or java on Oracle 10g on SLES 10 32 bit?
Does anyone know - How to install NW2004s abap and/or java on Oracle 10g on SLES 10 32 bit?
Does SAP offer the software for trial for this?
JayHi Check the link page you shall get the PDF and then goto Page 50 .you shall find the details.
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3096e412-7308-2b10-4999-e16c64ce5eeb
Thanks
Rishi Abrol -
Installing and configuring PHP for ORACLE 10g Release 1
Hello Lads,
Please can anybody help me finish PHP install...
I have got this error when executing the following command..
#make install
Here is the error:
/usr/local/php-5.1.4/sapi/cli/php: error while loading shared libraries: libclntsh.so.10.1: cannot open shared object file: No such file or directory
Thanks!I answered in your other thread... the one without the I in the title :)
nstalling and configuring PHP for ORACLE 10g Release 1 -
How to Find the Current Instance Id in Oracle 10g
Hi,
how to find the current instance id in oracle 10g studio,
I have the below code :
if (InstanceScreenFlow.processInstance.id.id.indexOf(text : ins.id) < 0) {
/// do something
it is saying that "'processInstance' is not a function"
Thanks,
Brijesh Kumar Singh.Why not just pass in the "id" predefined variable into your screenflow? Once you do that you'll be able to refer to it as "id.id" anywhere inside your screenflow.
Dan -
How to find encrypted columns in oracle 10g database
Hi,
How to find encrypted columns in oracle 10g database? We can see using view dba_encrypted_columns or all_encrypted_columns .
my question is apart from this is there anyother views or tables?
Thanks..user602872 wrote:
Hi,
How to find encrypted columns in oracle 10g database? We can see using view dba_encrypted_columns or all_encrypted_columns .
my question is apart from this is there anyother views or tables?Hmm not which I could find,
SQL> select * from dict where lower(table_name) like '%encrypted%';
TABLE_NAME
COMMENTS
DBA_ENCRYPTED_COLUMNS
Encryption information on columns in the database
ALL_ENCRYPTED_COLUMNS
Encryption information on all accessible columns
USER_ENCRYPTED_COLUMNS
Encryption information on columns of tables owned by the user
SQL>HTH
Aman.... -
Auditing in oracle 10g database and oracle 10g application server
Dear friends,
We have oracle 10g application server and oracle 10g database server in place.My criteria is to audit users connected using oracle application user credentials to the database.
Can you please tell me how can i do it.
Thanks & regards,Its the database connection you want to track. The session audit will show where it came from.
Auditing is turned using this command:
alter system set audit_trail = DB scope=spfile;
Note: The use of spfile will require a DB bounce before audit starts
To audit Sessions:
audit create session;
Query by Audit Type:
SELECT A.USERNAME,
OS_USERNAME,
A.TIMESTAMP,
A.RETURNCODE,
TERMINAL,
USERHOST
FROM DBA_AUDIT_SESSION A
WHERE USERHOST = <replace with iAS servername> ;
By User
SELECT USERNAME,OBJ_NAME,ACTION_NAME , TIMESTAMP
FROM DBA_AUDIT_TRAIL WHERE USERNAME = 'SCOTT';
Check for users sharing database accounts
select count(distinct(terminal)),username
from dba_audit_session
having count(distinct(terminal))>1
group by username;
Attempts to access the database at unusual hours
SELECT username, terminal, action_name, returncode,
TO_CHAR (TIMESTAMP, 'DD-MON-YYYY HH24:MI:SS'),
TO_CHAR (logoff_time, 'DD-MON-YYYY HH24:MI:SS')
FROM dba_audit_session
WHERE TO_DATE (TO_CHAR (TIMESTAMP, 'HH24:MI:SS'), 'HH24:MI:SS') <
TO_DATE ('08:00:00', 'HH24:MI:SS')
OR TO_DATE (TO_CHAR (TIMESTAMP, 'HH24:MI:SS'), 'HH24:MI:SS') >
TO_DATE ('19:30:00', 'HH24:MI:SS');
Attempts to access the database with non-existent users
SELECT username, terminal, TO_CHAR (TIMESTAMP, 'DD-MON-YYYY HH24:MI:SS')
FROM dba_audit_session
WHERE returncode <> 0
AND NOT EXISTS (SELECT 'x'
FROM dba_users
WHERE dba_users.username = dba_audit_session.username);
Other audits you might consider:
audit grant any object privilege;
audit alter user;
audit create user;
audit drop user;
audit drop tablespace;
audit grant any role;
audit grant any privilege;
audit alter system;
audit alter session;
audit delete on AUD$ by access;
audit insert on AUD$ by access;
audit update on AUD$ by access;
audit delete table;
audit create tablespace;
audit alter database;
audit create role;
audit create table;
audit alter any procedure;
audit create view;
audit drop any procedure;
audit drop profile;
audit alter profile;
audit alter any table;
audit create public database link;
Best Regards
mseberg -
How to the find the Delete records/Statement used in Oracle 10g database?
Hi all,
I am Using Oracle 10g Database release 2 on Windows 2003 Server Enterprise Edition... Last week One of my user has deleted important records from my database,i need to find who did this... is there any way to find out ...Please Advice me ....One More thing i have not enabled the Auditing features in My database .....
Thank You
ShanRajesh Lathwal wrote:
Use log miner ..
Regards
RajeshEven with that, if he wants to know WHO, he will have to have previously enabled extended logging .... -
Restore and recover Oracle 10g database from tape.
I have a very basic question for restore and recover Oracle 10g database. Our envirnment settings are:
Oracle 10g on Unix, daily database and archivelog backup to Vista NetBackup server. Retention policy is 2. Old backup files are copied from NetBackup server to the tape for record keeping.
I want to restore a database to a point in time. Because our retention policy is setup to 2. The backup files I need have been copied to the tape. So I should ask SYSTEM ADMIN to copy the backup files back to NetBackup server disk or I can ask him to copy backup files to the Unix server that host my Oracle 10g database. Then I can use Rman to do restore and recover. Is this doable? I know normal procedure is to copy backup files I need back to NetBackup server disk, not directly back to database server. Please put your comments here as early as better. I do appreciate your kind help.853153 wrote:
I have a very basic question for restore and recover Oracle 10g database. Our envirnment settings are:
Oracle 10g on Unix, daily database and archivelog backup to Vista NetBackup server. Retention policy is 2. Old backup files are copied from NetBackup server to the tape for record keeping.
I want to restore a database to a point in time. Because our retention policy is setup to 2. The backup files I need have been copied to the tape. So I should ask SYSTEM ADMIN to copy the backup files back to NetBackup server disk or I can ask him to copy backup files to the Unix server that host my Oracle 10g database. Then I can use Rman to do restore and recover. Is this doable? I know normal procedure is to copy backup files I need back to NetBackup server disk, not directly back to database server. Please put your comments here as early as better. I do appreciate your kind help.For sure it is double work, To copy backup files on UNIX host.
Are you using catalog or nocatalog?
If the backup information is out of retention, Catalog them again also in netbackup.
So that you can able to restore database directly without copying those files to host.
Maybe you are looking for
-
What is wrong with my font? Squares instead of letters - Help!
Can someone tell me what is wrong with my system font? Everytime I need to put my administrator key the login page will appear but with weird glitched font of squared A's all around (see picture). I can't recall that I have done any installations th
-
Disk Utility Refuses to Format drive to GUID
I purchased a 1 TB wd 10eavs external hard drive, and have tried numerous things to get it to format. Every single time, Disk Utility comes up with an error saying "File system formatter failed" after about 2 minutes. I can format it to NTFS but that
-
Identify digital camera in metadata in CS3 Bridge
The metadata no longer shows the make and model of the digital camera used. It is identified generically as digital. It is necessary to go to file information for camera identification. For me this is very inconvenient. I am unable to identify at a g
-
When I capture a still frame froma video in Llightroom 4.3, where does the captured frame end up? I cannot find it. Stan
-
Quotation comparison in vendor order currency.
Hi MM gurus, I have created quotations (ME47) for local vendors in LKR currency. But my company currency is USD. In quotations, quotation price shows in LKR. But when i execute the price comparison (ME49) it shows in USD. My client needs it in LKR. I