Está en la página 1de 30

Frequent Encountered Problems and Questions (FEPQ)

with Oracle & Oracle Financial Applications (11i)

NOTE: First Timers: The links are below the


tips and code
Usage:

by George R. Lewycky grlewycky@yahoo.com

http://georgenet.net/oracle

http://groups.yahoo.com/group/OracleSharedInfo/

© 2004 George R. Lewycky

View My Guestbook Sign My Guestbook

Assorted useful Downloads


Most used files !!

take my poll at: Your Oracle Status:


htmlGEAR.com

keywords: oracle 11i pl/sql pl sql sql*plus tips techniques books financials sqlldr
sqlloader apps utilies sites installations general ledger gl ccid e-business ee-BI e-bi suite
tca 11.5. 11i10 applications software utilities scripts mailing list forum custom.pll
Application Object Library AOL Legacy Interfaces Extracts Conversion installations
customization enhancement

Brief History & Synopsis of Oracle (answers.com)

Version Numbering System

Oracle 8: 8.0.3 - 8.0.6


Oracle 8i: 8.1.5.0 - 8.1.7.4
Oracle 9i (Release 1): 9.0.1.0 - 9.0.1.4
Oracle 9i (Release 2): 9.2.0.1 - 9.2.0.6 (Latest current patchset as of
December 2004)
Oracle 10g: 10.1.0.2 - 10.1.0.3 (Latest current patchset as of August
2004)

If you are installing, setting up or beginning to use


Oracle's Financial Suite
You will need the following:
TOAD
http://www.quest.com/toad/ (expires) or
http://toadsoft.com/(freeware - you have to download again after this version expires)
http://www.quest.com/requests/results.asp?RequestDefID=49
this link has a useful guide and here is TOAD's Mailing Lists | Yahoo Groups

Another useful SQL GUI too is WINSQL by Synametrics

EXCEL OR EQUIVALENT SPREADSHEET (LOTUS, QUATTRO)


Essential for data cleanup, manipulation, date transformations, changing data to
uppercase, removing bizarre characters, truncating lengths, etc.
http://office.microsoft.com/home/default.aspx
http://dmoz.org/Computers/Software/Spreadsheets/
http://www.faqs.org/faqs/spreadsheets/faq/

SQL*Loader
Look for sqlldr.exe (DOS program)

Oreilly's Books on SQL*Loader | Oracle Unleashed, 2E SAMS SQL*Loader |


SQL*Loader Basics | Using SQL*Loader and Export/Import (Que) | Using SQL-Loader
to load data into Oracle | SQL*Loader FAQ's | SQL*Loader Concepts | Oracle Bulk
Loader | Replacing 3GL Data Loading with SQL*Loader and Database Triggers
Oracle SQL*Loader: The Definitive Guide and related Oracle SQL*Loader: The
Definitive Guide EXAMPLES O'Reilly |
This link has a good example to walk you thru

Loading EBCDIC data directly into the Oracle Database using


SQL*Loader

Specify the Characterset WE8EBCDIC500 for the EBCDIC data. The following example
shows the SQL*Loader Controlfile to load a fixed length EBCDIC record into the Oracle
Database.

LOAD DATA
CHARACTERSET WE8EBCDIC500
INFILE data.ebc "fix 86 buffers 1024"
BADFILE data.bad'
DISCARDFILE data.dsc'
REPLACE
INTO TABLE temp_data
(
field1 POSITION (1:4) INTEGER EXTERNAL,
field2 POSITION (5:6) INTEGER EXTERNAL,
field3 POSITION (7:12) INTEGER EXTERNAL,
field4 POSITION (13:42) CHAR,
field5 POSITION (43:72) CHAR,
field6 POSITION (73:73) INTEGER EXTERNAL,
field7 POSITION (74:74) INTEGER EXTERNAL,
field8 POSITION (75:75) INTEGER EXTERNAL,
field9 POSITION (76:86) INTEGER EXTERNAL
)

USEFUL EXCEL MACRO TO EXTRACT AND DELIMIT YOUR DATA


http://tushar-mehta.com/index.html?http://tushar-
mehta.com/excel/software/text_write_program/index.html
If you have comma's embedded in your data (address, names, etc) Excel will not make a
sufficient delimited file too easy to produce. I came across this macro and been using it
for over a year to produce files for SQL*Loader.

Other 3rd Party Sofware needed for installation and


operation of Oracle
• A useful SQL GUI too is WINSQL by Synametrics
• MKS ToolKit - http://www.mkssoftware.com need for upgrading Oracle does not
include a shell interpreter with Oracle E-Business Suite Release 11i or Oracle9i
Application Server. MKS Toolkit (http://www.mkssoftware.com ), a third-party
set of utilities that includes several UNIX shell interpreters and Perl, is
recommended. MKS Toolkit for System Administrators, MKS Toolkit for
Developers, and any other MKS Toolkit suites that include UNIX shell
interpreters and Perl are sufficient to support installation of Discoverer 4i content
for Release 11i.
• Cygwin is a Linux-like environment for Windows
• Jinitiator - load also on the end-users machines
• JDK/Java - only on the SERVER box
• C++
• Smart Certificate - same as Digital Certificate, use for minimal security

Third Party Software


Resources for Ad-Hoc Reporting Users
Rep2excel is a professional oracle report to excel converter
Assorted pipes, utils, converters for data
Links for various tools (ADP GmbH)
http://www.oraworld.com/util_db.htm - Utilities
FastReader High-speed snapshot of data from huge databases, quickly extract and load
database tables in a heterogeneous environment
SS64 Oracle Tools links
DATALOAD end-user data conversion tool
Free Programmer's Editors, Integrated Development Environment (IDE), ASCII Text
Editors cute, notepad2, vi, others
VEDIT and EBCDIC
MORE4APPS (for Financials only)
Gudu Software DBA tools
http://www.lv2000.com/ tools for sending email from forms & Excel utility
Check Barnes and Noble for Oracle books !!!

Oracle Press Series

Check Amazon for Oracle books !!

Bookpool | Alexis's Ark of Books | Oracle Books | Oracle Press (McGraw


Hill) | | Yahoo: Shopping > Computers Books > Titles |
Oracle Certification, Database, SQL, Application, Programming Books | Digital Guru

