26 January 2012

SQL Loader Utility handling Multi Byte chars



Situation
We had erroneous data after loading with SQL Loader.
Settings
Database created with
CHARACTER SET "UTF8"
NATIONAL CHARACTER SET "WE8ISO8859P1"
NLS_LANGUAGE = AMERICAN
NLS_TERRITORY = AMERICA
Example
Create a test table with
CONNECT scott/tiger;
DROP TABLE LOADER_TEST;
CREATE TABLE LOADER_TEST (
   USR_ID          NUMBER NOT NULL ,
   USR_NAME        VARCHAR2(50) ,
   USR_LNK_NAME    VARCHAR2(50) ,
   USR_LNK_ORDER   NUMBER
);

·         Case 1
Client (Win 2000)
NLS_LANG=AMERICAN_AMERICA.UTF8
Controlfile (ctrl.txt)
LOAD DATA
CHARACTERSET UTF8
INFILE *
REPLACE INTO TABLE LOADER_TEST
FIELDS TERMINATED BY ';'
TRAILING NULLCOLS (
   USR_ID         INTEGER EXTERNAL,
   USR_NAME       CHAR(50),
   USR_LNK_NAME   CHAR(50),
   USR_LNK_ORDER  INTEGER EXTERNAL
)
BEGINDATA
1;Santé bien;http://www.vaud-sante.ch;3
2;Santé;http://www.vaud-sante.ch;4
3;Alle à gessa;http://www.gessa.com/now;2
4;Alle à;http://www.gessa.com/now;1
5;Gägs;http://www.gaegs.ch;5
6;Gägs ä;http://www.gaegs.ch;6
Invoke sqlldr
sqlldr userid=scott/tiger control=ctrl.txt
Result
column usr_id format 99 heading "Id"
column USR_NAME format a32 heading "Name"
column USR_LNK_NAME format a26 heading "Link"
column USR_LNK_ORDER format 99 heading "Ord"
select * from loader_test;
Id Name                             Link                      Ord
-- -------------------------------- ------------------------- ---
 1 Santé bien                       http://www.vaud-sante.ch    3
 2 Santé;http://www.vaud-sante.ch/   4
 3 Alle à gessa                     http://www.gessa.com/now    2
 4 Alle à;http://www.gessa.com/now  1
 5 Gägs                             http://www.gaegs.ch         5
 6 Gägs ä;http://www.gaegs.ch/        6
For the records 2,4,6 where a special character is prior to the delimiter, the SQL Loader does not see the delimiter.

·         Case 2
Change the control file (ctrl.txt) to
CHARACTERSET WE8ISO8859P1
Reload the data and select the LOADER_TEST table again
Id Name                             Link                      Ord
-- -------------------------------- ------------------------- ---
 1 Santé bien                      http://www.vaud-sante.ch    3
 2 Santé                            http://www.vaud-sante.ch    4
 3 Alle à gessa                    http://www.gessa.com/now    2
 4 Alle à                          http://www.gessa.com/now    1
 5 Gägs                             http://www.gaegs.ch         5
 6 Gägs ä                         http://www.gaegs.ch         6
Now, SQL Loader recognises all delimiters, but data seems to be corrupted.

·         Case 3
Change the client environment to
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
Reselect data - now the result is now correct !
 Id Name                           Link                       Ord
--- ------------------------------ -------------------------- ---
  1 Santé bien                     http://www.vaud-sante.ch     3
  2 Santé                          http://www.vaud-sante.ch     4
  3 Alle à gessa                   http://www.gessa.com/now     2
  4 Alle à                         http://www.gessa.com/now     1
  5 Gägs                           http://www.gaegs.ch          5
  6 Gägs ä                         http://www.gaegs.ch          6
Conclusion
Running client tools (e.g. SQL Loader, SQL Plus) against a database with UTF8 character set, you must assign WE8ISO8859P1 to NLS_LANG for the client tools due to prober data representation. That means a correct characterset conversion will take place within SQL Net and Net8 respectively.

21 January 2012

Who is most likely to develop a boil?


