Saturday, January 17, 2009

Make Stored Procedure at DB2

To make a Stored Procedure with IBM Data Studio, you can follow this step by step tutorial
1. Open IBM Data Studio
2. Choose file -> new -> data development project
3. Give a project name, for example Project2
4. Choose "Use an existing connection". Click Finish
5. At Data Project Explorer will show Project2
6. Right click at Proejct2 -> new -> Stored Procedure
7. Give a Stored Procedure name, for example PROC_3. Choose next
8. At statement detail, change with the query that you want. Click next
9. Click next
10. Choose the specific name. This is an alias name for Stored Procedure.
11. Click Finish

This is the query generated by IBM Data Studio
CREATE PROCEDURE PROC_3 ( )
DYNAMIC RESULT SETS 1
------------------------------------------------------------------------
-- SQL Stored Procedure
------------------------------------------------------------------------
P1: BEGIN
-- Declare cursor
DECLARE cursor1 CURSOR WITH RETURN FOR
SELECT *
FROM EMPLOYEE;

-- Cursor left open for client application
OPEN cursor1;
END P1


If you want to run it. First right click the Stored Procedure, then choose Deploy, after that choose run. You can see the output at the right below corner.

This is the screenshot

Free Image Hosting at www.ImageShack.us

Or you can run it from DB2cmd. Just write this command.
"db2 connect to sample" then "db2 call proc_3()"

Best regards,

Deny Sutani

Access Control: An Introduction To Access Control

The Problem

Your building is secure at night, but during the day there are several doors that have to be open. Anybody could walk in. What can you do?

The Solution

You need an Access Control System.

What is an Access Control System?

Access Control is an electronic security system which permits or restricts access to specific areas of a premises. It not only protects property against unwanted visitors but ensures the safety of both the property and of the people inside.

In simple terms, an Access Control System provides control of entry (or exit) through nominated doors via a control panel and some form of electric locking facility.

An Access Control System can be as simple or as complicated as you wish but in each case, the solution will always provide an easy passage for permitted persons around the building.

Door Entry or Access Control?

Door entry is commonly associated with a single door or gate, whereas access control is more suited to multiple doors or entry points.

Access Control can also incorporate a host of other features which enhance other areas of the business.

Access Control / Door Entry Technology

There are a number of ways that a permitted user can open a door that is fitted with a system.

PIN Code Entry

The most common unit is the keypad system. This comprises a control unit with a series of numbered push buttons, or a touch-sensitive pad, connected to the lock release mechanism via a control unit located at the entrance.

Magstripe (also called Swipe Card) Readers

Each entry point has a card reader and the user “swipes” an encoded card similar to a credit card to gain entry.

This technology is widely used and there are many choices of manufacturers.

Proximity Readers

Rather than swiping the card or tag, it is simply presented to a reader which typically will see the card at a distance of about 100mm. This is a fast, non-contact, method of entry.

Long Range Readers

Long range proximity readers (of approximately a meter or so) automatically unlock or open a door when it detects the card.

This is particularly suitable for compliance with the Disability Discrimination Act (DDA) as no action is required by the card bearer.

Smartcard Readers

For systems that use cards or tags, these cards can also carry additional information which can be used for other building services – – for example, time and attendance functions, integration with payroll systems, car park management and even vending machine applications.

Biometric Readers

A Biometric Reader system uses unique human characteristics – such as finger prints or a retina scan – to clearly identify those who are permitted access.

As there are no cards or tags which can be stolen or lost, or open to misuse, this type of system significantly increases the level of security.

What about Visitors?

You will want to welcome most of those who visit your premises, so it must be easy for them to let you know they are there.

The three most common means of attracting attention are:

• A simple door bell system which alerts your staff to the fact that there is someone waiting outside.

• An audio intercom panel which allows the visitor to have a direct conversation with a member of your staff and, if appropriate, the door can be remotely released.

