Article



Cisco Systems and CCNA and Article

Routing Protocols: Article from uCertify

uCertify has sent us this article which is useful for the CCNA (Cisco Certified Network Associate) certification exam. The article helps you to understand the Routing Protocols, which determine the best path to deliver packets by knowing about all other routers connected to the network, a topic for 640-802 exam.

Routing Protocols
A routing protocol specifies how routers communicate with each other for distributing routing information between routers on a network. It helps each router to determine the best path to deliver packets by knowing about all other routers connected to the network.   

There are two categories of routing protocols, namely Interior Gateway Protocol (IGP) and Exterior Gateway Protocol (EGP).

An Interior Gateway Protocol (IGP) refers to a routing protocol that exchanges routing information between gateways within a single autonomous system. The routing information is used by the Internet Protocol (IP) or other network protocols to specify how to route transmissions. Following are the Interior Gateway Protocols (IGPs):

  • IS-IS
  • OSPF
  • IGRP
  • EIGRP
  • RIP (RIPv1 and RIPv2)

Intermediate System-to-Intermediate System (IS-IS) is a link-state routing protocol standardized by the ISO. It supports variable length subnet masks (VLSM), uses multicast to discover neighboring routers using hello packets, and supports authentication of routing updates.

Open Shortest Path First (OSPF) is a routing protocol that is used in large networks. Internet Engineering Task Force (IETF) designates OSPF as one of the Interior Gateway Protocols. A host uses OSPF to obtain a change in the routing table and to immediately multicast updated information to all the other hosts in the network.

Interior Gateway Routing Protocol (IGRP) is a Cisco proprietary distance vector Interior Gateway Protocol (IGP). It used by Cisco routers to exchange routing data within an autonomous system (AS). This is a classful routing protocol and does not support variable length subnet masks (VLSM). IGRP supports multiple metrics for each route, including bandwidth, delay, load, MTU, and reliability.

EIGRP is a Cisco proprietary protocol. It is an enhanced version on IGRP. It has faster convergence due to use of triggered update and saving neighbor’s routing table locally. It supports VLSM and routing summarization. As EIGRP is a distance vector protocol, it automatically summarizes routes across Class A, B and C networks. It also supports multicast and incremental updates and provides routing for three routed protocols i.e. IP, IPX, and AppleTalk.

RIPv1 was designed to fulfill dynamic routing needs of a network. It uses MAC-level broadcasts, which are not desirable in the current scenario because all nodes must process all broadcasts. It does not support VLSM and route summarization.

RIPv2 is a classless protocol. It improves upon RIPv1 with the ability to use VLSM and route summarization. It supports route authentication and multicasting of route updates. It is used in small to medium size networks. RIPv2 uses triggered updates to speed up convergence. It supports variable length subnet masks (VLSM).

Variable Length Subnet Masks (VLSMs) allow administrators to divide a given IP address space into more than one subnet. It helps in efficient use of IP addressing. A classless routing protocol is required to deploy VLSM. Classful protocols such as RIP v1 do not support VLSM.

An Autonomous system (AS) is a group of networks under a single administration and with single routing policies. Each AS is assigned a unique number in order to differentiate it from other autonomous systems. The assigned unique number can be from 1 to 65,535. The Internet Assigned Numbers Authority (IANA) is responsible for assigning these numbers. There are public and private AS numbers like private and public IP addresses.

Administrative distance defines the reliability of a routing protocol. The router uses administrative distance in order to choose the best path when there are two or more different routes on a router to the same destination using different routing protocols. Each routing protocol’s administrative distance value decides which routing protocol is more reliable. The lower the administrative distance value, the more reliable the routing protocol.

Protocol Administrative distance value
IGRP 100
OSPF 110
IS-IS 115
RIP 120

Note: The administrative distance value for static route is 0.

Exterior Gateway Protocol (EGP) is a protocol that exchanges routing information between different autonomous systems. It is commonly used between hosts on the Internet to exchange routing table information. Border Gateway Protocol (BGP) is the only active EGP.

BGP stands for Border Gateway Protocol. It is an interautonomous system routing protocol and is a form of Exterior Gateway Protocol (EGP). This protocol is defined in RFC-1267 and RFC-1268. It is used for exchanging network reachability information with other BGP systems. This information includes a complete list of intermediate autonomous systems that the network traffic has to cover in order to reach a particular network. This information is used for figuring out loop-free interdomain routing between autonomous systems. BGP-4 is the latest version of BGP.