Anyone can develop a boil. However, people with certain illnesses or medications that impair the body's immune system (the natural defense system against foreign materials or microbes) are more likely to develop boils. Among the illnesses that can be associated with impaired immune systems are diabetes and kidney failure. Diseases, where there is inadequate antibody production (such as hypogammaglobulinemia), that are associated with deficiencies in the normal immune system can increase the tendency to develop boils.

Many medications can suppress the normal immune system and increase the risk of developing boils. These medications include cortisone medications (prednisone [Deltasone, Liquid Pred] and prednisolone [Pediapred Oral Liquid, Medrol]) and medications used for cancer chemotherapy.


What is the treatment for a boil?

Home treatment is an option for most simple boils. Ideally, treatment should begin as soon as a boil is noticed since early treatment may prevent later complications.

The primary home remedy for most boils is heat application, usually with hot soaks or hot packs. Heat application increases the circulation to the area and allows the body to better fight off the infection by bringing antibodies and white blood cells to the site of infection.

As long as the boil is small and firm, opening the area and draining the boil is not helpful, even if the area is painful. However, once the boil becomes soft or "forms a head" (that is, a small pustule is noted in the boil), it can be ready to drain. Once drained, pain relief can be dramatic. Most small boils, such as those that form around hairs, drain on their own with hot soaks. On occasion, and especially with larger boils, medical treatment is required. In this situation, the boil will need to be drained or "lanced" by a health-care practitioner. Frequently, these larger boils contain several pockets of pus that must be opened and drained.

Antibiotics are often used to eliminate any accompanying bacterial infection, especially if there is an infection of the surrounding skin. However, antibiotics are not needed in every situation. In fact, antibiotics have difficulty penetrating the outer wall of an abscess well and often will not cure an abscess without additional surgical drainage.

When should I seek medical attention?

While boils typically resolve on their own and therefore have an excellent prognosis, there are special cases in which medical care should be sought when boils develop. Rarely, boils may spread or persist, leading to more widespread infections.

