Note: Technical Talk being moved to:
www.nazimcricket.com/wiki


Monday, 12 December 2011

Available db_recovery_file_dest

A gr8 script picked up somewhere along the way to check the available amount of db_recovery_file_dest space.
select name,
  floor(space_limit/1024/1024) "Size_MB",
  ceil(space_used/1024/1024) "Used_MB",
  floor(space_limit/1024/1024) - ceil(space_used/1024/1024) "Available_MB",
  round(ceil(space_used/1024/1024) / floor(space_limit/1024/1024) * 100)  || '%' "Percent Used"
  from v$recovery_file_dest
  order by name;

Tuesday, 8 November 2011

chmod

Only just found out, instead of working out the numeric settings of chmod, the following conventions can be "literally" used:
chmod u+rwx
chmod g+rwx
chmod o+rwx

chmod u-rwx
chmod g-rwx
chmod o-rwx

Monday, 24 October 2011

Export to Pipe

Using fifo (first in first out) you can redirect your database exports through a pipe straight to gzip.
make fifo pipe
mkdir fifo db.fifo

write the file output to gzip and send to background
cat db.fifo | gzip > db.dmp.gz &

run the export to the fifo pipe
exp username/password file=db.fifo log=db.log etc

Thursday, 13 October 2011

PeopleSoft SymbolicID

Note to self - symbolicid is stored in table:
PSACCESSPRFL

Tuesday, 27 September 2011

Ian Healy - Legen ... wait for it ... dary!!

What a generous bloke. Signed a whole bunch of items. Amazing stuff!!

OEM - UDM Collection Interval

You may have noticed that User Defined Metrics (UDM) in Oracle Enterprise Manager (OEM) have a minimum collection time of 5 minutes.

If you wish to change this interval, you can do so by editing a xml file on the server which is the target of the UDM.

On target server, navigate to $ORACLE_AGENT_HOME/sysman/emd/collection and edit file oracle_database_{SID}.{SERVER}.xml.

Search for the name of the UDM and edit the IntervalSchedule tag e.g.

<CollectionItem NAME="{UDM_NAME}">
<Schedule>
<IntervalSchedule INTERVAL="{n}"/>
</Schedule>

Saturday, 13 August 2011

Check Server UpTime

systeminfo | find "Time"

Saturday, 6 August 2011

Ardmona Cricket Cards

Recent inclusions to the collection are sets of Ardmona 1979 and 1980 cricket cards:

Ardmona 1979 Set

Ardmona 1980 Set

Friday, 5 August 2011

Change Apex 4.0 Admin Password

To change the ADMIN user password on Apex 4.0 run the script apxxepwd.sql. This will change the encrypted password stored in table apex_040000.wwv_flow_fnd_user.
Rem Copyright (c) Oracle Corporation 1999 - 2006. All Rights Reserved.
Rem
Rem NAME
Rem apxxepwd.sql
Rem
Rem DESCRIPTION
Rem Changes the password for the INTERNAL ADMIN user
Rem
Rem NOTES
Rem Assumes the SYS user is connected.
Rem
Rem REQUIRENTS
Rem - Oracle 10g
Rem
Rem
Rem MODIFIED (MM/DD/YYYY)
Rem jstraub 08/01/2006 - Created
Rem jkallman 09/29/2006 - Adjusted current_schema to FLOWS_030000
Rem jkallman 08/02/2007 - Change FLOWS_030000 references to FLOWS_030100
Rem jkallman 07/08/2008 - Change FLOWS_030100 references to FLOWS_040000
Rem jkallman 10/02/2008 - Change FLOWS_040000 references to APEX_040000

Rem

set define '&'

set verify off

alter session set current_schema = APEX_040000;

prompt ...changing password for ADMIN

begin

wwv_flow_security.g_security_group_id := 10;
wwv_flow_security.g_user := 'ADMIN';
wwv_flow_security.g_import_in_progress := true;

for c1 in (select user_id
from wwv_flow_fnd_user
where security_group_id = wwv_flow_security.g_security_group_id
and user_name = wwv_flow_security.g_user) loop

wwv_flow_fnd_user_api.edit_fnd_user(
p_user_id => c1.user_id,
p_user_name => wwv_flow_security.g_user,
p_web_password => '&1',
p_new_password => '&1');
end loop;

wwv_flow_security.g_import_in_progress := false;

end;
/

Thursday, 7 July 2011

Added to the Site

Donated by my friend Jack ...

Monday, 4 July 2011

Been A Good Book Week

Have had a decent week of autograph hunting at second hand book shops. Picked up Max Walker for $9, Keith Stackpole for $20 and the bargain of the year, Brian Booth for 50¢

Saturday, 25 June 2011

Trade Section

Added a Trade Section to the cricket website ...