Visit uCertify Web site to read more free articles for other Cisco certification exams.
Mar 07 2008 02:53 pm | No Comments »


Sun Education and 310-019 and SCJA and Article

Article: Java-Data types, Variables, and Arrays

uCertify has sent us this article which is useful for the SCJA certification exam. The article helps you to understand the Java types, variables and arrays, a topic for CX310-019 exam.

Java-Data types, Variables, and Arrays
Java is a robust language. One of the factors, which makes Java robust is the fact that it is a strongly typed language, i.e., every variable has a type, every expression has a type, and every type is defined.Java defines eight primitive data types. These are as follows:
  1. int
  2. byte
  3. long
  4. short
  5. float
  6. char
  7. boolean
  8. double

These can be grouped into four main categories as listed below:

  • Integers: This includes int, long, short , and byte.
  • Floating-point numbers: This includes float and double. These represent numbers with fractional precision.
  • Characters: The char type is included in this category.
  • Boolean: The boolean is a special type to represent true/false values.

The width and range of each type is given below:

Type Width Range
byte 8-bit -128 to 127
short 16-bit -32,768 to 32,767
int 32-bit -2,147,483,648 to -2,147,483,647
long 64-bit -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
float 32-bit 1.4e-045 to 3.4e+038
double 64-bit 4.9e-324 to 1.8e+308
char 16-bit ‘\u0000′ to ‘\uffff ‘


Type Conversion and Type Casting

Java provides two kinds of data type conversions automatic and explicit. Automatic conversion takes place when the following two conditions are fulfilled:

  • The two types are compatible.
  • The destination type is larger than the source type.

When these two conditions are met, widening conversion takes place, i.e., a narrow data type is promoted to a wider one. For example, value of byte type will be promoted to int, as int is wider than byte in width.

In many cases automatic type conversions are helpful, but they fail to fulfill all the requirements. For example, an automatic conversion cannot be performed to convert int to byte, as int is wider than byte. The general form to perform such type of narrowing conversion is as follows:

(target-type) value

The example below describes an explicit conversion:

class Rat {
public static void main(String args[]){
int a=10,b=20;
byte c;
c= (byte)(a+b);
System.out.print(c);
}

}

here, the value obtained after adding variables a and b of int type is stored in c, which is of byte type. Therefore, before storing the value casting is done:

c= (byte)(a+b);

Variable

A variable is said to be a storage unit in Java. A variable is defined as the combination of an identifier, a type, and an optional initializer. Every variable has a scope, which defines its visibility, and a lifetime.

Variable Declaration:

The general form for declaring a variable in Java, is as follows:

type identifier[=value];

In the line mentioned above, type defines the data type of a variable. It can be int, short, char, etc. The identifier refers to the name of the variable, and the value is any constant assigned to a variable. The variable declaration must end with a semicolon “;”. Java keywords such as final, try, etc. are not allowed as variable names. Some examples given below describe variable declaration in detail:

int a, b, c; // declaration of three variables a, b, and c of int type.

int a=3, b; // declaration of two variables a and b and initialization of a.

char x=’x'; // declares char type variable and assigns value. The char type value must be within single quotes.

Dynamic Initialization of Variables :

The example given below describes the dynamic initialization:

class Dynamic {
public static void main(String args[]) {
int a=10, b=30;
double c=a+b; //dynamic initialization of variable c
System.out.print(c);
}
}

In the example given above, the variable c is dynamically assigned the value obtained after the addition of values stored in variables ‘a’ and ‘b’.

The Scope and Lifetime of a Variable

In the example mentioned above, all the variables are declared within the main method. However, Java allows a variable declaration within any block. An opening and closing brace defines a block. This is a block:

{

//block

}

A block defines a scope. A scope determines the visibility and lifetime of an object, which is defined inside it.

The other programming languages such as C defines two categories of scopes: global and local. These two traditional categories do not gel well with Java’s strict object-oriented model. In Java, the two main scopes are those that are defined by a class and a method.

The scope defined by a method begins with an opening brace and finishes with a closing brace. The parameters of a method are also within that scope.

As a rule, the variables declared inside a scope are only visible to the code within that scope. These variables are not visible to the code outside the scope. Therefore, declaring a variable inside a scope localizes it and prevents it from unauthorized access or modification.