Any boil or abscess in a patient with diabetes or a patient with an underlying illness that can be associated with a weakened immune system (such as cancer, rheumatoid arthritis, etc.) should be evaluated by a health-care practitioner. Additionally, many medicines, especially prednisone, that suppress the immune system (the natural infection-fighting system of the body) can complicate what would be an otherwise simple boil. Those who are taking such medications should consult their health-care practitioner if they develop boils. (If you are not sure about your medications' effects on the immune system, your pharmacist may be able to explain to you which medicines to be concerned about.)

Any boil that is associated with a fever should receive medical attention. Increasing reddening of the nearby skin and/or formation of red streaks on the skin, the failure of a boil to "form a head," and the development of multiple boils are other symptoms that warrant a visit to a health-care practitioner.

A "pilonidal cyst," a boil that occurs between the buttocks, is a special case. These almost always require medical treatment, including drainage and packing (putting gauze in the opened abscess to assure it continues to drain). Finally, any painful boil that is not rapidly improving should be seen by a health-care practitioner.


What can be done to prevent boils (abscesses)?

There are some measures that you can take to prevent boils from forming. Good hygiene and the regular use of antibacterial soaps can help to prevent bacteria from building up on the skin. This can reduce the chance for the hair follicles to become infected and prevent the formation of boils. In some situations, your health-care practitioner may recommend special cleansers such as pHisoderm to even further reduce the bacteria on the skin. When the hair follicles on the back of the arms or around the thighs are continually inflamed, regular use of an abrasive brush (loofah brush) in the shower can be used to help break up oil plugs and buildup around hair follicles.

Pilonidal cysts can be prevented by avoiding continuous direct pressure or irritation of the buttock area when a local hair follicle becomes inflamed. At that point, regular soap and hot water cleaning and drying can be helpful.

For acne and hidradenitis suppurativa (see above), topical or oral antibiotics may be required on a long-term basis to prevent recurrent abscess formation. As mentioned above, surgical resection of sweat glands in the involved skin may be necessary. Other medications, such as isotretinoin (Accutane), can be used for cystic acne and have been helpful in some patients with hidradenitis suppurativa. Recurrences are common in patients with hidradenitis suppurativa.

Finally, surgery may occasionally be needed, especially for pilonidal cysts that recur but also for hidradenitis suppurativa. For pilonidal cysts, surgically removing the outer shell of the cyst is important to clear the boil. The procedure is typically performed in the operating room. For hidradenitis suppurativa, extensive involvement can require surgical repair by a plastic surgeon.

Boils At A Glance

A boil, or skin abscess, is a collection of pus that forms in the skin.
Antibiotics alone can be inadequate in treating abscesses.
The primary treatments for boils include hot packs and draining ("lancing") the abscess but only when it is soft and ready to drain.
If you have a fever or long-term illness, such as cancer or diabetes, or are taking medications that suppress the immune system, you should contact your health-care practitioner if you develop a boil (abscess).
There are a number of methods that can be used to reduce the likelihood of developing some forms of boils, but boils are not completely preventable.

Is any kind of alcohol does good for diabetes ?


During one of our friends arguments, one says Brandy good for Diabetic compare other drinks others says no. Here are my findings,


Should people with diabetes drink alcohol? That is a question ask by many diabetics. The answer is you are able to dink alcohol but in moderation. The American Diabetes Association recommends that maximum of 2 drinks a day for man and 1 drink a day for woman. In reality it is going to be better for you to avoid drinking alcohol so that you are not going to have to worry about any complications that may come about. Also, it is really not a good idea mixing alcohol with any kind of medication. People with diabetes should consult their doctor about the use of alcohol with the medications that they are taking.

How Alcohol Affect Diabetes?

Alcohol can make blood glucose too high or too low. Moderate amount of alcohol can cause blood sugar to rise but excess alcohol can actually decrease our blood sugar level even to an unsafe level. When we drink, the alcohol goes from our stomach straight into our blood. Within 30 to 90 minutes after drinking, the alcohol in our bloodstream hit its highest point. It takes our liver about 2 hours to break down one drink. When there is no alcohol in our blood, our liver keeps blood sugar level from going too low by changing stored carbohydrate into glucose, the glucose is then release into our blood. If we drink alcohol faster than our liver can breaks it down, the liver will be busy breaking down alcohol and therefore will not be able to release glucose into our blood. This cause our blood glucose continue to drop and we may end up with very low blood sugar.

Alcohol Consumption Guidelines For Diabetes :

  • Alcohol should only be used if your diabetes is under good control and with your doctor's prescription.
  • Avoid mixing alcohol with any kind of medication - alcohol can interfere the effects of oral diabetes medicines or insulin.
  • Drink not more than 2 drinks per day.
  • Do not drink when your stomach is empty in order to prevent very low blood sugar level.
  • Drink slowly to make sure that you liver have enough time to break down the alcohol.
  • Choose your drinks, select drinks that are lower in alcohol and sugar - dry wine, light beer, or unsweetened liquor (whiskey, brandy, rum, vodka or gin) mixed with plenty of low calorie mixer, club soda or water are better than other alcoholics drinks.
  • Stick with sugar-free mixers such as diet soda, diet tonic, club soda or seltzer for mixed drinks.
  • Always check your blood glucose after you drink to see how alcohol affects you
  • Include alcohol's calories into your daily calorie count.

Drinking Alcohol Effect Diabetes and Raising Blood Sugars?

Small amounts of alcohol will not hinder your control over diabetes but there are some precautions that diabetics should take to make sure that alcohol can be safely enjoyed. If you are diabetic and are currently treated with either tablets or insulin the main risk that you face with consuming alcohol is that alcohol could make you more prone to hypoglycemia. Despite how I feel this morning after getting wasted last night.

Hypoglycemia, which most diabetics already know, is when your blood sugar level drops down to an unsafe level.

The problem is, how is someone going to tell if you are experiencing hypoglycemia or if you are just drunk? Many of the early warning signs of hypoglycemia are mimicked by alcohol. Your friends may not seek help for you until you lose consciousness and maybe not even at that point. Come on, you’ve never seen anybody pass out drunk? Sometimes beer and diabetes don’t mix.

Another problem with a Diabetic consuming alcohol is that if done on a regular basis it can cause you to gain weight. Gaining weight while battling diabetes is pretty much the opposite of what you need to be doing. Weight gain is going to cause a diabetic to lose control over their disease.

Let’s not forget that when you are drunk your judgment could become impaired. This impaired judgment could lead to you eating a whole bunch of things you shouldn’t be eating. Oh, I don’t know, say you’re out on the town and before you know it…last call. Next thing you know you are stumbling into a sub shop that’s open late and stuffing your face with a foot long sub. Not good.

Moderation, awareness and good judgment are key when a diabetic is consuming alcohol. It’s good to remember that just because you may be out having a grand old time doesn’t mean that you are taking a vacation from your diabetes.

You still need to be checking your blood sugar levels and being very aware of any early signs that something is not right.

As for the moderation piece, experts consider a sensible drinking limit to be about 3 alcoholic drinks per day. So 21 per week. Here’s my question: Can you save up all of your daily drinks for consumption on Saturday night?

Drinking Brandy Is Good For Health

Consuming 30 milliliters of brandy per day reportedly has a similar antioxidant potential which a regular dose of vitamin C has, according to researchers belonging to the Monash University. This does not mean that consuming Vitamin C should be given up, but it can continue along with drinking brandy.


Red wine is known to be another source of antioxidant. The arteries are de-sludged by its consumption in addition to it contributing towards preventing strokes and certain types of dementia. The copper from brandy’s distilling process results in the antioxidants being produced, with a better health effect from superior quality brandy. Recent research has revealed that the same health benefits can be derived from whisky also. 

The study was conducted by Dr Steve Langford, a chemist, and Dr Gordon Troup, a physicist. Brandy-infused fruitcake which is consumed during Christmas also has the same effect. As many as seven types of the liquor were tested with an electron spin resonance spectroscopy for imaging antioxidant chemicals and free radicals, and six of them were found to contain antioxidants. The Alcohol in Moderation Digest has published the results of the research. 

Note: I have collected all this information from net, so please be care full before taking any decision based on this article. This is for information purpose.



11 January 2012

Software Development Methodologies(Waterfall, Agile,Iterative,Spiral & Scrum)


Software development methodology is a framework that is used to structure, plan, and control the process of developing an information system - this includes the pre-definition of specific deliverables and artifacts that are created and completed by a project team to develop or maintain an application.



A wide variety of such frameworks have evolved over the years, each with its own recognized strengths and weaknesses. One software development methodology framework is not necessarily suitable for use by all projects. Each of the available methodology frameworks are best suited to specific kinds of projects, based on various technical, organizational, project and team considerations



Every software development methodology framework acts as a basis for applying specific approaches to develop and maintain software. Several software development approaches have been used since the origin of information technology.

Waterfall development

The Waterfall model is a sequential development approach, in which development is seen as flowing steadily downwards (like a waterfall) through the phases of requirements analysis, design, implementation, testing (validation), integration, and maintenance. The first formal description of the method is often cited as an article published by Winston W. Royce in 1970

• Project is divided into sequential phases, with some overlap and splashback acceptable between phases.

• Emphasis is on planning, time schedules, target dates, budgets and implementation of an entire system at one time.

• Tight control is maintained over the life of the project via extensive written documentation, formal reviews, and approval/signoff by the user and information technology management occurring at the end of most phases before beginning the next phase.



Pitfalls of Waterfall model:

This model does not suitable for non-trivial project to finish a phase of a software product's lifecycle perfectly before moving to the next phases and learning from them.

Designers may not be aware of future implementation difficulties when writing a design for an unimplemented software product which result

Agile Development

Agile software development is a group of software development methodologies based on iterative and incremental development, where requirements and solutions evolve through collaboration between self-organizing, cross-functional teams. It promotes adaptive planning, evolutionary development and delivery, a time-boxed iterative approach, and encourages rapid and flexible response to change. It is a conceptual framework that promotes foreseen interactions throughout the development cycle.


Agile methods break tasks into small increments with minimal planning and do not directly involve long-term planning. Iterations are short time frames (timeboxes) that typically last from one to four weeks. Each iteration involves a team working through a full software development cycle, including planning, requirements analysis, design, coding, unit testing, and acceptance testing when a working product is demonstrated to stakeholders. This minimizes overall risk and allows the project to adapt to changes quickly. Stakeholders produce documentation as required. Iteration might not add enough functionality to warrant a market release, but the goal is to have an available release (with minimal bugs) at the end of each iteration. Multiple iterations might be required to release a product or new features.

Team composition in an agile project is usually cross-functional and self-organizing, without consideration for any existing corporate hierarchy or the corporate roles of team members. Team members normally take responsibility for tasks that deliver the functionality iteration requires. They decide individually how to meet iteration’s requirements.

Agile methods emphasize face-to-face communication over written documents when the team is all in the same location. Most agile teams work in a single open office (called a bullpen), which facilitates such communication. Team size is typically small (5-9 people) to simplify team communication and team collaboration. Larger development efforts can be delivered by multiple teams working toward a common goal or on different parts of an effort. This might require a coordination of priorities across teams. When a team works in different locations, they maintain daily contact through videoconferencing, voice, e-mail, etc.





Pitfalls of Agile Model:

An agile software development method is that it is developer-centric rather than user-centric. Agile software development focuses on processes for getting requirements and developing code and does not focus on product design.

Iterative and incremental development

Iterative and Incremental development is at the heart of a cyclic software development process developed in response to the weaknesses of the waterfall model. It starts with an initial planning and ends with deployment with the cyclic interactions in between.

Incremental development slices the system functionality into increments (portions). In each increment, a slice of functionality is delivered through cross-discipline work, from the requirements to the deployment. The unified process groups increments/iterations into phases: inception, elaboration, construction, and transition.



• Inception identifies project scope, risks, and requirements (functional and non-functional) at a high level but in enough detail that work can be estimated.

• Elaboration delivers a working architecture that mitigates the top risks and fulfills the non-functional requirements.

• Construction incrementally fills-in the architecture with production-ready code produced from analysis, design, implementation, and testing of the functional requirements.

• Transition delivers the system into the production operating environment.



Each of the phases may be divided into 1 or more iterations, which are usually time-boxed rather than feature-boxed. Architects and analysts work one iteration ahead of developers and testers to keep their work-product backlog full.

How Agile methodology differ from Iterative

Most agile methods share iterative development's emphasis on building releasable software in short time periods. Agile methods differ from iterative methods in that their time period is measured in weeks rather than months. Most agile methods also differ by treating their time period as a strict timebox.

Spiral development

The spiral model is a software development process combining elements of both design and prototyping-in-stages, in an effort to combine advantages of top-down and bottom-up concepts. It is a meta-model, a model that can be used by other models.



The basic principles are:

• Focus is on risk assessment and on minimizing project risk by breaking a project into smaller segments and providing more ease-of-change during the development process, as well as providing the opportunity to evaluate risks and weigh consideration of project continuation throughout the life cycle.

• "Each cycle involves a progression through the same sequence of steps, for each part of the product and for each of its levels of elaboration, from an overall concept-of-operation document down to the coding of each individual program."

• Each trip around the spiral traverses four basic quadrants: determine objectives, alternatives, and constraints of the iteration; evaluate alternatives; Identify and resolve risks; develop and verify deliverables from the iteration; and plan the next iteration.

• Begin each cycle with an identification of stakeholders and their win conditions, and end each cycle with review and commitment.

Scrum Methodology

Scrum is an iterative, incremental framework for project management often seen in agile software development, a type of software engineering.

Sprint

A sprint is the basic unit of development in Scrum. Sprints tend to last between one week and one month, and are a "timeboxed" (i.e. restricted to a specific duration) effort of a constant length. Each sprint is preceded by a planning meeting, where the tasks for the sprint are identified and an estimated commitment for the sprint goal is made, and followed by a review or retrospective meeting, where the progress is reviewed and lessons for the next sprint are identified. During each sprint, the team creates a potentially deliverable product increment.

Scrum enables the creation of self-organizing teams by encouraging co-location of all team members, and verbal communication between all team members and disciplines in the project.



Scrum teams consist of three core roles and a range of ancillary roles

Core roles

The core roles in Scrum teams are those committed to the project in the Scrum process—they are the ones producing the product (objective of the project).

Product Owner

The Product Owner represents the voice of the customer and is accountable for ensuring that the Team delivers value to the business. The Product Owner writes customer-centric items (typically user stories), prioritizes them, and adds them to the product backlog. Scrum teams should have one Product Owner, and while they may also be a member of the Development Team, it is recommended that this role not be combined with that of ScrumMaster.

Team

The Team is responsible for delivering the product. A Team is typically made up of 5–9 people with cross-functional skills who do the actual work (analyse, design, develop, test, technical communication, document, etc.). It is recommended that the Team be self-organizing and self-led, but often work with some form of project or team management.

ScrumMaster

Scrum is facilitated by a ScrumMaster, also written as Scrum Master, who is accountable for removing impediments to the ability of the team to deliver the sprint goal/deliverables. The ScrumMaster is not the team leader but acts as a buffer between the team and any distracting influences. The ScrumMaster ensures that the Scrum process is used as intended. The ScrumMaster is the enforcer of rules. A key part of the ScrumMaster’s role is to protect the team and keep them focused on the tasks at hand. The role has also been referred to as a servant-leader to reinforce these dual perspectives.

Ancillary roles

The ancillary roles in Scrum teams are those with no formal role and infrequent involvement in the Scrum process—but nonetheless, must be taken into account.

Stakeholders (customers, vendors)

These are the people who enable the project and for whom the project will produce the agreed-upon benefit[s], which justify its production. They are only directly involved in the process during the sprint reviews.

Managers (including Project Managers)

People who will set up the environment for product development.

03 January 2012

How to set the completion Status of Concurrent Program in Oracle Apps (Unix)

Many times users wants to control the status of concurrent program, specially in unix it is difficult to complete the program in warning status. Following code snippet will be useful programmers who wants to set the concurrent program status.

In generally,
For PL/SQL program status is controlled by retcode, if retcode is 0 for sucessful completion, 2 for error and 1 for warning.

Same in Unix, exit 1 indicates error and exit 0 indicates successful completion but for warning you don't have direct way. In those cases we need to use following function.


################################################################################

This function sets the completion status

################################################################################
set_completion_status(){count_status=`sqlplus -s << EOSQL
$APPSLOGIN
WHENEVER SQLERROR EXIT SQL.SQLCODE
SET HEADING OFF
SET FEEDBACK OFF
SET VERIFY OFF
SET LINESI 100
SET PAGESI 0
SELECT COUNT(1)
FROM ikncu.RAC_FUTURE_ACK_TEMP
WHERE process_flag IN ('ERROR')
AND po_request_id = $FCP_REQID;
EXIT EOSQL`

sqlplus -s << EOSQL
$APPSLOGIN WHENEVER SQLERROR EXIT SQL.SQLCODE
SET FEEDBACK OFF DECLARE l_stat BOOLEAN;
l_session_id NUMBER;
BEGIN
fnd_global.initialize(session_id => l_session_id
, user_id => fnd_global.user_id
, resp_id => fnd_global.resp_id
, resp_appl_id => fnd_global.resp_appl_id
, security_group_id => null
, site_id => null
, login_id => null
, conc_login_id => null
, prog_appl_id => null
, conc_program_id => null
, conc_request_id => $FCP_REQID
, conc_priority_request => null);
IF($count_status = 0)THEN
ci_utility_pkg.spool('inside if block');
l_stat :=
fnd_concurrent.set_completion_status('NORMAL','Normal Completion. Review log for details.');
ci_utility_pkg.spool($count_status);
ELSE
l_stat := fnd_concurrent.set_completion_status('WARNING','Completed in Warning. Review log for details.');
ci_utility_pkg.spool($count_status);
END IF;
COMMIT;
END;
/
EXIT;
EOSQL
}