Oracle Books
datadesignb.com | O'Reilly's catalog | Oracle book reviews | Apress | Oracle Press
(McGraw Hill) | Rampant Oracle In-Focus Series | Yahoo Directory

Oracle Unleashed 1996 by Sams Publishing Good reference material (utilities, SQL,
pl/sql, various products) though a bit old. Good for anyone using the "old" stuff

Frequently Asked Questions (Problems)


& Answers
Q: TEXT_IO doesn't work in SQL+ or PL/SQL why ?

A: TEXT_IO can only be run in a PL/SQL script inside oracle FORMS only,

not a database package/procedure called from forms.

The Pl/SQL script has to be a program unit from within forms or in a

forms library.

Q: I'm not happy with Oracle's "canned" Invoices and other output, what

can I do ?
A: Various products exist as shown below.

I myself wrote a PL/SQL program to handle this. (contact me if

interested)

Oracle created these views which have all the data you would need:

AR_INVOICE_HEADER_V, AR_INVOICE_LINE_V.

Check eTRM (on Metalink)for the other views you might need (taxes,

etc).

See NOTE: Note:68149.1 on Metalink also

Adobe®/Acelio/Jetform Output Pak for Oracle® E-Business Suite

Adobe® Output Pak for Oracle E-Business Suite

Red Star is the leading provider of document generation, delivery and

archiving technology

Printing bitmapped reports

Evergreen's DOCUGUARD and Econoprint

CONTACT: Doug Brooker 1-800-248-2898 x 1274 dbrooker@evergrn.com

Sirvisetti Systems has various products also

Q: My output from PL/SQL does page break when I send to the printer A:

It's a known problem. This editor, TEXTPAD works to solve the problem

http://www.textpad.com/download/index.html#downloads

Q: What can I use for cloning my Oracle database(s) ?

A: http://babboo.com/has a product called Xclone

Radiant has http://www.radiants.com/dm/oracle.asp

SnapMirror for E-Business Suite

RapidClone

Cloning Oracle Applications Environments

SnapMirror for Sun servers by Network Appliance

EMC has Time Finder

http://hk.emc.com/partnersalliances/pdfs/h883_interstitial.jsp

http://www.orafaq.com/howto/clone-db.txt

Cloning using Hot Backup http://www.quest-


pipelines.com/newsletter/cloning.htm

See

http://www.jusungyang.com/ORACLEfolder/Administration/DatabaseCloning.t

xt

Q: How can I move table data from one database to another ?

A: DBlink, copy command, exp/imp, transportable tablespace.

Q: How can I clone (copy) a table without copying the data (just the

schema)?

A: create table city2 as select * from city where 1=2 ;

OR

create table brand2 as select * from brand where 1=2 ;

Q: How can I load data into Oracle tables:

A: 1. SQL Loader

2. TEXT_IO at FORM level, this package use to read from file

3. UTL_FILE, At PL/SQL level package for read text file.

Q: What causes SQL*Loader-625: Multibyte character error in control

file when I run SQL*Loader?

A: You might have pressed backspace, or an unprintable character

somewhere in your control file. You might want to re-type the lines

using NOTEPAD

SQL*Loader: Release 8.1.7.0.0 - Production on Thu May 2 10:07:31 2002


(c) Copyright 2000 Oracle Corporation. All rights reserved.

SQL*Loader-625: Multibyte character error in control file.

Example for correction:

LOAD DATA
INFILE 'C:\MY SQL\cust_apr30.txt' <- you might need to fully re-
type this line

Q: SQL*Loader doesn't run after I click the MS-DOS prompt in Windows,

why ?

A: see below
How to execute SQL*LOADER

Run your MS-DOS prompt using the Command Prompt as shown below:

You cannot run this DOS program through the START ' RUN method!!!!!

INTERFACE AND ERROR's DEBUGGING under Oracle Apps

Q: I’m trying to run Customer Interface (OR OTHER INTERFACES) and I can’t make
out what the error’s mean in the report

A: Do the following:

You are running Customer Interface and there is an error message in the
INTERFACE_STATUS column, but you don't know what it means.

SQL> select interface_status from ra_customers_interface_all; ? change to appropriate


table

INTERFACE_STATUS

B0,O3,E2,D1,D2,D3,D4,D5,D6,D7,D0,E1,
B0,O3,E2,D1,D2,D3,D4,D5,D6,D7,D0,E1,

NOTE: THIS APPLIES TO ALL INTERFACE TABLES!!!!!!!!!!!!!!!


EACH TABLE HAS THIS FIELD
Look on Metalink, and search for Document ID: 1073634.6 or see link
below
click here for a PDF with the error codes also

Q: What Oracle tables must I use to process various interfaces for APPS ?

A: see Click this link also | PDF of Oracle Fincls Interface & Base Tables
Interface table listing

See Note:230754.1 on Metalink: titled "Different uses of RACUST Customer Interface">

Most tables end with _INTERFACE or _ALL (single or multi-org) examples


below

Oracle Financials – Payables - Invoices


AP_INVOICES_INTERFACE
AP_INVOICE_LINES_INTERFACE

Oracle Financials – Receivables - Customers


RA_CUSTOMERS_INTERFACE_ALL
RA_CUSTOMER_PROFILES_INT_ALL
RA_CONTACT_PHONES_INT_ALL
RA_CUSTOMER_BANKS_INT_ALL
RA_CUST_PAY_METHOD_INT_ALL
HZ_PARTY_INTERFACE

Q: Differences between Interface's and API's

INTERFACE's: use for mass loads, migrations,conversions; you can populate interface
tables with many records and then start interface any time, so it's asynchronius; if any
record fails, it will stay in the interface tables till either fixed or purged

API's for: synchronious tasks, like integrations or web site calls; you normally would
only be processing one record at the time and get results right away; also, you would
have to handle situations where Error status is returned

Q: What does the date value of 31-DEC-4712 mean ?

A: it is reserved for "future closed date" indicating the transaction is still open. see
NOTE: 1014791.102

Related Oracle products


Question: Difficulty EXPORTING Discoverer Reports into PDF format

"Internal Error in Generating Report Export Failed"


