Oracle PL/SQL best practice

Hello experts,
Is there any place I could find oracle PL/SQL best practice programming advice?  I got a requirement to write a small paper to help new people that come to work for us so I wanted to put some of best practices (or a set of standard tips) in that along with coding standards etc...
Best regards,
Igor

Hello,
my first links would be
Re: 10 database commandments
On Code Reviews and Standards
Beware: Any discussion about coding standards tends to get lenghty with flame wars about upper/lower/camelcase keywords, indent style etc :-)
As stated in the linked document: keep them simple.
Regards
Marcus
Best Practices
Doing SQL from PL/SQL: Best and Worst Practices
Naming and Coding Standards for SQL and PL/SQL
PL/SQL Coding Standards
Also related:
Performance question
Re: How to re-construct my cursor ?

Similar Messages

  • PL/SQL Best practice

    can any one provide me PL/SQL Best practice document link ?
    Thsnks...

    can any one provide me PL/SQL Best practice document link ?nice reading as well:
    Doing SQL from PL/SQL: Best and Worst Practices

  • Oracle 11g memory_target best practices

    Hi expert.
    I'll use memory_target in my oracle 11g enviroment. There is a best practices, or formula, for to choose my memory_target?
    There is a memory_target limit? (for example 128gb)
    Many thanks

    Thanks for the replies.
    I could like know if there are some criteria, or formula, to a correct memory_target set.
    I'm reading the file OracleOLTPonDellEqualLogicPS60x0.pdf
    >
    http://www.google.com/url?sa=t&source=web&cd=1&ved=0CBQQFjAA&url=http%3A%2F%2Fwww.delltechcenter.com%2Fpage%2FSizing%2Band%2BBest%2BPractices%2Bfor%2BOracle%2B11g%2BOLTP%2Bon%2BEqualLogic&rct=j&q=OracleOLTPonDellEqualLogicPS60x0.pdf&ei=7av3TPP_J4yb4Ab_7pnzBg&usg=AFQjCNF9PfDrIP-VkYq_v3qPx03UAdkF9Q&sig2=pAF4A7E-S_FJkQ8jxsiWmw&cad=rja
    >
    that explain the best practices for an Oracle RAC 11g on Dell Server. About the Tuning Parameter I don't undestand very well what's the criteria for to choose the MEMORY_TARGET between 32,40 or 48GB
    Maybe choose what's the correct memory value for my server? I've an machine with X gb of RAM that I can allocate for an oracle istance. There is a fisical limit MEMORY_TARGET?
    Thanks for all suggest.
    Cheers,
    Lain

  • Oracle RAC /apps best practice

    New to RAC and trying to set up the filesystems according to best practice. For the /apps mountpoint (for oracle binaries etc.) we have made it seperate to each server, with the thought that 'rolling' oracle upgrades could be done rather than a shared storage to all servers in the cluster. Unfortunately by having it on the SAN it causes configuration issues when then presenting shared storage for data to the cluster.
    Do most (best practice) RAC clusters have local (on board) storage for the /apps oracle binaries rather than SAN presented storage?
    Thanks.

    Hi Linux-Newbie
    I would advice you to control on the best place the IBM rebooks : http://www-111.ibm.com/search/SupportSearchWeb/SupportSearch?action=search&pageCode=SPS&productKey=&clearAll=false&brand=&os=&searchTerms=RAC+best+practice&searchLimits=DA410%2BDA430%2BDA440%2BD600%2BD700%2BDB510%2BDB520%2BD800%2BDB540%2BDB560%2BDB530&searchLimits=DA410%2BDA430%2BDA440%2BDA420%2BDA460%2BDA470%2BDA480%2BDB100%2BDA4A10%2BDA4A20%2BDA4A30%2BDA400%2BDA500%2BDB700%2BDB600&searchLimits=DB550%2BD100&sortBy=1&docCount=0&submit.x=0&submit.y=0&submit=submit
    Or
    http://www.oracle.com/technology/products/database/clustering/index.html

  • Oracle BPEL standard, best practice and naming convention

    Hi, folks,
    Is there any standard or best practice associated with Oracle BPEL, regarding development, performace, what to avoid, etc? And is there any naming convention for the process, variable partner link name, etc? Similar to naming convention in writing Java code?
    Thanks
    John

    Hi,
    Here is the best practice guide:
    http://download.oracle.com/technology/tech/soa/soa_best_practices_1013x_drop3.pdf
    Thanks & Regards,
    Dharmendra
    http://soa-howto.blogspot.com

  • SQL Best Practices

    Hello,
            I'm planning to install a SQL server 2012 SP1 as a backend database for SCCM 2012 R2.
    Kindly suggest a best practice.

    Julie,
    Check this:
    http://www.sqlservercentral.com/blogs/basits-sql-server-tips/2012/06/23/sql-server-2012-installation-guide/
    http://www.sqlskills.com/blogs/glenn/the-accidental-dba-day-4-of-30-sql-server-installation-and-configuration-best-practices/
    http://www.brentozar.com/archive/2008/03/sql-server-2005-setup-checklist-part-1-before-the-install/
    http://technet.microsoft.com/en-us/sqlserver/bb671430.aspx
    http://forums.whirlpool.net.au/archive/2144288
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • In Oracle, which is best practice for 'NOT EQUAL TO'

    I need to check for where a decimal value is not zero.
    Am I better to use
    'less than symbol or greater than symbol' 0
    or
    != 0or does Oracle substitute 'less than symbol or greater than symbol' to != effectively ?
    In my mind if it doesn't the 'less than symbol or greater than symbol' would be slower because it has to check if the value is greater than OR less than.
    I appreciate != is not SQL-92 compliant.
    I appreciate it would be less than a nano second difference but they all add up!
    Thanks
    The 'less than symbol or greater than symbol' do not show it seems as they are used in HTML.
    Edited by: cubmar on Jun 5, 2009 11:16 AM
    Edited by: cubmar on Jun 5, 2009 11:21 AM

    Even though The CBO is cleverly written program it does makes its assumptions. When ever the Optimizer finds a NOT operator it assumes that is going to fetch a large portion of the data and goes for a FULL TABLE SCAN. INDEX SCAN Is not an option.
    And hence if you are not going to select a large portion of the data using NOT can be expensive.
    Below is an example.
    i have created a table which has one record with value as 1 and 99999 records with value as 0.
    SQL> create table t
      2  as
      3  select decode(level,1,1,0) no, rpad('*',100,'*') name
      4    from dual
      5  connect by level <= 100000
      6  /
    Table created.
    SQL> create index t_idx on t(no)
      2  /
    Index created.
    SQL> exec dbms_stats.gather_table_stats(user,'T',cascade=>true)
    PL/SQL procedure successfully completed.so when i use the condition no != 0 i am gong to select only 1 record. So i expect the optimizer to go for a INDEX RANGE SCAN but see what happens.
    SQL> explain plan
      2  for
      3  select * from t where no != 0
      4  /
    Explained.
    SQL> select * from table(dbms_xplan.display)
      2  /
    PLAN_TABLE_OUTPUT
    Plan hash value: 1601196873
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |   103 |   345   (2)| 00:00:05 |
    |*  1 |  TABLE ACCESS FULL| T    |     1 |   103 |   345   (2)| 00:00:05 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - filter("NO"<>0)
    13 rows selected.But with the use of < or > you can go for a INDEX RANGE SCAN.
    SQL> explain plan
      2  for
      3  select * from t where no >0 or no <0
      4  /
    Explained.
    SQL> select * from table(dbms_xplan.display)
      2  /
    PLAN_TABLE_OUTPUT
    Plan hash value: 4259936809
    | Id  | Operation                    | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |       |     2 |   206 |     6   (0)| 00:00:01 |
    |   1 |  CONCATENATION               |       |       |       |            |          |
    |   2 |   TABLE ACCESS BY INDEX ROWID| T     |     1 |   103 |     3   (0)| 00:00:01 |
    |*  3 |    INDEX RANGE SCAN          | T_IDX |     1 |       |     2   (0)| 00:00:01 |
    |   4 |   TABLE ACCESS BY INDEX ROWID| T     |     1 |   103 |     3   (0)| 00:00:01 |
    |*  5 |    INDEX RANGE SCAN          | T_IDX |     1 |       |     2   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
       3 - access("NO"<0)
       5 - access("NO">0)
           filter(LNNVL("NO"<0))
    19 rows selected.So you must be cautious when you use NOT operator.

  • Best practice documentation of application

    Hello listers, I need to come up with a proposal for a standard on how we want (to force) our developers to document there code and all the neat stuff there are building. Is there a best practice for Oracle and if so can some direct me to the URL. Thanks Ronald

    Hi,
    There are a lot of such links available in the oracle site. Some of them are
    http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a76992/sql.htm
    http://otn.oracle.com/tech/pl_sql/content.html
    You can search for more in the oracle site for "Best Practices" or "Coding Standards". You can also search in
    "www.google.com" for external articles.
    Thanks,
    Sharmila

  • Best practice-naming standards

    Where can I locate information as to Oracle Inc recommended best practices specifically addressing field, table, schema naming?
    Thanks for your response.
    Rob

    Disciplined PL/SQL [01-Nov-2003]
    by Steven Feuerstein
    Four simple guidelines for improving the quantity and quality of PL/SQL code you write
    http://otn.oracle.com/oramag/oracle/03-nov/o63tech_plsql.html
    Joel P�rez

  • Best Practice for migration to Exadata2

    Hi Guru,
    I'm thinking to migrate an Oracle RAC 11g (11.2.0.2) on HP/UX Itanium cluster machine to a New Exadata 2 System
    Are there best practice? Where can I found documentation about migration?
    Thanks very much
    Regards
    Gio
    Edited by: ggiulian on 18-ago-2011 7.39

    There are several docs available on MOS
    HP Oracle Exadata Migration Best Practices [ID 760390.1]
    Oracle Exadata Best Practices [ID 757552.1]
    Oracle Sun Database Machine X2-2/X2-8 Migration Best Practices [ID 1312308.1]
    If you already have Exadata, I recommend to open an SR with Oracle and engage with ACS.
    - Wilson
    www.michaelwilsondba.info

  • Great new resources on OTN: best practices and OPM project polishing tips

    Two great new resources are now available on OTN.
    Oracle Policy Modeling Best Practice Guide
    A clearly laid out paper that walks through a series of valuable recommendations. It will help you to design and model rules that maximize the advantages of using Oracle Policy Automation's unique natural language approach. Leverages more than 10 years of practical experience in designing and delivering enterprise policy models using OPA. Highly recommended reading for all skill levels.
    Tips for Polishing a Policy Modeling Project
    This presentation contains dozens of useful tips for delivering rich and natural-feeling interactive interviews and other decision-making experiences with OPA.
    See the links at the top of the New and Featured section on the OPA overview tab, and also at the top of the Learn more section.
    http://www.oracle.com/technetwork/apps-tech/policy-automation/overview/index.html
    Jasmine Lee has digested much of her 10 years experience into these fantastically useful new materials - and they're free!
    Davin Fifield

    Thanks Davin to posted this info!
    Thanks Jasmine these material very nice.

  • Workflow setup:Best Practices

    Hi All,
    Could anyone please share knowledge related to Oracle Workflow setup:Best Practices.What all are the high level steps?
    I am looking from embedded workflow setup for R11 or R12.
    Thanks for your time!
    Regards,

    This is a very broad question - narrowing it to specifics might help folks respond better.
    There are a lot of documents on MOS that refer to best practices from a technology stack perspective.
    Oracle Workflow Best Practices Release 12 and Release 11i          (Doc ID 453137.1)
    As far as functional practices are concerned, these may vary from module to module, as functionality and workflow implementation vary from module to module.
    FAQ: Best Practices For Custom Order Entry Workflow Design          (Doc ID 402144.1)
    HTH
    Srini

  • Essbase unix file system best practice

    Is there such thing in essbase as storing files in different file system to avoid i/o contention? Like for example in Oracle, it is best practice to store index files and data files indifferent location to avoid i/o contention. If everything in essbase server is stored under one file directory structure as it is now, then the unix team is afraid that there may run into performance issue. Can you please share your thought?
    Thanks

    In an environment with many users (200+) or those with planning apps where users can run large long-running rules I would recommend you separate the application on separate volume groups if possible, each volume group having multiple spindles available.
    The alternative to planning for load up front would be to analyze the load during peak times -- although I've had mixed results in getting the server/disk SME's to assist in these kind of efforts.
    Some more advanced things to worry about is on journaling filesystems where they share a common cache for all disks within a VG.
    Regards,
    -John

  • Soa 11g best practices

    Is there some Oracle doc describing best practices for SOA Suite 11g
    Thanks - casey

    THANKS - looks like a great series of articles.
    Am also looking for a document that specifically address Best Practices for 11g SOA in the same vein as for 10g.
    Thanks - Casey

  • Best Practice to fetch SQL Server data and Insert into Oracle Tables

    Hello,
    I want to read sqlserver data everry half an hour and write into oracle tables ( in two different databases). What is the best practice for doing this?
    We do not have any database dblinks from oracle to sqlserver and vice versa.
    Any help is highly appreciable?
    Thanks

    Well, that's easy:
    use a TimerTask to do the following every half an hour:
    - open a connection to sql server
    - open two connections to the oracle databases
    - for each row you read from the sql server, do the inserts into the oracle databases
    - commit
    - close all connections

