How to copy one schema into another using SQL

Some times we don’t have the DBA access and need to copy data from one schema to another. You can perform that by executing migration SQL script in Oracle XE. Step 1. Generate migration script.

Step 2. Run Below script by updating Source and Target connection details

Step 3. Execute the script. and commit the changes. This will migrate data from one schema to another.

Application Performance Management Tools

Depending on which language/technology your application is built on, there are several tools you could use for this. To fully manage and monitor the performance of an application, it requires collecting and monitoring a lot of different types of data. Below are important components of a complete application performance management tool, Performance of each web requests or transactions Performance of each transactions Usage and performance of all application dependencies like databases, web services, caching etc. Detailed transaction traces Code level performance profiling Server metrics like CPU, memory etc. Support for custom applications metrics Application log data Application errors Real user monitoring etc.   New Relic New Relic products work together as a platform from which you can troubleshoot and monitor software performance from end to end. Its SaaS based tool and supports the various languages – .NET, Java, Ruby, Phython, Nodejs, Go, PHP etc. APM Agents collect application performance data Browser Agent collects… Read more“Application Performance Management Tools”

Defining Performance and Performance Tuning

Why is My Application slow? When we find that after an application is deployed, it is not performing as desired. In other words it’s not meeting non-functional requirements. This application now requires some fixes that may correct the problem. The process of refactoring an application to improve its performance is called tuning. Before tuning we should also know, what is the user expectation (Non-functional requirement)? How much user going to access the system as per NFR. What is required throughput or response time user is expecting etc. Dependency on third party application or software etc.   A definite improvement can be achieved if you do some tuning to your code. The Tuning Process may involve: Switching compilers, turning on optimizations using a different runtime VM, finding bottlenecks in the code or architecture that need some fixes. There are always some limitations to our system i.e. CPU speed and availability, Memory… Read more“Defining Performance and Performance Tuning”

Test Driven Development

 TDD is just about writing the test before the program. In other words, first think about “how to use” any component, why do we need this component or what’s it for?  And only then think “how to implement”. Hence we can say, it’s a testing techniques as well as design techniques. Below are the advantages of it, It results into components that are easy to test. It results into components that are easy to enhance and adapt. In the end, there is no code without a test. We can tell at any time, whether everything still works as it should, or what exactly does no longer work as it once did. Complex things won’t fear us, execute the test and get positive feedback. You can re-use the unit test in accessing the performance of your system early stage of software lifecycles. Why test first? The test is the executable specification…. Read more“Test Driven Development”

Creating First Parasoft Virtual Asset

Now we know Parasoft Virtualize concepts. Today we will experience the magic of virtualization by creating our first virtual asset and testing it. First of all create an empty project as follows: Open the pull-down menu for the New toolbar button (top left) then choose Project. Choose Virtualize –> Empty Project, and then click Next. Enter a name for the project, change the destination if needed and then click Finish. Adding a New .pva File to an Existing Project To add a new .pva file to an existing project. Do one of the following: Right click the project node, and select Add New> .pva File from the shortcut menu. Choose File > New > .pva File. In the New .pva File wizard that opens, select the project that you want to contain the .pva file, enter a name for the .pva file, and then click Next. This will create a… Read more“Creating First Parasoft Virtual Asset”

Getting started with Parasoft Virtualize

Exploring Parasoft Virtualize UI Parasoft Virualize is based on Eclipse Workbench. Prasoft has developed and integrated several  perspectives. For ex: The Virtualize Perspective The Event Details Perspective The Change Advisor Perspective Let’s explore each perspective. The Virtualize Perspective The Virtualize perspective, which is built into the Eclipse workbench, provides a set of capabilities designed to help you create and manage virtual assets and provisioning actions. You can open this perspective in any of the following ways: Click the Virtualize Perspective button in the shortcut bar (on the top right of the workbench). Click the Open Perspective button in the shortcut bar, choose Other, then choose Parasoft Virtualize in the Select Perspective dialog that opens. Choose Window> Open Perspective> Other, then choose Parasoft Virtualize in the Select Perspective dialog that opens. The Virtualize perspective provides special views you will use to when creating and managing virtual assets and provisioning actions. Virtualize… Read more“Getting started with Parasoft Virtualize”

Basic Java constructs

