how to change to archivelog mode(zt from asktom)
今天在asktom上看到这么一个帖子, 觉得比较简洁明了, 这也是tom的一贯风格.Can we use the init.ora created from spfile to recreate spfile in case of any spfile errors? I find a *. prefixed to all parameters. Should this be removed ?One more question: If I have to change init parameters for making my db to archivelog mode, then the steps what I understand is :a. Change the reqd parameters in init.ora.b. Startup the db as usual from spfile.c. Create spfile from pfile.d. shutdown normale. startup
how to bind in list in Oracle7/8 (zt from asktom)
Mark -- Thanks for the question regarding "In list question with bind variables.", version originally submitted on 2-May-2000 13:21 Eastern US time, last updated 12-Apr-2005 21:02Tom's latest followup | GOTO a Bookmarkable Page | Bottom You Asked (Jump to Tom's latest followup) Hi Tom, I am using Pro*C and I need to send an array of strings in a "where <value> in :<value>" is this possible? And if not what should I do? and we said.
怎么在多个session之间共享全局变量
Hi Tom,We have a similar requirement to have global values accesible across multiple sessions.We are currently in the process of upgrading to 9i, and was thinking of using the global context feature to do that.Can you provide us with a simple example to do this on 9i using global context?Appreciate your help,Thanks, Followup: ops$tkyte@ORA920> create or replace context App_Ctx using My_pkg 2 ACCESSED GLOBALLY 3 /Context created.ops$tkyte@ORA920>ops$tkyte@
undo_retention and undo reuse (zt from asktom)
Reviewer: hk from Finland Original questioner asked also:"How do I know if I actually do need 3.5G undo spaceor Oracle is not reusing the undo space where it shouldbe?"That is good question anyhow and it's still open here?If undo_tablespace size is 100Megs and we run some batch job, which take 95megs undo space. Now, batch job is done and undo_tablespace is 95% full. Then immediately starts another transaction and it needs over 5 megs undo space. Is undo_retention ignored and trans
about temp files
Thanks for the quick response.Is there a way to force temp files to be created as non-sparse files in UNIX ? Followup: Here, I'll let you tech edit a new section of "expert one on one Oracle" 2cnd edition :)Temp FilesTemporary data files (temp files) in Oracle are a special type of data file. Oracle will use temporary files to store the intermediate results of a large sort operation, hash operations, global temporary table data, or result set, when there is insufficient memory to
about temp segments(zt from asktom)
May 07, 2002 Reviewer: A reader Hi Tom,When user is doing sort operation.oracle first do sort in memory(sort_area_size) and if the space is not enough it go to temporary tablespace(if temp tablespace is TEMP) and create TEMP SEGMENT for sorting.Once process is done with sorting oracle deallocate extents.Am i right?As far as i konw we only create TEMP tablespace ,How Sort segment are created?.and how many sort segment(max) can be in a database.2) If many session are performing sort o
logical reads vs physical (zt from asktom)
please correct me if my understanding is wrong.LIO - from/to the buffer cache ( not disk ).PIO - to/from the disk.correct ?in many of the threads on tuning i notice that you mention, the less the number of PIO as well as LIO the better. i can understand the 'physical' part of it but not the logical.the query has to get the results and it has to do as much work as is necessary to get it, isnt it ? so at least that much of LIO is a must. how can we reduce that ? Followup: LIO = logical = buffer
Using Grouping_id() in aggregate.
You Asked (Jump to Tom's latest followup)Hi TomI never really understood the usage of GROUPING_ID function in OTN.I heard it avoids using multiple GROUPING functions.Can you please illustrate with a small exampleThanks and we said...http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:18735507471922#18844335353167You use grouping_id with "grouping sets" or group by cube/rollup -- it tells you the level of aggregation.Consider, we'll show grouping sets, group b
something about latch algorithm
Reviewer: A reader from NJ, USA Tom,I reviewed your book (Expert One-on-One Oracle and Oracle Perf. By design, Cary Millsap's Optimizing Oracle Performance. Based on these, I have come up with a little logic of how the Oracle kernel's latch acquisition algorithm will look like at a very high level. Please confirm if my understanding is correct. The code snippet is shown below :Code snippet for latch that sorround an Oracle kernel code==================================================
How to find sql with need bind(from asktom)
Lbrary cache latch contention is typically caused by NOT using bind variables. It is due to excessive parsing of statements.One way to see if this might be the case in your situation is to run a script like:create table t1 as select sql_text from v$sqlarea;alter table t1 add sql_text_wo_constants varchar2(1000);create or replace function remove_constants( p_query in varchar2 ) return varchar2as l_query long; l_char varchar2(1); l_
Some tips on views (from asktom)
The finaly question becomes what is worse for perforamnce,is simple -- "doing things to protect programmers, who are paid to write code for money and do it right, is the worst thing you can do for performance"In my world -- views are implemented for single use things. When I build a view, it is for an application. I tend to not use a generic view for everything. I create a view much like people create subroutines -- for a PURPOSE.So, i will pick neither of 1 or 2 from your first l
Setup two listener.
Setting up multiple Listeners I. Setting up Two Listeners for one Instance Same Machine Main Listener file is located in %ORACE_HOME%networkADMIN directory. Default listener filename is listener.ora. To add multiple listeners, listener name, ie must first add in the listener.ora file. Then start the listerner from listerner.ora. In this example, listeners are located in the same machine. Sample two listeners configuration
v$log.status的一点概念(zt from oracle-l)
http://www.mail-archive.com/oracle-l@fatcity.com/msg90348.htmlThis makes sense if you think about where the various v$ dynamic performance views get their info from, and which Oracle background process is responsible for each task. First, note that: 1. v$log.status gets its redo log info from the *control file* 2. v$datafile_header.checkpoint_change# and checkpoint_time get their info from the *datafile headers*. Here's the sequence of events when a log switch happens: 1.
How to update aggregate history Info(zt from asktom)
You Asked (Jump to Tom's latest followup)Hi Tom,We have a busy OLTP database that shares many schemas for many applications. A workflow application has a dbms job that runs every 5 minutes. Here is what it does:1. delete from <a wide de-normalized summary table>;2. insert into <this de-normalized summary table> select * from <a code table>, < inline view with sum(case when..) as period1,... ... sum(case when ...) as period10, c