Wednesday, June 12, 2013

SQL Loader SQLLDR

SQL*Plus

SQL*Plus is the most basic Oracle Database utility, with a basic command-line interface, commonly used by users, administrators, and programmers.

SQL*Loader is a bulk loader utility used for moving data from external files into the Oracle database.

SQL*Loader supports various load formats, selective loading, and multi-table loads.

we can start it from  Run > sqlplusw.exe

THE MOST IMPORTANT COMMANDS AVAILABLE IN SQL * PLUS:
ACCEPT – read a variable input from the user;

DEFINE – declares a variable (DEF);

DESCRIBE – lists the attributes of the tables or other objects (DESC);

EDIT - opens an editor in which you can change the last command;

EXIT or QUIT – disconnects the user and SQL * Plus session;

GET - searches for a file in SQL and submits SQL buffer;

HOST – running an operating system command (!);

LIST - shows the last command executed SQL buffer (L);

PROMPT - displays a text on the screen;

RUN - lists and runs the command that is saved in the SQL buffer (/);

SAVE – save buffer command into a SQL script file;

SET - change environment variables specific to SQL * Plus;

SHOW - displays the environment variables settings in SQL * Plus;

SPOOL - copies the output of a command to a file;

START – run a SQL script.

THE MOST IMPORTANT SQL * PLUS SET COMMANDS
- SET RECSEP {WR [APPED] | SHE [CH] | OFF} controls the print record delimiters. The three possible values have the following meanings:
WRAPPED prints a separator after each line of a record (even if it spans multiple lines);
EACH doing the same thing, but only at the end of a record;
OFF cancels print a separator.

- SET RECSEPCHAR {_ | c} sets the character that separates the records;

- SPACE {1 | n} sets the number of spaces between the columns.

- SET WRA [P] {OFF | ON} specifies how to display records (truncated or on a line).

- SET NULL text specifies the text displayed in place of NULL value.

- HEADS [EP] {| | c | OFF | ON} specifies the characters that separate the column names of records.

- SET UND [ERLINE] {_ | c | OFF | ON the specific character used} for underlining the names of the columns.

- SET NEWP [AGE] {1 | n | NONE} sets the number of blank lines left at top of every page.

- SET TERM [OUT] {OFF | ON the display of output controls –} generated commands executed from a script.

- SET PAGES [IZE] {24 | n} specifies the number of lines displayed per page (default is 24; may be set to a value of 0 to suppress the display of column names, the title of a report).

- SET FEED [BACK] {6 | n | OFF | ON the display number} controls the record supplied as a result of a SELECT command.

- ECHO {OFF | – Controls the display ON} commands from a script launched with the START command SQL, as they are executed.

The SPOOL command allows saving the results of a query to a file specified as a parameter. She has the following syntax:

ENHANCING COMPETITIVENESS [OL] [file_name [. ext] | OFF | OUT]




For more examples 











Tuesday, June 4, 2013

Multiple Operating Unit setup in Oracle Apps Reports R12.1.3

Multiple Operating Unit setup in Oracle Apps Reports R12.1.3

Problem:
With the introduction of multi-org access control in release 12, an applications responsibility
can access multiple operating units. Some concurrent programs have been enhanced to process multiple operating units simultaneously, while for other requests the operating unit must be specified when you run the program. To support this, concurrent programs are defined with an operating unit mode of 'S' for single operating unit or 'M' for multiple operating units. If the 'Operating Unit Mode' is not set for the concurrent program it will fail.




This is described in (unpublished) Documentation Bug 5587132

Solution:
To support this, concurrent programs are defined with an operating unit mode of 'S' for single
operating unit or 'M' for multiple operating units. This mode is set automatically during
the upgrade to release 12.

However, if you have modified the definition for any concurrent programs, the upgrade will not set
this. This is done to preserve your customizations. Depending on how you run the customized
program, you may need to set this operating unit mode.
To do this, execute the following SQL to set a concurrent program to run for a single operating
unit:

UPDATE FND_CONCURRENT_PROGRAMS
SET MULTI_ORG_CATEGORY='S'
WHERE CONCURRENT_PROGRAM_NAME = ''


Enter 'M' instead of 'S' for multiple operating units.

If you want to know which setting is appropriate for a given program, you may
review the setting in the appropriate .ldt file.
Please note, however, that if you have customized the concurrent program definition,
this setting may not be appropriate given the way you use the program.



This can also be done via Applications User Interface:


1. Login into application with System Administration responsibility (NOT System
Administrator)
2. Navigate: Concurrent -> Programs
3. Query for short name of the concurrent program
4. Click on Update pencil icon of your program
5. Under 'Update Concurrent Program' region, select Request tab
6. Under 'Request Setting' region, select 'Single' from the drop down of 'Operating Unit
Mode' field
7. Save changes by clicking on 'Apply' button.