• An audio intercom panel with a camera facility which allows your staff to see who wants to enter the building before permitting access.

Once access has been permitted, the visitor can either be escorted around or issued with a card or pin number for the duration of their visit.

Things to Consider

When planning an access control system, you should consider the following:

• How many entry/exit points
• Where are these located>
• Level of security desired
• The movement of staff around the building
• Method of operation
• Future growth of building
• Turnover of employees
• Disability access
• Interface with other systems – for example, the fire alarm

As with any type of security system, it is sensible to employ a company that you can trust. Make sure you use a NSI (NACOSS) approved organisation; this will ensure that your system will be designed and installed by professionals.

Accelerator Software Provides a Faster Download

Over half of all households that connect to the Internet have a broadband connection these days, mostly cable or DSL. Which means the other half does not and still uses dial-up. Modems are much faster than they used to be in the early days of computing, but today's websites are larger and require a lot of bandwidth to load quickly. To make matters worse for those on slower connections, even simple software updates are now often dozens of megabytes and can take a long time to download. What it all means is that modem users need a break!

Fortunately, there are things that can be done to make a connection faster. You see, the operating system software on today's computers is not optimized for fast downloads. Microsoft's primary goal is simply to make sure Windows works with all the different hardware out there. Compatibility is important, of course, but it can be frustrating when things just don't work as well as they should.

But not everything is your computer's fault. Your Internet service provider, too, is primarily concerned with reliability (good), compatibility (good), and moving as much traffic as possible with as little investment as possible (not so good). Further, while the Internet moves at electronic speed, not all connections are equal. You may have noticed that downloading pictures from the same exact website is sometimes faster and other times much slower. That may be because the server is very busy, but it can also be because your connection is taking some detours instead of directly getting on the highway.

What does it all mean? It means that between hardware and software designed for compatibility rather than performance, and Internet connections that may not necessarily favor individual dial-up customers, you may simply not get the speed your computer is capable of and that you are paying for. This is bad news for those who frequently download movies, music or pictures.

Fortunately, there are solutions, and I don't mean getting a new computer or waiting until you have broadband access. One such solution is download accelerators. They can greatly increase the speed and reliability of your downloads. How do they do it? By optimizing the way your computer works and by making sure your data downloads the fastest and most direct route possible. With a download accelerator, you are no longer at the mercy of some remote traffic routing computer. Instead, the accelerator in your own system determines the best way to download data as quickly and efficiently as possible.

But speed is not the only benefit of a good download accelerator. How often has it happened to you that a connection times out or is interrupted before a file has downloaded completely? Probably quite often. And then you have to start all over. A download accelerator will keep track of things and will simply pick up where you left off if a connection gets dropped. Imagine how much time you save.

The bottom line is clear. You have better things to do than wait for downloads to complete. If you want to regain control of your Internet connection, accelerate downloads and restore, or just web browsing in general, a good accelerator is invaluable.

Global Warming

Browsing, chatting and all other internet activities make a carbon polution. Every time we use Google service we have contributed on global warming. This is happened because every time we turn on the computer, it will use electricity.

Physician from Havard University, Alex Wissner-Gross concluded that every time google search engine work, it make 7 grams of carbon. It means when we make 10 search, then it will produce 70 grams of carbon.

This calculation based on carbon emissions from the consumption of electricity needed to power the computer users and the Google data center that operates around the world. Using large energy means more carbon dioxide emissions considering almost electricity that is used currently based fossil energy sources.

Google said it's true that every time they make a search it will produce a carbon polution, but it is only cost 0,0003 kWh or 0,2 gram of carbon. Google claims that the result is too high. Moreover Google has make Climate Savers Computing Initiative to lower the use of energy in the consumer level to half of 2010 and began to decrease carbon dioxide emissions 54 million tons per year.

How to Install IBM Data Studio

