This document describes the procedure required to migrate a database from Windows to Linux using the RMAN Convert Database command. Both Windows and Linux platforms have the same endian format, which makes possible to transfer the whole database, making the migration process very straightforward and simple. To migrate between platforms that have a different endian format, Cross Platform Transportable Tablespaces (XTTS)needs to be used instead. For IT managers, database migration has become one of the most routine and challenging facts of life. Workload balancing, technology refresh, server and storage consolidation, data center relocation, data classification, and mergers/acquisitions are all drivers to move data from one storage device to another on a regular basis. You¶d think that any operation performed routinely would become easy, but it is not that simple which it seems to be. Migration moving data from one device to another (especially as the capacity of storage devices continues to grow) and then redirecting all I/O to the new device is an inherently disruptive process. With the increase in the percentage of mission-critical data and the proportionate increase in data availability demands, downtime with its huge impact on a company¶s financial bottom line becomes unacceptable. In addition, business, technical and operational requirements impose challenging restrictions on the migration process itself. Resource demands staff, CPU cycles, and bandwidth and risks application downtime, performance impact to production environments, technical incompatibilities, and data corruption/loss make migration one of IT¶s biggest challenges.


1.1 DATA
The term data means groups of information that represent the qualitative or quantitative attributes of a variable or set of variables. Data (plural of "datum", which is seldom used) are typically the results of measurements and can be the basis of graphs, images, or observations of a set of variables. Data are often viewed as the lowest level of abstraction from which information and knowledge are derived. Raw data refers to a collection of numbers, characters, images or other outputs from devices that collect information to convert physical quantities into symbols that are unprocessed. Raw data refers to a collection of numbers, characters, images or other outputs from devices to convert physical quantities into symbols, that are unprocessed. Such data is typically further processed by a human or input into a computer, stored and processed there, or transmitted (output) to another human or computer (possibly through a data cable). Raw data is a relative term; data processing commonly occurs by stages, and the "processed data" from one stage may be considered the "raw data" of the next. The terms information and knowledge are frequently used for overlapping concepts. The main difference is in the level of abstraction being considered. Data is the lowest level of abstraction, information is the next level, and finally, knowledge is the highest level among all three. 1.2 INFORMATION Information as a concept bears a diversity of meanings, from everyday usage to technical settings. Generally speaking, the concept of information is closely related to notions of constraint, communication, control, data, form, instruction, knowledge, meaning, mental stimulus, pattern, perception, and representation.



Databases can be seen as a symbolic form of the computer age. Software database drivers are available for most database platforms so that application software can use a common API to retrieve the information stored in a database. consisting of rows and columns of information. Databases consist of software-based "containers" that are structured to collect and store information so users can retrieve. and many electronic mail programs and personal organizers are based on standard database technology.INTRODUCTION TO DATABASE DATABASE A database consists of an organized collection of data for one or more multiple uses. Commonly used database APIs include JDBC and ODBC.Database programs are designed for users so that they can add or delete any information needed. where coordination between many users is needed. Though there are various types of items within the database. spanning virtually the entire range of computer software. add. and searching. APPLICATIONS Databases function in many applications. the collections are computerized and therefore may offer a unique experience with each view. 5 . Unlike a narrative or film. navigating. The structure of a database is tabular. Databases have become the preferred method of storage for large multiuser applications. DATABASES IN NEW MEDIA Within new media. databases collect items on which the user can carry out various operations such as viewing. They do so through the use of tables . creates. update or remove such information in an automatic fashion. Even individual users find them convenient. each item has the same significance. This form of data may present a unique presentation of what the world is like.

Each has its own role to play in the developing and working of database.1 COLUMNS Columns are akin to fields. Unlike file records though. This makes reading data much more efficient you fetch what you want. All these components are linked to each other. In databases. even if you only wanted a tiny portion of the record. They are also similar to the columns found in spreadsheets (the A. a row can be made up of as many or as few columns as you want.2. They store the data that we want to save in our database 2. rows and columns form the building blocks of a database. the price of a part. Some of the main components which are used in developing and working of database are: y y y y y y y COLUMNS ROWS TABLES KEYS FORMS REPORTS QUERY Table.1 COMPONENTS OF DATABASE A database is developed with several components. individual items of data that we wish to store. that is. it is possible to extract only the columns you want to make up a row of data. 2.1. the date of an invoice is all examples of columns.1. C etc along the top). B. A customer's name.3 etc in a spreadsheet). 6 .2.2 ROWS Rows are akin to records as they contain data of multiple columns (like the 1. Old "records" that computers read forced the computer to read everything.

4 KEYS A key is a single or combination of multiple fields. Another table would be used to store details of parts and yet another would be used for supplier's names and addresses. Attributes are associated with it. For example.2. a primary key is a candidate key chosen as the main method of uniquely identifying a tuple in a relation. SECONDARY KEY A field or combination of fields that is basis for retrieval is known as secondary key. Its purpose is to access or retrieve data rows from table according to the requirement. Only keys would duplicate (and even then.1. 7 . on some tables . Secondary key is a non-unique field.these would be unique).1. PRIMARY KEY A primary key is a value that can be used to identify a unique row in a table. It is the tables that make up the entire database and it is important that we do not duplicate data at all. In the relational model of data.3 TABLE A table is a logical group of columns. TYPES OF KEYS The following tables or relations will be used to define different types of keys. 2. Examples of primary keys are Social Security numbers (associated to a specific person) or ISBNs (associated to a specific book). One secondary key value may refer to many records. you may have a table that stores details of customers' names and addresses. They are also used to create links between different tables. The keys are defined in tables to access or sequence the stored data quickly and smoothly.

Usually a foreign key in one table refers to the primary key (PK) of another table. This way references can be made to link information together and it is an essential part of database normalization.COMPOSITE KEY A primary key that consists of two or more attributes is known as composite key. SUPER KEY A super key is defined in the relational model as a set of attributes of a relation variable (relvar) for which it holds that in all relations assigned to that variable there are no two distinct tuples (rows) that have the same values for the attributes in this set. CANDIDATE KEY A candidate key is a field or combination of fields that can act as a primary key field for that table to uniquely identify each record in that table. ALTERNATE KEY An alternate key is any candidate key which is not selected to be the primary key. Equivalently a superkey can also be defined as a set of attributes of a relvar upon which all attributes of the relvar are functionally dependent. FOREIGN KEY A foreign key (FK) is a field or group of fields in a database record that points to a key field or group of fields forming a key of another database record in some (usually different) table. 8 .

The form should have some form of validation so that the user cannot enter "rubbish" onto the database.6 REPORTS It is all very well placing all this data into the database. Depending on the application. You just don't know. They are the screens that make up the application that allows us to enter and retrieve data. you wouldn't know which was incorrect? For example.5 FORMS Forms are used to enter or look at data. Each "field" on a form usually relates to a column on the database but this is not always the case. 2. For example.2. dates should store dates and so on. Suppose you had 3 columns on a table . Why? Because if one of the columns were incorrectly updated. there can be some very complex validation. A is equal to B + C. suppose the columns contain the following values: A = 11 B=7 C=5 Which column is wrong? You might think that A is wrong.1.A. but if you cannot access it in a format that you want (usually on paper). Every database should have some kind of reporting facility and I usually find that the report side of things is what makes a good (or bad) database application/package.1. Numbers must store numbers. B and C. More complex reports will 9 . This is why derived items are not stored on the database but can be shown on a form. suppose you have a field that shows a total of two or more items on a form. Simple reports should be so easy to produce that anyone can do it. Reports should be easy to produce and be quick. but perhaps B should be equal to 6 or maybe C should be 4. The total would NOT be stored on on the database. then it is extremely limited in use.

