Learning PL/SQL in Oracle 10G XE

Successfully installed Oracle 10G XE on my desktop. I'm a newbie Oracle user who wants to learn PL/SQL through Oracle 10G XE.
Is this possible? Hope you can give me tips and advice on how I would start with this?
Thanks!

Certainly possible. I would suggest you crack open the PL/SQL Users Guide. DO you have previous programming experience? If so, looks at the examples.

Similar Messages

  • Calling java from pl/sql in oracle 10g?its very urgent.

    Hi Friends,
    i hve simple java code:
    class Hell
    public static String Hello()
    return"hello world";
    & compile this code using javac & loaded Hell.class in to database using this command
    c:\>loadjava -user chandru/shekar@pulser c:\Hell.class
    & i wrote pl/sql like:
    CREATE OR REPLACE FUNCTION Hell RETURN String as language java name 'Hell.Hello() return java.lang.String';
    i will compile the code & run but at that time this error i am getting:
    ORA-29516: Aurora assertion failure: Assertion failure at eox.c:317
    Uncaught exception System error: java/lang/UnsupportedClassVersionError
    I am using oracle 10g.Plzzzzzzzzz help me.Its very important to for me.
    Is any path i hve to set for oracle 10g database.Plz any one help me.
    regards
    shekar

    Hello here is how I solved the problem
    Let us assume that i try to load the file Hello.Java into the user scott.
    public class Hello {
         public static String world() {
              return "hello world";
    1) Dropjava          
    You must drop the java class if you already have loaded the class onto the server.
    dropjava -u scott/tiger Hello.class
    2) load class on server and let the server compile the source code.
    It is necessary to compile the source code on the server when the server and the local machine have different Java versions. To check which Java version there is running on the client machine open a command prompt and write Java -version
    loadjava -user scott/tiger -resolve Hello.java
    3) Publish stored procedure      
    sqlplus scott/tiger@oracle
    CREATE OR REPLACE FUNCTION helloworld RETURN VARCHAR2 AS                LANGUAGE JAVA NAME 'Hello.world () return java.lang.String';
    4)Call stored procedure      
    VARIABLE myString VARCHAR2(20);
    CALL helloworld() INTO :myString;
    PRINT myString;
    RGDS
    Thomas Winterberg

  • SQL Query (Oracle 10g)

    Hi All,
    Please find the following requirement.
    Requirement -
    There are 2 standalone database named database A and
    database B used by 2 separate application. Database A
    has schema S1 and Database B has schema S2.
    Schema S1 has around 40 master tables which get updated
    very frequently. This 40 tables are also present in S2
    also.
    We want the both the 40 tables to be in sync every
    hourly or half any hour.
    eg. If records are added/updated deleted in S1.emp then
    same should be done in S2.emp and visa versa also.
    We dont want to use dblink,materialised views or
    scripts. Is there any feature in Oracle 10G like
    replication or Streams where in this can be done.
    Incase if are not able to replicate both ways then at
    least one way can we replicate ? like any records are
    added/updated deleted in S1.emp then same should be done
    in S2.emp and similarly in the other 39 tables.
    Thank you
    Message was edited by:
    User71408

    Can anyone provide a SQl query to create a
    schema/user named 'test' with username as 'system'
    and password as 'manager'system user is created during database creation, it's internal Oracle admin user that shouldn't be used as schema holder.
    In Oracle database, Oracle user is schema holder there's no seperate schema name to be defined other than username.

  • Migrating from SQL to Oracle 10g -- Oracle Migration Work Bench

    All
    I've come across this tool from Oracle for Migrating SQL and mySQL databases to Oracle 10g. But the procedure and documentation was not clear. I wanted to try this once and hence I am posting here.
    Could you please share your experiences if you have also tried this one already? All your inputs will be of great help in helping me understand this tool and its usage.
    Thank you.
    Regards!
    Sarat.

    Sarat Chandra C wrote:
    All
    I've come across this tool from Oracle for Migrating SQL and mySQL databases to Oracle 10g. But the procedure and documentation was not clear. I wanted to try this once and hence I am posting here.
    Could you please share your experiences if you have also tried this one already? All your inputs will be of great help in helping me understand this tool and its usage.
    Thank you.
    Regards!
    Sarat.Could you please share what specific questions you have? What points of the documentation you found "unclear"?

  • How to restore some *.sql in oracle 10g

    Hi someone gave me a cd with .sql backup and told me to restore it in oracle.
    Can someone tell me how to do it or some hints in the type of recovery I should use?
    Thanks

    mmm. not much detail in there. The .sql files are probably sqlplus scripts that at a guess create objects. If you're lucky they will also define the schema that they should be created in. The .zip file is probably a file of data either in some predefined format e.g. csv, in which case you can load it using sqlldr or it could be a big file of insert statements.
    My first steps would be -
    1/ find out which user the scripts are supposed to be run as.
    2/ read the .sql scripts to find out what they do and which order they should be run in
    3/ run the .sql scripts
    4/ look at the zipped file and work out how to load it.

  • SQL Loader Oracle 10g problem in upload date with time data -- Very urgent.

    Hi
    I am trying to upload data using SQL loader. There are three columns in the table
    defined as DATE. When I tried upload a data like this '2007-02-15 15:10:20', it is not loading time part. The date stored as 02/15/2008' only. There is not time on that. I tried with many different format nothing work. Can please help me ?
    I have also tried with to_date --> to_timestamp it did not work.
    The application is going to be in production, I cannot change DATE to TIME STAMP. This is very urgent.
    LASTWRITTEN "decode(:LASTWRITTEN,'null',Null, to_date(:LASTWRITTEN,'YYYY-MM-DD HH24:Mi:SS'))",
    CREATEDON "decode(:CREATEDON,'null',Null, to_date(:CREATEDON,'YYYY-MM-DD HH24:Mi:SS'))",
    LASTUPDATEDON(21) "decode(:LASTUPDATEDON,'null',Null, to_date(:LASTUPDATEDON(21),'DD/MM/YYYY HH24:MI:SS'))"

    Your problem is most likely in decode - the return type in your expression will be character based on first search value ('null'), so it will be implicitly converted to character and then again implicitly converted to date by loading into date column. At some of this conversions you probably are loosing your time part. You can try instead use cast:
    SQL> desc t
    Name                                      Null?    Type
    LASTWRITTEN                                        DATE
    CREATEDON                                          DATE
    LASTUPDATEDON                                      DATE
    SQL> select * from t;
    no rows selected
    SQL> !cat t.ctl
    LOAD DATA
    INFILE *
    INTO TABLE T
    TRUNCATE
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
    LASTWRITTEN
    "decode(:LASTWRITTEN,'null',cast(Null as date),
      to_date(:LASTWRITTEN,'YYYY-MM-DD HH24:MI:SS'))",
    CREATEDON
    "decode(:CREATEDON,'null',cast(Null as date),
      to_date(:CREATEDON,'YYYY-MM-DD HH24:MI:SS'))",
    LASTUPDATEDON
    "decode(:LASTUPDATEDON,'null',cast(Null as date),
      to_date(:LASTUPDATEDON,'DD/MM/YYYY HH24:MI:SS'))"
    BEGINDATA
    2007-02-15 15:10:20,null,null
    null,2007-02-15 15:10:20,null
    null,null,15/02/2007 15:10:20
    SQL> !sqlldr userid=scott/tiger control=t.ctl log=t.log
    SQL*Loader: Release 10.2.0.3.0 - Production on Fri Feb 29 00:20:07 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 3
    SQL> select * from t;
    LASTWRITTEN         CREATEDON           LASTUPDATEDON
    15.02.2007 15:10:20
                        15.02.2007 15:10:20
                                            15.02.2007 15:10:20Best regards
    Maxim

  • Write an UPdate statement using the logic used in PL/SQL block (oracle 10g)

    Hi All,
    I have written the following PL/SQL block. I want to write an UPDATE statement using the logic used in the following PL/SQL block. can any one please help me out in this regards.
    DECLARE
       v_hoov_fag   gor_gold_post.hoov_flg%TYPE;
       v_b49n          gor_gold_post.b49n%TYPE;
       CURSOR c
       IS
          SELECT bs_id, loyalty_date, loyalty_period, contract_date
            FROM gor_gold_post
           WHERE tariff_code IN (169, 135, 136);
    BEGIN
       FOR rec IN c
       LOOP
          IF    (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
                        - SYSDATE) < 304
             OR (    TRUNC (  ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
                            - SYSDATE
                           ) IS NULL
                 AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2
          THEN
             v_hoov_flg := 1;
          ELSE
             v_hoover_flag := 99;
          END IF;
          IF    (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
                        - SYSDATE) < 121.6
             OR (    TRUNC (  ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
                            - SYSDATE
                           ) IS NULL
                 AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2
          THEN
             v_b49n := 1;
          ELSE
             v_b49n := 99;
          END IF;
          UPDATE gor_gold_post
             SET hoov_flg = v_hoov_flg,
                 b49n = v_b49n
           WHERE bs_id = rec.bs_id AND tariff_code IN (169, 135, 136);
          COMMIT;
       END LOOP;
    END;Thank you,

    Using case statement.
    UPDATE gor_gold_post
       SET hoov_flag = CASE WHEN TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) < 304
                                   OR
                                   (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) IS NULL
                                AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2)
                           THEN 1
                           ELSE 99
                         END,
           b49n      = CASE WHEN TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) < 121.6
                             OR
                             (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) IS NULL
                                AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2)
                           THEN 1
                           ELSE 99
                         END
    WHERE tariff_code IN (169, 135, 136);Note: Code not tested.

  • Help Me: trigger a pl/sql in oracle 10g

    hi am the beginner in pl/sql..am having the problem in triggering a pl/sql...i cant explain the whole problem here...i explained it in the following link plz click to see my problem...
    Message was edited by:
    ana_oracle

    Only problems that can be explained in this forum will be answered.

  • PL/SQL New Features for Oracle 10g

    Hi,
    If anybody asks what are the new features in PL/SQL for Oracle 10g version, what would be the answer?
    Thanks,
    Mrinmoy

    user3001930 wrote:
    Hi,
    If anybody asks what are the new features in PL/SQL for Oracle 10g version, what would be the answer?
    Thanks,
    MrinmoyI would say: Who cares about 10g features nowadays. And they I would tell them about the new 11g features (that I remember).

  • How to Deploy Oracle 10g Express to JBOSS

    I am trying to learn JBOSS 4.03, Oracle 10g Express, & myEclipse 4.1.1 for a class project and get the following error when trying to deploy oracle to JBOSS.
    --- Packages waiting for a deployer ---
    org.jboss.deployment.DeploymentInfo@67e105b1 { url=file:/C:/Program Files/jboss-4.0.3SP1/server/default/deploy/oracle-ds.xml }
    deployer: null
    status: null
    state: INIT_WAITING_DEPLOYER
    watch: file:/C:/Program Files/jboss-4.0.3SP1/server/default/deploy/oracle-ds.xml
    altDD: null
    lastDeployed: 1142921147203
    lastModified: 1142921147203
    mbeans:
    --- Incompletely deployed packages ---
    org.jboss.deployment.DeploymentInfo@67e105b1 { url=file:/C:/Program Files/jboss-4.0.3SP1/server/default/deploy/oracle-ds.xml }
    deployer: null
    status: null
    state: INIT_WAITING_DEPLOYER
    watch: file:/C:/Program Files/jboss-4.0.3SP1/server/default/deploy/oracle-ds.xml
    altDD: null
    lastDeployed: 1142921147203
    lastModified: 1142921147203
    mbeans:
    Does anyone know of a good online tutorial for this or has anyone solved this problem? All I did was copy the oracle-ds.xml file from oracle into C:\Program Files\jboss-4.0.3SP1\server\default\deploy

    hi,
    Do this...
    Get  Current Config....
    sqlplus system@xe
    SQL*Plus: Release 10.1.0.2.0 - Production on Mi Jan 25 11:44:33 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Beta
    SQL> select dbms_xdb.gethttpport as "HTTP-Port"
    , dbms_xdb.getftpport as "FTP-Port" from dual;
    HTTP-Port FTP-Port
    8080 0
    Change Port HTTP and FTP.
    SQL> begin
    2 dbms_xdb.sethttpport('80');
    3 dbms_xdb.setftpport('2100');
    4 end;
    5 /
    PL/SQL procedure successfully completed.
    SQL> select dbms_xdb.gethttpport as "HTTP-Port"
    , dbms_xdb.getftpport as "FTP-Port" from dual;
    HTTP-Port FTP-Port
    80 2100
    Disable HTTP and FTP
    SQL> begin
    2 dbms_xdb.sethttpport('0');
    3 dbms_xdb.setftpport('0');
    4 end;
    5 /
    PL/SQL procedure successfully completed.
    SQL> -- get current status
    SQL> select dbms_xdb.gethttpport as "HTTP-Port"
    , dbms_xdb.getftpport as "FTP-Port" from dual;
    HTTP-Port FTP-Port
    0 0
    Regards,
    Levi Pereira

  • Recommened book for learning PL/SQL

    I've been trying to learn PL/SQL from Oracle's documentation, and I'm a bit tired of it.
    All the information is there, but you really need to scan back and forth to collect all the bits you need. It is rather difficult.
    Can you recommend a good book? I want to learn all the idea and concepts, not just the syntax. So please don't direct me to "Learn PL/SQL in 21 days".
    Thanks.

    It may be true that one can get away with documentation. However, it greatly depends on your background. If you learn language X, and this is your very first exposure to programming, you won't find documentation inspirational. You will suffer with badly chosen textbook too. As you progress, the matter of a good book becomes less and less important. You may find that for learning your second language you don't need a book, and this is especially true in the era of internet, when there is a great competition among web tutorials.
    My apology for not being specific, but the matter of finding a good book is easy -- you just go to amazon, find several with high ASR, and chose the one based upon readers reviews. You will unlikely to expect better feedback to your question here.

  • Returning Partial Resultsets - Oracle 10g

    Hi,
    Is there a way that i can issue a long-running SQL against Oracle 10g & attempt to cancel my query half-way through, but still be able to "get hold" of the "partial result set" queried till that point in time ?
    Thanks in advance.

    you can run query and cancel it as well.
    what do mean by partitial result set?
    --Girish                                                                                                                                                                                           

  • What will you do if any SQL is not working.in oracle 10g...apps 11.5.10.2

    What will you do if any SQL is not working. in oracle 10g....apps 11.5.10.2

    928714 wrote:
    yes sir.If you help me in answering my questions i wll be very thankful to you sir.
    tnx,I haven't a clue.
    As you have been advised in many of your posts, go study the documentation for whichever specific topic you are interested in.
    For me to answer your questions, I would need to go get that documentation.
    Then I would need to read that documentation.
    Then I would need to write a forum post that interprets what I think I learned from that documentation.
    It is so very much faster if YOU go do that instead of posting to a forum and expecting others to do it. You will remember what you study for a lot longer time if you teach yourself.

  • Oracle 10g - Introduction to SQL  course question

    Two years ago I completed the Oracle 9i - Introduction to SQL course. An complete the #1Z0-007 exam and pass with almost 100%.
    I notice that Oracle 10g - Introduction to SQL courses are now being offer. If I have already done the Oracle 9i course and have been using SQL for the pass two years. Is doing the Oracle 10g - Introduction to SQL worthwhile ?
    Will I learn anything new or is the course almost the same ?
    Thanks
    Brendon

    Brendon,
    Almost certainly not useful. I'd compare the contents of the course you did with the features that have been introduced into Oracle since the version that the course was based on, and try to find some material on these features.
    Cheerio,
    Colin

  • How do you compare Oracle 10G with SQL Server 2005?

    exept for performance and pricing...
    We haven't decide to upgrade SQL Server 2000 to SQL Server 2005 or buy more license for Oracle 10G...
    Any comments are welcome!

    OK I only came here because of APC's referral down the piece (I was curious where all the hits came from - cheers Andrew). Comments embedded anyway
    Thanks Gaff!
    * Staff Experience with product - how flexible is
    your staff?
    --Staff need to learn sth. new...:)That's a fair motivation if recruitment and retention of staff is an issue - if you want reliability giving business systems to people who don't know the tech is a rather foolish move.
    * Current product use Corporation/group - if you have
    15 SQL Server boxes and no Oracle, what is the
    impetus for change? Same if you have 15 Oracle boxes
    and no SQL Server ones.
    --80% SQL server and 20% Oracle. We are thinking to
    balance to 50%-50%.I'm curious as to the reasoning behind this? I don't really see what the benefit is.
    * Features - Do you want/need text handling
    capabilities? Data mining? Storage of non-text
    records? XML?
    --I think both of DB system can do these.They can
    * Scalability - Is one Windows box going to meet your
    needs or do you need to scale (now or eventually) to
    multiple boxes of multiple CPUs?
    --This is really a benefit feature of Oracle better
    than SQL Server.SQLServer scales - it just scales in a different way (federated databases vs RAC).
    Thank u for ur US$.02Are you evaluating the platform for an in-house development or a database neutral application - if the latter I'd be sorely tempted to find out what the development platform is or read the docs for clues. For example we are looking at a product that supports SQLServer,MSDE and Oracle. In the FAQ "how do I choose between SQLServer and MSDE?", if we do implement it will be on an MS platform.
    I consider this probably the most crucial factor since SQLServer and Oracle have different architectural features they tend to generate different development approaches - porting one to the other nearly always hurts the new platform. Plus if I need support I'd be hoping that I got a bug fix from a developer and not from a developer whose fix was then ported.
    The same applies to in-house dev obviously, but there at least you can hire people with the right skillset for the app development.
    Cheers
    Niall Litchfield
    Oracle DBA
    http://www.niall.litchfield.dial.pipex.com

Maybe you are looking for

  • IMac G5 "Off the Grid"

    I presume the guts of an iMac G5 all run on DC coverted via the power supply from AC. If so, where can I get a schematic of the power supply -- so that I might figure out how to feed the beast DC from an "off the grid" DC source (i.e., photovoltaic,

  • PPPoE: PADR size

    Hi. We have a problem with the connection of several CPEs (non-cisco). these CPEs sends a PADR with a size of 129 bytes, then our concentrator (7200) doesn't accept the connection: Jan  7 09:27:25.325: [818]PPPoE 397: Service request sent to SSS Jan

  • Can I replace a Homehub v1 with v1.5 ?

    Please forgive the simple question, I am of the non-computer generation. We have an original Homehub v1 that I believe is no longer 100%. The wireless signal keeps varying in strength and I have tried all the tricks. I have fitted Solwise home plugs

  • Why is my filter selection greyed out

    What cause the filters tap and everything under to be greyed out

  • Apple ID/iMessage won't activate

    I've been trying to activate iMessage for weeks on my new iPhone 5, I even installed iOs 7.0.3 which was supposed to fix iMessage problems and it still will not activate; whether I have full bars and Wi-fi or not. I did not have my number connected t