Use either of these two products and instead of (F)ile->(E)xport, use (F)ile->(P)rint then
select the PDF printer

PDFCreate version 2 $50 USD by ScanSoft.com OR


Adobe Acrobat 6.0 Standard $299/$70 (downloaded) USD by Adobe
Yahoo Directory of PDF software

Useful SQL for Oracle APPS


Question: What versions are loaded on my machine ?

SQL> select substr(product,1,15) product,substr(version,1,15)


version,substr(status,1,15) status
from product_component_version

PRODUCT VERSION STATUS


--------------- --------------- ---------------
NLSRTL 3.4.1.0.0 Production
Oracle8i Enterp 8.1.7.3.0 Production
PL/SQL 8.1.7.3.0 Production
TNS for 32-bit 8.1.7.3.0 Production

also,

SQL> select * from v$version where banner like 'Oracle%';

BANNER
----------------------------------------------------------------
Oracle8i Enterprise Edition Release 8.1.7.3.0 - Production

Question: How to produce a delimited file from Oracle using SQL ?

this is for file transfer between databases, spreadsheets, platforms, etc NOTE:
TOAD & Discoverer also have this feature

filename: xxx.sql
set heading off
set linesize 100
set pagesize 0
set feedback off
spool c:\test.txt
select jobno ||'","',nyctpm ||'","', descr || '","' from jobxref;
spool off
- - - - - - - - - - output - - - - - - - - -
outfile: test.txt
95578"," LIONEL SAINT LOUIS"," CORRECT-FALLING DEBRIS,ICE,WAT","

- - - - - OR - - - - - - - -
SET SERVEROUTPUT ON
SET ECHO OFF
SET VERIFY OFF
SET Heading OFF
SET LINESIZE 2000
SET NEWPAGE NONE
SET PAGESIZE 100
SET Heading OFF
SET COLSEP , <- this saves you the headache of coding each
column!!!
spool c:\myfile.txt
select * from tablename <---- select all from your table
spool off

NOTE: if any of the columns have ',' embedded in them like the address
you might be in a bit of a bind. So you might need a unique delimiter
like '|' or ']'
You must include tick marks with this delimiter !!! See below
line:

SET COLSEP '|' or SET COLSEP ']'

your file will look something like this:


92877|S SHECTER |EMGINEERING & TECHNICAL FIELD
92881|S SHECTER |ENGINEERING & TECHNICAL FIELD

How do I export a database table to a flat file

Question: What Applications/Versions/Patch Levels are loaded on my machine ?

this query gives more details than the one below

select substr(a.APPLICATION_NAME,1,60) "Application Name"


, substr(i.PRODUCT_VERSION,1,4) "Version"
, i.PATCH_LEVEL "Patch Level"
, i.APPLICATION_ID "Application ID"
, i.LAST_UPDATE_DATE "Last Update"
from APPS.FND_PRODUCT_INSTALLATIONS i
, APPS.FND_APPLICATION_ALL_VIEW a
where i.APPLICATION_ID = a.APPLICATION_ID
-- not all applications update the next field correctly
-- and i.PATCH_LEVEL like '11i%'
-- these are the applications that concern me most
-- and i.APPLICATION_ID in
('0','140','260','101','200','275','201','222','185')
order by a.APPLICATION_NAME

Question: What patches are loaded on my machine ?

select patch_name,
patch_type,
applied_patch_id,
rapid_installed_flag,
maint_pack_level
from ad_applied_patches
where patch_name like '%'
order by 1

OR

select * from ad_bugs

This SQL lists the objects under owner APPS ( PKG, VIEW, etc)

select owner,object_name,object_type from dba_objects where owner='APPS'

How do I obtain CCID ( code combination id) / Chart of Account data for General Ledger

select
substr(gl.code_combination_id,1,5) ccid,
substr(gl.segment1,1,5) Auth,
substr(gl.segment2,1,8) Account,
substr(gl.segment3,1,5) RC,
substr(gl.segment4,1,5) Func,
substr(gl.segment5,1,5) Job
FROM gl.gl_code_combinations gl
order by code_combination_id

Question: How many transactions exist by GL DATE (period) ?

select gl_date,count(gl_date)
from ra_cust_trx_line_gl_dist_All
where account_class = 'REV'
group by gl_date

How to find your current GL Period END DATE

select a.END_DATE
from GL_PERIOD_STATUSES a
where a.application_id = '222' and
a.closing_status = 'O' and
a.start_date =
(select max(b.start_date) from gl_period_statuses b where
b.application_id = '222' and b.closing_status = 'O')

Question: What is my current GL SET OF BOOKS

select SET_OF_BOOKS_ID,
NAME,SHORT_NAME,
CHART_OF_ACCOUNTS_ID,
CURRENCY_CODE,
PERIOD_SET_NAME,
ACCOUNTED_PERIOD_TYPE,
LATEST_OPENED_PERIOD_NAME,
substr(DESCRIPTION,1,30) description from gl_sets_of_books

Question: What is my current GL Period

select max(gl_date) from


ra_cust_trx_line_gl_dist_all
SQL> /

MAX(GL_DATE)
---------
31-MAR-05

Question: What DB version is on my machine ?

SQL> VARIABLE VERSION VARCHAR2(50)


SQL> VARIABLE COMPATIBILITY VARCHAR2(50)
SQL> EXEC DBMS_UTILITY.DB_VERSION(:VERSION,:COMPATIBILITY)

PL/SQL procedure successfully completed.

SQL> PRINT VERSION

VERSION
----------------------------------------
8.0.4.0.0

SQL> PRINT COMPATIBILITY

COMPATIBILITY
----------------------------------------
8.0.0

Question: What machine, server or instance am I using ??

SQL> Select name from v$database;


SQL> select instance_name from v$instance;
SQL> select * from global_name;
SQL> SELECT VALUE FROM V$PARAMETER WHERE NAME='db_name';
SQL> select to_number(translate(substr(version,1,9),'1.$','1')) from
v$instance;
SQL> select s.machine from v$session s where s.audsid =
userenv('sessionid');
SQL> select global_name from global_name;

NAME
---------
ARGP
also you can use this:
SQL> select sys_context('USERENV','DB_NAME') AS instance from dual;