1. Depending on the database.need someone with programming/database knowledge. Things like "Give me a list of all the customers who ordered something last month" or "List all customers in a specific area". and production databases.1 BASED ON FUNCTIONALITY OPERATIONAL DATABASE These databases store detailed data needed to support the operations of an entire organization. 2. Queries can and often are the foundation of reports (in that a report can be based on the results of a query. For example: y y Customer database Personal database 10 . 2.2. we take a simple look at some basic design concepts for your tables.7 QUERY Queries are little programs that let the user ask questions. transaction databases. as it is possible to produce really silly results.2 TYPES OF DATABASE There is various kind of database which exists in the computer world. Next week. They are also called subject-area databases (SADB). Queries often use a language called "SQL" (Structured Query Language) which is a computer language that makes accessing databases simple. They are differentiated on their functionality and how they model the data. These then are the general components of what makes up a database. 2. queries can be constructed on screen or you may even be able to type in a query command direct.

On the OLAP. historical data used for analysis. Recent developments in data warehousing have led to the use of a Shared nothing architecture to facilitate extreme scaling. It becomes the central source of data that has been screened. a company might store sales records over the last ten years in an analytic database and use that database to analyze marketing strategies in relationship to demographics. Data warehouses are characterized by being slow to insert into but fast to retrieve from. 11 . standardized and integrated so that it can be used by managers and other enduser professionals throughout an organization. author. The dynamically-generated page will display the information about each item (such as title. An inventory catalog analytical database usually holds descriptive information about all available products in the inventory. you will often see analytic databases in the form of inventory catalogs such as the one shown previously from Amazon. Web pages are generated dynamically by querying the list of available products in the inventory against some search parameters. DATA WAREHOUSE A data warehouse stores data from current and previous years data extracted from the various operational databases of an organization.a. For example.On Line Analytical Processing) are primarily static.y y Inventory database Accounting database ANALYTICAL DATABASE Analytic databases (a. edited. read-only databases which store archived. ISBN) which is stored in the database.

DISTRIBUTED DATABASE These are databases of local work-groups and departments at regional offices. They consist of a home page and other hyperlinked pages [of multimedia or mixed media such as text. Examples of these are collections of documents in spreadsheets. word processing and even downloaded files. as well as data generated and used only at a user¶s own site. HYPERMEDIA DATABASES ON THE WEB These are a set of interconnected multimedia pages at a web-site. privately-owned data online ² available for a fee to end-users and organizations from commercial services. EXTERNAL DATABASE These databases provide access to external. manufacturing plants and other work sites. video clips. audio etc. 12 . photographic images. branch offices. graphic. Access to a wealth of information from external database is available for a fee from commercial online services and with or without charge from many sources in the Internet. These databases can include segments of both common operational and common user databases. END-USER DATABASE These databases consist of a variety of data files developed by end-users at their workstations.

REAL-TIME DATABASES A real-time database is a processing system designed to handle workloads whose state may change constantly. document-based databases do not store data in tables with uniform sized fields for each record. Instead. Any number of fields of any length can be added to a document. mostly 13 . though one could characterize some modern systems like XPath as being simultaneously navigational and declarative. As opposed to relational databases. queries find objects primarily by following references from other objects. main memory databases are often used. Main memory databases are faster than disk-optimized databases since the internal optimization algorithms are simpler and execute fewer CPU instructions. Fields can also contain multiple pieces of data. In applications where response time is critical. such as telecommunications network equipment that operates emergency systems. Accessing data in memory provides faster and more predictable performance than disk.NAVIGATIONAL DATABASE In navigational databases. they store each record as a document that has certain characteristics. IN-MEMORY DATABASES In-memory databases primarily rely on main memory for computer data storage. This differs from traditional databases containing persistent data. DOCUMENT-ORIENTED DATABASES Document-oriented databases are computer programs designed for document-oriented applications. These systems may be implemented as a layer above a relational database or an object database. This contrasts with database management systems which employ a disk-based storage mechanism. Traditionally navigational interfaces are procedural.

process control.unaffected by time.2. You will be instantly familiar with this relationship because that is how all windows-based directory management systems (like Windows Explorer) work these days. Relationships in such a system are thought of in terms of children and parents such that a child may only have one parent but a parent can have multiple children. For example. Parents and children are tied together by links called "pointers" (perhaps physical addresses inside the file system). real-time databases become integrated into society and are employed in many applications. Real-time processing means that a transaction is processed fast enough for the result to come back and be acted on right away. As computers increase in power and can store more data. banking. a single table acts as the "root" of the database from which other tables "branch" out. Real-time databases are useful for accounting. law. In this tree. a stock market changes rapidly and dynamically. the Hierarchical Database Model defines hierarchically-arranged data.2 MODEL BASED HIERARCHICAL DATABASES As its name implies. multi-media. medical records. 14 . A parent will have a list of pointers to each of their children. and scientific data analysis. reservation systems. Perhaps the most intuitive way to visualize this type of relationship is by visualizing an upside down tree of data. 2.

the Network model solves the problem of data redundancy by representing relationships in terms of sets rather than hierarchy. Of course. To get to a low-level table. Thus. The network model is very similar to the hierarchical model actually. Visually. instead of using a single-parent tree hierarchy. The model had its origins in the Conference on Data Systems Languages (CODASYL) which had created the Data Base Task Group to explore and design a method to replace the hierarchical model. the Network Database model was designed to solve some of the more serious problems with the Hierarchical Database Model. 15 . NETWORK DATABASES In many ways. Specifically. children can have multiple parents and parents can have multiple children. However. In fact. in the case of a Network Database. the network model uses set theory to provide a tree-like hierarchy with the exception that child tables were allowed to have more than one parent. you start at the root and work your way down through the tree until you reach your target. a Network Database looks like a hierarchical Database in that you can see it as a type of tree. as you might imagine. However.This child/parent rule assures that data is systematically accessible. the look is more like several trees which share branches. the hierarchical model is a subset of the network model. This allowed the network model to support many-to-many relationships. one problem with this system is that the user must know how the tree is structured in order to find anything.

Not all databases have or need a database schema ("schema-less databases"). These offer a wide range of functions. as well as frame databases and RDF-stores (also known as triple stores). Many databases use a combination of strategies. add. update or remove such information in an automatic fashion. the model was difficult to implement and maintain. Document-Oriented. 16 . which stores language objects natively without using a separate data definition language and without translating into a separate storage schema. The structure of a database is tabular. Most notable is the object database management system. applicable to many. whereas data-warehouse and other retrieval focused applications like Google's Big Table.3 ARCHITECTURE OF DATABASE A number of database architectures exist. these object databases store the relationship between complex data types as part of their storage model in a way that does not require runtime calculation of related data using relational algebra execution algorithms. Database programs are designed for users so that they can add or delete any information needed. These have been enhanced with extensible data types (pioneered in the PostgreSQL project) to allow development of a very wide range of applications. the network model was far from perfect. Most profoundly. Databases consist of software-based "containers" that are structured to collect and store information so users can retrieve. Unlike relational systems. There are also other types of databases which cannot be classified as relational databases.Nevertheless. 2. knowledge bases. Most implementations of the network model were used by computer programmers rather than real users. may also use a combination of these architectures in their implementation. What was needed was a simple model which could be used by real end users to solve real problems. XML. if not most circumstances in modern data processing. or bibliographic database (library catalog) systems may use a Column oriented DBMS architecture. though it was a dramatic improvement.Over many years general-purpose database systems have dominated the database industry. consisting of rows and columns of information. Online Transaction Processing systems (OLTP) often use a "row oriented" or an "object oriented" data store architecture.

Each level has its own schema. It is necessary to view data at different levels of abstraction. 17 .3. Schema: y Description of data at some level. but it is difficult to work with data at this level. Conceptual External. or numbers and strings.2.1 THREE LEVEL DATABASE ARCHITECTURE DATA AND RELATED STRUCTURES Data are actually stored as bits. We will be concerned with three forms of schemas: y y y Physical.

g. minimizing physical distances between related data and organizing the data structures within the file (blocked records. Changes to data structures are difficult to make. btree. An external schema specifies a view of the data in terms of the conceptual level. on the random access disk system. EXTERNAL DATA LEVEL In the relational model. Application code becomes complex since it must deal with details.Early applications worked at this level . Referred to as physical data independence. flat). linked lists of blocks. Rapid implementation of new features very difficult. etc. the conceptual schema presents data as a set of tables.PHYSICAL DATA LEVEL The physical schema describes details of how data is stored: files.explicitly dealt with details. It is tailored to the needs of 18 .) Problem: y y y y Routines are hardcoded to deal with physical representation. It also typically describes the record layout of files and type of files (hash. etc.. y y y Physical schema can be changed without changing application: DBMS must change mapping from conceptual to physical. y In the relational model. CONCEPTUAL DATA LEVEL Hides details of the physical level. E. The DBMS maps data access between the conceptual to physical schemas automatically. the external schema also presents data as a set of relations. indices.

Translation from external level to conceptual level is done automatically by DBMS at run time. It is not stored. The analysis and design of data models has been the cornerstone of the evolution of databases. The external view is computed when accessed. Different external schemas can be provided to different categories of users. Applications are written in terms of an external schema. Data models are abstractions. Faculty should not see billing or payment data. they are very useful. Actually. Before the 1980's. Referred to as conceptual data independence WHAT IS A DATA MODEL? Well. databases can also be differentiated according to how they model the data. You cannot really touch a data model. oftentimes mathematical algorithms and concepts. But nevertheless. 2. The conceptual schema can be changed without changing application: y y Mapping from external to conceptual must be changed.a particular category of users. Information that can be derived from stored data might be viewed as if it were stored. calculated when needed. there isn't really a data model "thing". the two most commonly used Database 19 . As models have advanced so has database efficiency. Portions of stored data should not be seen by some users and begins to implement a level of security and simplifies the view for these users Examples: y y Students should not see faculty salaries. y GPA not stored.4 DATABASE MODELS Besides differentiating databases according to function. essentially a data model is a "description" of both a container for data and a methodology for storing and retrieving data from that container.

integers. columns for name and password that might be used as a part of a system security database.1 FLAT MODEL The flat (or table) model consists of a single. This may not strictly qualify as a data model.4. For instance. two-dimensional array of data elements. where all members of a given column are assumed to be similar values.Models were the hierarchical and network systems. and all members of a row are assumed to be related to one another. or floating point numbers. Each row would have the specific password associated with an individual user. Let's take a quick look at these two models and then move on to the more current models. as defined above. Columns of the table often have a type associated with them.2 HIERARCHICAL MODEL 20 . date or time information.4. 2. defining them as character data. 2.

and a member in any number of sets.In a hierarchical model. and now describe the structure of XML documents. Sets (not to be confused with mathematical sets) define one-to-many relationships between records: one owner. 2. many members. called records and sets. ordering of paragraphs/verses.4. the hierarchical structure is inefficient for certain database operations when a full path (as opposed to upward link and sort field) is not also included for each record. data is organized into a tree-like structure. However. such as the Information Management System (IMS) by IBM. recipes.3 NETWORK MODEL The network model (defined by the CODASYL specification) organizes data using two fundamental constructs. Parents and children are tied together by links called "pointers". This structure is very efficient to describe many relationships in the real world. and a sort field to keep the records in a particular order in each same-level list. Parent±child relationship: Child may only have one parent but a parent can have multiple children. 21 . A parent will have a list of pointers to each of their children. implying a single upward link in each record to describe the nesting. any nested and sorted information. This structure allows one 1:N relationship between two types of data. table of contents. A record may be an owner in any number of sets. Hierarchical structures were widely used in the early mainframe database management systems. Records contain fields (which may be organized hierarchically. as in the programming language COBOL).

and domains.4. It is a mathematical model defined in terms of predicate logic and set theory. to the extent that it is built on the concept of multiple branches (lower-level structures) emanating from one or more nodes (higherlevel structures). attributes. A relation is a table with columns and rows. 2. each tuple will contain a single value for each of its attributes. Second. The named columns of the relation are called attributes. This gives excellent retrieval performance. Although it is not an essential feature of the model. network databases generally implement the set relationships by means of pointers that directly address the location of a record on disk. Many object databases also support SQL. Most object databases use the navigational concept to provide fast navigation across networks of objects. and the domain is the set of values the attributes are allowed to take. thus. The products that are generally referred to as relational databases in fact implement a model that is only an approximation to the mathematical model defined by Codd.4 RELATIONAL MODEL The relational model was introduced by E. there can't be identical tuples or rows in a table.F. The operations of the network model are navigational in style: a program maintains a current position. Objectivity/DB. for instance. implements named 1:1. All relations (and. generally using object identifiers as "smart" pointers to related objects. the ordering of columns is immaterial in a table. at the expense of operations such as database loading and reorganization.The network model is a variation on the hierarchical model. tables) in a relational database have to adhere to some basic rules to qualify as relations. combining the strengths of both models. many:1 and many: many named relationships that can cross databases. and navigates from one record to another by following the relationships in which the record participates. while the model differs from the hierarchical model in that branches can be connected to multiple nodes. Records can also be located by supplying key values. Three key terms are used extensively in relational database models: Relations. First. Codd in 1970 as a way to make database management systems more independent of any particular application. The network model is able to represent redundancy in data more efficiently than in the hierarchical model. And third. 1:many. 22 .

any value occurring in two different records (belonging to the same table or to different tables). implies a relationship among those two records. Yet. a book's ISBN. A key that can be used to uniquely identify a row in a table is called a primary key. Tables can also have a designated single attribute or a set of attributes that can act as a "key". Keys are commonly used to join or combine data from two or more tables.A relational database contains multiple tables. a column can be used as a key even if it was not originally intended to be one. Any column can be a key. (0)1:M. because generated keys can be used internally to create links between rows that cannot break.A key that has an external. In practice. For example. M:M). in principle. One of the strengths of the relational model is that. less reliably. most databases have both generated and natural keys. while natural keys can be used. in order to enforce explicit integrity constraints. or a car's serial number) is sometimes called a "natural" key. for searches and for integration with other 23 . which facilitate fast retrieval of data from large tables. relationships between records in tables can also be defined explicitly. Keys are also critical in the creation of indexes. an arbitrary or surrogate key can be assigned (such as by giving employees ID numbers). which can be used to uniquely identify each tuple in the table. real-world meaning (such as a person's name. by identifying or non-identifying parentchild relationships characterized by assigning cardinality (1:1. each similar to the one in the "flat" database model. an Employee table may contain a column named Location which contains a value that matches the key of a Location table. or multiple columns can be grouped together into a compound key. It is not necessary to define all the keys in advance. If no natural key is suitable (think of the many people named Brown).

records in two independently developed databases could be matched up by social security number.databases. A measure is a quantity describing the fact. These databases attempt to bring the database world and the application programming world closer together. dimensions are chosen and the facts are grouped and added together to create a summary.4. The dimensional model is often implemented on top of the relational model using a star schema. It's important that measures can be meaningfully aggregated . a database consists of a single large table of facts that are described using dimensions and measures. This aims to avoid the 24 . (For example.5 DIMENSIONAL MODEL The dimensional model is a specialized adaptation of the relational model used to represent data in data warehouses in a way that data can be easily summarized using OLAP queries. consisting of one table containing the facts and surrounding tables containing the dimensions. except when the social security numbers are incorrect. allowing them to be used together. such as revenue. creating a new programming model known as object databases. Dimensions tend to be discrete and are often hierarchical. and its type) and is used in queries to group related facts together. or have changed. Coming up with a standard set of dimensions is an important part of dimensional modeling. when and where it happened. In the dimensional model. in particular by ensuring that the database uses the same type system as the application program. A data warehouse can contain multiple star schemas that share dimension tables. In an OLAP query. and country.for example. 2. for example. missing. Particularly complicated dimensions might be represented using multiple tables.4. state. the object-oriented paradigm has been applied to database technology. resulting in a snowflake schema. A dimension provides the context of a fact (such as who participated. the revenue from different locations can be added together. the location might include the building.) 2.6 OBJECT-ORIENTED MODELS In recent years.

At the same time. by making the objects manipulated by the program persistent. by defining an object-oriented data model for the database.overhead (sometimes referred to as the impedance mismatch) of converting information between its representation in the database (for example as rows in tables) and its representation in the application program (typically as objects). object databases attempt to introduce the key ideas of object programming. Object databases suffered because of a lack of standardization: although standards were defined by ODMG. they were never implemented well enough to ensure interoperability between products. and defining a database programming language that allows full programming capabilities as well as traditional query. Nevertheless. object database ideas were picked 25 . Others have attacked the problem from the database end. A variety of these ways have been tried for storing objects in a database. This also typically requires the addition of some kind of query language. such as encapsulation and polymorphism. However. into the world of databases. since conventional programming languages do not have the ability to find objects based on their information content. object databases have been used successfully in many applications: usually specialized applications such as engineering databases or molecular biology databases rather than mainstream commercial data processing. Some products have approached the problem from the application programming end.

The process of doing database design generally consists of a number of steps which will be carried out by the database designer. 2. Principally. the term database design could also be used to apply to the overall process of designing.This helps prepare you for the remaining steps. 26 . In the relational model these are the tables and views. it can be thought of as the logical design of the base data structures used to store the data. the designer must: * * Determine the relationships between the different data elements.  Find and organize the information required . Usually. The term database design can used to describe many different parts of the design of an overall database system. In an object database the entities and relationships map directly to object classes and named relationships. A fully attributed data model contains detailed attributes for each entity.5 DATABASE DESIGN Database design is the process of producing a detailed data model of a database. This logical data model contains all the needed logical and physical design choices and physical storage parameters needed to generate a design in a Data Definition Language.1 The Design Process The design process consists of the following steps  Determine the purpose of your database . but also the forms and queries used as part of the overall database application within the database management system (DBMS).Gather all of the types of information you might want to record in the database. such as product name and order number. However. not just the base data structures.up by the relational vendors and influenced extensions made to these products and indeed to the SQL language. Superimpose a logical structure upon the data on the basis of these relationships 2. and most correctly.5. which can then be used to create a database.

the other way around is different. 27 .  Set up the table relationships . See if you can get the results you want from your tables.  Refine your design . Create the tables and add a few records of sample data. as necessary. Divide the information into tables . Sometimes when data is changed you can be changing other data that is not visible.2 TYPES OF DATABASE DESIGN CONCEPTUAL SCHEMA Once a database designer is aware of the data which is to be stored within the database.Choose each table¶s primary key. One attribute can change and not another. However. but one person cannot have more than one addresses. as needed. in a list of names and addresses. such as Products or Orders. For example.5. Make adjustments to the tables.Divide your information items into major entities or subjects. 2.Apply the data normalization rules to see if your tables are structured correctly. as needed. An example might be Product ID or Order ID. and is displayed as a column in the table. because if the address is different than the associated name is different too. Add fields to tables or create new tables to clarify the relationships. The primary key is a column that is used to uniquely identify each row. assuming a situation where multiple people can have the same address. Each subject then becomes a table. the name is dependent upon the address.Decide what information you want to store in each table. Make adjustments to the design. For example. an Employees table might include fields such as Last Name and Hire Date.  Turn information items into columns . they must then determine where dependency is within the data.Look at each table and decide how the data in one table is related to the data in other tables.Analyze your design for errors.  Apply the normalization rules . Each item becomes a field.  Specify primary keys .

although not all vendors of object databases implement this. Each table may represent an implementation of either a logical object or a relationship joining one or more instances of one or more logical objects. maintenance.6 DATABASE MANAGEMENT SYSTEM Database Management System (DBMS) consists of software that organizes the storage of data. relational or object model. a DBMS allows users and other software to store and retrieve data in a structured way. majority of them do implement this method. 2. A DBMS controls the creation. and use of the database storage structures of social organizations and of their users. It is the detailed design of a system that includes modules & the database's hardware & software specifications of the system. although SQL syntax and function can vary from one DBMS to another. In the case of relational databases the storage objects are tables which store data in rows and columns.LOGICALLY STRUCTURING DATA Once the relationships and dependencies amongst the various pieces of information have been determined. This includes detailed specification of data elements. such as the network. A great deal of 28 . Since complex logical relationships are themselves tables they will probably have links to more than one parent. PHYSICAL DATABASE DESIGN The physical design of the database specifies the physical configuration of the database on the storage media. it is possible to arrange the data into a logical structure which can then be mapped into the storage objects supported by the database management system. Relationships between tables may then be stored as links connecting child tables with parents. data types. indexing options and other parameters residing in the DBMS data dictionary. In large systems. A common query language for the object database is OQL. It allows organizations to place control of organization wide database development in the hands of Database Administrators (DBAs) and other specialists. The model tends to determine the query languages that are available to access the database. One commonly used query language for the relational database is SQL. Database management systems are usually categorized according to the database model that they support.

It facilitates easy-to-use data entry screens. concurrency control. and interfaces. 29 . and recovery from hardware failures. and actually accesses the database and data dictionary as they exist on a storage device. query optimization. Software tools within the data manipulation subsystem are most often the primary interface between user and the information contained in a database. An example of a DBMS is SQL Server. and is concerned with managing factors such as performance. It usually requires that user perform a detailed series of tasks to process a transaction. change. and change management. converts them into physical equivalents. the actual program that contains the logic to execute your SQL statements. The DBMS is the database engine itself. y Data Definition Subsystem helps user to create and maintain the data dictionary and define the structure of the files in a database.1 COMPONENTS OF DBMS y DBMS Engine accepts logical request from the various other DBMS subsystems. fields. y Data Manipulation Subsystem helps user to add. Performs that actual data access based upon these commands (relationally). cells with data. It allows user to specify its logical information requirements. The DBMS is the "tools" used to manipulate the data in the database.the internal engineering of a DBMS is independent of the data model.6. y Application Generation Subsystem contains facilities to help users to develop transaction-intensive applications. and delete information in a database and query it for valuable information. This is the core. security management. integrity. 2. programming languages. concurrency. In these areas there are large differences between the products. y Data Administration Subsystem helps users to manage the overall database environment by providing facilities for backup and recovery. The database holds the records.

Such higher entity relationships provide information on all of the underlying domains at the same time. update. and labels for a prototyped application.2. and structure of the data needed to build a database. Features commonly offered by database management systems: QUERY ABILITY Querying is the process of requesting attribute information from various perspectives and 30 . y Database Maintenance: used to add. relationships.3 DBMS FEATURES AND CAPABILITIES Alternatively. and protect the data in a database. For instance. applications effectively share code with each other and are relieved of much internal complexity. y Database Interrogation: can access the data in a database for information retrieval and report generation. queries.2 PRIMARY TASKS OF DBMS PACKAGES y Database Development: used to define and organize the content. End users can selectively retrieve and display information and produce printed reports and documents. the relation between attributes drawn from a specified set of domains can be seen as being primary. the DBMSs of today roll together frequently needed services or features of attribute management.6. correct. provided it was of some particular "make" with an inferior paint job. Thus. y Application Development: used to develop prototypes of data entry screens. and especially in connection with the relational model of database management. 2. By externalizing such functionality to the DBMS. reports. forms. the database might indicate that a car that was originally "red" might fade to "pink" in time. tables. Or use 4GL or 4th Generation Language or application generator to develop program codes.6. delete. with none of them being privileged above the others.

RULE ENFORCEMENT Often one wants to apply rules to attributes so that the attributes are clean and reliable. we want the DBMS to deny such a request and display an error message. For example. we may have a rule that says each car can have only one engine associated with it (identified by Engine Number). or (in the most elaborate models) through the assignment of individuals and groups to 31 . DBMS usually provide utilities to facilitate the process of extracting and disseminating attribute sets. Ideally such rules should be able to be added and removed as needed without significant data layout redesign. BACKUP AND REPLICATION Copies of attributes need to be made regularly in case primary disks or other equipment fails. rules may need to change. or by the assignment of individuals and privileges to groups. SECURITY Often it is desirable to limit who can see or change which attributes or groups of attributes. This may be managed directly by individual. analyze its data and update it according to the users privileges on data. hybrid gas-electric cars. in this example. If somebody tries to associate a second engine with a given car. so that the information remains consistent throughout the database system and users cannot tell or even know which server in the DBMS they are using. with changes in the model specification such as. the system is said to exhibit replication transparency. Example: "How many 2-door cars in Texas are green?" A database query language and report writer allow users to interactively interrogate the database.combinations of factors. A periodic copy of attributes may also be created for a distant organization that cannot readily access the original. However. When data is replicated between database servers.

they can rely on the DBMS to supply such calculations. and when it was changed. some DBMS can adjust themselves to improve the speed of those interactions. RDBMS store the data into collection of tables. Rather than have each computer application implement these from scratch. Edgar Codd introduced the relational database 32 . Each RDBMS table consists of database table rows. etc. allowing a human expert to make the necessary adjustments after reviewing the statistics collected. Logging services allow this by keeping a record of access occurrences and changes. cross-referencing. sorting. fields and records. CHANGE AND ACCESS LOGGING Often one wants to know who accessed what attributes.roles which are then granted entitlements. AUTOMATED OPTIMIZATION If there are frequently occurring usage patterns or requests. RDBMS data is structured in database tables. grouping. summing. Each database table row consists of one or more database table fields.7 RELATIONAL DATABASE MANAGEMENT SYSTEM RDBMS stands for Relational Database Management System. averaging. which might be related by common fields (database table columns). 2. COMPUTATION There are common computations requested on attributes such as counting. what was changed. Most RDBMS use SQL as database query language. In some cases the DBMS will merely provide tools to monitor performance. RDBMS also provide relational operators to manipulate the data stored into the database tables.

7. optimizer. RELATIONAL ENGINE . Index. lock tables. TRANSACTION ENGINE . For example MySQL and Firebird provide drivers for PHP. They provide methods to prepare statements execute statements. redo logs.This component stores and retrieves data records.Transactions are sequences of operations that read or write database elements. 2.Relational objects such as Table. etc. Some vendors provide language-specific proprietary interfaces. and JDBC. DCL. It comprises three major components (compiler.model. DB2. Many modern DBMS do not conform to the Codd¶s definition of a RDBMS.1 RDBMS COMPONENTS INTERFACE DRIVERS . etc. Python SQL ENGINE . Oracle and MySQL. It also provides a mechanism to store metadata and control information such as undo logs. Examples include DDL. but nonetheless they are still considered to be RDBMS. which are grouped together. ODBC. 33 . and execution engine).A user or application program initiates either schema modification or content modification.This component interprets and executes the SQL query. These drivers are built on top of SQL. DML. The most popular RDBMS are MS SQL Server. and Referential integrity constraints are implemented in this component. fetch results. STORAGE ENGINE .

2. storage. and retrieval costs Facilitated development of new applications program DISADVANTAGES y y y y Database systems are complex. and time-consuming to design Substantial hardware and software start-up costs Damage to database affects virtually all applications programs Extensive conversion costs in moving form a file-based system to a database system y Initial training required for all programmers and users 34 .ADVANTAGES & DISADVANTAGES ADVANTAGES y y y y y y y Reduced data redundancy Reduced updating errors and increased consistency Greater data integrity and independence from applications programs Improved data access to users through use of host and query languages Improved data security Reduced data entry.8 DATABASE . difficult.



Oracle Instance:. however. and memory structures in an Oracle server.Overview of Primary Components 1. 4. Advanced Replication.The user server processes are the primary processes involved when a SQL statement is executed. Oracle Server:. that provide the actual physical storage for database information. Background processes perform functions on behalf of the invoking process. such as Advanced Queuing.An Oracle database consists of operating system files. Shared Server. User and Server Processes:. 37 . and recover the database in the event of a disk failure.Many other processes exist that are used options within Oracle. ensure that the database can be recovered in the event of a software or hardware error. Real Application Clusters. Oracle Database:.Non-database files are used to configure the instance. 2. The instance must be started to access the data in the database. other processes may help the server complete the processing of the SQL statement. The database files are used to ensure that the data is kept consistent and can be recovered in the event of a failure of the instance.An Oracle instance is the combination of the background processes and memory structure. The background processes perform input/output (I/O) and monitor other Oracle processes to provide increase parallelism for better performance and reliability. authenticate privileged users. however. 6. The Oracle server consists of an Oracle instance and an Oracle database. process. Other Key Files:. not all of them are used when processing a SQL statement. a System Global Area (SGA) is allocated and Oracle background processes are started. Every time an instance is started. 5. 3. or perform other tasks necessary to maintain the database. also known as database files.There are several files. Other Processes:. Some are used to improve the performance of the database. They consolidate functions that would otherwise be handled by multiple Oracle programs running for each user. and so on.

Client-Server 3.3. comprehensive. integrated approach to information management. Consists of an Oracle Instance and an Oracle Database. Host-Based 38 .2 ORACLE SERVER An Oracle Server: Is a database management system that provides an open. The Oracle server run on a different computers in one of the following ways: 1. Client-Application Server-server 2.

Users are connected directly to the same computer on which the database resides. Client-Server:.3 ORACLE INSTANCE An Oracle Instance: Is a means to access an oracle database Always opens one and only one database Consists of memory and background process structures 39 . and the database sits on a seprate computer (server). 3. Host-Based:.1. Client-Application Server-Server:. 3. 2.(Three-Tier) Users access the database from their personal computers (client) through an application server. which is used for the application¶s requirements.(Two-Tier) Users access the database from their personal computer (client) over a network.

4 ESTABLISING A CONNECTION AND CREATING A SESSION Connection to an Oracle Instance: Establishing a user connection Creating a session 40 . The instance can open and use only one database at a time. An instance is identified by using methods specific to each operation system. 3.An Oracle instance consists of the System Global Area (SGA) memory structure and the background processes used to manage a database.

which is connected through a network to the machine running the Oracle instance. The user starts the application or tool on a local computer and connects over a network to the computer running the Oracle instance. when a user logs on to the Oracle Server. In this configuration. The communication pathway is established using the interprocess communication mechanisms available on the host operating system. This application or tool is executed as a user process.  In the most basic configuration. 2. called client-server. 3. Connection A connection is a communication pathway between a user process and an Oracle Server. The server process communicates with the Oracle instance on the behalf of the user process that runs on the client. 41 . This process is called a server process. The server process executes SQL statements on behalf of the user. a process is created on the computer running the Oracle Server. In a three-tier connection. A database user can connect to an Oracle Server in one of the three ways: 1. The user log on to the operating system running the Oracle instance and starts an application or tool that accesses the database on that system.Connection to an Oracle Instance Before users can submit SQL statements to an Oracle database. the user runs a browser on a network to use an application residing on an NT server that retrieves data from an Oracle database running on a UNIX host. the user¶s computer communicates over the network to an application or a network server.  The user starts a tool such as SQL*Plus or runs an application developed using a tool such as Oracle Forms. they must connect to an instance. network software is used to communicate between the user and the Oracle Server. For example.

many concurrent sessions are possible if the user logs on from many tools. For a given database user. starting a database session requires that the Oracle Server be available for use. applications. or terminals at the same time. The session starts when the user is validated by the Oracle Server.5 ORACLE DATABASE An Oracle database: Is a collection of data that is treated as a unit Consists of three files types 42 . 3.Session A session is a specific connection of a user to an Oracle server. Except for some specialized database administration tools. and it ends when the user logs out or when there is an abnormal termination.

and redo log files. Other Key File Structures The Oracle Server also files that are not part of the database:  The parameter file defines the characteristics of an Oracle instance. 2. the physical structure of an Oracle database includes only three types of files: control files. password files and so on. An Oracle database has a logical and a physical structure. Data files containing the actual data in the database. 3. For example. configuration files. Redo logs containing a record of changes made to the database to enable recovery of the data in case of failures. However. 3. 43 .An Oracle Database The general purpose of a database is to store and retrieve information.  The password file authenticates users privileged to starts up and down an Oracle instance. Control files containing information necessary to maintain and verify database integrity. for example: parameter files.  Archived redo log files are offline copies of the redo log files that may be necessary to recover from media failures. An Oracle database consists of three file types: 1. The physical structure of the database is the set of operating system files in the database. data files.6 PHYSICAL STRUCTURE The physical structure includes three types of files: Control files Data files Redo log files Other keys files exits and are required to start up and use a database. it contains parameters that size some of the memory structure in the SGA.

44 . It contains data and control information for the Oracle Server and is allocated in the virtual memory of the computer where Oracle resides. System Global Area (SGA): Allocated at instance startup.7 MEMORY STRUCTURE Oracle¶s memory structure consists of two memory areas known as: 1. and is a fundamental component of an Oracle instance 2.3. Program Global Area (PGA): Allocated when the server process is started SGA is used to store database information that is shared by database processes.

Dynamic SGA A dynamic SGA implements an infrastructure that allows the SGA configuration to change without shutting down the instance. statistical data) 45 .1 System Global Area (SGA) The SGA consists of several memory structures: Shared pool Database Buffer Cache Redo Log buffer Other structures (for example. the default size is zero. and large pool to changes without shutting down the instance. lock and latch management. up to a maximum of SGA_MAX_SIZE. Sizing the SGA The size of SGA is determined by several initialization parameters. The parameters that most affects SGA are: DB_CACHE_SIZE: The size of the cache of standard blocks.The following statement can be used to view SGA memory allocation SHOW SGA. the database buffer cache.7. This then allows the size of the database buffer cache. shared pool. SHARED_POOL_SIZE: The size in bytes of the area devoted to shared SQL and PL/SQL. LARGE_POOL_SIZE: The size of the large pool. and large pool could be initially under configured and would grow and shrink depending upon their respective workloads. LOG_BUFFER: The number of bytes allocates for the redo log buffer cache. Conceivably. 3. shared pool.

The size of a granule depends on the estimated total SGA size whose calculation is based on the value of the parameter SGA_MAX_SIZE - 4 MB if estimated SGA size is < 128 MB 16 MB otherwise 3.2 SHARED POOL Used to store:  Most recently executed SQL statements  Most recently used data definitions It consists of two key performance-related memory structures:  Library Cache  Data Dictionary Cache 46 .There are two additional memory structures that can be configured within the SGA: Large Pool Java Pool  SGA is dynamic  Sized by the SGA_MAX_SIZE parameter  Allocated and tracked in granules by SGA components  Contiguous virtual memory allocation  Granules size based on total estimated SGA_MAX_SIZE Unit of Allocation A granule is a unit of contiguous virtual memory allocation.7.

procedures. whereas the variable structures grow and shrink based on user and program requirements. 3. It can be dynamically resized using ALTER SYSTEM SET. After performance analysis. PL/SQL packages. The fixed structures remain relatively the same size. Memory allocation for the shared pool is determined by the SHARED_POOL_SIZE initialization parameter. such as reusable SQL execution plans. and cursor information. this can be adjusted but the total SGA size cannot exceed SGA_MAX_SIZE. Sizing the Shared Pool Since the shared pool is used for objects that can be shared globally.3 LIBRARY CACHE Stores information about the most recently used SQL and PL/SQL statements Enables the sharing of commonly used statements Is managed by a least recently used (LRU) algorithm 47 . it must be sized to accommodate the needs of both the fixed and variable areas.7. The actual sizing for the fixed and variable structures is based on an initialization parameter and the work of an Oracle internal algorithm.Sized by the parameter SHARED_POOL_SIZE The shared pool environment contains both fixed and variable structure. and functions.

3. the server process look at the data dictionary for information to resolve object names and validate access Caching data dictionary information into memory improves response time on queries and DML 48 . Shared PL/SQL:. the text.7.The shared SQL stores and shares the execution plan and parse tree for SQL statements run against the database. The second time that an identical SQL statement is run. and other database objects During the parse phase. less recently used execution paths and parse trees are removed from the library cache to make room for the new entries.Consists of two structures:  Shared SQL area  Shared PL/SQL area Size determine by the Shared Pool sizing. If the size of the shared pool is too small. schema.4 DATA DICTIONARY CACHE A collection of the most recently used definitions in the database Includes information about database files. If the SQL or PL/SQL statements are not reused. which affects performance. Parsed and compiled program units and procedures are stored in this area.The shared PL/SQL area stores and shares the most recently executed PL/SQL statements. users. As the cache fills. and bind variables must be exactly the same. they eventually are aged out. Memory is allocated when a statement is parsed or a program unit is called. it is able to take advantage of the parse information available in the shared SQL to expedite its execution. tables. columns. indexes. The library cache consists of two structures: Shared SQL:. The library cache is managed by a least recently used (LRU) algorithm. statements are continually reloaded into the library cache. To ensure that SQL statements use a shared SQL area whenever possible. privileges. The library cache size is based on the sizing defined for the shared pool.

then the database has to query the data dictionary tables repeatedly for information needed by the database. Because subsequent require physical reads. Sizing the Data Dictionary The overall size is dependent on the size of the shared pool size and is internally by the database. 49 . If the data dictionary cache is too small. When a query is processed. The Oracle server uses a least recently used algorithm to age out buffers that have not been accessed recently to make room for new blocks in the database buffer cache. The data dictionary cache is also referred to as the dictionary cache or row cache. When this information is needed by the database. and the data that is returned is stored in the data dictionary cache. caching data dictionary information into memory improves response time. the Oracle server process looks in the database buffer cache for any blocks it needs. 3.7. If the block is not found in the database buffer cache. Information about the database is stored in the data dictionary tables. These queries are called recursive calls and are slower than the queries that are handled by the data dictionary cache. the server process reads the block from the data files and places a copy in the database buffer cache.5 DATABASE BUFFER CACHE Stores copies of data blocks that have been retrieved from the data files Enables great performance gains when you obtain and update data Managed through an LRU algorithm DB_BLOCK_SIZE determine primary block size. the data dictionary tables are read.Size determine by the Shared Pool sizing.

The parameter DB_BLOCK_SIZE determines the primary block size. and it is specified by the DB_BLOCK_SIZE parameter. which is used for the SYSTEM tablespace.Database Buffer Cache consists of independent sub-caches  DB_CACHE_SIZE  DB_KEEP_CACHE_SIZE  DB_RECYCLE_CACHE_SIZE Can alter dynamically resized ALTER SYSTEM SET DB_CACHE_SIZE=96M. Three parameters define the sizes of the buffer caches: 50 . DB_CACHE_ADVICE set to gather statistics for predicting different cache size behavior Statistics displayed by V$DB_CACHE_ADVICE Sizing the Buffer Cache The size of buffer cache is equal to the size of an Oracle block. The database buffer cache consists of independent sub-caches for buffer pools and for multiple block sizes.

Non-standard block sizes can have any power-of-two values between 2 KB and 32 KB. ON. The buffer cache advisory is enabled via the initialization parameter DB_CACHE_ADVICE. Three values ( OFF. DB_RECYCLE_CACHE_SIZE:.Sizes the recycle buffer cache.Sizes the default buffer cache size only. DB_KEEP_CACHE:. 2. READY) are available.1. The buffer cache advisory information is collected and displayed through the V$DB_CACHE_ADVICE view.Sizes the keep buffer cache. 3. Data Buffer Advisory Parameter The buffer cache advisory feature enables and disables statistics gathering for predicting behavior with different cache sizes.Advisory is turned off but the memory for the advisory remains allocated.Advisory is turned on and both cpu and memory overhead is incurred. which is used to eliminate blocks from memory that have little change of being reused. Multiple Block Sizes An Oracle database can be created with a standard block size and up to four non-standard block sizes. it always exists and cannot be set to zero. It is a dynamic parameter via ALTER SYSTEM.Advisory is turned off and the memory for the advisory is not allocated ON:. 51 . which s used to retain blocks in memory that are likely to be reused. DB_BLOCK_SIZE:. DB_CACHE_ADVICE Parameter Values OFF:. READY:. The information provided by these statistics can help BDA size the buffer cache optimally for a given workload.

This information is stored in redo entries. Sizing the Redo Log Buffer Cache The size of the redo log buffer cache is defined by the initialization parameter LOG_BUFFER. UPDATE.3. 52 . Redo entries contain the information necessary to recreate the data prior to the change made by INSERT. CREATE. ALTER. or DROP operation.7.6 REDO LOG BUFFER Records all changes made to the database blocks Primary purpose is recovery Changes recorded within are called redo entries Redo entries contain information to reconstruct or redo changes Size defined by LOG_BUFFER The redo log buffer cache is a circular buffer that contains changes made to data files blocks.

The performance gain is from the reduction of overhead from increasing and shrinking of the shared SQL cache. the allocation of memory from the large pool fails. and backup and recovery processes. Oracle needs to allocate additional space in the shared pool for storing information about the connections between the user processes.3. 53 . If the large pool is configured but is not large enough. Sizing the Large Pool The large pool is sized in bytes defined by the LARGE_POOL_SIZE parameter. and servers. dispatches.Recovery Manager (RMAN) uses the large pool when the BACKUP_DISK_IO=n and BACKUP_TAPE_IO_SLAVE=TRUE parameters are set.7. Backup and Restore:. RMAN writes an error message to the alert log file and does not use I/O slaves for backup or restore. The shared pool does not have to give up memory for caching SQL parse trees in favor f shared server session information. The large pool relieves the burden on areas within the shared pool.7 LARGE POOL An optional area of memory in the SGA Relieves the burden placed on the Shared Pool Used for:  Session memory (UGA) for the Shared Server  I/O server processes  Backup and restore operations or RMAN  Parallel execution message buffers  PARALLEL_AUTOMATIC_TUNING set to TRUE Does not use an LRU list Sized by LARGE_POOL_SIZE When users connect through the shared server. I/O.

in bytes. Its size is set.3. using the JAVA_POOL_SIZE parameter.7.7.8 JAVA POOL Services parsing requirements for JAVA commands Required if installing and using JAVA Sized by JAVA_POOL_SIZE parameter The Java pool is an optional setting but is required if installing and using Java. 3.9 PROGRAM GLOBAL AREA (PGA) Memory reserved for each user process connecting to an Oracle database Allocated when a process is created De-allocated when the process is terminated Used by only one process 54 .

 Stack Space: . In dedicated server configuration.The Program Global Area or Process Global Area (PGA) is a memory region that contains data and control information for a single server process or a single background process.Contains other session variables. the PGA is an area that is used by only one process. 3. which is shared by several processes. the PGA included these components:  Sort Area: .7.7.  Session Information: . In contrast to the SGA.  Cursor State: .10 PROCESS STRUCTURE Oracle takes advantage of various types of processes: USER PROCESS: Started at the time a database user requests connection to the Oracle server SERVER PROCESS: Connects to the Oracle Instance and is started when a user establishes a session BACKGROUND PROCESSES: Started when as Oracle Instance is started 3.10. The PGA is allocated when a process is created and de-allocated when the process is terminated.Used for any sorts that may be required to process the SQL statement.Indicates the stage in the processing of the SQL statements that are currently used by the session.Includes user privileges and performance statistics for the session.1 USER PROCESS A program that requests interaction with the Oracle server Must first establish a connection Does not interact directly with the Oracle server 55 .

Rather it generates call through the user program interface (UPI). The user process does not interact directly with the Oracle server.A database user who needs to request information from the database must first make a connection with the Oracle server. 3.10. and beginning the user process. which creates a session and starts a server process.2 SERVER PROCESS A program that directly interacts with the Oracle server Fulfills calls generated and returns results Can be dedicated or Shared Server 56 . The connection is requested using a database interface tool.7. such as SQL*PLUS.

a server process is started to handle the user processes request. In a dedicated server environment.Once a user has established a connection. 3. In a shared server process communication with the Oracle server using the Oracle Program Interface (OPI).11 BACKGROUND PROCESSES Maintains and enforces relationships between physical and memory structures Mandatory background process:  DBWn  PMON  CKPT  LGWR  SMON Optional background processes:  ARCn 57 . the server process is terminated.7. A server process can be either a dedicated server process or a shared server process.

It ensures that a sufficient number of free buffers-buffers that can be overwritten when server processes need to read in blocks from the data files-are available in the database buffer cache. Database performance is improved because server processes make changes only in the buffer cache. LMDn  RECO  CJQ0  LMON  Snnn  Dnnn  Pnnn  LCKn  QMNn 3.11.7. Database Writer (DBWn) writes the dirty buffers from the database buffer cache to the data files. 58 .1 DATABASE WRITER (DBWn) DBWn writes when: Check point occurs Dirty buffers reach threshold There are no free buffers Timeout occurs RAC ping request is made Tablespace OFFLINE Tablespace READ ONLY Table DROP or TREUNCATE Tablespace BEGIN BACKUP The server process records changes to rollback and data blocks in the buffer cache.

3. LGWR confirms the commit only after the redo is written to disk.7.2 LOG WRITER (LGWR) LGWR writes: At commit When one-third full When there is 1 MB of redo Every three seconds Before DBWn writes Because the redo is needed for recovery. 59 . LGWR can also call on DBWn to write to the data files.11.

3 SYSTEM MONITOR (SMON) Responsibilities: Instance recovery  Rolls forward changes in redo logs  Opens database for user access  Rolls back uncommitted transactions Coalesce free space De-allocates temporary segments If the Oracle instance fails. For example. the failure of the operating system causes an instance failure. Rolling forward to recover data that has not been recorded in the files but that has been recorded in the online redo log. This data has been written to disk because of the loss of 60 . any information in the SGA that has not been written to disk is lost. Instance recovery consists of the following steps: 1. the background process SMON automatically performs instance recovery when the database is reopened.3.11.7. After the loss of the instance.

2. this process completely recovers these transactions. Any data that is not locked by unrecorded transactions is immediately available. 3. During this process. Rolling back uncommitted transactions.4 PROCESS MONITOR (PMON) Cleans up after failed processes by: Rolling back the transaction Releasing locks Releasing other resources Restarting dead dispatchers 61 . Opening the database so that users can log on. Because all committed transaction have been written to the redo logs. SMON reads the redo log files and applies the changes recorded in the redo log to the data blocks. 3.the SGA during instance failure.11. They are rolled back by SMON or by the individual server processes as they access locked data.7. CHECKPOINT (CKPT) Responsible for: Signaling DBWn at checkpoints Updating data files headers with checkpoint information Updating control files with checkpoint information 62 .

including both committed and uncommitted data. the following information is written: Checkpoint number into the data file headers Checkpoint number. to the data files. checkpoints are useful because they can expedite instance recovery. Because of the least recently used algorithm of DBWn. and system change numner into the control files.7. log sequence number. a data block that changes frequently might never qualify as the least recently used block and thus might never be written to disk if checkpoints did not occur. 3. CKPT does not write data blocks to disk or redo blocks to the online redo logs. archive log name. Therefore. redo log entries before the checkpoint no longer need to be applied to the data files if instance recovery is required.An event is called a checkpoint occurs when the Oracle background process DBWn writes all the modified database buffers in the SGA.11.6 ARCHIVER (ARCn) Optional background process Automatically archives online redo logs when ARCHIVELOG mode is set Preserves the record of all changes made to the database 63 . Because all database changes up to the checkpoint have been recorded in the data files. Checkpoints are implemented for the following reasons: Checkpoints ensure that data blocks in memory that changes frequently are written to data files regularly. At a checkpoint.

The Archive Process All other background processes are optional, depending on the configuration of the database; however, one of them, ARCn, is crucial to recovering a database after the loss of a disk. As online redo log files fill, the Oracle server begins writing to the next online redo log file. The process of switching from one redo log to another is called a log switch. The ARCn process initiates backing up, or archiving, of the filled log group at every log switch. It automatically archives the online redo log before the log can be reused, so that all of the changes made to the database are preserved. This enables the DBA to recover the database to the point of failure, even if a disk drive is damaged.

Archiving Redo Log Files One of the important decisions that a DBA has to make is whether to configure the database to operate in ARCHIVELOG or in NOARCHIVELOG mode.

NOARCHIVELOG MODE :- In NONARCHIVELOG mode, the online redo log files are overwritten each time a log switch occurs. LGWR does not overwrite a redo log group until the checkpoint for that group is complete. This ensures that committed data can be recovered if there is an instance crash. During the instance crash, only the SGA is lost. There is no loss of disks, only memory. For example, an operating system crash causes an instance crash. ARCHIVELOG MODE:- If the database is configured to run in ARCHIVELOG mode, inactive group of filled online redo log files must be archived before they can be used again. Since changes made to the database are recovered in the online redo log files, the database administrator can use the physical backup of the data files and the archived online redo log files to recover the database without losing any committed data because of any single point of failure, including the loss of a disk. Usually, a production database is configured to run in ARCHIVELOG mode.


Dictates how the physical space of a database is used Hierarchy consisting of tablespaces, segments, extents, and blocks

A logical structure hierarchy exists as follows:  An Oracle database is a group of tablespaces.  A tablespace may consist of one or more segments.  A segment is made up of extents.  An extent is made up of logical blocks. 
Blocks is the smallest unit for read and write operation.

Connect to an instance using: 
User process  Server process


The Oracle server components that are used depends on the type of SQL statements: 
Queries returns rows  DML statements log changes  Commit ensures transaction recovery

Some Oracle server components do not participate in SQL statements processing. A data manipulation language (DML) statement requires only two phases of processing,
1. Parse is the same as the parse phase used for processing a query. 2. Execute requires additional processing to make data changes.

DML Execute Phase To execute a DML statement: 
If the data and rollback blocks are not already in the buffer cache, the server process

reads them from the data files into the buffer cache. 
The server process place locks on the rows that are to be modified. The rollback block is

used to store the before-image of the data, so that the DML statements can be rolled back if necessary. 
The data block records the new values of the data.

Processing a DML Statement The server process records the before-image to the undo block and updates the data block. Both of these changes are done in the database buffer cache. Any changed blocks in the buffer cache are marked as dirty buffers. That is, buffers that are not same as the corresponding block on the disk.

The processing of a DELETE or INSERT command uses similar steps. The before-image for a DELETE contains the column values in the deleted rows, and the before image of an INSERT contains the rows location information.


67 . If we can¶t configure parameters than Oracle will automatically take the default values. location is given as per the user need. If he can¶t choose any location than parameter file will store on default location in DATABASE folder in Oracle.14 DATABASE CREATION Before creating the database we have to define some parameters according to computer configuration so that performance will increase and less I/O will use.ora´ extension.7. Parameter file save with ³initdatabe_name.3. When we start creating database first of all control files will read ad than database will created. Db_name=lalit Db_block_size=8192 Control_files=¶G:\oracle\lalit\control. User can choose any of the location to store his parameter files.ctl¶ Shared_pool_size=200m Sga_target=300m Undo_management=auto Undo_tablespace=undo1 In this.

Along with this our parameter files will generates whose non-default values we already sets. 68 .

sql 69 . @?/rdbms/admin/catproc. @?/rdbms/admin/catalog.But some files in the Oracle a DBA can¶t change so he has to create a view of that tables.sql But with the above command view is created but we can¶t read from that view because all the data is in binary form so DBA has to use the command after this that will decode all the view in user understandable from.


Such a data validation process can be designed to interrogate the data to be migrated. freeing up human resources from tedious tasks. to ensure that it meets the pre-defined criteria of the target environment. Data migration phases (design. in the event that the extracted and transformed data elements are highly 'integrated' with one another. interrupting the standard E(T)L process. 71 . Programmatic data migration may involve many phases but it minimally includes data extraction where data is read from the old system and data loading where data is written to the new system. or computer systems. and the presence of all extracted data in the target system is essential to system functionality. and supports processes in the new system. eliminate redundant or obsolete information. and the input file specification. or when systems merge (such as when the organizations that use them undergo a merger/takeover). this strategy can have detrimental. this allows a pre-load 'data validation' step to be put in place. An alternative strategy is to have on-the fly data validation occurring at the point of loading. which can be designed to report on load rejection errors as the load progresses. It is required when organizations or individuals change computer systems or upgrade to new systems. Automated and manual data cleaning is commonly performed in migration to improve data quality.INTRODUCTION TO DATA MIGRATION DATA MIGRATION Data Migration is the process of transferring data between storage types. and match the requirements of the new system. load. there may be a need for a parallel run of both systems to identify areas of disparity and forestall erroneous loss. is complete. results are subjected to data verification to determine whether data was accurately translated. data on the old system is mapped to the new system providing a design for data extraction and data loading. After loading into the new system. formats. extraction. Data migration is usually performed programmatically to achieve an automated migration. However. If a decision has been made to provide a set input file specification for loading data onto the target system. The design relates old data formats to the new system's formats and requirements. During verification.To achieve an effective data migration procedure. verification) for applications of moderate to high complexity are commonly repeated several times before the new system is deployed. cleansing. and not easily quantifiable effects.

or to upgrade the version of database software being used. it may be necessary to move from one database vendor to another. is generated and consumed by software applications which in turn support business processes. In these cases a physical transformation process may be required since the underlying data format can change significantly. often using virtualization techniques.4. This will result in having to move physical blocks of data from one tape or disk to another. but this can happen with major upgrades. The need to migrate data can be driven by multiple business requirements and the approach taken to the migration depends on those requirements. The data format and content itself will not usually be changed in the process and can normally be achieved with minimal or no impact to the layers above.1 DATA MIGRATION CATEGORIES Data is stored on various media in files or databases. Further.for instance a new CRM or ERP platform will inevitably involve substantial transformation as almost every application or suite operates on its own specific data model. commercial offthe-shelf packages are generally configured for each customer using metadata. DATABASE MIGRATION Similarly. to allow the application to be sold to the widest possible market. APPLICATION MIGRATION Changing application vendor . Application programming interfaces (APIs) are supplied to protect the integrity of the data they have to 72 . STORAGE MIGRATION A business may choose to rationalize the physical media to take advantage of more efficient storage technologies. Three major migration categories are proposed on this basis. The latter case is less likely to require a physical data migration.

The latter case is less likely to require a physical data migration. either from one version to another or from one program to an entirely different program. Carefully examine the database and the data. database or application to another to reflect the changes to the organization and information about customers. Determine what you are trying to accomplish with the database. DB2 or SQL Server should only require a testing cycle to be confident that both functional and nonfunctional performance has not been adversely affected. BUSINESS PROCESS MIGRATION Business processes operate through a combination of human and application systems actions.handle. When these change they can require the movement of data from one store. often orchestrated by business process management tools. using entire programs or just scripts. In these cases a physical transformation process may be required since the underlying data format can change significantly. Use of the API is normally a condition of the software warranty. Only then can you plan what the new database environment should look like. depending largely on whether the data manipulation language or protocol has changed . This may or may not affect behavior in the applications layer. or to upgrade the version of database software being used.but modern applications are written to be agnostic to the database technology so that a change from Oracle to MySQL. business optimization and reorganization to attack new markets or respond to competitive threat. 4. although a waiver may be allowed if the vendor's own or certified partner professional services and tools are used.2 DATABASE MIGRATION Like data migration it may be necessary to move from one database vendor to another. but this can happen with major upgrades. Examples of such migration drivers are Mergers and acquisitions. Database migration is necessary when a company upgrades its database or system software. Such upgrades or program switches can take 73 . products and operations. to facilitate data migration. Software can be specifically written.

greater security. Of course. lower cost. you can be sure will be supported. The reasons are compelling: greater stability and reliability. 68% of companies in North America consider lowering overall operating costs a top priority. To make that decision. "You'll fail if you start a migration from the ideological side instead. but other as a result of regular company practices or as a result of directives mandated in the wake of a company takeover. according to numerous independent studies and industry experts. experts advise planning. reducing costs can be another driving factor in the decision-making process. access to application source code. and conformity with open standards. projected out several years. You always call the shots. both financially and otherwise.This step is crucial. unwieldy. based on what it would take to migrate and what it would cost not to migrate--not only financial costs. and Africa. By gathering this support before launching your project. conduct a thorough cost-benefit analysis. Before starting. your project may be doomed to failure. of Santa Cruz. They may fear unanticipated technological roadblocks as well as employees reticent to give up the tools they are used to using. and more planning.3 WINDOWS TO LINUX MIGRATION GUIDE For many companies. leader of the Linux architecture team for Novell SUSE for Europe." says Nicholas Petreley. But for those charged with spearheading the actual migration. "nobody can force you to upgrade or deny you a security fix. take these STEPS: GET EXECUTIVE BUY-IN. and Linux is one means to that end. Without executive support. Calif. a Linux analyst at IT market intelligence firm Evans Data Corp. To achieve success in a Windows to Linux desktop migration. so you are guaranteed to save money and retain more control in the long run. the project may seem difficult." notes Stefan Werden. According to Forrester Research. the Middle East. With a Windows-to-Linux migration. 74 . or untenable. migrating from Windows to Linux makes sense. such as the amount of overall control you want over your organization's software requirements. 4. make sure your reasons for migrating are business-driven. planning. Before launching into a migration.

Mandrake. and email ± and not workers who routinely use powerful programs like Photoshop or Macintosh-based applications. It's more important that your migration team is comfortable with the Linux distribution chosen. the cost of consultants in the area.EXAMINE EXISTING ENVIRONMENT-Also. proof of concept and architecture and implementation review. "When you run into a problem like not being able to get something to print. or whether you will be migrating with existing hardware. Typically. Consultants charge in various ways--by the hour. along with solutions to some daunting challenges. environment and number of applications to migrate. CONSIDER USING OUTSIDE CONSULTANTS. and the number of employees. Gentoo. Here are some tips you can use to enhance your Windows to Linux migration experience. 75 . Total cost depends on geographic location. these include transactional workers and developers ± employees who rely on basic applications like Web browsers.It doesn't matter much whether you settle on Red Hat. A reasonable hourly price range for general consulting with an experienced systems engineer costs $125 to $225 per hour. marketing manager for the Java Desktop System at Sun Microsystems Inc." notes Susan Jeffries.Unless you or members of your team have attempted such a migration before. Doing so can save countless hours of frustration. If you don't have such a person. productivity suites. someone familiar with Linux will be able to fix it in 10 minutes. consider whether it makes sense to invest in new hardware. Debian." Petreley says. "It's about identifying needs or pockets where you can save the greatest amount of money with minimal disruption. SUSE. or by the project. a migration consulting service may begin with a workshop. it can be well worth the money to hire an outside consultant. CHOOSE LINUX VERSION . it could take a week to fix the problem. IDENTIFY THE EXPERTS -Often. or another flavor altogether.

or Fedora. a Red Hatand community-supported open source project to build a complete. Only then can you plan what the new database environment should look like. Microsoft Access databases can be ported fairly easily to MySQL Database Server and PostgreSQL. SUSE is backed by Novell. Red Hat makes GNOME and KDE look and work alike. SUSE can make a great deal of sense for companies used to managing their desktop environment with systems management tools like ZenWorks and SMS. DATABASE MIGRATION Carefully examine the database and the data. Determine what you are trying to accomplish with the database. and both distributions also are solid choices. While GNOME has the fewest features and is least likely to confuse users with options.CHOOSING A LINUX DISTRIBUTION When it comes to choosing a Linux distribution. extending their IT infrastructure with Red Hat desktops also can make good sense. a Debian variant. Both are solid companies. some enterprising vendors are creating solutions. as well as a wide variety of window managers. KDE is more feature-rich and powerful. SUSE. Red Hat. But for businesses that have deployed Red Hat servers and have experience with the Red Hat network. general purpose operating system exclusively from free software. including de facto standard Red Hat. such as Versora's ProgressionDB. or Fedora. but is so configurable that it could some to spend too much time working with it. while the Java Desktop System is supported by Sun. Linux supports GNOME and KDE. which today is SUSE. Mandrake. This 76 . of Irvine. Calif. there are a dizzying array of choices. Mandrake. CHOOSING A WINDOW MANAGER Unlike Windows. which deals with some of the most common conversion issues. Another option is Shareplex from Quest Software Inc. Businesses usually can't lose by going with a de facto standard. In situations where migration problems occur.

data replication software, mostly used to migrate Oracle to Linux, provides support for thousands of rows per second for load distribution, disaster recovery, and migrations.

Oracle Recovery Manager satisfies the most pressing demands of per formant, manageable backup and recovery, for all Oracle data formats. A complete high availability and disaster recovery strategy requires dependable data backup, restore, and recovery procedures. Oracle Recovery Manager (RMAN) provides a comprehensive foundation for efficiently backing up and recovering the Oracle database. It is designed to work intimately with the server, providing block-level corruption detection during backup and restore. RMAN optimizes performance and space consumption during backup with file multiplexing and backup set compression, and integrates with Oracle Secure Backup, as well as third party media management products, for tape backup. RMAN takes care of all underlying database procedures before and after backup or restore, freeing dependency on OS and SQL*Plus scripts. It provides a common interface, via command line and Enterprise Manager, for backup tasks across different host operating systems and offers features not available through user-managed methods, such as parallelization of backup/restore data streams, backup files retention policy, and detailed history of all backups.

Database Migration from Windows to Linux Using RMAN
This post describes the procedure required to migrate a database from Windows to Linux using the RMAN Convert Database command. Both Windows and Linux platforms have the same endian format, which makes possible to transfer the whole database, making the migration process very straightforward and simple. To migrate between platforms that have a different endian format, Cross Platform Transportable Table spaces (XTTS) needs to be used instead.


1. Check platform compatibility between source and target OS 2. Start the database in read only mode 3. Check database readiness for transport from Windows to Linux using DBMS_TDB.CHECK_DB 4. Check if there are any external objects 5. Execute the Rman Convert database command 6. Copy converted datafiles, generated Transport Script and Parameter File to Linux 7. Edit the init.ora for the new database 8. Edit the Transport Script and Parameter File changing the windows paths to Linux Paths 9. Execute the Transport Script 10. Change the Database ID 11. Check database integrity

desc V$db_transportable_platform Step 1-->shutdown database Step 2-->startup mount Alter database open read only Step 3-->connect to rman and run a script


rman> convert database new database vikas1 transport script 'E:\trans' to paltform 'Linux IA(32-bit)';

//this scripr generate file for every datafile in database folder and parameter file and a transport script in e drive copy these files and paste on linux machine.

Step 4-->copy parameter file on default location and edit it; Step 5-->edit tranport script file (change new path). Step 6-->open sqlplus and run script transport script.

4.7 SYSTEM REQUIREMENTS HARDWARE REQUIREMENT RAM²512 Mb (DDR2) or Higher CPU²2.86 GHz or higher MOTHER BOARD -- D945 GNT or Higher version HARD DISK² 10 Gb free or per requirement KEYBOARD-- TVS GOLD MOUSE²Optical Mouse MONITOR²as per requirement

SOFTWARE REQUIREMENT OPERATING SYSTEM² Windows 98, 2000, NT, XP. (32-bit), LINUX red hat 5. DATABASE -- Oracle 9i, 10g TOOL²Oracle Recovery Manager FRONT END²SQL Navigator BACK END ± Oracle 10g



users are able to visualize how the system will operate. With a data-flow diagram. It is therefore quite different from a flowchart. via an internal process. in what order.1 DATA FLOW DIAGRAM A data-flow diagram (DFD) is a graphical representation of the "flow" of data through an information system.DATA DESIGN 5. allowing a reader to determine what operations will be performed. but not what kinds of data will be input to and output from the system. nor where the data will be stored (all of which are shown on a DFD). How any system is developed can be determined through a data-flow diagram. nor where the data will come from and go to. data items flow from an external data source or an internal data store to an internal data store or an external data sink. There are different notations to draw data-flow diagrams. which shows the flow of control through an algorithm. Data-flow diagrams can be used to provide the end user with a physical idea of where the data they input ultimately has an effect upon the structure of the whole system from order to dispatch to report. A DFD provides no information about the timing of processes. DFDs can also be used for the visualization of data processing (structured design). And External 81 . The sponsor of a project and the end users will need to be briefed and consulted throughout all stages of a system's evolution. and under what circumstances.On a DFD. or about whether processes will operate in sequence or in parallel. Data Stores. Data Flow. and how the system will be implemented. what the system will accomplish. and to identify the transaction data in the data model. Data-flow diagrams (DFDs) are one of the three essential perspectives of the structured-systems analysis and design method SSADM. defining different visual representations for Processes. DEVELOPING A DATA-FLOW DIAGRAM In the course of developing a set of leveled data-flow diagrams the analyst/designers is forced to address how the system may be decomposed into component sub-systems. The old system's dataflow diagrams can be drawn up and compared with the new system's data-flow diagrams to draw comparisons to implement a more efficient system.

and the data flows between these processes and data stores". which shows the "interaction" (data flows) between "the system" (represented by one process) and "the system environment" (represented by terminators). The system designer makes "a context level DFD" or Level 0. 2. data stores. 82 . Data flow diagram ("bubble charts") are directed graphs in which the nodes specify processing activities and the arcs specify data items transmitted between processing nodes. The system is "decomposed in lower-level DFD (Level 1)" into a set of "processes.Entities. TOP-DOWN APPROACH 1.

4. e. unless they are "owned" by external systems. 83 . however.3.g. This approach "then continues on the subsequent sub processes". DFD is also a virtually designable diagram that technically or diagrammatically describes the inflow and outflow of data or information that is provided by the external entity. EVENT PARTITIONING APPROACH This level shows the overall context of the system and its operating environment and shows the whole system as just one process. are accessed by but not maintained by this system. these are often shown as external entities. It does not usually show data stores. Each process is then decomposed into an "even-lower-level diagram containing its sub processes". y In Level0 the diagram does not contain any Data stores. until a necessary and sufficient level of detail is reached which is called the primitive process (aka chewable in one bite).

A level-1 diagram must be balanced with its parent context level diagram. data stores. i. example the "inquiry" data flow could be split into "inquiry request" and "inquiry results" and still be valid.LEVEL 1 (HIGH LEVEL DIAGRAM) A Level 1 Data flow diagram for the same system. and only one. This level (level 1) shows all processes at the first level of numbering. level-1 diagram. external entities and the data flows between them. A process model will have one. 84 . these can be broken down to more detail in the level 1. The purpose of this level is to show the major high-level processes of the system and their interrelation.e. there must be the same external entities and the same data flows.

In this example processes 1.1. ER diagrams. 5. together they wholly and completely describe process 1. an entity-relationship model (ERM) is an abstract and conceptual representation of data.e. and its requirements in a top-down fashion.2 & 1. This level is decomposition of a process shown in a level-1 diagram. The data modeling technique can be used to describe any ontology (i. The first stage of information system design uses these models during the requirements analysis to describe information needs or the type of information that is to be stored in a database.3 are all children of process 1. or ERDs.LEVEL 2 (LOW LEVEL DIAGRAM) A Level 2 Data flow diagram showing the "Process Enquiry" process for the same system. a level-2 diagram must be balanced with its parent level-1 diagram test. Entity-relationship modeling is a database modeling method.2 ENTITY-RELATIONSHIP MODEL In software engineering. Diagrams created by this process are called entity-relationship diagrams. used to produce a type of conceptual schema or semantic data model of a system. 1. an overview and classifications of used terms and their relationships) for a certain area of interest. often a relational database. As before. as such there should be a level-2 diagram for each and every process shown in a level-1 diagram. and combined must perform the full capacity of this parent process. In the case of the design of an information system that is based on a 85 .

Note that sometimes. or a concept such 86 . When we speak of an entity we normally speak of some aspect of the real world which can be distinguished from other aspects of the real world. AND ATTRIBUTES Two related entities An entity with an attribute A relationship with an attribute An entity may be defined as a thing which is recognized as being capable of an independent existence and which can be uniquely identified. this in turn is mapped to a physical model during physical design. The classical notation mainly relates to conceptual modeling. mapped to a logical data model. an event such as a house sale or a car service. both of these phases are referred to as "physical design´. RELATIONSHIPS. such as IDEF1X THE BUILDING BLOCKS: ENTITIES. There are a number of conventions for entity-relationship diagrams (ERDs). at a later stage (usually called logical design).database. the conceptual data model is. There are a range of notations employed in logical and physical database design. such as the relational model. An entity is an abstraction from the complexities of some domain. An entity may be a physical object such as a house or a car.

a proved relationship between a mathematician and a theorem. most people tend to use the term entity as a synonym for this term. Because the term entity-type is somewhat cumbersome. a performs relationship between an artist and a song. infectivity: each entity of the entity set can participate in at most one relationship in the relationship set. a supervises relationship between an employee and a department. A relationship captures how two or more entities are related to one another. i.e.e. Although the term entity is the one most commonly used. Relationships can be thought of as verbs. totality or surjectivity: all entities in the entity set must participate in at least one relationship in the relationship set. y A thick line indicates both. Attributes are drawn as ovals and are connected with a line to exactly one entity or relationship set. objectivity: each entity in the entity set is involved in exactly one relationship. Attributes are often omitted as they can clutter up a diagram. Cardinality constraints are expressed as follows: y a double line indicates a participation constraint. strictly speaking. Examples: an owners relationship between a company and a computer. following Chen we should really distinguish between an entity and an entity-type. There are usually many instances of an a customer transaction or order. An entity-type is a category. An entity. If an entity set participates in a relationship set. other diagram techniques often list entity attributes within the rectangles drawn for entity sets 87 . y An underlined name of an attribute indicates that it is a key: two different entities or relationships with this attribute always have different values for this attribute. linking two or more nouns. DIAGRAMMING CONVENTIONS Entity sets are drawn as rectangles. y an arrow from entity set to relationship set indicates a key constraint. relationship sets as diamonds. they are connected with a line. is an instance of a given entity-type. i.


NAME ---------------------------------------------------------------------------------G:\TECHNOLOGY\ORCLW\CONTROLFILE\O1_MF_44QY9SXR_.2.DBF SQL> select name from v$controlfile.0\FLASH_RECOVERY_AREA\ORCLW\CONTROLFILE\O1_ MF_44QY9TPX_.LOG C:\ORACLE\PRODUCT\10.LOG C:\ORACLE\PRODUCT\10.DBF 5242880 G:\TECHNOLOGY\ORCLW\DATAFILE\O1_MF_USERS_44QYDHY7_.0\FLASH_RECOVERY_AREA\ORCLW\ONLINELOG\O1_MF _2_44QYB5L1_.LOG 89 .0\FLASH_RECOVERY_AREA\ORCLW\ONLINELOG\O1_MF _3_44QYBC2F_.2.LOG G:\TECHNOLOGY\ORCLW\ONLINELOG\O1_MF_2_44QYB14V_.LOG C:\ORACLE\PRODUCT\10.CTL C:\ORACLE\PRODUCT\10. MEMBER ---------------------------------------------------------------------------------G:\TECHNOLOGY\ORCLW\ONLINELOG\O1_MF_1_44QY9VJL_. BYTES FILE_NAME ---------.CTL SQL> select member from v$logfile.2.0.DBF 246415360 G:\TECHNOLOGY\ORCLW\DATAFILE\O1_MF_UNDOTBS1_44QYCFQW_.-----------------------------------------------------------440401920 G:\TECHNOLOGY\ORCLW\DATAFILE\O1_MF_SYSTEM_44QYBFPF_.0\FLASH_RECOVERY_AREA\ORCLW\ONLINELOG\O1_MF _1_44QY9ZZ7_.2.The Windows Database This exercise was done using a small default 10.4 database SQL> select bytes.DBF 136314880 G:\TECHNOLOGY\ORCLW\DATAFILE\O1_MF_SYSAUX_44QYCZ3D_.2.LOG G:\TECHNOLOGY\ORCLW\ONLINELOG\O1_MF_3_44QYB6OY_. file_name from dba_data_files.

Database closed. Start the database in read only mode In order to execute dbms_tdb. ORACLE instance shut down. Database dismounted. ORACLE instance started.-------------7 Microsoft Windows IA (32-bit) Little 10 Linux IA (32-bit) Little 11 Linux IA (64-bit) Little 13 Linux x86 64-bit Little 2. Total System Global Area 167772160 bytes Fixed Size 1295608 bytes Variable Size 71305992 bytes 90 . also you need to save the platform_ name string to use it later as part of the convert database SQL> select * from V$DB_TRANSPORTABLE_PLATFORM 2 where PLATFORM_NAME='Microsoft Windows IA (32-bit)' or 3 PLATFORM_NAME like 'Linux%' 4/ PLATFORM_ID PLATFORM_NAME ENDIAN_FORMAT ----------. SQL> shutdown immediate. SQL> startup mount.check_db the database must be opened on read only mode. Check platform compatibility between sources and target OS You need to check the platforms to be sure they have the same endian format.1.--------------------------------------------.

SQL> alter database open read only. Check if there are any external objects If there is any external objects take note of them.check_external displays report of external objects 91 .check_db does not return any exceptions. 3 begin 4 /* value of external is ignored. 6/ PL/SQL procedure successfully completed 4.Database Buffers 88080384 bytes Redo Buffers 7090176 bytes Database mounted. Database altered.check_db('Linux IA (32-bit)'). 3. 5 end. Check database readiness for transport from Windows to Linux If the execution of dbms_tdb. 3 begin 4 db_ready:= dbms_tdb. they will need to be taken care manually SQL> set serveroutput on SQL> declare 2 external boolean. SQL> set serveroutput on SQL> declare 2 db_ready boolean. but with SERVEROUTPUT set to ON 5 * dbms_tdb. that means the database is ready for transport to the target platform.

Starting convert at 19-MAY-11 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=154 devtype=DISK 92 .ORACLE_OCM_CONFIG_DIR. then the convert database command can be executed with Rman. In this example. the database is open in read only mode.6 * on console */ 7 external := dbms_tdb.Production on Thus May 19 17:26:22 2008 Copyright (c) 1982.WORK_DIR PL/SQL procedure successfully completed. SYS. 2007. C:\Documents and Settings\avargas>Rman target sys/oracle@orclw nocatalog Recovery Manager: Release 10. Using the RMAN CONVERT DATABASE COMMAND Having executed successfully the checkup steps.0 . At the end of the convert process Rman does display information about how to complete the conversion on the target platform. when using omf Rman does generate and display the new filenames on the output of the convert database command.4. Oracle. connected to target database: ORCLW (DBID=1718464921) using target database control file instead of recovery catalog RMAN> CONVERT DATABASE NEW DATABASE 'orcllnx' 2> transport script 'G:\TECHNOLOGY\ORCLLNX\transportscript' 3> to platform 'Linux IA (32-bit)'. SYS. 8 end. I¶m not using the db_file_name_convert '<source-path> '<targetpath>' option because the database is using oracle managed files (omf). 9/ The following directories exist in the database: SYS.2.check_external. 5. All rights reserved.DATA_PUMP_DIR.0. SYS.ADMIN_DIR.

DBF channel ORA_DISK_1: datafile conversion complete.ORACLE_OCM_CONFIG_DIR found in the database Directory SYS.DBF converted datafile=G:\TECHNOLOGY\ORCLW\DATAFILE\O1_MF_UNDOTBS1_44TM5F98_.ADMIN_DIR found in the database Directory SYS.Directory SYS.DBF channel ORA_DISK_1: datafile conversion complete. elapsed time: 00:00:35 channel ORA_DISK_1: starting datafile conversion input datafile fno=00003 name=G:\TECHNOLOGY\ORCLW\DATAFILE\O1_MF_SYSAUX_44QYCZ3D_.DBF channel ORA_DISK_1: datafile conversion complete.DBF converted datafile=G:\TECHNOLOGY\ORCLW\DATAFILE\O1_MF_SYSTEM_44TM3OPF_. elapsed time: 00:00:25 channel ORA_DISK_1: starting datafile conversion input datafile fno=00004 name=G:\TECHNOLOGY\ORCLW\DATAFILE\O1_MF_USERS_44QYDHY7_.DBF converted datafile=G:\TECHNOLOGY\ORCLW\DATAFILE\O1_MF_SYSAUX_44TM6JTB_. elapsed time: 00:00:01 93 .DBF channel ORA_DISK_1: datafile conversion complete.WORK_DIR found in the database User SYS with SYSDBA and SYSOPER privilege found in password file channel ORA_DISK_1: starting datafile conversion input datafile fno=00001 name=G:\TECHNOLOGY\ORCLW\DATAFILE\O1_MF_SYSTEM_44QYBFPF_. elapsed time: 00:00:55 channel ORA_DISK_1: starting datafile conversion input datafile fno=00002 name=G:\TECHNOLOGY\ORCLW\DATAFILE\O1_MF_UNDOTBS1_44QYCFQW_.DBF converted datafile=G:\TECHNOLOGY\ORCLW\DATAFILE\O1_MF_USERS_44TM7BD5_.DATA_PUMP_DIR found in the database Directory SYS.

.Run SQL script G:\TECHNOLOGY\ORCLLNX\TRANSPORTSCRIPT on the target platform to create database Edit init.ORA. they include all converted datafiles. mkdir ±p /oradisk/oracle/app/admin/ORCLLNX/adump mkdir ±p /oradisk/oracle/app/admin/ORCLLNX/bdump mkdir ±p /oradisk/oracle/app/admin/ORCLLNX/cdump mkdir ±p /oradisk/oracle/app/admin/ORCLLNX/udump mkdir ±p /oradisk/database/ORCLLNX/FRA O1_MF_SYSTEM_44TM3OPF_. then. use DBNEWID Utility Finished backup at 19-MAY-11 6. Copy Converted Datafiles. Generated Transport Script and Parameter File to the Linux We need to copy over the generated files to the Linux server.DBF.sql and utlrp. the transportscript and the generated pfile.DBF G:\TECHNOLOGY\ORCLW\DATAFILE\O1_MF_UNDOTBS1_44TM5F98_. for dump destination and flash recovery area i. G:\TECHNOLOGY\ORCLW\DATAFILE>move *44TM* .DBF G:\TECHNOLOGY\ORCLW\DATAFILE\O1_MF_SYSAUX_44TM6JTB_.e.2.0\DB_1\DATABASE\INIT_00JIGSKL_1_0.DBF 94 .ora file C:\ORACLE\PRODUCT\10.DBF G:\TECHNOLOGY\ORCLW\DATAFILE\O1_MF_USERS_44TM7BD5_. run utlirp.\.sql on the target platform To change the internal database identifier.If needed create at this point the directories you will need on the Linux server.\ORCLLNX G:\TECHNOLOGY\ORCLW\DATAFILE\O1_MF_SYSTEM_44TM3OPF_. This PFILE will be used to create the database on the target platform To recompile all PL/SQL modules..

DBF 1.\ORCLLNX\initORCLLNX.251.928 bytes free 7.808.556 initORCLLNX.G:\TECHNOLOGY\ORCLW\DATAFILE>move C:\ORACLE\PRODUCT\10.\.968..DBF 146.DBF 5.552 01_MF_UNDOTBS1_44TM5F98_.ora Check that all required files are located on the ORCLLNX directory G:\TECHNOLOGY\ORCLW\DATAFILE>dir ...616 TRANSPORTSCRIPT 440.ORA . Edit init.ora for new database The Rman convert command executed on Windows generated a parameter file that needs to be edited to be usedon the target Linux Server.072 01_MF_USERS_44TM7BDS_.897.ora 838.444.0\DB_1\DATABASE\INIT_00JIGSKL_1_0.\ORCLLNX Volume in drive G is TECHNOLOGY Volume Serial Number is 1877-B4EA Directory of G:\TECHNOLOGY\ORCLLNX 19/05/11 19/05/11 19/05/11 19/05/11 19/05/11 19/05/11 19/05/11 19/05/11 05:27 PM 05:27 PM 05:31 PM 05:31 PM 05:31 PM 05:31 PM 05:31 PM 05:31 PM 6 File(s) 2 Dir(s) <DIR> <DIR> 2. 95 .423.410.DBF 246.\.112 01_MF_SYSTEM_44TM30PF_.740 bytes 18.832 01_MF_SYSAUX_44TM6JTB_.2..

0" db_file_multiblock_read_count= 16 undo_management = "AUTO" 96 .0\DB_1\DATABASE\ADUMP" background_dump_dest = "C:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\UDUMP" core_dump_dest = "C:\ORACLE\PRODUCT\10.0.2.The pfile generated by Rman: # Please change the values of the following parameters: control_files = "C:\ORACLE\PRODUCT\10.0\DB_1\DATABASE\flash_recovery_area" db_recovery_file_dest_size= 2147483648 audit_file_dest = "C:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\BDUMP" user_dump_dest = "C:\ORACLE\PRODUCT\10.0\DB_1\DATABASE\TECHNOLOGY" db_recovery_file_dest = "C:\ORACLE\PRODUCT\\DB_1\DATABASE\CDUMP" db_name = "ORCLLNX" # Please review the values of the following parameters: __shared_pool_size = 62914560 __large_pool_size = 4194304 __java_pool_size = 4194304 __streams_pool_size = 0 __db_cache_size = 88080384 remote_login_passwordfile= "EXCLUSIVE" db_domain = "" dispatchers = "(PROTOCOL=TCP) (SERVICE=orclwXDB)" # The values of the following parameters are from source database: processes = 150 sga_target = 167772160 db_block_size = 8192 compatible = "10.0\DB_1\DATABASE\CF_DORCLLNX_ ID-1718464921_00JIGSKL" db_create_file_dest = "C:\ORACLE\PRODUCT\10.3.

ctl' db_create_file_dest = '/oradisk/database/ORCLLNX' db_recovery_file_dest = '/oradisk/database/ORCLLNX/FRA' db_recovery_file_dest_size= 2147483648 audit_file_dest = '/oradisk/oracle/app/admin/ORCLLNX/adump' background_dump_dest = '/oradisk/oracle/app/admin/ORCLLNX/bdump' user_dump_dest = '/oradisk/oracle/app/admin/ORCLLNX/udump' core_dump_dest = '/oradisk/oracle/app/admin/ORCLLNX/cdump' db_name = 'ORCLLNX' # Please review the values of the following parameters: __shared_pool_size = 62914560 __large_pool_size = 4194304 __java_pool_size = 4194304 __streams_pool_size = 0 __db_cache_size = 88080384 remote_login_passwordfile= 'EXCLUSIVE' db_domain = '' dispatchers = '(PROTOCOL=TCP) (SERVICE=orcllnxXDB)' # The values of the following parameters are from source database: processes = 150 sga_target = 167772160 97 .ctl' . '/oradisk/database/ORCLLNX/orcllnx_control2.undo_tablespace = "UNDOTBS1" job_queue_processes = 10 open_cursors = 300 pga_aggregate_target = 16777216 The pfile edited to be used on Linux # Please change the values of the following parameters: control_files = '/oradisk/database/ORCLLNX/orcllnx_control1.

statement will place the database in the appropriate invalidated.0' db_file_multiblock_read_count= 16 undo_management = 'AUTO' undo_tablespace = 'UNDOTBS1' job_queue_processes = 10 open_cursors = 300 pga_aggregate_target = 16777216 8.ORA' CREATE CONTROLFILE REUSE SET DATABASE "ORCLLNX" RESETLOGS NOARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 98 .0.controlfiles and dump directories.ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE STARTUP NOMOUNT PFILE='C:\ORACLE\PRODUCT\10.2. -.3. the following SQL -.The following commands will create a new control file and use it -.0\DB_1\DATABASE\ mode: -. -.db_block_size = 8192 compatible = ' open the database.After mounting the created controlfile. Edit the Transport Script Before running the transport script on the target Linux server we need to edit it to set the correct paths for datafiles.The script generated by Rman: -. also we may want to change the value for tuning parameters. -. Use this only if online logs are damaged.Data used by Recovery Manager will be lost.The contents of online logs will be lost and all backups will -.2.

GROUP 3 SIZE 50M DATAFILE 'C: \ORACLE\PRODUCT\10.Database can now be opened zeroing the online logs.2. 'C: \ORACLE\PRODUCT\10.0\DB_1\DATABASE\DATA_D-ORCLW_I1718464921_TSSYSTEM_ FNO-1_07JIGSKL'. ALTER DATABASE OPEN RESETLOGS.Online tempfiles have complete space information.2. -- 99 .0\DB_1\DATABASE\DATA_D-ORCLW_I1718464921_TSSYSAUX_ FNO-3_09JIGSNG'. GROUP 2 SIZE 50M. -.0\DB_1\DATABASE\DATA_D-ORCLW_I1718464921_TSUNDOTBS1_ FNO-2_08JIGSMD'.2.Commands to add tempfiles to temporary tablespaces.End of tempfile additions. -. -. 'C:\ORACLE\PRODUCT\10.0\DB_1\DATABASE\DATA_D-ORCLW_I1718464921_TSUSERS_ FNO-4_0AJIGSOA' CHARACTER SET AL32UTF8 .2.MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 SIZE 50M. -. ALTER TABLESPACE TEMP ADD TEMPFILE SIZE 20971520 AUTOEXTEND ON NEXT 655360 MAXSIZE 33554431M. -.Other tempfiles may require adjustment. 'C: \ORACLE\PRODUCT\10.

0\DB_1\DATABASE\INIT_00JIGSKL_1_0. Use the prompt * NEWDBID Utility (nid).It may take serveral hours to complete.sql set feedback 6. @@ ?/rdbms/admin/utlrp.2.ORA' CREATE CONTROLFILE REUSE SET DATABASE "ORCLLNX" RESETLOGS NOARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 100 . You may want to redefine the location of the directory objects. -.ORA' -. You may want to change the internal database identifier (DBID) prompt * or the global database name for this database.2. prompt * 2.2.ORA' @@?/rdbms/admin/utlirp. The script edited to be run on Linux: STARTUP NOMOUNT PFILE='/oradisk/oracle/app/oracle/product/10.The following step will recompile all PL/SQL modules.0\DB_1\DATABASE\INIT_00JIGSKL_1_0. Here prompt * is a checklist to help you stay on track: prompt * 1.sql SHUTDOWN IMMEDIATE STARTUP PFILE='C:\ORACLE\PRODUCT\10. prompt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SHUTDOWN IMMEDIATE STARTUP UPGRADE PFILE='C:\ORACLE\PRODUCT\10.0/db_1/dbs/initORCLLNX.set echo off prompt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ prompt * Your database has been created successfully! prompt * There are many things to think about for the new database.

Commands to add tempfiles to temporary tablespaces. ALTER DATABASE OPEN RESETLOGS. Here prompt * is a checklist to help you stay on track: prompt * 1.End of tempfile additions.MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 SIZE 50M. GROUP 2 SIZE 50M. -.Database can now be opened zeroing the online logs. -. '/oradisk/database/ORCLLNX/O1_MF_SYSAUX_44TM6JTB_.Online tempfiles have complete space information.DBF'. -. GROUP 3 SIZE 50M DATAFILE '/oradisk/database/ORCLLNX/O1_MF_SYSTEM_44TM3OPF_.DBF' CHARACTER SET AL32UTF8 .Other tempfiles may require adjustment. '/oradisk/database/ORCLLNX/O1_MF_USERS_44TM7BD5_. You may want to change the internal database identifier (DBID) 101 . -set echo off prompt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ prompt * Your database has been created successfully! prompt * There are many things to think about for the new database. -. -. prompt * 2.DBF'. '/oradisk/database/ORCLLNX/O1_MF_UNDOTBS1_44TM5F98_. You may want to redefine the location of the directory objects. ALTER TABLESPACE TEMP ADD TEMPFILE SIZE 20971520 AUTOEXTEND ON NEXT 655360 MAXSIZE 33554431M.DBF'.

prompt * or the global database name for this database. Use the prompt * NEWDBID Utility (nid). prompt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SHUTDOWN IMMEDIATE STARTUP UPGRADE PFILE='/oradisk/oracle/app/oracle/product/10.2.0/db_1/dbs/initORCLLNX.ORA' @@?/rdbms/admin/utlirp.sql SHUTDOWN IMMEDIATE STARTUP PFILE='/oradisk/oracle/app/oracle/product/10.2.0/db_1/dbs/initORCLLNX.ORA'; -- The following step will recompile all PL/SQL modules. -- It may take several hours to complete. @@?/rdbms/admin/utlrp.sql Set feedback 6;

9. Execute the Transport Script
This is the log of the transport script execution: avargas-pc:/oradisk/database/ORCLLNX> sqlplus / as sysdba SQL*Plus: Release - Production on Wed Jun 11 10:11:54 2008 Copyright (c) 1982, 2007, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> @transport SQL> STARTUP NOMOUNT PFILE='/oradisk/oracle/app/oracle/product/10.2.0/db_1/dbs/initORCLLNX.ora'; ORACLE instance started. Total System Global Area 167772160 bytes


Fixed Size 1266368 bytes Variable Size 71306560 bytes Database Buffers 88080384 bytes Redo Buffers 7118848 bytes SQL> CREATE CONTROLFILE REUSE SET DATABASE "ORCLLNX" RESETLOGS NOARCHIVELOG 2 MAXLOGFILES 16 3 MAXLOGMEMBERS 3 4 MAXDATAFILES 100 5 MAXINSTANCES 8 6 MAXLOGHISTORY 292 7 LOGFILE 8 GROUP 1 SIZE 50M, 9 GROUP 2 SIZE 50M, 10 GROUP 3 SIZE 50M 11 DATAFILE 12 '/oradisk/database/ORCLLNX/O1_MF_SYSTEM_44TM3OPF_.DBF', 13 '/oradisk/database/ORCLLNX/O1_MF_UNDOTBS1_44TM5F98_.DBF', 14 '/oradisk/database/ORCLLNX/O1_MF_SYSAUX_44TM6JTB_.DBF', 15 '/oradisk/database/ORCLLNX/O1_MF_USERS_44TM7BD5_.DBF' 16 CHARACTER SET AL32UTF8 17 ; Control file created. SQL> SQL> -- Database can now be opened zeroing the online logs. SQL> ALTER DATABASE OPEN RESETLOGS; Database altered. SQL> SQL> -- Commands to add tempfiles to temporary tablespaces. SQL> -- Online tempfiles have complete space information. SQL> -- Other tempfiles may require adjustment.


SQL> ALTER TABLESPACE TEMP ADD TEMPFILE 2 SIZE 20971520 AUTOEXTEND ON NEXT 655360 MAXSIZE 33554431M; Tablespace altered. SQL> -- End of tempfile additions. SQL> -SQL> SQL> set echo off ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Your database has been created successfully! * There are many things to think about for the new database. Here * is a checklist to help you stay on track: * 1. You may want to redefine the location of the directory objects. * 2. You may want to change the internal database identifier (DBID) * or the global database name for this database. Use the * NEWDBID Utility (nid). ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Database closed. Database dismounted. ORACLE instance shut down. ORACLE instance started. Total System Global Area 167772160 bytes Fixed Size 1266368 bytes Variable Size 71306560 bytes Database Buffers 88080384 bytes Redo Buffers 7118848 bytes Database mounted. Database opened. SQL> WHENEVER SQLERROR EXIT; SQL> SQL> DOC DOC>#######################################################################


2048) != 0 AND bitand(flags. SQL> SQL> DOC DOC> the following query reports the number of objects that have compiled DOC> with errors (objects that compile with errors have status set to 3 in DOC> obj$). "STARTUP UPGRADE" and DOC> re-execute utlirp. no rows selected SQL> Rem Store object numbers of all valid PL/SQL-based functional indexes SQL> DROP TABLE utlirp_enabled_func_indexes.DOC>####################################################################### DOC> The following statement will cause an "ORA-01722: invalid number" DOC> error if there the database was not opened in UPGRADE mode DOC> DOC> If you encounter this error. 105 . SQL> CREATE TABLE utlirp_enabled_func_indexes AS 2 SELECT obj# FROM ind$ 3 WHERE bitand(property. Table dropped. execute "SHUTDOWN". If the number is higher than expected. please examine the error DOC> messages reported with each object (using SHOW ERRORS) to see if they DOC> point to system misconfiguration or resource constraints that must be DOC> fixed before attempting to recompile these objects. >>>>>>>>>>>>>> many output lines followed These are the final lines of the logfile: PL/SQL procedure successfully completed. 1024) = 0. Table created.sql DOC>####################################################################### DOC>####################################################################### DOC># SQL> SELECT TO_NUMBER ('MUST_BE_OPEN_UPGRADE') FROM v$instance 2 WHERE status! = 'OPEN MIGRATES'.

SQL> SET serveroutput off SQL> 106 . please query the error DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors DOC> are due to misconfiguration or resource constraints that must be DOC> fixed before objects can compile successfully. PL/SQL procedure successfully completed.validate_components. DOC># SQL> select COUNT (*) "ERRORS DURING RECOMPILATION" from utl_recomp_errors. If this number is non-zero. ERRORS DURING RECOMPILATION --------------------------0 SQL> SQL> SQL> Rem ===================================================================== SQL> Rem Run component validation procedure SQL> Rem ===================================================================== SQL> SQL> SET serveroutput on SQL> EXECUTE dbms_registry_sys.DOC># SQL> select COUNT (*) "OBJECTS WITH ERRORS" from obj$ where status = 3. OBJECTS WITH ERRORS ------------------0 SQL> SQL> SQL> DOC DOC> the following query reports the number of errors caught during DOC> recompilation.

It is run from within Sqlplus havingthe database mounted: sqlplus "/ as sysdba" startup mount exit To change the DBID cd $ORACLE_HOME/bin .0/db_1/bin> sqlplus / as sysdba SQL*Plus: Release 10. 10. name FROM v$_database. Execution Log: avargas-pc:~/app/oracle/product/10.Production on Wed Jun 11 10:25:09 2008 Copyright (c) 1982.4. 107 . DBID Change./nid target=/ To verify the DBID and database name SELECT dbid.2.0 . Oracle.SQL> SQL> Rem ===================================================================== ====== SQL> Rem END utlrp.sql SQL> Rem ===================================================================== ====== SQL> set feedback 6.0. 2007. Change database identifier To change the database identifier you need to use the NEWDBID utility ³nid´. All Rights Reserved.2.

ORACLE instance started. Data Mining and Real Application Testing options avargas-pc:~/app/oracle/product/10. Connected to database ORCLLNX (DBID=1718464921) Connected to server version 10. 2007.0.modified Control File /oradisk/database/ORCLLNX/orcllnx_control2. OLAP.ctl Change database ID of database ORCLLNX? (Y/[N]) => Y Proceeding with operation Changing database ID from 1718464921 to 1179074095 Control File /oradisk/database/ORCLLNX/orcllnx_control1. Total System Global Area 167772160 bytes Fixed Size 1266368 bytes Variable Size 71306560 bytes Database Buffers 88080384 bytes Redo Buffers 7118848 bytes Database mounted.Connected to an idle instance.4.ctl /oradisk/database/ORCLLNX/orcllnx_control2.dbid changed Datafile /oradisk/database/ORCLLNX/O1_MF_UNDOTBS1_44TM5F98_./nid target=/ DBNEWID: Release 10.DBF .modified Datafile /oradisk/database/ORCLLNX/O1_MF_SYSTEM_44TM3OPF_.DBF .ctl . SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10. All rights reserved.DBF .2.0/db_1/bin> .0 .4.dbid changed 108 .ctl .0. Oracle.2.dbid changed Datafile /oradisk/database/ORCLLNX/O1_MF_SYSAUX_44TM6JTB_.2.0 Control Files in database: /oradisk/database/ORCLLNX/orcllnx_control1. SQL> startup mount.0 Production With the Partitioning.Production on Wed Jun 11 10:25:50 2008 Copyright (c) 1982.2.

All Rights Reserved. Database has been shutdown. avargas-pc:~/app/oracle/product/10. 2007.4.0 .DBF .dbid changed Instance shut down Database ID for database ORCLLNX changed to 1179074095.Completed succesfully.2. DBNEWID .dbid changed Datafile /oradisk/database/ORCLLNX/ORCLLNX/datafile/o1_mf_temp_44yxofkr_. Successfully changed database ID.2. SQL> startup mount. Connected to an idle instance. All previous backups and archived redo logs for this database are unusable.Production on Wed Jun 11 10:28:22 2008 Copyright (c) 1982. Database is not aware of previous backups and archived logs in Recovery Area.dbid changed Control File /oradisk/database/ORCLLNX/orcllnx_control2. ORACLE instance started.0.tmp . open database with RESETLOGS option. SQL> alter database open resetlogs.dbid changed Control File /oradisk/database/ORCLLNX/orcllnx_control1.ctl . Total System Global Area 167772160 bytes Fixed Size 1266368 bytes Variable Size 71306560 bytes Database Buffers 88080384 bytes Redo Buffers 7118848 bytes Database mounted. Oracle. Database altered 11.ctl . Check database integrity SQL> select tablespace_name from dba_tablespaces.0/db_1/bin> sqlplus / as sysdba SQL*Plus: Release 10. TABLESPACE_NAME 109 .Datafile /oradisk/database/ORCLLNX/O1_MF_USERS_44TM7BD5_.

-----------------------------SYSTEM UNDOTBS1 SYSAUX TEMP USERS SQL> select file_name from dba_data_files.DBF /oradisk/database/ORCLLNX/O1_MF_UNDOTBS1_44TM5F98_.DBF /oradisk/database/ORCLLNX/O1_MF_SYSAUX_44TM6JTB_. STATUS FROM DBA_REGISTRY. COMP_NAME STATUS -------------------------------------.DBF Checking component status after transport: SQL> SELECT COMP_NAME. FILE_NAME ------------------------------------------------------------------------------/oradisk/database/ORCLLNX/O1_MF_USERS_44TM7BD5_.DBF /oradisk/database/ORCLLNX/O1_MF_SYSTEM_44TM3OPF_.-----Oracle XML Database VALID Oracle Expression Filter VALID Oracle Rules Manager VALID Oracle Workspace Manager VALID Oracle interMedia VALID Oracle Database Catalog Views VALID Oracle Database Packages and Types VALID JServer JAVA Virtual Machine VALID Oracle XDK VALID Oracle Database Java Packages VALID 110 .


Sampling works. Verification should include data to be included as well as excluded and. An acceptable level of error implies that less than 100% of the data will be migrated without error and the level of error is inversely proportionate to the number of samples tested(refer to sampling standards such as ANSI/ASQ Z1. o Check the constraints. o We have to check database integrity. where some subset of random data or content is selected and inspected to ensure the migration was completed ³as designed´. o Whether the data¶s are loaded in the target database correctly. As per the assumption on repeatability. five or more iterations of testing with differing results implies that one of the key tenets of sampling is not upheld. 112 . tied to the specific queries being used for the migration. even migration for testing purposes.e. The following lists options for testing by the phase of the migration process: 7.. ³non-conformities occur randomly and with statistical independence. o We have to check the referential integrity. Even with these shortcomings. but what are the other testing options. sampling has a role in a well defined testing strategy. before any migration.1 PRE-MIGRATION TESTING These tests occur early in the migration process. if applicable. i. The pre-migration testing options include: y Verify scope of source systems and data with user community and IT. is completed.DATABASE MIGRATION TESTING The approach to testing data and content migrations relies upon sampling. but is reliant upon an acceptable level of error and an assumption pertaining to repeatability.4). debug and retest method. the fact that many migrations require four. Those that have tested migrations using this approach are familiar with the typical iterative test. where subsequent executions of the testing process reveal different error conditions as new samples are reviewed.

field type.y Define the source to target high-level mappings for each category of data or content and verify that the desired type has been defined in the destination system. The specification should include: y y y y y A definition of the source systems The source system¶s data sets and queries The mappings between the source system fields and the destination system Number of source records Number of source systems records created per unit time (to be used to define the migration timing and downtime y y y Identification of supplementary sources Data cleansing requirements Performance requirements 113 .field basis. If clever. testing here can also be used to verify that a migration specification¶s mappings are complete and accurate. test to ensure that the appropriate source fields contain these valid values. y Using the source to destination mappings. For example. if the destination system has a mandatory field. or during the earliest stages of the migration tool configuration. FORMAL DESIGN REVIEW Conduct a formal design review of the migration specification when the pre-migration testing in near complete. ensure that the appropriate source is not null. y Verify destination system data requirements such as the field names. Test tool configuration against the migration specification which can often be completed via black box testing on a field ±by. valid value lists and other field-level validation checks. or if the destination system field has a list of valid values. test the source data against the requirements of the destination system. y Test the fields that uniquely link source and target records and ensure that there is a definitive mapping between the record sets y y Test source and target system connections from the migration platform. mandatory fields.

This approach provides only summary information and if any issue exists. 7. the number of records migrated is compiled from the destination system and then compared to the number of records migrated. source values and the field level mappings are used to calculate the expected results at the destination.y Testing requirements The formal design review should include representatives from the appropriate user communities. For planning purposes. y Summary Verification ± There are several techniques that provide summary information including record counts and checksums. y Compare Migrated Records to Records Generated by the Destination System ± Ensure that migrated records are complete and of the appropriate context. In short. This testing will be used to verify that the planned downtime is sufficient. the means to close each issue and approve the migration specification and a process to maintain the specification in sync with the migration tool configuration (which seems to continuously change until the production migration). The outcome of a formal design review should include a list of open issues. it does not often provide insight to an issue¶s root cause. IT and management. Expect a significant sum of errors to be identified during the initial test runs although it will be minimized if sufficient pre-migration testing is well executed. y Compare Migrated Records to Sources ± Tests should verify that fields¶ values are migrated as per the migration specification. consider the time to verify that the migration process was completed successfully. This testing can be completed using sampling if appropriate or if the migration includes data that poses 114 .2 Post-Migration Testing Once a migration has been executed. Here. Post-migration is typically performed in a test environment and includes: y Test the throughput of the migration process (number of records per unit time). additional end to end testing can be executed.

Additionally. as an automated testing tool can be configured in parallel with the configuration of the migration tool. and other system processes that rely on migrated data. and most often. 115 . Attention should be given to reporting. the ability to test 100% of the migrated data is available immediately following the first test migration.significant business or compliance risk. The advantages of the automated approach include the ability to identify errors that are less likely to occur (the proverbial needles in a haystack). downstream feeds. User acceptance testing provides an opportunity for the user community to interact with legacy data in the destination system prior to production release. it is easy to see that automated testing saves significant time and minimizes the typical iterative test. this is the first such opportunity for the users. User Acceptance Testing Functional subtleties related to the co-mingling of migrated data and data created in the destination system may be difficult to identify early in the migration process. debug and retest found with sampling. When compared to sampling approaches. 100% of the migrated data can be verified using an automated testing tool.


117 .

118 .

119 .

120 .

121 .

122 .


Determine the migration type and the necessary tools and resources to complete it. In addition. Consider using third-party solutions to prevent hand-coding migration scripts that will be time consuming and rather complex if data cleansing is involved.CONCLUSION Database migration is a complex project that has to be thoroughly analyzed. Various approaches have to be fully reviewed and understood prior to choosing one. Oracle JDeveloper Application Migration Assistant. Migration Task Migration Analysis % of Effort 7% DB Best product Migration Analyzer % of Task 100% Schema and Content Conversion Application Component Conversion Environment/Utility Conversion Product Test Planning Product Test Execution Deployment 3% Schema & Data Migrator 100% 37% SQL Converter & Runtime Query Converter 95% 1% SQL Converter 50% 6% 39% Migration Tester Migration Tester 50% 66% 7% N/A 0% 124 . Outsourcing will bring in the best practices and appropriate tools to complete the project. The combination of Oracle Recovery manager. Migration can be done in-house or outsourced to a consulting practice. This project over database migration is a value-add tool that enables you to identify any issues with your database migration before the project is signed off as complete. and Oracle Database Migration Verifier provides a comprehensive solution for database and application migration to the Oracle platform. these solutions can reduce or eliminate the downtime and facilitate the replication between the systems.

Appendix 1 INDEX A Analytical database 11 Architecture of database 16 B Backup And Replication 31 Business Migration 73 R Relational Model 22 RDBMS 32 S Step of migration 78 System requirement 79 C Command Notation 78 Coding 88 Choosing Linux 76 D Data migration 71 Database migration 73 DBMS Features 30 Data Flow Diagram 81 E External database 12 External data level 18 T Three-Level Architecture 17 Task of DBMS Package 30 Tables 7 W Window Manager 76 K Key 7 125 .

Appendix 2 GLOSSARY A Attribute . R Report.A database report presents information retrieved from a table or query in a preformatted. originally for use on large mainframe computer systems. attractive manner.A single data item related to a database object C Candidate Key . E ER Diagram. D Data .An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database. K Key .DB2 is a relational database system developed by IBM Corporation.Data consists of a series of facts or statements that may have been collected.Database tables are composed of individual columns corresponding to the attributes of the object.A database schema is a collection of meta-data that describes the relations in a database 126 .A database key is a attribute utilized to sort and/or identify data in some manner.A candidate key is a combination of attributes that can be uniquely used to identify a database record without any extraneous data. DB2. processed and/or manipulated but have not been organized or placed into context. S Schema. Column. stored.

[2]. by Brodie and Stonebraker Database migration ± ³A planned approach´ by Steve Callan LINKS [1]. www." IFLA Journal 33: 323-326. [3].com/database migration www. Gregory.2 : {121-132}.REFERENCES [1]. "Pushing the Boundaries of Traditional Heritage Policy: maintaining long-term access to multimedia content. [2]. Van der Hoeven. Jeffery.databasejournal. Migrating Legacy 127 . and Remco Verdegem. "Emulation for Digital Preservation in Practice: The Results. [4]." The International Journal´Curation 2.wikisearch. Brian Lohman. Muira.

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.