Posts

Showing posts from May, 2013

How to deploy multiple PLSQL files at once

Image
This article describes how to deploy multiple pl/sql files (.api, .sql, .etc) at once using command prompt. First of all you have to store names of the plsql fiels in a text file in below way and save it in the folder where your plsql files are saved. Then open the command prompt and  change directory path to where your plsql files and text file is saved. Then type below commands in the command prompt and press enter. sqlplus/nolog conn username/password@service_name Then write @ sign and drag and drop the text file to command prompt or type the path of the text file. Press enter button. Do not forget to type @ sign before the path of the text file. Now all oracle files included in text files are deployed in your oracle database at once. If there are any compile errors in your db files, those are shown in the command prompt clearly. If There are more db files, it is difficult to type all file names in the text file. So you can create a script for this. Ope...

Conditional Compilation in Oracle

What is Conditional Compilation? PL/SQL source code is compiled selectively based on the compiler directives. Therefore, in the compile time code can be different according to conditions. Why do we need Conditional Compilation? Using conditional compilation features, we can include version specific features to our PLSQL source code. Therefore, In any production environments which use different versions,  Code is compiled and application is running properly without any issue. Assume, in development environments, we have developed multiple components such as component A for finance, component B for manufacturing, and component C for Sales. Now if we call methods written in component B for packages in component C, there is no issue when compiling and running particular code since all the components are properly deployed in the development environment. But, assume one of our customers install only component C in production environment, now when compiling the codes it gives e...