Posts

Showing posts from December, 2011

Global Temporary Tables

Applications often use some form of temporary data store for processes that are to complicated to complete in a single pass. Often, these temporary stores are defined as database tables or PL/SQL tables. In Oracle 8i, the maintenance and management of temporary tables can be delegated to the server by using Global Temporary Tables. Creation of Global Temporary Tables Miscellaneous Features Creation of Global Temporary Tables The data in a global temporary table is private, such that data inserted by a session can only be accessed by that session. The session-specific rows in a global temporary table can be preserved for the whole session, or just for the current transaction. The ON COMMIT DELETE ROWS clause indicates that the data should be deleted at the end of the transaction. CREATE GLOBAL TEMPORARY TABLE my_temp_table (   column1  NUMBER,   column2  NUMBER ) ON COMMIT DELETE ROWS; In contrast, the ON COMMIT PRESERVE ROWS clause indi...

Oracle External table techniques - XML files

How to push data from Oracle Table to external files? Well, external tables in Oracle provides a way to move data in as well as out of the database with the help of SQL*Loader and Data Pump functionality. Using Oracle DATA PUMP Using ORACLE_DATAPUMP access driver we can push data in database tables into external flat files. In the previous article on Oracle External Tables we have seen the default driver ORACLE_LOADER to read from external files . Now in this article we will learn how to push data to flat files using the access driver ORACLE_DATAPUMP . Here goes the example: CREATE TABLE emp_ext ORGANIZATION EXTERNAL ( TYPE ORACLE_DATAPUMP DEFAULT DIRECTORY ext_tab_dir  LOCATION ('emp.dmp') ) AS SELECT * FROM EMP; Here the external file emp.dmp will contain all the data of the table EMP. We can use the same file generated here as source and then create an oracle external table to retrieve data into some other Oracle system. Using UTL_FILE Another method to read and write exte...

Informatica Interview questions

1. How to filter record's in an XML file SQ and how to change the datatype 2. How to load data into a table based on the column length ,i.e. variable length of data filled in the column Retail Client interview questions 01/16/2012 Consulting Co. 1. How do you load data using informatica into tables with primary key - foreign key constraints enabled ? 2. If a workflow with many sessions is reported to be having load issues, what would be your approach to investigate these issues ? 3. How would you load data into tables with ragged hierarchies ? How do you query such tables using informatica ? What is the connect by prior clause in oracle? Would you be able to load these tables using the constraint based loading ? 4. What is an indirect file type in informatica? What are they used for? 5. How do you handle tables with many to many relationship? How do you load data into such tables with many to many relationship? 6. How do you ensure data integrity in oracle i.e. the underlying data...

Data Concurrency and Consistency

Image
This chapter explains how Oracle maintains consistent data in a multiuser database environment. This chapter contains the following topics: ·          Introduction to Data Concurrency and Consistency in a Multiuser Environment ·          How Oracle Manages Data Concurrency and Consistency ·          How Oracle Locks Data ·          Overview of Oracle Flashback Query Introduction to Data Concurrency and Consistency in a Multiuser Environment In a single-user database, the user can modify data in the database without concern for other users modifying the same data at the same time. However, in a multiuser database, the statements within multiple simultaneous transactions can update the same data. Transactions executing at the same time need to produce meaningful and consistent results. Therefore, control...