Tuesday, November 15, 2011

SQL Loader

SQL loader as some of you might have heard is a high performance data loader where it is used to load a large amount of data in no time in to SQL databases.This utility is provided by ORACLE and is one of the ORACLE DATABASE UTILITIES  along with other utilities such as Oracle Data Pump.
The data can be loaded from any text file and inserted in to the database. There are several types of files within the process of the SQL loader. There are three types of important files which are used prior to the process of SQL loader and those files are:
  • The DATA file
  • The CONTROL file
  • The parameter file
The  other files are used within the process of the Data being inserted in to the database.Those files are
  • The LOG file
  • The DISCARD file
  • The BAD file
The SQL loader reads a data file and a description of the data which is defined in the CONTROL file. Using this information and any added specified parameters , the SQL loader loads the data into the database.

 The Control File

The SQL Loader Control file contains information that describes how the data will be loaded. It contains the
  • Table name
  • Column Data types
  • Field Delimiters etc.
The Control file is the backbone of the whole process.
Manually creating a control file is an error prone process although when purchasing oracle, 
(i assume) the control file comes with it along with the sql loader utility. 
(That is why they call it ORACLE`s SQL loader utility.No point of creating a control file if you paid money to ORACLE).
The control file can also  specify that records are in a a fixed format. (A file is in fixed format when all records in a DATA file are of the same length).


Below is an image of the SQL loader Architecture










Thursday, November 3, 2011

Web Deployment with WAR files..

Deployments tend to be easy.
But when it comes to web deployments, a Deployer faces a diversion from the usual routine.The below post is about web deployments regarding a WAR file.

What is a WAR file???

A WAR file , also known as a Web application ARchive file, is a JAR file used to distribute a collection of JavaServer Pages, Java Servlets, Java classes, XML files, tag libraries and static Web pages (HTML and related files) that together constitute a web application.

When you take a WAR file, it is usually large in size and you find various files and directories within.
The WEB-INF directory in the WAR file contains a file names web.xml which defines the structure of the web application. If the web application is only serving JSP files, the web.xml is not strictly necessary.
If the web application uses servlets, then the servlet container uses web.xml to ascertain to which servlet  a URL request is t be routed.
web.xml is also used to define context variables which can be referenced within the servlets and it is used to define environmental dependencies which the Deployer is expected to set up.

Advantages of a WAR file :
  • SECURITY - No one can modify the deployment , once the war file is signed and deployed.
  • Easy development, testing and deployment.
  • The version of the deployed application is easily identified.
  • All J2EE container support .WAR files.
Now let us peek in to a very informative video on how to create a simple JSF application .WAR file for deployment.
(This task is usually done by the developer)