INSTANCE
---------------------------------------------------------------------
ARGP

SQL> select substr(release_name,1,7) Version,


2 substr(rpad(MULTI_ORG_FLAG,2,' '),1,2) "MO",
3 substr(rpad(MULTI_CURRENCY_FLAG,3,' '),1,3) "MRC"
4 from apps.fnd_product_groups;

VERSION MO MRC
------- -- ---
11.5.7 N N

SQL> select arp_util.ar_server_patch_level from dual;

AR_SERVER_PATCH_LEVEL
-----------------------------------------------------------------------
--
11i.AR.H

SQL> select distinct patch_level from apps.fnd_product_installations


2 where patch_level like '%AR%'

PATCH_LEVEL
------------------------------
11i.AR.H

This variation will give you the machine name you are running on:
SQL> Select sys_context('USERENV','TERMINAL') from dual;

SYS_CONTEXT('USERENV','TERMINAL')
--------------------------------------------------------------
AR0669

Question: How can I retrieve a random number ?

SQL> select dbms_random.random from dual;


RANDOM
----------
495129087

Question: What patches are loaded on our machine ?

SQL> select * from AD_APPLIED_PATCHES

Question: How do I derive the user name from the 4-digit reference number ?

Use the FND_USER table as shown below


select user_id,substr(user_name,1,20) username,
substr(description,1,20) fullname,last_logon_date,start_date from
fnd_user

USER_ID USERNAME FULLNAME LAST_LOGO START_DAT


--------- -------------------- -------------------- --------- ---------
-1 ANONYMOUS Anonymous user name 01-JAN-51
1 AUTOINSTALL This application use 05-MAR-00 01-JAN-51
4 CONCURRENT MANAGER This application use 01-JAN-51
3 FEEDER SYSTEM Use this id for data 01-JAN-51
2 INITIAL SETUP Dummy user for initi 01-JAN-51
5 APPSMGR User for routine mai 01-JAN-51
0 SYSADMIN System Administrator 19-JAN-05 01-JAN-51
1003 IEXADMIN Oracle Collections A 08-FEB-00 28-SEP-99
1007 ASGUEST AS Guest 06-MAR-00 16-FEB-00
1008 IBE_ADMIN iStore Administrator 06-DEC-00 26-APR-00
1005 OP_SYSADMIN OP System Administra 15-JUN-00 27-DEC-99
1006 OP_CUST_CARE_ADMIN Customer Care Admini 05-JAN-00 27-DEC-99

Question: What Family Patch Levels are on my machine ?

SELECT FA.APPLICATION_SHORT_NAME APP,


FPI.PATCH_LEVEL
FROM FND_PRODUCT_INSTALLATIONS FPI,
FND_APPLICATION FA
WHERE FA.APPLICATION_ID = FPI.APPLICATION_ID;

APP PATCH_LEVEL
-------------------------------------------------- ------------------
ABM 11i.ABM.F
AMV 11i.AMV.E
AR 11i.AR.H

Question: Am I setup for Multi-Org ?

select multi_org_flag from fnd_product_groups;

Useful DATE output SQL

This format is yymmdd = year month day | hh24mi = 24 hour clock and minutes

select to_char(sysdate,'yymmddhh24mi')
from dual