Java is a strongly typed language, which means that all variables must first be declared before they can be used. The basic form of variable declaration is “Variable Type followed by variable name”. For example “int myVar;” Doing so tells your program that the variable named “myVar” exists and holds numerical data[ i.e integer value]. A variable’s data type determines the values it may contain, plus the operations that may be performed on it. The data types are of two types. They are primitive data types and reference data types. Primitive Data Types are pre defined by the language and is named by a reserved keyword. Example: int, float etc. Reference Data types are often referred as non-primitive data types. Example: Objects and Arrays They are called as reference data types because they are handled “by reference” – in other words, the address of the object or array is stored in… Read more“Basic Java constructs”

New features of various java releases and their comparison

Java is the choice of many software developers for writing applications. It is a popular platform that provides API and runtime environment for scripting and running enterprise software, including network applications and web-services. Oracle claims that Java is running in 97% of enterprise computers. Each Java programmer must know about these new features. Types of Applications that Run on Java are below, Desktop GUI Applications Mobile Applications Embedded Systems Web Applications Web Servers and Application Servers Enterprise Applications Scientific Applications Below is the consolidated list of important new features added in various java releases.

Parasoft Virtualize Installation

You can download Virtualize CE or Enterprise edition from the Virtualize product page. For CE all it takes is supplying an active email address where the download link will be sent to. It’s quite a big download at 1.1 GB, but this has a reason: it includes the full version of Virtualize, SOAtest (the Parasoft functional testing solution) and Load Test. This means that when you decide to upgrade to the full version, all you need is another license. No reinstalling of software required. After downloading and installing the software, you can simply unlock the CE license through the Preferences menu by entering the email address you supplied to get a download link. That’s it. If want to go for enterprise edition and want to use Virtualize for bigger teams you will need to have Parasoft Environment Manager and License server as well. Installation on Windows machine To install: Run the… Read more“Parasoft Virtualize Installation”

Service Virtualization Tools

A couple of years ago, I took my first steps in the world of service virtualization when I took on a project where I developed stubs (virtual assets) to speed up the testing efforts and to enable automated testing for a telecommunications service provider. I started looking for the tools available in the industry. I found few Service Virtualization solutions from few leading companies like CA, HP, IBM. Here is the list of few leading Service Virtualization tools. CA Service Virtualization, formerly known as LISA CA Service Virtualization lets you virtualize software service behavior and model a virtual service to stand in for the actual service during development and testing. CA Service Virtualization, formerly known as LISA, captures and simulates the behavior, data and performance characteristics of complete composite application environments, making them available for development and test teams throughout the software lifecycle, for faster time-to-market with quality software functionality… Read more“Service Virtualization Tools”

Installing java SDK and writing first java program

Installing and using Java Install the java SDK from below location and follow the installation instructions, http://www.oracle.com/technetwork/java/javase/downloads/index.html Setting environment variable for Java Environmental variable is a variable that describes the operating environment of the process. Common environment variables describe the home directory, command search path etc. JAVA_HOME JAVA_HOME is a environment variable (in Unix terminologies), or a PATH variable (in Windows terminology) which contains the path of Java installation directory. On window operating system follow the below steps, 1.Right click My Computer and select Properties. 2. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located. or run the below from command prompt, Set JAVA_HOME = <jdk-install-dir> example, C:\Program Files\Java\jdk1.6.0_02. On Unix operating system run the below command, export JAVA_HOME=<jdk-install-dir> CLASSPATH Set PATH =%PATH%;%JAVA_HOME%\lib\tools.jar PATH Set PATH =%PATH%;%JAVA_HOME%\bin; Please note, changing the JAVA_HOME will reflect to path and class path… Read more“Installing java SDK and writing first java program”

Core Java Architecture and JVM

In this lesson, we are going to explain the core Java Architecture. Java Java was conceived by a team of engineers in Sun Microsystems in 1991 as a part of a research project, which was led by James Gosling and Patrick Naughton. It was initially called Oak but was renamed as Java in 1995. This is designed to be small, simple, and portable across platforms and operating systems, both at the source and at the binary level, which means that the same Java program can run on any machine. Features of Java Java is an Object Oriented Language. Object-Oriented design is a technique that helps the programmer visualize the program using real-life objects. Java is a Simple Language. The reason is, Certain complex features like operator overloading, multiple inheritance, pointers, explicit memory de allocation are not present in Java language. Using Java we can write Robust Programs. The Two main… Read more“Core Java Architecture and JVM”

