Sunday 4 May 2014

Deploying ADF application to Oracle cloud Part 2

This is second part of 3 part series. In the first part, I have covered prerequisites and setting up the environment.

Please find the link for Part 1 here.


In this part, I will be going to show you how move sample HR schema and corresponding data from local JDeveloper to oracle database cloud service.
The Database Cloud Service is built on Oracle Database technology, running on the Oracle Exdata Database Machine. I am pretty sure that you all are very eager to know more about Oracle Database Cloud service.
If you want learn more on Oracle Database service, please click here Oracle Database Cloud Service

As I mentioned in Part1 our sample application uses standard HR schema from Oracle XE. If you have already installed Oracle XE database schema in your local machine then well and good otherwise please do so at least now


Step1: Creating a Local Connection to the HR schema by using Database navigator

1        Open the Database navigator by navigating View -> Database -> Database Navigator














 2.2.  In the Database Navigator , right click on IDE Connection -> Create New connection
3.     In the create Database connection window provide the proper details

Click on Test Connection, if you received “Success” message you are good to go.

If you faced any issues please refer this Click here

 Just verify the required tables, for the sample application we need COUNTRIES, DEPARTMENTS, EMPLOYEES, JOBS, LOCATIONS, PS_TXN and REGIONS tables as shown below




Step2: You need to create a user in Oracle Database cloud service that JDeveloper can use to access the database service instance to read the database
1.     Sign in to your Oracle cloud account

The information about identity domain, username and password will be there in the mail sent by Oracle Cloud. 

2. From the platform service window, open database service console as shown below. 


    3.On the Oracle Application Express screen, select Administration > Manage Users and Groups


4 4.    On the Manage users and Groups click on create user button

5. In the Create user form, provide require details.  Please note down these details somewhere safely, since this information is required later.

After providing proper details in the Create user form, click on create user button

6.Take note of the URL in the browser window (up to and including "/apex"): we need this info in feature!



Step3: Creating Connection to the Oracle Database cloud service.

1.     Create cloud connection in the JDeveloper as shown below













     2. In the Cloud connection window, provide the required details. 











    In order to get SFTP details, open Database cloud service and scroll down. In the Additional information section you will find SFTP service detail






once done, click on the ok button. You will see a new cloud connection.





















Step4: Copying Database schema and Data to Oracle Database cloud service
Oracle Database cloud service provides a facility known as Database Cart.
Database Cart:  This act like a container to hold the definition of the content that will be loaded to your database cloud service.
You just need to drag and drop the tables from database to Database cart , you also have option to select only the table structure or both table structure and data while loading data from local SQL developer to Oracle Database Cloud service.
To configure Database Cart, Navigate Tools -> Preferences -> Database (expand Database) -> Utilities (expand utilities) -> Cart -> Cart Deploy, as shown below















Now Navigate, view -> Database -> Database Cart to open Database Cart window






Now, I want move both HR schema and corresponding data from my local SQL Developer to Oracle Database Cloud service. In order do that, select the tables and drag and drop them on to Database Cart as shown below.










Select the Data check box to include the data from the tables in the transfer.











Now click on cloud icon to deploy data and schema to Oracle Cloud service as shown below









Once you clicked on Cloud icon, the Deploy objects to Cloud window will open as shown below, Provide the proper details as required
























And then click on apply button .You will see the deploy operation progress as shown below












After the above dialog box closes, you will see your deployment file under your Deployments and Double click on that to see the status of the deployment. You may see the status listed as APPROVED. After a few seconds, double-click again to refresh the status. When the status changes to PROCESSED, the tables and their data were successfully moved to the cloud.













Just to verify, expand tables in your cloud server connection to see the newly imported tables and corresponding data.


















In order to verify your data also moved properly, you can login to database cloud service console and in the Oracle Application express window click on SQL workshop -> SQL Commands and in SQL prompt run your queries to verify the data



That’s it!  We have done with Part 2 as well.










No comments:

Post a Comment