This is the step by step to install IBM data studio
1. Open drive:\Installer\DB installer2_Install\IBM Data Studio\Windows
2. Extract IBM_data_studio_v111_win file
3. Click setup.exe.
4. Choose Install IBM Data Studio.
5. Tick all checkbox then click next.
6. Choose I accept the aggrement then click next
7. Choose create a new package group then choose your preferred path, then click next
8. If you have alreday had Eclipse, try yo use Extend and existing Eclipse.
9. Choose your preferred language.
10. Choose feature that you want to be installed.
11. IBM instalation manager will install IBM data studio to your computer, just sit relax
12. Finish and you can use IBM data studio right now.

Best regards,

Deny Sutani

DB2 Product Overview

DB2 is a DBMS made by IBM. It was released for the first time at 1983 in MVS. At 1996, IBm released DB2 UDB v5. At this version, DB2 has a feature to support saving many data type like audio, video and text

DB2 9 is the lateset release. In this version, like the previous, can run on many platform like AIX, HP-UK, Linux, Solaris, Windows, i5/OS and z/OS. In this version, DB2 has many type as you can see below.
The bigger the number, it become more expensive, more stable, and has more feature.

1. DB2 Everyplace
This version is the smallest DB2, it's size only 350KB. This version made for handheld user like PDA or smartphone.

2. DB2 Express
This version is an entry level for data server which is designed for
a computer with up to 2 CPU and 4GB memory and run on Linux platform. It has a few important feature such as
- pureXML : give an simple and efisien access to XML data at the same security and integrity with relational data.
- High Availability : give 24 x 7 reliability to DB2 data server. There 3 komponent in this feature, HADR, Online Reorganization, and IBM TSA MP.
- Workload Management : this feature monitoring query actively and manage it to run efisiently
- Performance Optimization : this feature combine 3 module, MQT, MDC and Query Parallelism
- DB2 Homogenous Federation Feature : this feature has ability to manage and access multiple data server

3. DB2 Express-C
This version is an entry level for data server which is designed for
a computer with up to 2 CPU and 4GB memory and run on Linux or Windows platform. This version can be used for evaluation and education freely. It has a few important feature such as
- Spatial Extender Client and samples
- Microsoft Cluster Server support
- Informix Data Source support
- Replication Data Capture
- DB2 Web Tools
- Global Secure Toolkit
- APPC and NetBios support

4. DB2 Personal Edition
This is the DBMS for single user on dekstop or notebook. It can be used to create, modify, and manage many local database.

5. DB2 Workgroup Server Edition
This version is the DBMS for multi user, client/ server which is designed for a computer with up to 4 CPU, 16GB memory and run on Linux, Windows, Solaris, Linux, AIX platform. This has the same feature with DB2 Express, but it has more scalability.

6. DB2 Enterprise Server Edition
This version is the DBMS for multi user, web enabled client/ server which is can hold huge transaction, multi terabyte data warehouse. It can run on server which has up to hundreds CPU running on Linux, Windows, Solaris, Linux, AIX platform. It has the same feature with DB2 workgroup with additional feature such as
• High Availability Disaster Recovery (HADR)
• Table (range) partitioning
• Online reorganization
• Materialized Query Tables
• Multi-dimensional data clustering
• Full intra-query parallelism
• Connection Concentrator
• The DB2 Governor
• Tivoli System Automation for Multiplatforms (TSA MP)

7. DB2 Data Warehouse Edition
This version can be used to make dynamic data warehouse. This is a combination between DB2 enterprise server and DB2 data partitioning.

8. DB2 Personal Developer’s Edition
This version can be used by application developer to make an application which interact with DB2 personal edition. In this version, developer can make application which connect to DB2 by using SQL, SQLJ, .NET or JDBC method.

There are another version of DB2 such as DB2 universal Developer, DB2 enterprise developer, DB2 for i5/OS and DB2 for z/OS. These version have more scalability and feature.

Best regards,

Deny Sutani