Object oriented concepts used in Java

Java is an Object-Oriented Language hence before learning java let us understand the object oriented Concepts first. Object An object in the software world means a bundle of related variables and functions known as methods variables and functions known as methods. Software objects are often used to model real-world objects you find in everyday life. The real world objects and software objects share two characteristics : 1. State : condition of an item. 2. Behaviour : Observable effects of an operation or event including its results. State can be of two types : Active state which reflects the behaviour and Passive State refers to state which does not change which does not change. The behaviour of an object forms the interface to the external world. Class A class is a blueprint or prototype that defines the variables and the methods (or funtions) common to all objects of a certain kind. Constituents… Read more“Object oriented concepts used in Java”

Service Virtualization

What Is Service Virtualization? Service virtualization lets you create a simulated version of a service. The simulated version is referred to as a virtual service. The virtual service does not need to duplicate all the functionality of the actual service. Service virtualization is a method to emulate the behavior of specific components in heterogeneous component-based applications such as API-driven applications, cloud-based applications and service-oriented architectures. It is used to provide software development and testing teams access to dependent system components that are needed to exercise an application under test, but are unavailable or difficult to access for development and testing purposes. Service virtualization attempts to remove these test environment constraints by simulating the behavior of unavailable or difficult-to access dependencies, as depicted in below figure. This is done by modelling and deploying a so-called “virtual asset” that emulates those parts of the dependency’s behavior that are required to execute the desired… Read more“Service Virtualization”

VSAM FAQs

 VSAM FAQ  Q1. What are the types of VSAM datasets? A1. Entry sequenced datasets (ESDS), key sequenced datasets (KSDS) and relative record dataset (RRDS).   Q2. How are records stored in an ESDS, entry sequenced dataset? A2. They are stored without respect to the contents of the records and in the order in which they are included in the file.   Q3. What is a CI, control interval? A3. A control interval is the unit of information that VSAM transfers between virtual and auxiliary storage.   Q4. What are the distinctive features of a ksds, key sequenced dataset? A4. The index and the distributed free space.   Q5. What is a CA, control area? A5. A group of control intervals makes up a control area.   Q6. What is a sequence set? A6. This is the part of the index that points to the CA and CI of the record… Read more“VSAM FAQs”

Bug Life Cycle

Life cycle of Bug   Log new defect When tester logs any new bug the mandatory fields could be: Build version, Submit On, Product, Module, Severity, Synopsis and Description to Reproduce In above list you can add some optional fields if you are using manual Bug submission template: These Optional Fields are: Customer name, Browser, Operating system, File Attachments or screenshots. The following fields remain either specified or blank: If you have authority to add bug Status, Priority and ‘Assigned to’ fields them you can specify these fields. Otherwise Test manager will set status, Bug priority and assign the bug to respective module owner. Look at the following Bug life cycle: Ref: Bugzilla bug life cycle The figure is quite complicated but when you consider the significant steps in bug life cycle you will get quick idea of bug life. On successful logging the bug is reviewed by Development or Test manager. Test manager… Read more“Bug Life Cycle”

JCL FAQs

Here list of frequently asked questions about JCL. How many levels of nesting is allowed in PROCs? Ans: 15 If the “DISP=” keyword is not coded for an existing dataset, what default values will be used for “DISP=”? Ans: If the “DISP=” keyword is not coded ,then the DEFAULT Values are : DISP=(NEW,DELETE,DELETE) If the “DISP=” keyword is not coded for a new dataset, what default values will be used for “DISP=”? Ans: If the “DISP=” keyword is not coded ,then the DEFAULT Values are : DISP=(NEW,DELETE,DELETE) What does COND=ONLY mean? Ans: It means that job step will be executed only if previous steps abnormally terminate What does COND=EVEN mean? Ans: It means that job step will be executed even if one of the previous steps abnormally terminates Can you execute a PROC from another PROC? Ans: Yes. Only if cataloged in SYS1.PROCLIB. Upto 15 levels are allowed. Question: What… Read more“JCL FAQs”

How to integrate elastic search with spring boot application