TO_CHAR(SY
----------
0409141005

select to_char(sysdate,'hh24:mi:ss')
from dual

TO_CHAR(
--------
10:11:14

Click here for more useful scripts

PL/SQL
Question: How can I see my PL/SQL output ????

In SQL*Plus or in your script add this line before your excute


SQL> set serveroutput on
SQL> execute xxxxxxxxxxx.yyyyyyyyyyyyy;

and you will see this: PL/SQL procedure successfully completed.

• ASK TOM: how to get around Dbms_output limitations


• ASK TOM: dbms_output.enable does not work

Question: Alignment, word wrapping and leading spaces are not displayed correct when I
run PL/SQL through SQL*Plus instead of running through TOAD
Add FORMAT WRAP to the set serveroutput on as shown below, see Notes:
1008252.6 and 159951.1 on Metalink

SQL> set serveroutput on F0RMAT WRAP


SQL> execute xxxxxxxxxxx.yyyyyyyyyyyyy;
Click this link also
Question: Upon compiling my PL/SQL I see this: expected symbol name is missing -
Why ?
This is becuase you have an ampersand ( & ) embedded in your text or
code and oracle thinks its a variable and expects a variable name after
it. You probably commented using the "&" as I have numerous time.

Miscellaneous
Question: Using SQL*Plus how can I produce a flat file without headings, feedback, etc ?
Try these set commands just before your spool command.

set newpage 0
set space 0
set linesize 80
set pagesize 0
set echo off
set feedback off
set heading off

Creating a duplicate TABLE of an existing Table


This isn’t copying the data or entire database but rather making an
exact copy of a table’s structure
to test a load or copy the data into.

create table
as select * from ;

Example:
SQL> create table temp_cust_int
AS Select * from ra_customers_interface;

Another option is :
SQL> create table x as select * from emp where 1=2;

Copying the data from one TABLE to another

insert into
select * from

DELETE ALL ROWS (RECORDS) FROM THE TABLE

SQL>
SQL> delete from temp_cust_int;

221 rows deleted.

SQL> commit
2 ;
Commit complete.

COPYING TABLE FROM ONE MACHINE TO ANOTHER

First do a count or delete all your rows

SQL> select count(*) from jobxref;

COUNT(*)
---------
4227

SQL> copy from apps/apps@argp -


> replace jobxref - or create jobxref -
> using select * from jobxref;

Array fetch/bind size is 15. (arraysize is 15)


Will commit when done. (copycommit is 0)
Maximum long size is 80. (long is 80)
Table JOBXREF dropped.

Table JOBXREF created.

4255 rows selected from apps@argp.


4255 rows inserted into JOBXREF.
4255 rows committed into JOBXREF at DEFAULT HOST connection.

SQL> select count(*) from jobxref;

COUNT(*)
---------
4255

Creating and viewing user sequence numbers

SQL> create sequence crmemo_counter


2 minvalue 0
3 maxvalue 999999999999
4 start with 1
5 increment by 1
6 cache 20
7 /
Sequence created.
SQL> select * from user_sequences;

SEQUENCE_NAME MIN_VALUE MAX_VALUE INCREMENT_BY C O


CACHE_SIZE LAST_NUMBER
------------------------------ --------- --------- ------------ - -
---------- -----------
CRMEMO_COUNTER 0 1.000E+12 1 N N
20 1
INVOICE_COUNTER 0 1.000E+12 1 N N
20 1
POR_REQ_NUMBER_S 1 1.000E+27 1 N N
0 100000
RA_TRX_NUMBER_1000_S 1 999999999 1 N Y
20 2

How to list table CONSTRAINTS (child tables)

SELECT TABLE_NAME, CONSTRAINT_NAME, R_CONSTRAINT_NAME


FROM USER_CONSTRAINTS
WHERE TABLE_NAME like ('%AR%')

TABLE_NAME CONSTRAINT_NAME
R_CONSTRAINT_NAME
------------------------------ ------------------------------
------------------------------
ABMBV_ACT_ACCT_DATA_VARIANCE SYS_C0090705
ABMBV_ACT_RATE_DATA_VARIANCE SYS_C0090707
ABMBV_RE_ACCT_DATA_VARIANCE SYS_C0090709
ARBV_ADJUSTMENT_DISTRIBUTIONS SYS_C0062119
ARBV_ADJ_DISTS_ALT_CRNCY SYS_C00117692
ARBV_APPLICATION_DISTRIBUTIONS SYS_C00117685

Sending any ASCII code using DBMS_OUPUT in PL/SQL


dbms_output.put_line(chr(12)); = ASCII 12 for Form Feed

I run my PL/SQL through SQL*Plus but I dont see anything? Why ?

Before you Execute the PL/SQL do the following:

SQL> set serveroutput on


SQL> execute xxxxxxxxxxxxxx.xxxxxxxxxxx; dont forget the semicolon

How can I VIEW PL/SQL code


use the package body name as shown below and enter it when prompted.

CREATE OR REPLACE PACKAGE BODY apps_ar_forms_dup_trackcm AS

select line, text


from user_source
where upper(name) = upper('&PLSQL_NAME')
order by line

Also you can use TOAD

Click Database, then Schema Browser, wait a few minutes. Then click the PROCS tab

and look for your FUNCTION, PROCEDURE or PACKAGE. click here for a
screen print example

How can I date/time stamp the spool filename ?

copy and paste this and save it as a xxx.sql file into your "bin" directory

example: on Sep 16, 2004 at 2:17pm the filename will be: argp_inv0409161417.txt

Prompt ====================================
Prompt
Prompt Creating the SIMPLEX Invoice file
Prompt
Prompt ====================================
set serveroutput on format wrap
set linesize 150
column dt new_value _dt <--- date column to store yymmddhh value
for the filename
column txt new_value _txt <--- stores ".txt" for DOS file extension
select to_char(sysdate,'yymmddhh24mi') dt from dual; <--- stores
the system date/time into "date"
select to_char('.txt') txt from dual; <--- stores
".txt" into the txt field
spool argp_inv&_dt&_txt <--- opens
spool file with dynamic filename
execute apps.apps_ar_forms_dup_track.print_invoice;
SPOOL OFF
Prompt ====================================
Prompt Invoice file to be printed is completed
Prompt
Prompt The file is created and exists in your
Prompt bin directory
Prompt ====================================

SQL*Plus substitution variables (used to store database columns as variables in


SQL*Plus) ?

SQL> column colum_name new_value variable

Substitution Variable Namespace, Types, Formats and Limits


How to store database columns as variables in SQL*Plus
new_value in SQL*Plus

Useful web sites


The Best collections of Oracle related Links I have
found
• Atul Mehta's Oracle World
• Stewart McGlaughlin Oracle Links
• Great Oracle Sites to Visit orafaq.com
• OracleAdvice.com | SQL*Plus Tips | Oracle 9i | Oracle 10g | Oracle 10g
Documentation Library
• Rhubarb's Oracle Links (error codes, books, UTILITIES, code)
• Oracle Quick Reference
• Peter's Links
• Free Oracle Training and Tutorials
• Ask Tom
• Codebox: Wide assortment of SQL, PL/SQL
• Jeff Hunter's DBA/Development site (click ORACLE on LEFT)
• Akadia Info Technology
• Oracle FAQ ( scripts, vendors, etc)
• Assorted Scripts (advanced) & Vendors
• Oracle8i Server, Release 8.1.5 (HTML & PDF) Concepts, Administration,
Reference, Development
• Oracle9i Database Online Documentation (Release 2 (9.2))
• Oracle9i Database List of Books (Release 2 (9.2))
• Oracle10g Database Online Documentation 10g Release 1 (10.1)
• Oracle's Magazine
• OracleApps Blog
• http://searchoracle.techtarget.com/need membership

FAQ's, Tips, Directories, Glossary, Dictionary


FAQ's

Oracle Users' Co-Operative FAQ


Oracle tips Archive by Donald K. Burleson
CanadaNet411 Q&A Assorted Q&A
FAQ's (very good mix of SQL, PLSQL & Oracle
http://www.orafaq.com/faq2.htm
IXORA Q & A
http://www.orafaq.com/faqwinnt.htm FAQ for Oracle on Windows NT/2000 Oracle
FAQ
Oncall DBA (APPS & Concurrent)
Oracle DBA Tips Index
DBA Tips Corner | dbahelp | dbazine.com
SQL for Web Nerds by Philip Greenspun
Jonathan Gennick
http://www.adp-gmbh.ch/sitemap.html

Tips

Did you Know ?


Oracle Idiosyncrasies
http://www.uaex.edu/srea/ Stephen Rea's Oracle Tips, Tricks, and Scripts
Ken Atkins Oracle Tips
Oracle Tips from www.praetoriate.com
Oracle newsgroups (USENET)
Avisit Solutions Tips vi, rman, legato, unix, financials, init.ora
Akadia Information Technology Part 1 and Part 2
http://directory.google.com/Top/Computers/Software/Databases/Oracle/
Oracle SQL Tricks | http://www.oraclenotes.com/ | Cheat Sheet
SQL*Plus COPY Utility
Morgan's Library (Oracle 9.2/10.1 commands, syntax, reference, etc)

Glossaries

Oracle's Glossary | Bytelife Oracle Glossary | Digital Guru's Dictionary

Scripts, Links, Jobs, Search Engines and Commands


Oracle tips (forms & db) | Ari Kaplan's site & Oracle Tips | Oracle Links (jobs/search
engines, etc) | ORAFAQ Scripts | Oracle 8i 9i SQL Scripts and Database Commands |
Rhubarb's Oracle Links (has scripts) | Kevin Loney's Scripts | Magazines, PL/SQL,
Replication, DBA tasks | Oracle DBA Scripts and Tips | thescripts.com
assorted directories of scripts

Flying Sideways – Oracle Scripts/Views/Grants/SGA

Mailing Lists & Forums:


Mailing Lists: ittoolbox.com very good Mailing list also ITtoolbox Wiki |
Oraclemonster.com | OracleFans Forums | Oracle-L@FreeLists.org | lazydba.com mailing
list | rchath.com mailing list | freelists.org
Forums: http://www.tek-tips.com/gthreadminder.cfm/lev2/4/lev3/27/pid/18 | Throne
Software Message Boards | DBFORUMS | Oracle Database, Tools & MarketPlace
(MCSE.MS) | Google's Directory | Yahoo's Directory | OTN: Forums Home » Oracle
Technology Network (OTN) » Products | Oraclenotes | UK Oracle User Group | List of
worldwide user groups | theoraclejobsite.com Special Interest Groups | Yahoo Directory:
Oracle Groups | webservertalk | WROX: Programmer to Programmer | QAIX | Oracle
Applications Users Group Public Sector Special Interest Group (OAUG Public Sector
SIG)

Oracle Newsgroups:
Oracle Newsgroups/USENET

link above lets you view, search and post these groups
Usenet
comp.databases.oracle comp.databases.oracle.marketplace
comp.databases.oracle.misc comp.databases.oracle.server.* (1)
comp.databases.oracle.tools.* (1)

PL SQL:
http://directory.google.com/Top/Computers/Programming/Languages/PL-SQL/

The Oracle PL/SQL CD Bookshelf

Steven Feuerstein Oracle PL/SQL CD Bookshelf (O'Reilly) Minmaxplsql list of


resources & 3rd party software | stevenfeuerstein.com | minmaxplsql.com (Blast Off
PL/SQL) | Steve's books on PL/SQL also Supplemental files (code) | |
http://www.oracleplsqlprogramming.com/

PL/SQL reference
Tucano's Introduction to Oracle PL/SQL Programming
PL NET (Open-source PL/SQL code library) SourceForge.Net
Oracle9i Application Developer's Guide - Fundamentals Release 2 (9.2) Part Number
A96590-01
Oracle8i Supplied PL/SQL Packages Reference
Oracle 101
CTA Program Database Application Development & Design Track - Columbia Univ.
courses & reference info !
Testing your PL/SQL by Ken Atkins
http://www.ilook.fsnet.co.uk/ora_sql/sqlmain2.htm
Oracle PL/SQL Tips, Tricks & Utils set of 28 PL/SQL codes
http://www.jusungyang.com/ORACLEfolder/PLSQL.html
PL/SQL Programming Examples (sending email, random number, clob, dbms_job)
Useful introduction to PL SQL
PL/SQL reference, help, & tutorial
PL SQL FAQ (Underground) | ORA FAQ
DMOZ open directory pl/sql
PL SQL Tutorial
PL/SQL users guide & ref ver 8.0
OraNails (tools, forms, reports, pl/sql
Useful PL/SQL sample code by ( keyword ) or by (description)
UltraEdit and TEXTPAD are good editors for PL/SQL especially for ASCII info
Books & code
PL SQL Message Forum or SQL & PL/SQL for Newbies
Oracle PL/SQL Interactive Workbook, 2/e
Error Handling
Oracle supplied Packages (DBMS_**,UTL_**, etc)
Good Intro & Tutorial
Errors & Error Handling
FAQ's (very good mix of SQL, PLSQL & Oracle
CLOB Example
Sending E-Mail in PL/SQL
Intro to DBMS_JOB
TEXT_IO code to write data to a flat file
ASK TOM: how to get around Dbms_output limitations
ASK TOM: dbms_output.enable does not work

Useful Links & Documents for Legacy Interfaces /


Extracts / Conversion
• IBMMAINFRAMES.com Online Discussion about IBM & UNISYS Mainframes
Forum Index
• Mainframe Resources
• Legacy Data Conversions With Simple Tools
• COBOL User Groups (COBUG) http://www.cobug.com/
• Mainframe FAQ's
• IBM's DFSORT feature to port packed signed ebcdic numeric data into ascii
format document I wrote for porting packed data easily (PDF document)
• http://www.theamericanprogrammer.com
• IBM Mainframe Discussion List IBM-MAIN@BAMA.UA.EDU
• TSO Intro
• COBOL/VSE Language Reference
• Vedit editor EBCDIC/ASCII conversion, large files, etc
• IBM Mainframe Datatypes: Mainframe Data (Field) Types | COBOL Comp-3,
also called Computational-3, Packed Decimal, or Packed |
• IBM Mainframe: MVS z/OS utility DFSORT R14 Application Programming
Guide | Ask Professor Sort | Smart DFSORT Tricks | OUTFIL Control Statements
(DFSORT) Useful for converting COMP-3 & Signed numerical data from
EBCDIC to ASCII see Table 38 Edit Mask Patters
• ASCII Software
• The COBOL Center infogoal.com
• COBOL Connection | Commonly Used Numeric Formats (COBOL)
• Encryption software
• Free Compilers
• From There to Here: Database Migration
• Inserting Data from Excel
• How Oracle Handles Numbers
• MVS Help for the Mainframe Programmer
• http://www.mainframemigration.org
• Cathy Cakebreads site (mostly Financials) | Tips on implementing and Quickstart
guide implementing Receivables
• Various tips for data conversion
• Handling Numbers
• TSO Introduction | TSO/ISPF Guide
• VENDORS: TAPECONVERSIONS.COM |
• SOFTWARE: EBCDIC to ASCII converter for Window (ZIP'd)

MVS

• http://www.ibmmainframes.com/ | IBM Mainframe reference info and Emulators |


IBM Mainframe Utilities, software & manuals |
• Mainframe Materials (especially Utilities IBM & 3rd party)

See on Metalink: 118366.1, 123512.1, 1072874.6, 181874.1, 118347.1, 140833.1, 6

Oracle Applications ( APPS 11i10 11i 11.5.X 11.5. 10.7


10.7 SC )
FND - Apps Foundation Level CM - Cash Management
GL - General Ledger INV - Inventory
AP - Accounts Payable OPM - Process Manufacturing
AR - Accounts Receivable BOM - Bill of Material
PO - Purchasing
Metalink: 1012626.102 ( GL to AR Mapping ) ; 1011799.6 ( GL to AP Mapping)

11.5.10 11i10 info, upgrades, etc


 Oracle Apps Tutorial Links
 11i10 New Features (PDF)
 COAUG Presentations look for 11.5.10 Version Update
 OracleGrapeVine.com Upgrade, Enchancements, Utility info
 Useful documents from Michigan Oracle Applications Users Group
 Presentations of Colorado Oracle Applications User Group has XML, Payables,
11.5.10
 Oracle Application Hints and Tips
 Oracle Application Tips 16 tips
 Oracle 11i Tutorial (solbourne)
 Home » Applications » Oracle E-Business Suite FORUM
 Oracle E-Business Suite 11.5.10 - Vision Instance
 Oracle Application Hints and Tips
 Appsking.com FAQ's
 Financials-Server.com
 5 Upgrade Pitfalls
 Upgrade of Oracle Applications
 Oracle ERP Release Strategy 11.5.9 & 11.5.10
 11i (11.5.10) Documentation Library (ORACLE)
 Unix & Oracle Weblog (11.5.10 maintenance pack)
 Oracle 11.5.10 Aligns Sales and Marketing, but Service Lags (by Gartner)
 Conversion Planning Guide
 Be sure to look on Metalink for NOTE: 182250.1 "Release 11i Related
Documentation"
 Adobe Output Pak for Oracle E-Business Suite
 Overview and tips for Oracle Financials 10.7 SC
 10.7 --> GOOGLE search on Oracle 10.7 SC migrations, etc

EXFORSYS Oracle Apps

ITTOOLBOX.COM the best one out there !!!!

Oracle APPS Blog - Financial Systems

Navigation Card for APPS (very good) MS WORD

Oracle Applications (AR/GR/AP/FND, etc)


Assorted FinApps SQL code by module
Oracle Application Hints and Tips
Oracle Financials group web site
Oracle Application Experts by Carol Francum
Oracle 11i documentation
DARC White Papers
DSP Global - Downloads (11i PDF's)
Oracle 11i newsletter by Solution Beacon
Free Release 11i Tools
Oracle Financials message board
OTN: Oracle Applications Documentation
Oracle Apps FAQ's
Most Popular Oracle Financials Articles
Cathy Cakebreads site (mostly Financials) | Tips on implementing and Quickstart guide
implementing Receivables
Allen-Sauer Printing bitmapped reports
Importing Journals
BOSS White Papers and Tips
COAUG Presentations (good collection!)
CUSTOM library
Harvard's Accounts Receivable | Harvard's General Ledger | Chart of Accounts | Assorted
AR, GL and financial documents
Interfaces (PDF)
Tuning & Optimizing (PDF)
Implementing Release 11
11i New Features (PDF)
Oracle Application Hints and Tips
UK Oracle User Group
AR Invoice Wizard EXCEL & API
FAQ's
Oracle's TCA Architecture (Party, Sites & Accounts)
Managing Concurrent Mgr (PDF) also see Oncall DBA

MULTI ORG
Release 11i Use of Multiple Organizations | DSP Global - Downloads 11i-Upgrades |
Multi-Org in Oracle APPS
Implementing HR after Financials | Multi-Org: Technical Perspective
SQL query to display Items in a multi-org setup | Foreign and Legacy Data

Form Customization / Custom.pll Library


Boss Corp. Custom Library Notes
Develop Custom Forms in Oracle Applications(tm) Release 11

Application Object Library (AOL)


Application Object Library
DBA Stuff
DBA Scripts
A guide to Oracle, Windows, Linux and OS X commands SS64
Scripts from Dennis
Datatypes (number, long, raw, date, etc)
Oracle Executables This table lists executable programs in $ORACLE_HOME/bin
How Oracle Stores Integers

Miscellaneous
PDF of flexfields and how they are stored and referenced A/R's Chart of accounts
Metalink Pocket Guide Oracle Supplied Packages (DBMS, UTL, etc)
Oracle Replication 8i
Oracle Utilities 8i
Oracle XML Publisher
Evergreen Database Technologies links
ASCII Chart or ASCII Chart 2
Frank-Peter Schultze Batch Bookmarks | Allenware.com Batch
XML FAQ
ORAFAQ (tools, glossary, scripts, books, links, tools)
How to send mail from Oracle Forms?
ORA errors codes - number related
Oracle Error Codes
Oracle Messages & Codes VERY GOOD
Oracle Syntax
Oracle Glossary
Oracle Security & Auditing
Oracle Database, SQL, Application, Programming Tips
Oracletuning.com
Good resorce on Discoverer
Good Course on Oracle
Oracle Report Notes
Bulletproofing, Backups, and Disaster Recovery Scenarios
Microsoft's Technet Script Center
Planet PDF

Windows, DOS, Batch, Command Shell, Scripting

Batfiles: The DOS batch file programming handbook & tutorial loaded with info and
samples !
windowsshellscripting.com | Tom Lavedas Bookmarks DOS, Scripting
NT/Win2k scripting
4DOS INFO | Shell Scripts on the PC | Garbo FTP archive
DOS Command line links | Microsoft & Windows Tips, Techniques, and Goodies
Microsoft Windows NT: Command Shell
Command shell overview

Email, SMTP

PL/SQL API Reference | an Oracle PL/SQL procedure to send an email with file
attachments | Emailing from Oracle | SEND MAIL THROUGH DATABASE BY
UTL_SMTP | Send Email by UTL_SMTP or | Send Email by UTL_SMTP

Visual Basic, VB, ODBC, Barcoding, Perl, Forms/Reports, OCI

• Open Database Connectivity - 'ODBC'


• JDBC/Oracle Tutorial 1 JDBC 1.0
• Oracle ODBC Class Module | VB Site Links ( VB Net, VB Thunder, Planet
Source Code
• DataDirect Connect for ODBC - Windows ODBC, UNIX ODBC, Linux ODBC,
Oracle ODBC, and DB2 ODBC
• http://www.perl.com/
• selection of Oracle, VBA and miscellaneous tips, tricks and hints
• Ericp Helps.com | Assorted Programming Links
• Computerhope.com
• Manuipulating Text (perl, sed, regular expressions, cgi
• IDAutomation (barcoding)
• ProgrammersHeaven.com
• CanadaNet411 Q&A Assorted Q&A
• Customizing Reports at Runtime
• Programmer's Guide to the Oracle Call Interface

Interview Q & A | Geekinterview.com


Descriptive FlexFields (DFF) Setup and Use Spring 1997 or DFF Setup & Use
Generating Sequence Numbers
Use of Sequences
Sequence Numbers (PDF)
Assorted Editors | Personally I suggest Textpad , especially for PL/SQL ouput
Useful info on Oracle History, SQL, PLSQL, etc
Integrigi's Security resources
Oracle Internationalization & Character Sets
dbms_metadata
How do I become a DBA ?
Date / Time Arithmetic with Oracle 9/10
Pro*COBOL Precompiler Programmer's Guide Release 8.1.5 A68023-01
Guide to File extensions (PDF) | File Extensions ( Windows OS2 Apple Unix
Oracle Reports Barcode FAQ & Tutorial
Oracle Reports Developer Release 6i
SQL
ORAFAQ SQL+
DEBUGGING APPLICATIONS WITH SQL*TRACE
SQL Character functions | SQL+: Converting Files | SQL online course/tutorial |
Subqueries | Handling Numbers ORA-XXXX errors assorted |
http://www.techonthenet.com/oracle/index.htm also pl/sql | SQL*Plus substution
variables

Assorted Code
Oracle PL/SQL Programming, 3rd Ed. Supplemental Files | | Oregon State Univ. (Forms,
| http://www.virtualschool4all.com/Oracle | App Development with Oracle (9i) | Oracle
101 | Oracle Forms 4.5/ 5.0/ 6.0/ 6i and 9i FAQ | CPSC 304 - Introduction to Relational
Databases | Exforsys Inc Free Training wide assortment besides Oracle stuff

Useful "WHITE" Papers


GOOGLE search

AOUG White Paper Links

District of Columbia Oracle Users Group - PAPERS


Useful documents from Michigan Oracle Applications Users Group | NorCal OAUG
Training Day 2004 Presentation Downloads | Orafaq links | TUSC Downloads | Wichita
Area OUG | BOSS Corportation | Australian Oracle User Group | | Oracle Development
Tools User Group | COAUG Presentations | NYOUG Presentations | Mid-West Oracle
Users Group papers | Integrigy Security Whitepapers | Quest Software's Document
Library | Univ Waterloo Financial Systems Upgrade Project (alot of 10.7, NCA, upgrade
docs) | Database Specialists | Useful Oracle Articles | Evergreen Database Technologies
White Papers & Presentations

Useful Consulting Web Sites and Training


Yahoo: Business to Business Directory | Assist | Akadia.com | Akadia publications
Dan Hotka | TUSC The Oracle Experts | Red Rock | Articles | Avisit Solutions Lts | Tips
& Tricks | COMP9311 Database Systems 04s2 | Ask Tom or Ask Tom | Oracle Reprorts -
Red Star Technologies | FINANCIALS-SERVER.COM | OUTERBAY APPLICATION
DATA MANAGEMENT archiving and other special software

Oracle Error Code prefixes and categories


ORA- Oracle RDBMS errors
DBA- SQL*DBA errors
LCC- Parameter parsing errors
IMP- Import errors
EXP- Export errors
PLS- PL/SQL errors
DBV- DB Verify errors
OBK- Oracle Backup / Restore Utility
RMAN- RMAN error messages
TNS- SQL*Net/Net8 errors
OSD- OSD level errors
SQL- SQLLIB runtime errors
FRM- Oracle Forms errors
REP- Oracle Reports errors
CDI- Oracle Case Dictionary errors
CGEN- Oracle Case Generator (Forms and Reports)
PCC- Precompiler errors
SQL*Loader- SQL*Loader errors

Training, Testing & Certification

Yahoo: Training | Learning Tree | Preparation for Certification | Raritan Valley Computer
Dept | OA Train – Oracle Applications | Self Test Software |
Computertrainingschools.com | Netstar | Object and Data Labs: Sysadmin | CMIS 565
Oracle Database Administration

Resumes & Interviewing

Assorted Resume samples


Geek Interview.COM
englishinterview.com

Various Installations with Oracle and/or Applications


(APPS)

Rockefeller Univ. Integrated Administrative Systems IAS | Oracle Navigation User Guide
– Rockefeller Univ
http://www.bc.pitt.edu/prism/
UAB Finance Manuals | UAB Oracle Accounting Applications
nbs.nih.gov | UAB.edu
stanford.edu | Oracle 11.5.9 upgrade | Resources / Learning Center
Ithaca
Harvard's ABLE | Harvard's 11i Navigation | Harvard's A/R | Harvard's General Ledger |
Chart of Accounts
Harvard's Financial & Reporting Applications | FAQ's A/R | Assorted AR, GL and
financial documents
Univ of Virginia | How Do I ? | Glossary
US Dept Transportation
Univ Waterloo Financial Systems Project
The University Computer Center (TUCC)
Government of Newfoundland and Labrador
Binghamton's Pegasus
Univ College London | User guides
Binghamton Training Library
University of Cambridge > University Offices > Finance Division > Finance Training
Good Reference & Training MANUALS

by George R. Lewycky
http://georgenet.net/
grlewycky@yahoo.com
(c) 2004,2006

También podría gustarte