Wednesday, March 30, 2005
I will be working on this, but if you suspect that the execution plan that Simple profiler lists doesn't make sense or is truncated then the workaround is to run the trace file through tkprof (without the explain= option since that can also give incorrect results) and look for the plan recorded there.
Wednesday, March 23, 2005
> Niall, monitoring will show table as used, but statistics is updated
> at the time of commit. First, there is no statistics in USER_TABLES that
> would count the number of times that blocks have been referenced by I/O
> and second, statistics for monitored tables is not updated until the
> transaction commits. To do otherwise would seriously break the relational
> rules.
Clearly I wasn't advocating using table monitoring but I would refer
you to the following piece of rule breaking
SQL> connect / as sysdba
Connected.
SQL> drop user u1;
User dropped.
SQL> create user u1 identified by u1
2 default tablespace users
3 temporary tablespace temp
4 quota unlimited on users;
User created.
SQL> grant create session,create table to u1;
Grant succeeded.
SQL> connect u1/u1
Connected.
SQL> select to_char(sysdate,'hh24:mi:ss') from dual;
TO_CHAR(
--------
20:39:18
SQL> create table t1 (col1 number);
Table created.
SQL> insert into t1
2 select rn
3 from (select rownum rn,'x' from all_objects,all_objects where rownum < 1001
);
1000 rows created.
SQL> rollback;
Rollback complete.
SQL> host time 23:55
SQL> select to_char(sysdate,'hh24:mi:ss') from dual;
TO_CHAR(
--------
23:55:06
SQL> select table_name,inserts,updates,deletes from useR_tab_modifications;
TABLE_NAME INSERTS UPDATES DELETES
------------------------------ ---------- ---------- ----------
T1 1000 0 0
SQL>
precise but wrong and certainly a violation of relational rules. This
is why Oracle refer to it as an estimate.
Tuesday, March 22, 2005
10.1.0.3 README Additions
These are additions to the Patch Set README which are not documented in separate notes.
Workaround:
Delete pdh.dll from %ORACLE_HOME%\bin.
Tuesday, March 15, 2005
I found the multi-step silver bullet of fixing missing cbo statistics particularly unhelpful because of the following unfortunate errors.
alter table xxx delete/drop??? Statistics; isn't a valid command, in fact neither of the options given is a valid command.
Exec dbms_stats(...); isn't a valid command either.
The conclusion that the dba drew from the above was
The system immediately returned to an acceptable performance level and the DBA learned about the importance of providing complete and timely statistics for the CBO using the dbms_stats utility
Well clearly the dba could have learned no such thing from the published commands because they wouldn't actually work. Assuming the author intended that the dba should run analyze table delete statistics and then use dbms_stats to gather stats this tells you nothing about timeliness or completeness of statistics gatherng though it might tell you about a new feature that might make your life easier.
Friday, March 11, 2005
In Oracle's case there is an often overlooked opportunity to discover known issues like this before you run into them rather than afterwards. This is because Oracle keeps a regularly update list of issues known to affect their database patchsets.
For Oracle 9.2 you should start at Note 189908.1
For Oracle 10g you should start at Note 279831.1
A valid support contract is required for these notes.
Wednesday, March 09, 2005
We are sending the e-mails using the mailx client from the unix cron jobs.
The new requirement is, after the stored procedure is executed using the job
scheduler (dbms_job), we would like to send the e-mail from Oracle. Is there
a way to send the e-mail from oracle?
The answer to this does depend on version and requirements, but yes you can send emails from Oracle in all versions from 8.1.7 up.
If you just want simple mail then the UTL_SMTP package will allow you to send emails quite simply. I have uploaded a sample package that you can use for this purpose here. If you want to send attachments or large messages (larger than the 32k varchar2 limit) then prior to 10g you will need to adopt some other technique. One possible technique is to load a fully capable Java mail client into the database and create a java stored procedure for this code. Tom Kyte covers this in his Expert one-on-one Oracle book.
It is also worth looking at the HTMLDB 1.6 release which uses a wrapper around UTL_SMTP to queue and send mail. This asynchronous queue related technique is suitable for high volume mailings as typically a mail server session will not respond in a suitable timeframe for a transaction processing application.
10g itself introduces the UTL_MAIL package. This allows attachments etc to be sent.
Tuesday, March 08, 2005
Version 0.9 contains a number of enhancements and bug fixes. In particular the following should be noted
Future developments are listed in the readme, I will be looking especially at completing a help system with the 1.0 release and at improvements to the business process repository and trending.
Tuesday, March 01, 2005
The second article looks at the issue of credibility. Don states that he looks for
He also clearly regards having books published as an indicator of credibility. Of the 9 people he chooses to highlight, 7 are published authors of books on Oracle.
He also states that
the Oracle Oak Table group claims to be “a network for the Oracle scientist”, yet I was concerned when I could not locate some of their members scientific research, academic achievements, awards, computer science conference proceedings, nor their membership in professional computer science organizations such as ACM or IEEE.
He probably has me, amongst others in mind, the Google search for a CV or Resume which he says he uses doesn't actually throw up my resume (because it isn't on-line) (though it does throw up VB code with On Error Resume Next in it, the perils of searching).
I'd agree that the ability to distinguish good advice from bad, and sound thinking from unsound is very important. I don't think that the Web helps much here. On the other hand CV information, even if you can get it, may not be that much of a help. For example Don appears to have none of the qualifications he looks for in others, his degree is in Psychology, he has never worked for Oracle, if you use the free scholar service provided by Google, you will find that whilst Don's books are listed and his presentations at IOUG count (the UKOUG doesn't show in these searches) he is cited just the once. That citation is in itself an interesting and accurate description of the checklist approach.
"Traditional approaches ([B01], [G01], [ORCLT99]) rely primarily on graphing and examining a small number of system parameters. Determining which system resources to investigate is at best a lengthy process of educated guesswork, where many problems can run undetected." (B01 is the citation, the paper is here).
There is of course another thing that is important in determining credibility, and that is the content of what the author is proposing. The credibility article is somewhat excellent in this regard.
Don - who, according to his resume, got his degree in Psychology in 1979 and started work in 1983 - claims in the article to have been using email in the 70s, one assumes that this was the University in-house email system rather than public discourse, and 'the web' at the same time period. This is really quite a remarkable claim given that Tim Berners-Lee had not yet even started upon Enquire, which itself would not become the web until 1991 or so. For some reason I am reminded of Al Gore. Now, it is true that people confuse the web and the internet all the time, but how credible is a Adjunct Professor in an IT field who does the same thing?
Now I am sure that Don is not arguing that he himself has little or no credibility in his own eyes (and we do know that he is a prolific publisher and author), but I remain confused as to why a published CV is apparently more important than attempting to understand and demonstrate behaviours.
In the mean-time and for what its worth I do have a degree - in Economics from the University of Bristol, I already have a job and am not actively looking for another, and if you care to read my presentations you will find them here or at the websites of the relevant conferences.
Niall.