Nested scopes are allowed, i.e., a scope within a scope. For example, each time a programmer creates a block of code, he creates a new, nested scope. When this happens, the outer scope encloses the inner scope. This means that objects declared in the outer scope will be visible to the code within the inner scope but not vice-versa. Objects declared inside the inner scope will not be visible to the outer scope.

The example below describes the nested scope:

class Nested {
public static void main(String args[]) {
int x; //visible to all code within main()
x=100;
if (x==100) { //start of new scope
int y=20; // known only within this block
//x and y both known here
System.out.println(+x + ” ” +y);
}

y=200; // error, as y is not known here
System.out.print(x) // x is known here
}
}

here, the variable x is declared at the start of the main() method’s scope and is accessible to all the subsequent code within the main method. The variable y is declared within the if block and is accessible within this block. That is why a compile-time error will be generated if y is initialized to 200.

Note : A variable is created when its scope is entered, and gets destroyed when its scope ends. This means that a variable will not hold its value once it has gone out of scope.

Array

An array is a group of variables of the same data type referred to by a common name. Arrays of any data type can be created and may have one or more dimensions. A particular element in an array is accessed by its index.

One Dimensional Array

A one-dimensional array is a list of variables of the same data type. The general form for creating a one-dimensional array is:

type var-name[]; or type[] var-name;

here, type refers to the data type of an array, and var-name refers to the name of the array.

For example,

int arr[];

This declares an empty array named arr of int type. In Java, the size of an array is set when it is explicitly created using the new operator.

int arr[]= new int [5];

It will create an array named arr of size 5. It will store 5 elements, from 0 to 4. The starting index of an array is 0.

The diagram below depicts a conceptual view of the array declared above:

here, each box will contain one element.

The first element of the array is positioned at the 0th location, therefore, to get the value of the first element, the following code is used:

System.out.print(arr[0]);

Note: In Java, the elements of an array are always set to default values after their creation. An int type array is set to 0 and a boolean type array contains false by default if no value is stored in an array.

Multidimensional Arrays

In Java, a multidimensional array is known as an array of arrays. The general form for declaring a multidimensional array:

type var-name[][]; or type[][] var-name;

like a one dimensional array, the size of a two dimensional array is also explicitly created using the new operator. The example below describes this:

int a[][]=new a[3][2];

This will create an array, which contains 3 rows and 2 columns. It will contain 3*2, i.e., 6 elements. The first index is [0][0] and the last index is [2][1]

Array size

In Java, the length field specifies the size of an array.

The example below describes its use.

