“Pure XML is streets ahead”
Julian Stuhler addresses DB2’s ease of use, compression capabilities and his experience of working with IDUG.
Thoughts on DB2
Julian Stuhler addresses DB2’s ease of use, compression capabilities and his experience of working with IDUG.
Our Brothers across the pond, DBI, have launched their new generation of performance monitoring software. Brother-Hawk sends automated, customised alerts based on the characteristics of real-time and recently computed data. Specifically for DB2 LUW databases it gives lights-out alerting of potential performance management issues.
This is added to their growing portfolio of DB2 performance management products. Particularly relevant at the moment is their database auditing solution, Brother Watchdog, which reduces corporate data risks by allowing organisations to track access and updates to corporate database data.
One of the major headaches all DB2 users face when upgrading to a new release is the possibility of access path regression. In order to benefit from enhancements to the optimiser, plans and packages need to be rebound under the new release. The vast majority of the time, this will result in the same or better access path being selected, but just occasionally DB2 may select a worse one and performance suffers.
IBM has delivered some very useful new functionality in the maintenance stream for DB2 9 for z/OS to help to address this issue. PK52523 provides some new options for REBIND that allow the old version of an access path to be stored. If regression occurs, the previous access path can be quickly and easily re-established with another REBIND. This will be a significant benefit for V8 customers moving to V9, removing one of the biggest migration pain points. This functionality will be further enhanced in future releases of DB2.
Er, no. Outlook contains a something called the Object Model Guard, which detects applications attempting to send e-mails and intercepts these, putting a prompt up on the screen asking whether or not to permit this.
This is entirely reasonable when you’re logged in on the desktop - it prevents viruses using your Outlook account as a SPAM source. If, however, you want to write some automation that is going to e-mail it’s results off to a set of recipients, this is a real nuisance.
To get around this you will need two things:
1) A freeware add-in from MAPILabs - Advanced Outlook Security, and
2) The code below.
The add-in allows you to determine how to treat specific code items that are attempting to e-mail - i.e. allow or deny the action. The difference from the standard Outlook response is that you can make this decision permanent (you can modify the reponse from the tool) so that you don’t get prompted every time you run your code.
Here’s the VB code that you’ll need to use - note that you should include a reference to the COM object “Microsoft Outlook 11.0 Object Library” in your project properties:
Imports Microsoft.Office Imports MAPI Imports MAPI.CdoAttachmentType Imports MAPI.CdoRecipientType Module Module1 Sub Main() trusted() MsgBox(”Done”) End Sub Sub trusted() Dim myapp As Microsoft.Office.Interop.Outlook.Application = New Microsoft.Office.Interop.Outlook.Application() Dim mymail As Microsoft.Office.Interop.Outlook.MailItem = TryCast(myapp.CreateItem(OlItemType.olMailItem), Microsoft.Office.Interop.Outlook.MailItem) mymail.To = “paul.stoker-eds@eds.com” mymail.Subject = “VB E-mailer” mymail.Body = “This e-mail has been sent to you by the code contained in the attachment (email.txt = email.vb).” + vbNewLine + vbNewLine + _ “To prevent the annoying pop-up about code sending e-mails, you need to install the Outlook Advanced ” + _ “Security add-in - the second attachment. This will only prompt you once and will then remember what ” + _ “you said. Have a look at the help that comes with the tool (MAPILab -> Advanced Security For Outlook ” + _ “-> Advanced Security Help) for advice about usage.” Dim myatt As Microsoft.Office.Interop.Outlook.Attachment = mymail.Attachments.Add(”C:\AData\CODE\VBApps\Email\email\email.txt”, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue, 1, “C:\AData\CODE\VBApps\Email\email\email.txt”) Dim myat2 As Microsoft.Office.Interop.Outlook.Attachment = mymail.Attachments.Add(”C:\Aardvark\OutlookSecurity\security_outlook.zip”, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue, 1, “C:\Aardvark\OutlookSecurity\security_outlook.zip”) Try mymail.Send() Catch MsgBox(”Ho hum”) End Try End Sub
The first time you run this, the add-in will prompt you asking what action you want to assign - if you permit it, then subsequent executions of the same code will pass through seemlessly.
That’s all folks…
Ever needed to track down those pesky connections to a database you’re trying to backup?
No idea how to work out who is constantly connected to a database via Command Centre?
Well, below is a simple guide to finding out where those database connections originate from by converting the application handle from the list applications command to an ip address.
Suppose you’ve just run a db2 list applications for database sampledb and get the following output: -
Auth Application Appl. Application Id
Id Name Handle
user01 db2bp.exe 354 J66D5F7E.ID08.025CC3135357
user02 javaw.exe 66 J66C89C5.D40D.023443140109
If you want to determine the ip address for user01, then follow the steps below: -
1. Take the first part of the Application Id as the ip address and the second part as the port number.
For user01 this will result in
ip address = J66D5F7E
port number = ID08
2. If the first character of either the ip address or port number is a value anything other than A,B,C,D,E or F then this needs to be converted as follows: -
G = 0, H = 1, I = 2, J = 3, K = 4, L = 5, M = 6, N = 7, O = 8, P = 9
For user01 we now have
ip address = 366D5F7E
port number = 2D08
3. Break the ip address into two character hex values and convert to decimal
36 6D 5F 7E
36 = 54
6D = 109
5F = 95
7E = 126
ip address = 54.109.95.126
4. Finally convert the port number from hex to decimal
2D08 = 11528
So for user01 the originating address is
ip address = 54.109.95.126
port number = 11528
Following the same steps the address for user02 would be: -
ip address = 54.108.137.197
port number = 54285
http://www-304.ibm.com/systems/support/z/cfsizer/
The CFSizer tool page has a list of links down the left hand side. Each of these provides a web tool to size the structures required for the product labelled.
Knock yourselves out!
JG
I had to set up 10 TWS batch schedules this week, and baulked a bit at the idea of going through the admin tool and clicking them all in. Following a discusion with a colleague, I came across a TWS utility called “composer” which I hadn’t previously known about. This allows you to export job and schedule definitions to a file, and then re-import them again. Using this, I was able to create the first set of jobs and schedule and then export to a file using:
composer create file.txt from job=WORKSTATION#JOBNAME
and
composer create file2.txt from sched=WORKSTATION#SCHEDNAME
Then, using some dodgy shell, sed and awk scripting, I cloned all of these for each of the environments and reloaded them using:
composer replace file.txt
What could be simpler? The text files produced are fairly self explanatory, although - no doubt - with a little rummaging there’s bound to be a manual somewhere about the syntax.
For those of you using Linux on the Itanium-64 bit (IA64) platform, note that DB2 9.5 is not available for Linux on IA64. The last supported DB2 version for Linux on IA64 is DB2 9. This is because Linux on IA64 is not a high growth platform for IBM and in fact quite the opposite. Customers appear to be choosing Linux on x86-64 in droves but that is not the case for Linux on IA64 . Moreover, unless demands from the marketplace change, there is no plan for supporting DB2 for Linux on IA64 going forward.
Here are the links which suggest that DB2 9.5 is not available for the Linux on Itanium-64 bit (IA64) platform:
while DB2 9 is supported on Linux on Itanium-64 bit (IA64):
Iqbal