Oracle Database Testing – This shall be one of the 3 parts of the Oracle Database testing series.
We will cover the following 3 parts in this database testing series:
#1) Introduction to Oracle Database Testing
#2) Testing the database with respect to Memory, Space, and CPU processing
#3) Oracle Real Database Application Testing
Bonus Part #4) How to Test and Validate Your Oracle Database Backup and Recovery?
Table of Contents:
Introduction to Oracle Database Testing
What is a Database
Also Read => All about Database Testing
A database is a collection of data structured methodically which helps manage, manipulate, and retrieve data as and when required.
A database is managed by making use of database software named the Database Management System (DBMS) which provides an interface for end users to access the data stored in the database. We access and manipulate this data by SQL statements (Structured Query Language) which were designed for this specific purpose.
For a layman who isn’t aware of the term “database” consider this – We have a desktop/laptop assuming most of us have Windows software installed on it, we open a Microsoft Excel sheet, store a couple of names and addresses of individuals, save and close it. Your desktop or laptop stores this data on their hard disk.
Next time we want to look up the address of a person whom we have on the Excel sheet, we open this Excel sheet and look it up. Consider this Excel sheet as the “database” and the Windows operating system as the “DBMS” software, which knows how to access and open the file so that the requested piece of information is available to us.
The DBMS software is much more complex, evolved, and integrated and performs various tasks and activities to ensure the smooth functioning of the database.
Why Oracle
Oracle is the corporation that has built the software to manage a database. Oracle database is one of the most sophisticated, robust, scalable, and secure databases available in the market due to the exquisite features all bundled and available to us.
Data in this database is termed relational because data is stored and sorted in tables and each of these tables has a relationship established among them. Hence, the name is called a Relational Database Management System (RDBMS).
Real example: Consider a class that comprises 50 students and each of them has a residential address, a class that they have opted for, and their phone numbers.
One table can group and store each student’s address, while another table can be used for phone numbers. If I have to query details of a particular student, I look up each of these tables and get the respective information since each of these tables seems “related”.
Managing data in Oracle is particularly favored because of the simplicity of managing and creating them. Since today’s competitive world demands uninterrupted availability, the Oracle database helps deliver it at lower costs.
You could skip the first two sections discussed above if you already have a faint idea about databases, relational models, and Oracle.
Now, Comes The Interesting Part!
Need to Test a Database
Data is one of the most integral constituents of an organization that is deemed extremely sensitive and we demand the database which manages them to make sure they are highly impregnable.
A Database can be considered as an application that runs among various other applications running on your server. The database has to be installed just like any other application and interacts with the hardware through the operations system (Windows, Unix) that runs on your server.
We have to make sure we get the optimal performance and benefits out of the Oracle database. The database will not manage itself and perform if you aren’t aware of its capability.
We have various methods to test a database in terms of load, stress, I/O, and performance.
The functioning of a database depends on several parameters, such as the memory, CPU processing speed, I/O subsystem, filesystem, hardware, and applications that connect to the database.
So, to make sure the database performs optimally and avoids the risk of instabilities, we need to make sure all the above parameters are well-tuned. Most importantly, be aware of your surroundings. The database in every organization is different – handled, managed, and backed up differently.
Telecom industry will want a database that is highly responsive and accurate since millions of users might make use of the database. A database for a chemical factory comparatively wouldn’t need such a highly responsive database, since they would focus mostly on reporting and retrieving data, as they would have much less traffic to handle.
Recommended Tool
#1) SolarWinds Database Performance Analyzer for Oracle
SolarWinds provides a Database Performance Analyzer for Oracle. It is a database monitoring solution for Oracle that will help you find out the root cause of poor performance. It can perform a blocking analysis.
Its anomaly detection is powered by Machine Learning. It supports real-time and historical monitoring. It has workload and index advisors. The solution can provide you with details about the wait times, plans, queries, resources, etc. for your Oracle database.
It can optimize all your production databases like Azure, Amazon AWS, etc. It can work with the cloud and on-premises databases. The solution will help you ensure the top performance for Oracle SE, EE, RAC, Exadata, E-Business, and PDBs.
How Do You Test Your Database?
We usually have the following environments in an organization:
- UAT (User Acceptance Testing)
- DEV (Development Environments)
- Pre-Prod or TEST environments
- Production
We usually perform testing on a considerable amount of data that we perceive to be eventually moved to production. This testing is performed in the pre-prod, test, or UAT environments.
Before deploying a production database, we need to validate the data to make sure that any adverse effects do not hamper production.
We need to test the database with a full workload, just as you expect it to be run against the production database. We also need to monitor it to ensure the operational and functional requirements are met. We need to test each of the SQL statements thoroughly before they are deployed in production.
Set a benchmark that you feel is acceptable. This again involves several cycles of testing. If any third-party applications might be part of the organizational infrastructure, make sure the third-party vendors are involved and get their feedback regarding the licensing and functioning of their application with the database.
If they have certain parameters that need to be set to handle a particular amount of workload, set them and make sure the organization and the vendor accept them.
If they have certain tools to test their application performance make sure they are validated since most databases, including Oracle, do not support third-party applications, and fixing an issue that creeps up after having the application deployed in production would be very tedious and could have a huge impact on the organization at which the database server resides.
Points to Consider for Testing Oracle DB:
- Consider several users.
- SQL statements that they might execute.
- The Memory used for each of the users for each of the statements.
- The number of transactions that a user would normally execute to retrieve the desired information from the database.
- Test if users are receiving the desired response from the database within the expected stipulated time.
#1) Memory Test
In terms of memory, it depends on the number of processes that are running in the database as the database system constitutes a user, server, and background process.
User processes are the processes that service users request from the application. Server processes interpret the request from the application users and process the SQL statements sent from the user.
Background processes help with the functioning of the database and perform various tasks during the life of the database. The advantage of Oracle is that a database can automatically manage the memory and it can tune it according to the load.
But, despite that, we need to make sure we have enough memory on the server and that a certain amount of memory is always dedicated to the Oracle database.
#2) Space Test
In terms of space, we need to consider the amount of data that would be worked on daily, weekly, monthly, and yearly and how much of it would you want to be stored permanently or for a longer period.
We should get this valuable piece of information from the Business intelligence who has designed the infrastructure. Another crucial piece of information is to know if we need to store unlimited amounts of data. Define “unlimited” should be your first question.
We can have terabytes of data stored as long as you have enough resources to support it. We would have to manage them with data requirements that have been ever-growing.
#3) Processing Test
In terms of Processing, how many CPU cores would we need? Remember, a core is a physical entity, and with the advent of CPU subsystem technology, we have various methods to employ and utilize multiple CPU cores and multiple threads per core.
Suppose you have 8 CPUs at your disposal. Are we sure we are utilizing all of them? Do we need 8 CPUs? Can we manage them with 4 or 6? Estimating several CPU cores you would require has become more and more imperative to understand processor requirements.
#4) Application Testing
In terms of Application testing, we need to understand the type of application – Is it a Pro*C, OCI, JDBC application.
The mechanism of connection depends on the type of client software used and connection pooling employed. An approximate number of processes and sessions are required to accommodate the users connecting to the database simultaneously.
For versions higher than Oracle 11g, we also have a very good feature called the Oracle Real Application testing with several enhancements that make use of SQL Performance Analyzer, Database replay, and Test Data management which helps you diagnose the changes to data and manage them. More details are on this in the next part of this series.
Conclusion
To conclude, we have dealt with the definition of a database, introduction to Oracle database, the need, and aspects of testing Oracle database.
In the next part of this series, we will delve deeper into each aspect of Oracle Database testing to ensure that we meet the broad requirements for the design and functioning of the database.
Till then put your all questions related to Oracle database testing, in the comments below.
About the author: This is a guest post by Suntrupth Yadav. He is an Oracle Certified Professional in 10g and 11g with over 8.5 years of total experience in the software industry. He is an expert in handling all kinds of Oracle database issues.
@ Anjali Mone – Yes, It would be covered in part 3 of the same series
@ Kal , @ Sajadh Singh – Thank you for your feedback.
@ sathishkumar BM – Please check part 3 of the same series. If you have any specific queries with respect to the DB testing, do let me know.
@ Laxmi – Thank you for your valuable feedback.
@ gaurav khurana – Did you have a chance to look at part 2 and 3 of this series?
Part 2 and 3 are available here:
https://www.softwaretestinghelp.com/testing-oracle-database-for-memory-space-and-cpu/
https://www.softwaretestinghelp.com/oracle-real-application-testing/
hi
Effective Information about Oracle Database Testing.
@ Laxmi – Thank you for your valuable feedback.
@ gaurav khurana – Did you have a chance to look at part 2 and 3 of this series?
Part 2 and 3 are available here:
https://www.softwaretestinghelp.com/testing-oracle-database-for-memory-space-and-cpu/
https://www.softwaretestinghelp.com/oracle-real-application-testing/
Regards,
Suntrupth
Example to understand “TEST HARNESS” :
If there is a unit A and Unit B that are to be integrated. Also, that Unit A sends data to Unit B or in other words, Unit A calls Unit B.
Unit A if 100% available and unit B is not, then the developer can write a piece of code that is limited in its capability ( what this means is the Unit B if it has 10 features, only 2 or 3 that are important for integration with A) will be developed and is used for integration. This is called a STUB.
The integration would now be: Unit A->Stub (substituting for B)
On the other hand, if Unit A is 0% available and Unit B is 100% available, the simulation or proxy has to be Unit A here. Therefore when a calling function is replaced by auxiliary code, then it is called the DRIVER.
The integration in this case would be: DRIVER (substituting for A) -> Unit B
The entire framework: The process of planning, creating and usage of stubs and/or drivers to carry out the integration testing is called the Test Harness.
Hi,
The post gave good knowledge on database testing . Could you please suggest a certification for SQL which suitable for testers .
Thank you .
I want to do global certification in Oracle Database Testing,could you guide me for this?
Thank you very much for the awesome post. It is very informative
Thanks for sharing. Are you going to cover Oracle Application Testing Suite as well?
It would have been better if we started this with a case study where side by side we are deploying each and every point which is said in the article
Thanks very useful post looking forward to next posts
@AmanKush Sharma – Can you please let me know how exactly it relates to the topic in hand?
Thank you for your post and its useful for me. We need real time Example for Oracle Database Testing.