NAZIM'S CRICKET PAGE (Trade Section)

Tuesday, 14 June 2011

Autographed Caricatures

The latest addition to the collection is a range of signed caricatures by John Ireland:

Sunday, 17 April 2011

Latest Acquisition

Lucky pick up from a library booksale

Monday, 4 April 2011

Couple of Pics from the new setup

Frontosa Colony and Albino Pleco

Wednesday, 30 March 2011

Tuesday, 29 March 2011

DOS Script to Email Results of a Database Export

Had to write a batch script to check on the status of a nightly database export and email status. Some of what I've done may not be perfect, but it does the job nicely and portions can be reused, hence it's appearance on this blog for future reference.

@ECHO OFF
REM Enable local environments to be changed without affecting anything else.
SETLOCAL

REM check the export.log file for the filedate and pass it into a variable. Done by doing a directory listing on the file, returning just the filename and then looping through and capturing the file's timestamp into a variable

for /f "tokens=* delims=" %%a in ('dir/b export.log') do (
for /f "tokens=1 delims=" %%i in ("%%a") do (
set _fdt=%%~Ti
)
)

REM Write the logfile contents to a secondary file. This is only done to allow us to append the results of a TSM tape backup of the export.dmp to a logfile and email it in the email body.

type export.log > bkup.log

REM set a variable _status with a default of ERRORS. If the process has a status of SUCCESS, the following commands will overwrite this variable. If not, it will report it as ERRORS in the email

SET _status=ERRORS

REM Loop through the earlier generated secondary logfile and find the string "Export terminated successfully without warnings" which is a standard Oracle output found in export logs

for /f "tokens=*" %%s in ('type bkup.log ^| find /i "Export terminated successfully without warnings"') do (SET _status=SUCCESS)

REM Processes to follow a SUCCESS which includes sending the export.dmp to TSM tape storage. Append the TSM results to the secondary logfile generated earlier.
if %_status%==SUCCESS (
cd \TSM\baclient\
dsmc archive -des="TSM Archive Name %_fdt%" -archmc=ARCH14D export.dmp >> bkup.log

Use a third party application, postie to email the results

c:\postie\postie -host:mailhost -to:sender@email.com -s:"SUCCESS:ExportDaily (%USERDOMAIN%) for %_fdt%" -nomsg -from:sender@email.com -file:bkup.log
)

REM Email as ERRORS if the above step fails

if %_status%==ERRORS c:\postie\postie -host:mailhost -to:recipient@email.com -s:"ERRORS:ExportDaily (%USERDOMAIN%) for %_fdt%" -nomsg -from:sender@email.com -file:D:\backup\obj_live\bkup.log

Friday, 18 March 2011

Alter Database Open Resetlogs Upgrade

Had to restore a database to a point-in-time from a hotbackup.  Followed Steps:

  1. Copied datafiles to target
  2. Created a New Controlfile
  3. Recovered using syntax: RECOVER DATABASE UNTIL TIME 'YYYY-MM-DD:HH:MI' USING BACKUP CONTROLFILE;
  4. Ran ALTER DATABASE OPEN RESETLOGS;
... and that's when the wheels fell off, with the database instance terminated and errors in the alert log advising startup upgrade needs to be done.

The reason for this is that the target database was upgraded sometime after the point in time recovery date.

In the past, when faced with this situation, I was able to point the database and the /etc/oratab entries to the old Oracle Home and recover that way, but in this instance the old home had been removed and well a more elegant solution needed to be found.

Resolution:

  1. Copied datafiles to target
  2. Created a New Controlfile
  3. Recovered using syntax: RECOVER DATABASE UNTIL TIME 'YYYY-MM-DD:HH:MI' USING BACKUP CONTROLFILE;
  4. Ran ALTER DATABASE OPEN RESETLOGS UPGRADE;
The next step is to then apply the upgrade scripts and breathe a sigh of relief!

Friday, 11 March 2011

Meeting Jeff Thomson

"Ashes to ashes, dust to dust; if Lillee don't get you Thommo must!"


Had the opportunity today of meeting Jeff Thomson at a function, where he was guest speaker.  At 60 years of age, Thomson is an unassuming, very likeable, down-to-earth bloke.

The first half of the evening was rather a let down, as Thomson delivered jokes that wouldn't have been much funnier at the hands of a professional stand-up comedian.  However, he more than made up for the light hearted banter with some insightful comments about his career.

His anecdotes relating to his good friend Len Pascoe were hilarious, though I shan't bother repeating them here, as "you had to be there".

Most interesting was the Q&A session, where a lot of interesting information was gleaned.  I personally asked him two questions (paraphrasing):

Q.  Did you ever feel like you were playing second string to Dennis Lillee and what was your relationship with Lillee like?