Maybe you are looking for

  • Double cd imported in reverse

    I've recently re-imported my CD collection into itunes on my MAC (had a Dell before). One particular double cd keeps getting imported in reverse, i.e. when I click on the songs and artists I'm seeing...that i know are on cd 1...a completely different

  • How do you restore IPhone to a backup other than the most recent.  Phone crashed, restore didn't work.

    My iPhone 4 crashed and I did a restore, but instead it set it up as a new install.  So when I went to do a restore, I still lost all my contacts and apps.  Need help restoring using a precious backup.

  • Which model should I buy?

    Hi, as a newcomer to this world,I have a "problem", which model I should take. I am not sure in selecting with or without 3G. I am almost sure that it will be a 32GB version, just to be sure it is in the middle. Or is it too much thos 32GB?. My idea

  • Planning level to be added in aggregation level

    Hi, Currently my aggregation level has the following elements: 1. Plant 2. Sales Group 3. Cutomer Now I need to change from Plant to Customer Plant. Following are my queries on the same: 1. Can I add customer plant in addition to plant in the aggrega

  • Data Transfer Object Class

    HI, i'm new with the web dynpro,  so i been told to use java web dynpro  using the Data Transfer Object, with a conection to Oracle. anybody has information about the web dynpro using Data Transfer Object. thanks in advance!!