Documentos de Académico
Documentos de Profesional
Documentos de Cultura
http://georgenet.net/oracle
http://groups.yahoo.com/group/OracleSharedInfo/
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
SQL*Loader
Look for sqlldr.exe (DOS program)
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
)
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
A: TEXT_IO can only be run in a PL/SQL script inside oracle FORMS only,
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.
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).
archiving technology
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
RapidClone
http://hk.emc.com/partnersalliances/pdfs/h883_interstitial.jsp
http://www.orafaq.com/howto/clone-db.txt
See
http://www.jusungyang.com/ORACLEfolder/Administration/DatabaseCloning.t
xt
Q: How can I clone (copy) a table without copying the data (just the
schema)?
OR
A: 1. SQL Loader
somewhere in your control file. You might want to re-type the lines
using NOTEPAD
LOAD DATA
INFILE 'C:\MY SQL\cust_apr30.txt' <- you might need to fully re-
type this line
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!!!!!
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.
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,
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
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
A: it is reserved for "future closed date" indicating the transaction is still open. see
NOTE: 1014791.102
also,
BANNER
----------------------------------------------------------------
Oracle8i Enterprise Edition Release 8.1.7.3.0 - Production
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:
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
This SQL lists the objects under owner APPS ( PKG, VIEW, etc)
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
select gl_date,count(gl_date)
from ra_cust_trx_line_gl_dist_All
where account_class = 'REV'
group by gl_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')
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
MAX(GL_DATE)
---------
31-MAR-05
VERSION
----------------------------------------
8.0.4.0.0
COMPATIBILITY
----------------------------------------
8.0.0
NAME
---------
ARGP
also you can use this:
SQL> select sys_context('USERENV','DB_NAME') AS instance from dual;
INSTANCE
---------------------------------------------------------------------
ARGP
VERSION MO MRC
------- -- ---
11.5.7 N N
AR_SERVER_PATCH_LEVEL
-----------------------------------------------------------------------
--
11i.AR.H
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 do I derive the user name from the 4-digit reference number ?
APP PATCH_LEVEL
-------------------------------------------------- ------------------
ABM 11i.ABM.F
AMV 11i.AMV.E
AR 11i.AR.H
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
PL/SQL
Question: How can I see my PL/SQL output ????
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
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
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;
insert into
select * from
SQL>
SQL> delete from temp_cust_int;
SQL> commit
2 ;
Commit complete.
COUNT(*)
---------
4227
COUNT(*)
---------
4255
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
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
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 ====================================
Tips
Glossaries
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/
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
MVS
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
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
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
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
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
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