Feed aggregator

Moved to a new blog

Vikas Jain - Mon, 2011-11-07 16:15
I've moved to a new blogging platform provided by my employer Intel at http://blogs.intel.com/cloud-access-security/
Hope, you will follow my posts there.

wish list for 12c

Nuno Souto - Sat, 2011-11-05 07:59
Back in 2008 my wish list included sparse object allocation (deferred allocation in Oracle's translation).  And bingo, I got it in 11gr2! It was almost as if someone came here for inspiration! Prior to that in my "No Moore" series I actually described the Exadata architecture, long before it became public. Not that such a thing would ever be acknowledged by Oracle, we know that!  After all, I Noonsnoreply@blogger.com9

datapump gives wrong privileges

Freek D’Hooge - Wed, 2011-11-02 13:58

When performing an export / import using datapump or with the legacy exp / imp utilities, a bug can cause wrong privileges to be granted to users.
The circumstances under which the bug occurs seems to be that a privilege is given on one user with grant option and on a second user (or role) without grant option and that the object must be a schema procedural object (job, program, schedule, …).

I could reproduce this issue on 10.2.0.4, 11.2.0.2 and 11.2.0.3, so changes are that all versions since 10.2 (or even 10.1) are affected.

SQL> @reproduce.sql
SQL> set feedback on
SQL> set linesize 120
SQL> set pages 9999
SQL> set trimspool on
SQL>
SQL> select
  2    banner
  3  from
  4    v$version
  5  ;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE    11.2.0.2.0      Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production

5 rows selected.

SQL>
SQL> drop user fdh cascade;

User dropped.

SQL> drop user grant_test_usr;
drop user grant_test_usr
          *
ERROR at line 1:
ORA-01918: user 'GRANT_TEST_USR' does not exist

SQL> drop user grant_test_usr2;
drop user grant_test_usr2
          *
ERROR at line 1:
ORA-01918: user 'GRANT_TEST_USR2' does not exist

SQL> drop role grant_test_role;
drop role grant_test_role
          *
ERROR at line 1:
ORA-01919: role 'GRANT_TEST_ROLE' does not exist

SQL>
SQL> select
  2    directory_path
  3  from
  4    dba_directories
  5  where
  6    directory_name = 'DATA_PUMP_DIR';

DIRECTORY_PATH
------------------------------------------------------------------------------------------------------------------------
/u01/oracle/oracle1/admin/gunnar/dpdump/

1 row selected.

SQL>
SQL> create user fdh
  2  identified by blabla
  3  default tablespace users
  4  quota unlimited on users
  5  /

User created.

SQL>
SQL> create user grant_test_usr
  2  identified by blabla
  3  default tablespace users
  4  quota unlimited on users
  5  /

User created.

SQL>
SQL> create role grant_test_role
  2  /

Role created.

SQL>
SQL> create user grant_test_usr2
  2  identified by blabla
  3  default tablespace users
  4  quota unlimited on users
  5  /

User created.

SQL>
SQL> BEGIN
  2    dbms_scheduler.create_job
  3      ( job_name          =>  'FDH.TEST',
  4        job_type          =>  'PLSQL_BLOCK',
  5        job_action        =>  'begin null; end;',
  6        repeat_interval   =>  'FREQ=DAILY; BYHOUR=5',
  7        end_date          =>  NULL,
  8        enabled           =>  FALSE,
  9        auto_drop         =>  FALSE
 10      );
 11
 12    commit;
 13  END;
 14  /

PL/SQL procedure successfully completed.

SQL>
SQL> create procedure
  2    fdh.procedure_test
  3  is
  4  begin
  5    null;
  6  end;
  7  /

Procedure created.

SQL>
SQL> grant alter on fdh.test to grant_test_usr with grant option;

Grant succeeded.

SQL> grant alter on fdh.test to grant_test_role;

Grant succeeded.

SQL> grant alter on fdh.test to grant_test_usr2;

Grant succeeded.

SQL>
SQL> grant debug on fdh.procedure_test to grant_test_usr with grant option;

Grant succeeded.

SQL> grant debug on fdh.procedure_test to grant_test_role;

Grant succeeded.

SQL> grant debug on fdh.procedure_test to grant_test_usr2;

Grant succeeded.

SQL>
SQL> select
  2    table_name, grantee, privilege, grantable
  3  from
  4    dba_tab_privs
  5  where
  6    owner = 'FDH'
  7    and table_name in
  8    ( 'TEST', 'PROCEDURE_TEST'
  9    )
 10  order by
 11    table_name, grantee, privilege, grantable;

TABLE_NAME                     GRANTEE                        PRIVILEGE                                GRA
------------------------------ ------------------------------ ---------------------------------------- ---
PROCEDURE_TEST                 GRANT_TEST_ROLE                DEBUG                                    NO
PROCEDURE_TEST                 GRANT_TEST_USR                 DEBUG                                    YES
PROCEDURE_TEST                 GRANT_TEST_USR2                DEBUG                                    NO
TEST                           GRANT_TEST_ROLE                ALTER                                    NO
TEST                           GRANT_TEST_USR                 ALTER                                    YES
TEST                           GRANT_TEST_USR2                ALTER                                    NO

6 rows selected.

SQL>
SQL> /* execute the following part on the os
SQL>    in the data_pump_dir directory
SQL>
SQL> expdp system schemas='FDH' dumpfile=grant_test.dmp
SQL> impdp system schemas='FDH' dumpfile=grant_test.dmp sqlfile=grant_test_dump.txt
SQL>
SQL> grep GRANT grant_test_dump.txt
SQL> */
SQL>
SQL>
SQL> !
[oracle1@elin ~]$ cd /u01/oracle/oracle1/admin/gunnar/dpdump/
[oracle1@elin dpdump]$ expdp system schemas='FDH' dumpfile=grant_test.dmp

Export: Release 11.2.0.2.0 - Production on Wed Nov 2 19:49:15 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
Password:

UDE-28002: operation generated ORACLE error 28002
ORA-28002: the password will expire within 6 days

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/******** schemas=FDH dumpfile=grant_test.dmp
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 0 KB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PROCEDURE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCOBJ
Processing object type SCHEMA_EXPORT/POST_SCHEMA/GRANT/PROCOBJ_GRANT
Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
  /u01/oracle/oracle1/admin/gunnar/dpdump/grant_test.dmp
Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at 19:49:49

[oracle1@elin dpdump]$ impdp system schemas='FDH' dumpfile=grant_test.dmp sqlfile=grant_test_dump.txt

Import: Release 11.2.0.2.0 - Production on Wed Nov 2 19:49:57 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
Password:

UDI-28002: operation generated ORACLE error 28002
ORA-28002: the password will expire within 6 days

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYSTEM"."SYS_SQL_FILE_SCHEMA_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_SQL_FILE_SCHEMA_01":  system/******** schemas=FDH dumpfile=grant_test.dmp sqlfile=grant_test_dump.txt
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PROCEDURE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCOBJ
Processing object type SCHEMA_EXPORT/POST_SCHEMA/GRANT/PROCOBJ_GRANT
Job "SYSTEM"."SYS_SQL_FILE_SCHEMA_01" successfully completed at 19:50:02

[oracle1@elin dpdump]$ grep GRANT grant_test_dump.txt
-- new object type path: SCHEMA_EXPORT/PROCEDURE/GRANT/OWNER_GRANT/OBJECT_GRANT
GRANT DEBUG ON "FDH"."PROCEDURE_TEST" TO "GRANT_TEST_USR" WITH GRANT OPTION;
GRANT DEBUG ON "FDH"."PROCEDURE_TEST" TO "GRANT_TEST_ROLE";
GRANT DEBUG ON "FDH"."PROCEDURE_TEST" TO "GRANT_TEST_USR2";
-- new object type path: SCHEMA_EXPORT/POST_SCHEMA/GRANT/PROCOBJ_GRANT
SYS.DBMS_UTILITY.EXEC_DDL_STATEMENT('GRANT ALTER ON "FDH"."TEST" TO "GRANT_TEST_USR" WITH GRANT OPTION');
SYS.DBMS_UTILITY.EXEC_DDL_STATEMENT('GRANT ALTER ON "FDH"."TEST" TO "GRANT_TEST_ROLE" WITH GRANT OPTION');
SYS.DBMS_UTILITY.EXEC_DDL_STATEMENT('GRANT ALTER ON "FDH"."TEST" TO "GRANT_TEST_USR2" WITH GRANT OPTION');

As you can see, all three grants on fdh.test are now including the “with grant option” clause, while only the grant to grant_test_usr should have been using the “with grant option”.
The privileges on the procedure are correct.
I have logged a case about this with Oracle, but no bug number is assigned at this moment


Categories: DBA Blogs

Is SQL*Plus Resumable?

Jeff Hunter - Wed, 2011-11-02 08:15
I am using resumable space for a lot of my operations. However, it seems as though the SQL*Plus copy command doesn't respect the resumable feature? Note, I am issuing an "alter session enable resumable timeout 14400" through a login trigger. I know this works because if I do the same type of operation through an INSERT/SELECT through a dblink, my session waits for more space to be added.

Oracle NoSQL Database Slides From HPTS

Charles Lamb - Wed, 2011-11-02 05:47

Here are my slides from my HPTS. There are some slides with performance figures starting at slide 28.


Tailoring Fusion CRM

Peter O'Brien - Tue, 2011-11-01 17:36
The journey for the Fusion CRM development team has been a long one. What a great feeling for all of us when Fusion Applications was officially released this year as Generally Available. During his keynote speech at this year's Oracle OpenWorld Steve Miranda reiterates that statement. Also during his session there were some great demonstrations of Fusion CRM. Anthony Lye demonstrated (about 25 minutes into the presentation) how the application can be extended at run time. Design time at run time features are made possible by a number of Fusion Middleware technologies including WebCenter and MDS (pdf 592kb). Extending the application, as Anthony Lye demonstrated, is one form of tailoring that can be performed with the out of the box application. Other forms of tailoring include personalisation and customisation (personalization and customization in the documentation). Both concepts are very similar in that changes to the application are persisted via MDS but they are differentiated by the scope of the change and for whom the change is made.

Available to all users.
Put simply, personalisation is a tailoring action performed by an end user for themselves to set their own preferences for how they work with the application. These changes can be to include dynamic content such as Business Intelligence reports or a syndication feed from an external source. The key point is that these are personal preferences explicitly specified by the user for the user by editing the page via the WebCenter Page Composer. A user can also perform implicit personalisation of the Fusion CRM application without ever touching Page Composer simply by hiding columns in a table, or rearranging their order relative to each other by dragging and dropping. These personal preferences are also reflected in the shared components across Fusion CRM including the Activities UI components for Notes, Interactions, Appointments and Tasks. Setting a preference for the display width of the comments column for Tasks in the Marketing application is reflected in Opportunity Management.

Only available to users with Administration privileges.In the context of Fusion CRM, customisation is a modification made by an administrator, or someone with the appropriate permissions, to the application for a set of users. This set, referred to as Customization Level, can be defined as all users for the installed application, internal users, external users or users with a particular set of roles. For the Partner Relationship Management functionality in Fusion CRM V1 the internal vs external layer was introduced so that a Channel Administrator could tailor how they wanted their partners (external users) to see the Fusion CRM screens. Both internal and external users are interacting with the same screen, but the external users may see a lot more branding and content more suitable for partners rather than employees.

From a development perspective, MDS terminology can make things a bit confusing because irrespective of the nature of change, MDS refers to it as a customisation. There are many cross platform components used in Fusion CRM that are individual products in themselves. Getting to grips with the terminology used by these different product teams and understanding the context has been a challenge, but really rewarding when you see the results.

Are you in Higher Education and use APEX?

David Peake - Wed, 2011-10-26 19:08

For some time I have been interested in furthering the use of Oracle Application Express in higher education.
There are a number of institutions currently using Application Express either as part of their curriculum or for internal use.
One of the big problems is knowing who else in higher education is using Oracle Application Express and SQL Developer.

Therefore to provide a forum for people to come together I have set up a LinkedIn Group: Oracle APEX Educators SIG
Please join this group as a way to communicate ideas, collateral and knowledge.

Cheers,
David

SQL Developer 3.0 Early Adopter Now Available

Sue Harper - Wed, 2011-10-26 09:23
On Tuesday 19th January, the SQL Developer team released a third early adopter for general use. This SQL Developer 3.0 EA3 now includes the full Data Modeler 3.0, which is also running in an early adopter cycle. The significance of this is that you can open and edit data models from within SQL Developer.  If you are not a modeler, then this extension should not be in your way, but if you like to move between the Data Modeler and SQL Developer and prefer to work with one tool, you can.

The best way to start, once you have started SQL Developer is File > Data Modeler. If you are familiar with the Data Modeler, then you'll recognize all the menu options there.  Create a new model based on a DDL file or a schema in the database, then select > Import >...
The browser menu is available under View > Data Modeler > Browser and if you want to change any preference settings, just select Tools > Preferences > Data Modeler!

If you have any feedback on the integrated offering, then post a message on the forums: SQL Developer Forum or the Data Modeler Forum.

SQL Developer Data Modeler 3.0 is Production

Sue Harper - Wed, 2011-10-26 09:22
I'm please to say that SQL Developer Data Modeler 3.0 is now production.  The latest release is now available for download from OTN. There are various demonstrations available for you to get to know the new features and remind yourselves of other features.

See the main SQL Developer Data Modeler page on OTN for download links, new feature pages and demonstrations.

See the Oracle Press Release for more.

Data Modeler: Working with Different Database Sites

Sue Harper - Wed, 2011-10-26 09:22
SQL Developer Data Modeler supports the option to create different implementations (physical DDL scripts) based on the same relational model (tables, columns and constraints).  The Data Modeler itself can be visualized as a model!  Your complete design can be made up of logical (ERD) models, relational, physical models and indeed datatype and process models. If we just think of the logical, relational and physical, then one logical model can be transformed or forward engineered into one or more relational models.  (i.e your entities can be transformed to tables) and then each of those relational models can have many physical models.

So you may, for example, do a generic logical model for an airline application, but transform it to a number of slightly different relational models (applying different transformation rules or perhaps different glossaries.  Now once you have that relational model set, you can have a number of different physical models. Often we have a test, development and production environment and want to have slightly different physical settings for these. We can do that in the physical model.

So let's assume you have the relational model all set.  Add new database sites using the Tools > RDBMS Site Administration as shown above. This invokes the RDBMS Site editor. Here you can add as many new sites as you need. They can be reused, so there is no need to be too specific, you only need to add new sites if you want more than one, say Oracle Database 11g, physical model in a design. In the next image we show that three additional sites have been added for the Oracle 11g Database.(click on any of the images to see them in full size)

Now return to the relational model and create the new physical models. To do this, expand the Relational model and select the Physical Model node.  Right-click for the context menu and select New. This allows you to choose the database site you wish to associate with the model. You can do this for each of you test, development and production sites.  In the image shown above right, there are 4 different physical models.

Once you have made the physical property updates for each physical database, you can start the DDL generation.  Ensure you select the correct Physical model from the database sites in the DDL File Editor dialog before you start the generation.

Cloning Sites
Now each of these sites will have all the relational detail from the diagram, so the tables, columns, constraints will all be the same. You've created the different sites, so that you can have different tablespaces and possibly user definitions, but chances are you'll want your sequences and PL/SQL code to be the same.  You can do this by adding that content to one of the physical models and then cloning the others from this. Select the new physical model and right-click, select Clone From.  You can now select the model you want to clone.

Dallas: OTN Developer Days and New Features

Sue Harper - Wed, 2011-10-26 09:22
Last week I was sitting cross legged on the floor with the children in a slum in Delhi teaching them English and learning a little Hindi, next week I'll be in Dallas, helping folk start up the latest Oracle Virtual Machine packed with new tutorials and software.  The only link between the two might be the fading henna tattoo, which the girls in the slum did on my arm! Maybe more, the children in the slums were enthusiastic and excited to learn and often at these Developer Days we find that too. Too often we don't get the opportunity of sitting down for a day and learning a whole lot of new stuff and an OTN Developer Day is a perfect opportunity for that. 

Take a look at the details, how to register and where it's being held in Dallas.  Kris and I will be there from the SQL Dev and Data Modeler teams, so come and see the new features and learn more!

New Events, Travel and Updates

Sue Harper - Wed, 2011-10-26 09:20
The product managers for the Oracle Database Development Tools have been involved in a number of events in the last few months and I have been on the road with them.  We cover different types of events; the larger Oracle events, our own training days and Oracle user groups. The audience differs at the events, but generally we try to tell attendees as much about our products that we can. Here's how the recent trip break down for me.

The first of the event types that we cover are the OTN Developer Days.  These are a single full day event and include an afternoon of hands on tutorials. My last blog entry was about the Developer Day we had in Dallas.  The team have done a few of these; Dallas was followed by one on Toronto and one in Chicago.  Our next Developer Day is in Warsaw Poland, June 15th. (Oracle Technology Network Developer Day) and offer 4 tracks for the hands on: Oracle APEX, Database (SQL Developer, Data Modeler, XML DB and TimesTen), .Net and Java. 


Another important Oracle event we support is Oracle OpenWorld, which last year had a develop-centric component called Oracle Develop.  We have just taken Oracle Develop to Moscow and Hyderbad.  The great thing about these events is that you get the hands on sessions and most popular talks from Oracle Develop in San Francisco.  So if you can't attend OpenWorld in October this year, then watch out for the spill-over events near you.


The user group events we support vary from product manager to product manager, as typically we are invited to talk at these.   I am UK based, so doing a few trips in Europe is a good option for me and this year I was able to attend the Norway Oracle User Group and Orcan, the user group in Sweden.  My last trip was to Cleveland Ohio!  I really like these users groups because the audience is either using the products we talk about or are looking for the features we have to offer.  This means the talk is useful for the attendees and worthwhile for me!


I've just added the ODTUG KScope 11 logo to my blog, as that's the next big user group I'm off to.  This is a great event to attend, there is lots of new news and useful information and lots of useful technical talks, presented by people using the products they talk about. If you can get across to the West Coast in June, that that's an event worth attending.

Expert PL/SQL Practices - Unit Testing

Sue Harper - Wed, 2011-10-26 09:20
I wrote SQL Developer 2.1 while the product was under development.  As with all features in products, there is no guarantee that a feature will make a release until production, so it can be a nerve wracking process, writing, while things change as you write.  The UI is often the most fluid and so screen shots and menus need to be done as close to the release of the product as possible.  If you write a book after production you don't have the same problem, you just have to face the fact that in the IT world that if you do that, chances are that as your book is published, another, later release of the product is also published! It's a game of catchup. Regrettably, one of the features that I think is a killer feature in SQL Developer did not make it into that book.  Unit Testing was still under development as I was writing the book and the time required between writing and production of the book and the product was too great a gap.

All is not lost!

I was recently invited to write a single chapter for "Expert PL/SQL Practices".  A collaboration is great, because you only need to focus on one chapter, it's also harder to do, because styles vary and each author may have a different audience in mind.  So who ultimately buys the book is up for grabs. My chapter in the book is very much in the same style of my SQL Developer 2.1 book, (because that's how I write) and covers PL/SQL Unit Testing.  The book is available from Apress or Amazon and should be on the shelves soon.

Book Review: Android Application Testing Guide (Deigo Torres Milano) by PACKT Publishing

Ittichai Chammavanijakul - Mon, 2011-10-24 10:39

Android Application Testing Guide book  (Diego Torres Milano) by Packt PublishingWhen I was offered to review this book, I was so excited. The topic is probably one of the least popular topics in the Android development circle based on the number of books written on Android. Most of the books in the market tend to cover solely on the area of actual development because it gives readers an instant gratification when creating something. However, it is unfortunate (but true) that the application testing might be something most developers least think about, or if they do, they not do it systematically. (I’m guilty of this as well.) I would like to expand my horizon by learning from the pros. That’s why I’m so excited for a chance to review this book.

The “Android Application Testing Guide” is a very practical book introducing available frameworks and most widely used tools & techniques to improve the qualify of the application by engaging in the quality control and testing throughout the development cycle (not just start testing at the end). This agile development concept called the Test Driven Development (TDD) relies on repeatable short cycle to trying to catch and take care of potential issues (i.e., bugs) as early as possible.

The first chapter explains what involves in the different stages of testing in the Android development including unit test, integration test, functional or acceptance test, system test, and performance test. It starts introducing the Android testing framework extending JUnit which provides the complete testing framework suitable for the end-to-end testing strategies.

The chapter 2 starts working on the actual testing using JUnit which is the default framework for Android testing project and is supported by Eclipse which it the most widely-used IDE for Android development. The chapter jumps right into the step-by-step on how to create the Android test project which is a separate from its development project being tested. The test project will have independent structure and a set of its own components. Having a separate project is the best practice because from the production build’s standpoint, testing codes will not be included in the actual build, thus it will be not be in the APK.

Chapter 3 dives into individual building block in the Android SDK tool.  This covers Assertions, TouchUtils class (to simulate the touch events), Mock objects (to simulate mock objects in order to isolate the tests), TestCase class, and Instrumentation. There is an extensive explanation of individual component accompanying by code samples.

Chapter 4 talks about the concept of Test Driven Development. Again, it is the strategy of performing tests along the development process – not at the end as in the traditional approach. This even includes writing test cases (and test codes) first right after studying the requirements, and then writing the actual codes to satisfy (having the “pass” results) the test cases. Author claims that this approach of creating test cases this early will ensure that tests will be performed instead of, if left until the end, it is highly possible that they would have been forgotten or ignored. I agree with the concept. But in reality this may not work with all types of the projects, and this is confirmed by author in a few paragraphs later to use your judgement and expertise in applying this approach to wherever suitable. The latter part of the chapter shows samples on how to apply the TDD in the step-by-step sample application and tests, which I found this makes the case very compelling.

Chapter 5 introduces the Android Virtual Device (AVD) which is the next best thing to the real devices. The obvious advantage of using AVD is ability to create different Android configurations to run tests. The Headless Emulator (no window displayed) is also mentioned here allowing the automated tests via command line with no windows. I really enjoy many samples of what you can do with command-lines especially when you can simulate different device’s conditions including network bandwidth throttling, or different locales, etc. Later in the chapter, it talks about the support of the Monkey application (you can read more about Monkey Theorem here) which allows random event generation. It also demos the server-client setup and test scripting with Monkneyrunner.

Chapter 6 talks about the Behavior Driven Development which, according to author, is considered the evolution of the Test Driven Development and a need of Acceptance Testing. In summary, the approach emphasizes not only to include the business or end users in testing, but also to use non-technical terms in the test cases that business or end users would understand. Personally I think the concept is too abstract than practical. However, the introduction of Fitnesse and Slim tools makes the point to see its usefulness especially the part of “Wiki”-style test cases and test result documentation.

Chapter 7 contains all practical real-world samples of the disciplines and techniques you can use in the different situations. This includes testings on activities and applications, databases and Content Providers, UIs, exceptions, parsers and memory leaks. Couple tools are introduced here including EasyMock which provides mock objects for interfaces, and Hamcrest which is a library of matcher objects for comparison.

Chapter 8 continues the introduction of Agile technique with Continuous integration. Similar to continuous testing, it is suggested that integration should be done frequently early in the process and in small steps. The most common practice, as stated by author, is to trigger the build process after every commit to the source code repository. The chapter goes in details how to setup the automate building process using ant, the version control repository using Git, the continuous integration with Hudson, and test result analysis using nbandroid-utils.

Chapter 9 discusses one of the most critical components in designing Android application which is performance. As we all know, with a device which has limited computing power and battery life, balancing between performance and effective use of resources is something developers should keep in mind when designing an Android application. The chapter again introduces us with a series of tools and techniques for performance testing. This includes using traditional LogCatlogging, extending Instrumentation, Traceview, dmtracedump, and Caliper microbenchmarks.

Chapter 10 – alternative testing tactic is not for the most Android developers as it involves building Android from source code. Again, more tools are introduced. Even though it is very technical, it is still a good read.

Summary:

I have to say that for a novice Android developer like I am, I learn a lot from reading the Android Application Testing Guide. Best-in-class testing techniques are covered in this book which are commonly practiced in the agile development. These include Test Driven Development, Behavior Driven Development, Continuous Integration, etc. They in generally oppose to the traditional approach of doing test and integration at the end of development cycle. However, as author states in the book, there is no silver bullets in software development – the suggested testing approaches might not apply to certain needs or projects. But I can see that for a large complex project, applying these methodologies and techniques will likely increase in the productivity and quality.

Numerous tools are introduced in this book. This may be one of the big issues for those who are less-advanced in Android development. Since there is no common repository of these tools, extended knowledge of a varieties of open-source tools, and ability to incorporate them with the development process are required. I wish that there would be consolidated repository for all testing tools or even better all required testing functionality would be built-in in the SDK. Well, before when that would happen, this Android Application Testing Guide book is probably one of a few reference books that has the complete collection of Android testing topics.

Disclosure: I received the Android Application Testing Guide e-book from Pubkt publishing with no charge. I’m not compensated for this book review. The content expressed in this post is personal opinion.

 

Categories: DBA Blogs

Oracle NoSQL Database Available for Download

Charles Lamb - Mon, 2011-10-24 02:45

Oracle NoSQL Database is available for download on OTN.

Press Release

Oracle NoSQL Database Indexing

Charles Lamb - Fri, 2011-10-21 02:56

Oracle NoSQL Database's simple K/V pair model utilizes a B+Tree on each node to index by the key of each record.  Is a Key-Value store useful with only primary key indexing?  Absolutely.

Consider:

  • Click stream logs - indexed by timestamp or ipaddr
  • User Profiles - indexed by UID
  • Sensor/Stats/Network capture - indexed by timestamp
  • Mobile device backup services - indexed by device id or user id
  • Personalization - index these by user id and then do further look-up within the user id by sub key as needed
  • Authentication services - indexed by user id

In an unstructured or semi-structured environment, primary-key indexing is very often sufficient.  Further, consider the case of Map/Reduce post-processing of NoSQL Database data in any of the above scenarios.  During the M/R steps, secondary indices, sometimes ad-hoc, are effectively generated on-the-fly.



Oracle Fusion Applications 101: Bye, Bye PL/SQL

Andries Hanekom - Wed, 2011-10-19 13:29
Starting to get hands on with Oracle Fusion Applications (OFA), one of the first clear indications that OFA is a completely different beast compared to Oracle EBS is by looking at the amount of PL/SQL packages used in EBS 12.1.3 compared to OFA 11.1.1.5.1:

-- Oracle EBS 12.1.3 --
SELECT COUNT(*)
FROM DBA_OBJECTS
WHERE OBJECT_TYPE = 'PACKAGE BODY'
and owner not in ('SYS','SYSTEM');

COUNT(*)              
----------------------
47929    

-- Oracle Fusion 11.1.1.5.1 --
SELECT COUNT(*)
FROM DBA_OBJECTS
WHERE OBJECT_TYPE = 'PACKAGE BODY'
AND OWNER NOT IN ('SYS','SYSTEM');

COUNT(*)              
----------------------
3677

In EBS 12.1.3 the majority of Business Logic was developed in PL/SQL, either in server side Packages or contained in Forms and Reports native PL/SQL. Since 11.5.10 and the introduction of OAF, allot of new Business Logic has been developed in JAVA, contained in BC4J Entity, View and Application Module objects. With Fusion Applications, the entire product is developed as a Java Enterprise Application.

As we can see from the amount of PL/SQL packages, only a small amount of business logic runs outside of JAVA, predominantly in PL/SQL for more data-intensive tasks.

#OracleFusionApplicationLesson 1 for Oracle EBS Developers: Get your JAVA on!

Oracle OEM 12c unzipping.....

Bas Klaassen - Mon, 2011-10-17 07:03
I decided to download the OEM12c software from Oracle to install the new OEM.After downloading the software, I had some trouble unzipping the two files.The files downloaded where :- em12_linux_x86_disk1of2.zip- em12_linux_x86_disk2of2.zipWhen unzipping the files, the following error occurred :[oracle@localhost software]$ unzip em12_linux_x86_disk2of2.zipArchive: em12_linux_x86_disk2of2.Bas Klaassenhttp://www.blogger.com/profile/04080547141637579116noreply@blogger.com8
Categories: APPS Blogs

OSB: AdminServer spinning 100% CPU

Marc Kelderman - Sat, 2011-10-15 13:37
Sometimes for no reason, or I did not find a reason..., the AdminServer is spinning into 100% CPU. Communication is impossible; deployment is failing or take a long time (hours...), Console will not start, etc.

The log files of the AdminServer will not give you a hint on this behavior. It will tell you that memory is reaching 100%:

AdminServer.log: reaching out of memory
Kill the AdminServer process and starting the AdminServer again, will not solve the issue. After a time the AdminServer is at 100% and communication is not possible.

A solution that worked for a short time was:
kill AdminServer process
delete all files and directories from the AdminServer:

cd $WLS_DOMAIN/servers/
cp -rv AdminServer/security .
rm -rf AdminServer/*
mv security AdminServer

Start the AdminServerThis solution resulted taht teh AdminServer was up and running, I could connect to the Service Bus console and the normal console. But when I started a deployment of new services, the AdminServer spinned into 100%.

After searching the log files and investigating why this suddenly happened, it did not occur on other environments, I did something radical. I removed all the OSB artifacts that were installed on the the AdminServer.

stop AdminServer
stop all the managed servers
cd $WLS_DOMAIN/osb
rm -rf * start AdminServerNow the AdminServer is up and running very quickly. Due to the fact there are now services deployed.
Start a deployment of services to the AdminSerer
After deployment, start all the managed services.This workarround works! The AdminServer is not spinning anymore, reacts fast on the consoles.




Pages

Subscribe to Oracle FAQ aggregator