class Rat {
public static void main(String args[]) {
int a[]=new int[4];
System.out.print(a.length);

here, the output will be 4.

What is an ArrayIndexOutOfBoundsException?

In Java, a run-time error ArrayIndexOutOfBoundsException is encountered when a program attempts to extract a value from an array outside its boundary. For example,

  1. class Rat {
  2. public static void main(String args[]) {
  3. int a[]=new int[4];
  4. System.out.print(a[5]);

The above-mentioned code will generate an exception at runtime, as the code at line number 3 declares and creates an array of size 4. It will have index starting from 0 to 3 , but the code at line number 4 attempts to extract the value from the 5th location.

Visit uCertify Web site to read more free articles for other Java certification exams.

Oct 31 2007 04:27 am | No Comments »


70-536 and Article and MCTS .NET

Free Article: Developing Multi-Threaded .NET Applications

Try this free article for MCTS .NET certification exam that is available at uCertify Website. This article will help you understand how to develop multi-threaded application using .NET, a topic for the 70-536-C SHARP exam.

Developing Multi-Threaded .NET Applications

A thread is a sequence of code execution within a single process. It does not have its own address space. However, it uses the memory and other resources of the process in which it executes. A thread consists of identification, a stack, a register set containing the program or the instruction pointer, the stack pointer, and a priority. A process can have multiple threads that execute independently and concurrently with its own sequence of instructions. Therefore, multiple operations are performed concurrently within a single process and each operation is treated as a thread. Multiple operations are also referred to as multi-threaded operations.

In a multi-threaded operation, all threads in a single process exist in the same address space and share all the resources belonging to the process. A thread can create, suspend, resume, terminate, or change the priority of another thread within a single process. A thread can kill its process by canceling the main or primary thread. Therefore, canceling the main thread terminates all the threads of the process. If any changes occur to the main thread, it can also affect all the threads of the process. Even the priority of the process, when changed, can also change the priorities of all threads that inherited.

The .NET Framework supports a multi-threaded operation in developing .NET applications. Multiple threads within a single process can manage the multi-tasks of an application. As compared to multiple processes, multiple threads can increase the throughput of an application and simplify program structure. In a multi-threaded operation, the application does not require any special mechanism to communicate between its tasks, and less system resources are needed for context switching between the tasks.

Advantages and Disadvantages of Using Multiple Threads

Multiple threads can accomplish various tasks while working in a single application domain. They can communicate to a Web server and a database over a network. They can perform operations that are time taking and can distinguish various tasks of varying priority. Multiple threads also enable the user interface to be more responsive during the time allocation of background tasks.

However, one should avoid using multiple threads in a single application domain, as the consumption of operating-system resources can be minimized and the application performance enhanced. The frequent use of threads can cause the computer to consume more memory. There are a limited number of processes that require the context information, AppDomain objects, and threads according to the storage space in the memory. It is also very difficult to keep track of large number of threads, as it consumes significant processor time. Therefore, if there are multiple threads executing in a single process, threads in other processes get less frequent time period for execution.

Furthermore, several errors can occur in the source code while controlling code execution with large number of threads. Similarly, a large number of threads can also cause conflicts when different resources are shared among multiple threads. In order to avoid these conflicts, it is better to control access to shared resources by providing synchronization objects. By synchronization objects, one can coordinate resources that are shared among multiple threads. Therefore, the number of threads should be reduced to make it easier to synchronize resources. The resources that require synchronization can include the following:

  • System resources, e.g. communication ports
  • Resources that are shared by more than one process, e.g. file handles
  • Resources of an application domain shared by multiple threads, e.g. global, static, and instance fields

Creating Threads

The .NET Framework provides the System.Threading name space, which contains classes that are used to create and manage multiple threads in an application. The Thread class of the System.Threading name space represents a single thread and creates and controls the thread in a process. It sets a thread’s priority and gets the status of that thread. Some of the major methods of the Thread class are as follows:

Method Name Description
Abort Raises a Thread Abort Exception exception on the thread that is being invoked and begins the process of the thread’s termination.
Interrupt Raises a Thread Interrupted Exception exception when a thread is interrupted or when the thread is in a blocked state, i.e. in a wait, sleep, or join state.
Join Blocks the thread that is recently being called until the previous thread terminates.
Start Sets a thread to execute.
Sleep Blocks the current thread for a specified time period (in milliseconds). Allows the execution of other threads.
SpinWait Blocks the current thread for a certain number of iterations. Does not allow the execution of other threads.

Some of the major properties of the Thread class are as follows:

Property Name Description
Is Alive Returns a value of the current thread that is recently executing.
Is Background Gets a value to indicate whether or not the thread is running as a background thread.
Is Thread Pool Thread Gets a value to indicate whether or not a thread belongs to the thread pool.
Managed Thread Id Returns a unique identifier to identify the currently managed thread.
Name Returns a string that contains the name of the thread.
Priority Returns a value to indicate the thread’s priority. The default property value is Normal.
Thread State Gets a value to indicate the state of the current thread.

The following code snippet displays a simple multi-threaded processing in a process:

using System;
using System.Threading;
public class ThreadProcess1
{
public static void Thread1()
{
Console.Write(”Enter your first name”);
string fname = Console.ReadLine();
Console.WriteLine(”The length of your first name is: {0}”, fname.Length);
Thread.Sleep(0);
}
public static void Thread2()
{
Console.Write(”Enter your last name”);
string lname = Console.ReadLine();
Console.WriteLine(”The length of your last name is: {0}”, lname.Length);
Thread.Sleep(0);
}
public static void Main()
{
Console.WriteLine(”Start a thread.”);
Thread t1 = new Thread(new ThreadStart(Thread1));
t1.Start();
Thread.Sleep(0);
Console.WriteLine(”Wait until the first task ends.”);
t1.Join();
Console.WriteLine(”Start another thread.”);
Thread t2 = new Thread(new ThreadStart(Thread2));
t2.Start();
Thread.Sleep(0);
t2.Join();
Console.WriteLine(”Press Enter to end program.”);
Console.ReadLine();
}
}

Thread Pooling

The .NET Framework provides a class known as the ThreadPool in the System.Threading name space. This class provides a pool of threads that are used to post work items and process asynchronous I/O and timers. Thread pooling is a technique that uses threads more efficiently by providing a pool of worker threads that are managed by the system. There is one such thread in the thread pool, which monitors the status of several wait operations that are queued to the thread pool. When a wait operation completes, a worker thread starts executing the corresponding callback function.

Note: Background threads are those threads that are executed from the managed thread pool. There is only one thread pool in a single process. By default, the size of a thread pool is 25 threads per processor.

Thread Priorities

Since the Windows operating system is designed to optimize the scheduling of threads, a developer can adjust a thread’s scheduling priority in order to reduce bottlenecks and allow blocked threads to run. A thread determines its priority property to determine the manner in which the time can slice its processor time for its execution. The ability of the operating system is to allocate longer time slices to those threads that have high priority properties and shorter time slices to threads with low priority properties. In .NET infrastructure, the Priority property of the Thread class returns a value to indicate the thread’s priority. It accepts values from the Thread Priority enumeration. Each thread in a process has a priority within the range between the Lowest and the Highest value. By default, the value of a thread’s priority is Normal. A thread in its state of execution can be assigned in any of the following values:

  • Highest
  • Above Normal
  • Normal
  • Below Normal
  • Lowest

States of Threads

A thread in a thread pool can be in any one of the states of execution. The Thread State enumeration of the System.Threading name space specifies the execution state of each thread in a thread pool. The Thread State enumeration has the following members that describe the various execution states of a thread:

Member Name Description
Aborted Specifies the thread to be in the Stopped state.
Abort Requested Requests the thread to be aborted. But the thread has not yet received the Thread Abort Exception exception that causes the thread to terminate.
Background Specifies the execution of a thread as a background thread.
Running Indicates that the thread has been started and it is not blocked.
Stopped Indicates that the thread has been stopped.
Stop Requested Requests the thread to stop.
Suspended Indicates that the thread has been suspended.
Suspend Requested Requests the thread to suspend.
Unstarted Indicates that the thread has been created, but the Thread.Start method has not been called on the thread.
Wait Sleep Join Indicates that the thread is blocked, as the Monitor.Wait, Thread.Sleep, or Thread.Join method is called each on separate threads.

The .NET Framework provides a property in the Thread class known as the Thread State property that retrieves one of the values indicating the state of the current thread in a process. The state of a current thread can be illustrated in the figure given below:


Thread Synchronization

Thread synchronization is a process through which multiple threads share access to common resources. In a .NET multi-threaded application, individual threads sometimes need to be synchronized with other parts of the application program. For example, if multiple threads access the same resources for both read and write operations, the resultant value can be incorrect. If a thread writes the contents to a file and another thread reads the contents from the same file at the same time, data can become corrupted. In such a situation, the file access needs to be locked, until at least one thread completes its execution before letting the other thread to start its execution.

The Microsoft .NET Framework has provided many thread synchronization objects. One such thread synchronization object is Mutex, which enables only one thread to access the resource at a time. Another thread synchronization object is Semaphore, which allows zero to any number of threads to access the resource simultaneously.

In a .NET application, the synchronization technique is used to control the order in which the lines of program code run when a set of tasks are to be performed in a specific sequence. The technique can also be used to prevent the problems that can arise when two or more threads share the same resources at the same time.

Get more free article on the MCTS.NET article page at uCertify. There are also many useful articles for other Microsoft certifications such as MCTS Windows Vista, MCITP, MCTS SQL Server 2005, etc at the Web site.

Oct 08 2007 05:26 am | No Comments »


Sun Education and 310-019 and SCJA and Article

JDBC: Free Article for SCJA Exam from uCertify

This free article for SCJA certification exam is provided by uCertify that will help you to prepare and excel in exam CX310-019. This exam measures your in-depth knowledge and skills in designing application using Java technology.

JDBC

The introduction of the Java language is required before introducing the concept of JDBC. Java is an object-oriented programming language. It incorporates all the objected-oriented concepts such as polymorphism, abstraction, encapsulation, etc. Java is a platform independent language because it can run on different operating systems. Java syntactically resembles C and C++, but it is simpler than the two, as it does not contain pointers and multiple inheritance. Both pointers and multiple inheritance seem complex to the application developer. Java has some drawbacks too. It does not provide much facility for developing GUI (graphical user interface) applications. The earlier version of Java did not contain any support for database access. This was the major drawback of this language, as in today’s world, keeping and managing databases is quite important. To remove this drawback, Sun Microsystems has introduced a new interface known as Java Database Connectivity (JDBC). JDBC provides database connectivity to Java applications.

JDBC Interface

JDBC stands for Java Database Connectivity. It provides database access to Java applications. The JDBC API interfaces are used to connect to the database and execute all types of SQL statements. The JDBC API interfaces can execute normal SQL statements, dynamic SQL statements, and stored procedures that take both IN and OUT parameters. The section below provides a description of various JDBC API interfaces.

Callable Statement Interface: This interface provides methods for executing stored procedures that return OUT parameter values. The CallableStatement object inherits the PreparedStatement object, adds various methods for registering parameters to be OUT parameters, and provides methods to get the parameters passed back from the stored procedure.

Connection Interface: This provides database connection to Java applications. It can be used to create various Statement objects for executing SQL statements and stored procedures. It also provides the facility to set the transaction properties for the connection.

Database MetaData: This interface provides various methods for obtaining the information about the database. It provides listing of tables for a specific database, primary keys, columns, and other information related to specific tables.

Driver Interface: This is a database specific Driver object, which the JDBC vendor provides. It contains information about connecting Java applications to the database. It also provides information about the database, such as version of the database, etc.

Prepared Statement Interface: This interface supports the execution of dynamic SQL statements and stored procedures. It allows setting various parameters in dynamic statements with specified data values.

Note: Dynamic statements are those statements whose values are not known at the time of creation.

Result Set Interface: This object is used to get information from a SQL SELECT statement. The SQL SELECT statement returns the cursor, which is used by the Result Set interface to search the results returned by the SELECT statement. It provides a set of methods for extracting information from different columns contained in the cursor.

Result Set Metadata: This interface provides information about a returned result set. It is created from a ResultSet object and provides information specific to that object. It provides the information about the number of columns in the result set such as names, and types of the column.

Statement Interface: This is created from the Connection object. It is used to execute standard SQL statements and stored procedures. It provides two main methods, executeQuery() and executeUpdate(). These methods support execution of SQL queries and SQL updates. The executeQuery() method returns a ResultSet object. JDBC API Objects Java provides various objects that can be used in Java applications. These objects provide Java with some of the database specific data types available in most databases.

The table below describes various JDBC API objects:

Object Detail
Date It provides an object that can accept database date values.
Driver Manager It provides another way to make a connection to the database.
Driver Property Info It is used to manage Driver objects.
Time It provides an object that can accept database time values.
Timestamp It is used to get the values from the database that are of timestamp data type.
Types It provides a list of predefined integer values that identify the various data types that can be used in JDBC.

 

JDBC Exceptions

Whenever an error occurs in Java, an exception is thrown. The JDBC API introduces three new exceptions. These exceptions are discussed as follows:

DataTruncation Exception: This exception is thrown when JDBC unintentionally truncates a data value. The exception provides methods to get information about the data value that was truncated and the truncation error as well.

SQLException Exception: This is thrown by almost all the methods in the JDBC API. It provides methods for getting information about the error and the present state of the SQL transaction.

SQLWarning Exception: This exception is generated when the database issues a warning. The warnings are silently sent to the object whose method caused it to be reported.

JDBC Vs CGI

Before the introduction of JDBC, the Java applications used to call and access CGI (Common Gateway Interface) programs through streams in Java. The CGI scripts in Java call a separate program that provides database access and returns results. The CGI approach is slow and allows bugs to get into the applications. In addition to this, one must know both the technologies - Java and CGI - to make applications, whereas to access the database through JDBC, one must be a master in Java only.

Another strong reason to use JDBC is that it provides faster access than the CGI approach. In CGI approach, another program is called that accesses the database, processes the data, and returns the result back to the calling program in a stream. This requires multiple levels of processing that increase wait time and also allow more bugs to creep into the applications. The figure below demonstrates the way CGI accesses the database. When a CGI script is called, a new script is executed through a Web server, whereas execution of a JDBC statement against the database requires only some sort of server that passes the SQL commands through to the database. This increases the speed of execution of SQL statements. The CGI script first connects to the database and processes the results, whereas the JDBC allows the connection of the database to Java applications so that it can perform all the processing.

The figure below demonstrates how a JDBC statement is executed:

Please visit http://www.ucertify.com to read more free articles for SCJA and other Java Certification such as SCWCD, SCMAD, etc.

Sep 27 2007 05:52 am | No Comments »


Oracle and 1Z0-042 and OCA and Article

Automatic Storage Management in Oracle

uCertify offers this free article for Oracle Database 10g: Administration-I that will assist you in your preparation for Exam 1Z0-042 . This exam is required to be certified as OCA Professional. It evaluates your skill of installation, management and maintenance of Oracle10g databases.

Automatic Storage Management

Enterprises are preferably switching from old existing Oracle versions, such as Oracle 8i and Oracle 9i, to Oracle 10g to have various additional profitable features. They often employ the Automatic Storage Management (ASM) option to enhance the manageability and consolidation of a database.

Oracle 10g

Oracle 10g is a revolutionary product in Oracle’s grid computing world. Oracle 10g is a DBMS, which can automate many database tasks. Oracle 10g follows the Oracle’s 9i platform; the letter ‘g’ in Oracle 10g signifies grid computing.

Oracle 10g delivers numerous interesting and dynamic new features. In this article, Automatic Storage Management (ASM) is explained in detail. There are many features available in Oracle 10g that help manage database operations more efficiently. One of the pivotal features of Oracle 10g is Automatic Storage Management (ASM). It is one of the storage options available in Oracle 10g.

Basic Functions of ASM

ASM relieves the burden of disk and storage management by defining the disk groups for file management, as a result of which file groups are reduced, and the time of the DBA is saved.

Note: The main function of ASM is to simplify and automate the database to manage Oracle database files. The RAC helps in automating the database management.

RAC

RAC stands for Real Application Cluster, which is a component provided by Oracle in its 9i version and which is now also available in the 10g version. RAC enables a database to be installed across multiple servers.

The image below depicts a window in which the configuration settings of Automatic Storage Management are detailed. A candidate has to enter the disk group name, the level of mirroring/redundancy, and the requisite data that the cursor therein prompts for. Click the Next button to proceed further.


This article will mainly focus on the following:

  • ASM overview
  • New features in ASM

ASM Overview

ASM is a very dynamic feature of Oracle 10g, which provides a grouped file system with no further investment on the software.

With ASM, there is no need of enhancing the storage resources for database management. ASM’s intelligent mirroring technology enables triple data protection. It is known as triple data protection because while configuring Automatic Storage Management, a user is provided three levels of redundancy, which are as follows:

  • High
  • Normal
  • External

New Features in ASM

Following are the main new features of ASM:

  • ASM can support multiple database versions.
  • ASM enhances the manageability of the database.

ASM helps the DBA save money by optimizing storage utilization.

Oracle’s 10g version has enhanced the ASM functionality in the clustered environment, allowing one ASM instance per client to manage all database instances in the cluster, which has removed the requirement of maintaining more than one ASM instance to manage individual database instances.

For higher availability and manageability, ASM’s instance should be installed in a separate ORACLE_HOME parameter, which is ASM_HOME.

ASM enhances I/O performance, as the database files are intelligently distributed across the current active devices. While adding more resources, database file distribution is re-balanced, keeping the database up and running.

ASM has mirroring capability to enhance manageability, which means that ASM can keep duplicate copies of data as a backup for recovery purposes.

Note: DBAs should note that ASM is not general-purpose, and will not replace the OS file system because ASM’s file resources are not directly managed by the OS, but rather it is the ASM’s file resources, which are managed by the file management system of the OS.

Preparing hard disk for configuration of ASM

If the DBA is configuring ASM for Windows NT OS, then the following points should be taken into consideration:

  • Investigate for enough space on the system’s hard disk.
  • Using the disk partitioning utility (DISKPART.EXE) of Windows creates primary disk partitions, deciding the size of each partition.

Following example can give an idea about how to create partitions:

  • C:\>Select disk1
  • C:\Disk1 selected.
  • C:\Create partition primary size = 100
  • C:\Partition created.
  • C:\Create partition primary size = 100
  • C:\Partition created.

……………….

The following image depicts the list of volumes created via the DISKPART.EXE utility in a Windows NT environment.

This article helps in understanding the fundamental functionality of Automatic Storage Management (ASM).

To read more technical articles for Exam 1Z0-042 and other Oracle certification exam such as OCA 10g, OCP 10g, OCA 9i, OCP 9i, etc., please visit http://www.ucertify.com

Sep 17 2007 11:03 pm | No Comments »

Next Page »