We can use elastic search with spring boot application and for this below are the detailed steps which can be followed. (Please note there some compatibility issue with some version of elastic search hence choose the appropriate one as per your need, I have used the version 2.4.0 with my spring boot app version 1.4.0.RELEASE) 1. Download and unzip the elastic search from http://www.elastic.co/downloads/past-releases/elasticsearch-2-4-0 2. Open config file \elasticsearch-2.4.0\config\elasticsearch.yml and change the cluster name if needed, uncomment and add the value to property 3. Run the elastic search by clicking on batch file, \elasticsearch-2.4.0\bin\elasticsearch.bat (Here this is going to run the elastic search on separate server than your application i.e localhost:9300 ) 4. Add the below dependency to your spring application

5. Add the below properties to application.properties file

6. To enable the elastic search repository which will be used to save/generate/delete the search indexes while application does… Read more“How to integrate elastic search with spring boot application”

How to create custom page template in WordPress

Custom page template should be used when you want a different layout on any page. There can be multiple reasons for actual uses in your site created on wordpress. This is simple and can be done by following below steps , you just need simple knowledge about php, html and css. 1. Create template file, let us take the example of creating a template where we can display all the posts from a particular category. Also User should be able to navigate easily to each post of that category. a) Create a template file and add the below code,

b) Few things to note down which are following, i. Template name must be defined and same name will appear on page while choosing the template ii. Be cautious while writing the php code mixed with html code as these have different syntax iii. Above code is used to display… Read more“How to create custom page template in WordPress”

Email validator in java

You can use the below validator class for email address in your java projects,

Converting a number to english word in java

You can use the below java class to convert a number to english word,

How to sign SOAP request in Jmeter

In this post we will see how to test a SOAP web service in JMeter. Using JMeter, we can do both functional testing as well as load testing of a SOAP web services. As we know that web services are headless so, we can’t use the record and playback feature of JMeter to record the web service requests. Hence, we need to create the Sampler requests manually. In this tutorial, we will use the S”OAP/XML-RPC Request” sampler to create and send the SOAP request. SOAP/XML-RPC Request The SOAP/XML-RPC Request sampler is used to send a SOAP or an XML-RPC request to a webservice. This sampler creates an HTTP POST request(as SOAP is based POST method) with the request body specified in the “SOAP/XML-RPC Data” field. We can specify the SOAPAction in the SOAPAction field after checking the Send SOAPActioncheckbox. Steps to test a SOAP Web service using JMeter- Add a Thread… Read more“How to sign SOAP request in Jmeter”

How to write to local file system using a postman collection java script

Ensure that you have node and npm installed. Install newman with: npm install newman. Create a file with the following contents:

Here is another example:

How to get file name from HttpServletRequest

You can use the below java method which returns the file name from part private String getFileName(Part part) { for (String content : part.getHeader(“content-disposition”).split(“;”)) { if (content.trim().startsWith(“filename”)) { return content.substring(content.indexOf(‘=’) + 1).trim().replace(“\””, “”); } } return null; }

Recover oracle database from error ORA-00333

To restore the oracle from ORA-00333: redo log error , you need to follow the below steps, SQL> connect system Enter password: ERROR: ORA-01033: ORACLE initializatio Process ID: 0 Session ID: 0 Serial number: 0 ORA-00333: redo log read error block 767 count 7428 SQL>connect sys as sysdba password SQL> startup SQL>select l.status, member from v$logfile inner join v$log l using (group#); SQL>recover database using backup controlfile; Enter and provide the current file path – /oracle/fast_recovery_area/redo01.log SQL>alter database open resetlogs;

Integration of Rich File Manager with ckeditor

This article is helpful to those developers or programmers who are facing the issues with file upload functionality and are using the ckfinder a paid service. Rich file manager is open source and is free to use. You can follow the below steps to integrate this with ckeditor in your spring boot or java application. 1.Download the latest version of ckeditor  and rich file manager. Add the above downloaded files under resources folder of your project. Make sure to add ckeditor and RichFilemanager-master directories in parallel under resource folder. 2.Open the js file /Resources/ckeditor/config.js and add below lines, config.filebrowserImageBrowseUrl =’/RichFilemanager-master/index.html?filter=image’ (Note, we have added the filter Image to support the upload of images only moreover you can remove or modify the filter as per your need. 3. Enabling the java connector – We need to use the java connector to connect rich file manager with ckeditor. i) Modify the rich… Read more“Integration of Rich File Manager with ckeditor”