A.  Lillee and I were good mates.  I used to scare the sh*t out of batsmen and then Lillee would do his thing and get the wickets.  It was a great partnership, which later on was mirrored in the partnership between McGrath and Warne.  All I ever wanted to do was bowl fast.

Q.  Who do you think will win the world cup this year?

A.  I reckon Australia are a good chance.  They've not lost anything so far and if Hussey is in form, they should do well.  India are not that special.

Other snippets of information gleaned from the Q&A included the following.  Please note, I did not take notes and am just recalling from memory what was said.  Some of what was mentioned, may have been misinterpreted by myself, so if you want Thomson's personal opinion on any of these matters, don't quote me, ask the man yourself (Is that a decent enough disclaimer for the dirt I'm about to dish out?)
  • Hilditch is likely to be offered another 2 year extension of contract as Selector, which is bad news for Australian cricket.
  • Ponting has his favourites and as a result talented players like Brad Hodge have not had a decent run in the team.
  • Michael Clarke is not liked by the players and the selectors would rather have as captain someone such as Tim Paine.
  • Thomson doesn't rate Phil Hughes as a test calibre batsman and would rather see someone like David Warner given a chance to play test cricket.
  • From the current crop of players, he rates Brett Lee the highest.  Does not appear to have any time for the likes of Tait, Siddle or Mitchell.
  • In his opinion, most bowlers don't spend enough time honing their craft on the cricket pitch.  As an example, Steve Finn when not picked for England, was sent off for strength and conditioning instead of playing cricket for his county side.  Thomson feels that the only way to get the best out of bowlers is to have them bowl a lot.
  • His role model was "his dad" and guys such as Fred Trueman.
Pardon the paunch - I should've worn black, as I'm told it's more slimming (doubt it would've helped much though)
















 

MySQL Spool File

Thanks to my friend LW for helping sort this one out.

You can increase the verboseness (is that a word?) of a batch output logfile in MySQL, by repeating the "-v" switch.

This is amazingly useful if for example you are running some DML and wish to capture in your output logfile the number of rows being inserted/deleted/updated.

mysql -u user -ppassword database_name -v -v < test.sql > test.log

Thursday, 10 March 2011

Lightening Strikes Thrice!! (Warning: Disturbing Images)

AAARRRGGG!!!! Today for the third time, in a lifetime of keeping fish, I've lost my entire colonies of happy, healthy, breeding fish. This time to equipment failure. Murphy's Law being what it is, these things always happen in the dead of night when no one is around to notice of course.

My primary air-filter stopped working and the secondary didn't have enough juice to keep the fish alive, as the population in my tank, through breeding was starting to get out of control. My own fault of course, for not thinning them out and there is only so much equipment that can be added to a tank!

Anyhow, just lost an array of fantastic fish including Frontosas, Duboisies, Mainganos, Electric Yellows. The only survivors, my clown loaches, bristlenose catfish and one or two hybrid cichlids, which may not live through the day :(

Not sure what to do now, may just give the survivors to a friend and call it a day!

Thursday, 24 February 2011

Obtaining a Cricket Postmark

Thanks to some fabulous advice from Colleen of Australian PictorMarks I was able to obtain this awesome cricket postmark through Australia Post on an Ashes Cover.

I think the end result is quite pleasing to the eye.

The Great Forgery!!

As the Sydney Cricket Ground turned pink for Jane McGrath this summer, I found myself the lucky recipient of a signed and framed Test Shirt from Phil Hughes, courtesy of the McGrath Foundation.

Whilst awaiting my prize, I asked my daughter to illustrate the shirt for my work newsletter. Looking at her handiwork alongside the now received shirt, I feel quite satisfied that should she fall upon hard times in the future, she may well have a decent career in forgery!

Monday, 21 February 2011

SQL Server - Query Backups Taken

Note to self ... Good place to check backups taken:

dbo.backupset

Friday, 18 February 2011

PeopleSoft - Access Log Table

A good place to check login/logout activity
PSACCESSLOG

Thursday, 3 February 2011

MySQL Global Options File - Storing Password

New to MySQL, but will make notes for my benefit, and for the odd person who stumbles on this post via Google. I need to write a few cron scripts for a MySQL database and I don't think I should put the connect string in them for the world to see.

A reasonable solution found is to simply store the password in the /etc/my.cnf (options) file.

Added the following text to achieve this. Also decided to store the default database name as well to make life simpler.

[client]
password={password}
database={dbname}
For this setting to take affect, just had to restart the database. So now the cron script can simply connect to the correct database by typing in "mysql".

Need to assess security implications of this decision as I proceed to learn the nuances of MySQL.

Wednesday, 2 February 2011

Check O/S Version

uname -a

Also .....

LINUX:
cat /etc/issue

AIX:
oslevel
oslevel -r (shows technology level)
oslevel -s (shows service pack)