Oracle SQL Interview Questions

1. What is Oracle SQL?

Oracle SQL (Structured Query Language) is the language used to interact with an Oracle database. It’s used to retrieve and manipulate data in the database.

2. What is the difference between SQL and Oracle SQL?

SQL is a standard language used for managing and manipulating relational databases, while Oracle SQL is the specific implementation of the SQL language used to interact with Oracle databases.

3. How can you sort data in Oracle SQL?

Data can be sorted in Oracle SQL using the ORDER BY clause in a SELECT statement. The ORDER BY clause specifies the column or columns that should be used to sort the data and the sort order (ascending or descending).

4. What is a constraint in Oracle SQL?

A constraint in Oracle SQL is a rule that restricts the data that can be stored in a table. Constraints can be used to enforce business rules and to maintain data integrity. Some common types of constraints include NOT NULL, UNIQUE, and FOREIGN KEY constraints.

5. What is a join in Oracle SQL?

A join in Oracle SQL is a way to combine rows from two or more tables based on a related column between them. There are several types of joins, including INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL OUTER JOIN.

6. What is the difference between INNER JOIN and OUTER JOIN in Oracle SQL?

An INNER JOIN returns only the rows that have matching values in both tables, while an OUTER JOIN returns all the rows from one table and the matching rows from the other table. There are three types of outer joins: LEFT JOIN, RIGHT JOIN, and FULL OUTER JOIN.

7. What is a subquery in Oracle SQL?

A subquery in Oracle SQL is a query nested inside another query. The inner query is executed first and its result is used by the outer query. Subqueries are used to return data that will be used in the main query as a condition to further restrict the data to be retrieved.

How to secure aapanel dashboard

How to secure aapanel dashboard

The simple but powerful control panel is aapanel and in this article will see how we can secure aapanel dashboard. Let’s get started..

Step 1:

Open the aapanel dashbaord and click on website and open the website you have created as shown below

aapanel dashboard

Step 2:

After that click on SSL and check if you have active SSL Certificate as shown below

ssl certificate

If you don’t have the SSL certificate for your website you can check this article how to add SSL certificate to your website.

Step 3:

If you have the active SSL Certificate then go to settings and click on Security and ON panel SSL and press set button as shown below

setting pannel

Step 4:

After pressing the set button SSL key dialog box appears as shown below.

ssl set

Compare both key and certificate with the step 2 key and certificate. These two should be same, if not copy the key and certificate from step 2 and paste it in this set SSL and press save.

Step 5:

After that we need to restart the panel/service. To restart the panel/service, open the terminal and type sudo -i to enter as a root user then type bt and select 1 to restart the pannel as shown below.

open terminal

Step 6:

Next, we need to check the connection. To do so open a new tab on the browser and enter the url as the below format.
www.example.com:7800/34dfgt5e
In this case
www.example.com is the domain name
7800 is the panel port number
34dfgt5e is the security enterence

You can find these details under settings tab as shown below.

port number

Now, your aapanel is secure. By this way you can secure aapanel.

Hope you find this article useful.

Copy of PLSQL DEVELOPER 1024 x 720 (3)

How to create SSL Certificate for website in aapanel

The simple but powerful control panel is aapanel and in this article will see how we can create SSL Certificate for our website in aapanel. Let’s get started..

Step 1:

First will create a website and then add SSL certificate. To create a website click on website and click Add site as shown below

site creation

Step 2:

We need to provide the Domain Name. In this case my domain name is “www.demo.com” you can provide your domain name. If you need FTP then select the FTP and click create. Afterthat we need a database, for that select database and select MySQL. Then note down the databse username and password which will be used later. Next select the latest PHP version and check the HTTP redirect to HTTPS as shown below and click submit.

Note: Here you can provide your custom username and password for database

site create
site creation

Once the creation is successful you will receive the successful message as shown below

successful site

Step 3:

Next select the website you have just created as below

site

Step 4:

Select SSL and then select Let’s Encrypt. Next choose File Verification and select, Select All then press Apply as shown below.

ssl

Once you pressed the Apply button it will ask you Apply or renew select Apply and open as shown below

Apply SSL

Step 5:

Once all done you will receive the below screen that all set the on that screen select Force HTTPS as shown below

Final

That’s all we have successfully created SSL Certificate for our website in aapanel

To secure your aapanel dashboard check this article How to secure aapanel dashboard

Hope you find this article useful.

CONNECT ORACLE ON TO PLSQL DEVELOPER

HOW TO CONNECT ORACLE ON TO PLSQL DEVELOPER

After starting PLSQL Developer for the first time you will be prompted to logon to connect Oracle database:

plsql developer login screen

If you cancel this logon dialog you will continue without an Oracle connection. This will disable all PLSQL Developer functions that require a connection, such as compiling, querying and so on. You can connect oracle from within the PL/SQL Developer IDE later to enable these functions.


After entering the username, password and database and pressing OK or <Enter>, you will be connected to the database and the PL/SQL Developer IDE will be displayed. You can now write PL/SQL Programs, Test PL/SQL Programs, query the database, and so on, as described in the following chapters.


If you have multiple databases or multiple database accounts, then you can make additional connections by using the Log on button on the Session ribbon. Each additional connection will be added to the Connection List, which can subsequently be used to view and manage your connections. When starting PL/SQL Developer again later you can quickly log on by selecting a connection from the Connection List.

Logon failure

The logon dialog can fail for the following reasons:


1. You do not have the Oracle Client software installed. This is a requirement for PL/SQL Developer.
Install an Oracle Client and try again.


2. You have more than one Oracle Client software installations. In this case PL/SQL Developer may
have chosen an Oracle Client that is not appropriate. Cancel the logon dialog, go to Configure >
Preferences > Oracle / Connection, select the appropriate Oracle Home from the list, restart
PL/SQL Developer and try again.


3. You are using an Oracle Instant Client but have not set all required environment variables:
• PATH – Needs to include the Instant Client directory (where oci.dll is located).
• TNS_ADMIN – Needs to point to the directory where tnsnames.ora is located.
• NLS_LANG – Defines the language, territory, and character set for the client.

To install Oracle 11gR2 64 bit file click here. or to download the setup click here

Steps to install Oracle 11gR2 the post will helpful for you.

To install SQL Developer click here

If you like this post then share your view in the comment box

install plsql developer

HOW TO INSTALL PLSQL DEVELOPER 15.0

PLSQL Developer 15.0 is available as a 32 bit and 64 bit version. The filename for the installation package of the 32 bit version is plsqldev<version>x32.msi. The filename for the installation package of the 64 bit version is plsqldev<version>x64.msi. You can perform an interactive or silent installation. Both installation methods are described below.

Table of Contents

System requirements

PL/SQL Developer 15.0 will run on Windows 2000 and later, and is compatible with Oracle Server version 7.0 and later. To connect to an Oracle database, PL/SQL Developer requires an Oracle Client version 7.0 or later installed on the PC. The 32 bit version of PL/SQL Developer requires a 32 bit Oracle Client. The 64 bit version of PLSQL Developer 15.0 requires a 64 bit Oracle Client.

Interactive installation

To install PL/SQL Developer interactively, double-click on the plsqldev<version>x32.msi file (32 bit) or plsqldev<version>x64.msi file (64 bit). Follow the on-screen instructions for installation.

Silent installation

For silent installation you can use the following MSI command:


msiexec /i <package>.msi /qn [<property>=”<value>”] [<property>=”<value>”] …


Note that this command has to be executed as administrator. You can provide the following installation properties:

PropertyMeaning
installpath=”<dir>”Installs PL/SQL Developer in the given directory path
productcode=”<code>”Provides the product code for registration
serialnumber=”<number>”Provides the serial number for registration
password=”<password>”Provides the registration passwor
activation commands

For successful registration you must supply the product code, serial number and password.


For example (on one line):


msiexec /i plsqldev1203x64.msi /qn
installpath=”C:\Program Files\PLS”
productcode=”ABCD – 1234 – EF”
serialnumber=”01.234567″
password=”secret”


This command installs the 64 bit version of PL/SQL Developer 12.0.3 in directory “C:\Program Files\PLS” and registers the license with the given license information.

Uninstalling PL/SQL Developer

If for some reason you wish to uninstall PL/SQL Developer, you can remove it using the “Programs and Features” option of the Windows Control Panel. For silent uninstallation you can use the following MSI command as administrator:


msiexec /x <package>.msi /qn

To install Oracle 11gR2 64 bit file click here. or to download the setup click here


Steps to install Oracle 11gR2 the post will helpful for you.

To install SQL Developer click here

If you like this post then share your view in the comment box

PLSQL DEVELOPER TOOL

PLSQL DEVELOPER TOOL INTRODUCTION

Introduction

PLSQL Developer is an Integrated Development Environment (IDE) for developing stored program
units in an Oracle Database. Using PLSQL Developer you can conveniently create the server-part of your client/server applications.


As a worst-case scenario, up to now you might have been working like this:
• You will use a text editor to write program units (procedures, triggers, etc.).
• If there is a compilation error, you have to find out where it is located in the source file, correct it,
switch back to SQL*Plus to recompile it, only to find the next error.
• You use SQL*Plus or the client-part of your application to compile the source files and to test the program unit.
• In case of a runtime error, again you have a hard time locating the cause of the problem and
correcting it.
• You use the Explain Plan utility or tkprof to optimize your SQL statements.
• To view or modify other objects and data in your database, you use SQL*Plus or yet another tool.
These tasks – editing, compiling, correcting, testing, debugging, optimizing and querying – can all be
performed without leaving PL/SQL Developer’s IDE. Furthermore, PL/SQL Developer provides several
other tools that can be helpful during every day PL/SQL development.

plsql features

Table of Contents

Editing

PL/SQL Developer, like any other serious development environment, assumes that you store your
source files on disk. Other tools just let you edit sources in the database, but this does not allow for any version control or deployment scheme. The source files can be run through SQL*Plus, so you can deploy them on any platform without using PL/SQL Developer. You can edit many files at once through a standard multiple document interface.

The editor offers a wide range of assistance to the programmer. There is context sensitive help on SQL statements and PL/SQL statements. We’ve all been there: you start typing substr, but have forgotten the exact meaning of the parameters. Now, you can simply hit F1 and you’re taken to the appropriate topic in the SQL Reference Manual. Tables, views and program units can be described for you in a roll-up window from within the editor in the same way. A Code Assistant is integrated into the editor that automatically displays information of database objects as you type their name, allowing you to browse and pick elements from this description.

For large package or type bodies, the program editor provides a tree view with the code contents for easy navigation, highlights code structures and variable references, allows you to fold/unfold code sections, and provides hyperlink navigation. The Query Builder allows you to graphically create select statements. PL/SQL Developer’s extensible templates make it easy to insert standard SQL and PL/SQL code into your programs. Al editors use the appropriate SQL, PL/SQL and SQL*Plus syntax highlighting to make your code more readable.

Compiling & correcting

From within the editor you can compile a source file. In case of a compilation error you are
automatically taken to the appropriate source line. All compilation errors are reported in a list at the bottom of the editor. This list can include hints for code that may indicate common programming errors or violations of user-defined naming conventions.


Because you can compile a source file without saving it, you can safely explore many alternatives of solving a problem. The editor keeps track of the fact that you have changed the file without saving or compiling it.

Testing & debugging

To test your program unit, you can write a test script. The body of the test script contains a PL/SQL block in which you can program the test-code. Any variables that you want to use in the PL/SQL block can be declared, assigned a value for input, and viewed after execution.


When you execute a test script, a runtime error might occur. In this case, PL/SQL Developer allows you to view the sources of the error stack. Each source line of the error stack that was involved in the runtime error is highlighted, so you can easily backtrack to the cause of the problem.


If you are using Oracle 7.3.4 or later you can use PL/SQL Developer’s integrated debugger. You can step through your code, set breakpoints, view/set variables, view the call stack, and so on.


On Oracle8i and later you can additionally use the dbms_trace feature to log selected events of a program run. This can help you analyze the program flow and exceptions.


Output from calls to the dbms_output and the PL/SQL Web Toolkit packages are automatically shown in a corresponding tab page of the Test Window.


For regression testing you can use the Test Manager to quickly run and verify a set of Test Scripts.

Optimizing

To optimize the SQL statements in your program units, Oracle’s Explain Plan utility can be a big help. Therefore it is integrated into PL/SQL Developer’s IDE. By simply selecting the SQL statement in the source file and pressing F5, the query plan is visually presented to you in a separate Explain Plan window. You can then modify the statement to optimize its query plan outside the source file, and copy it back afterwards.


You can also view statistics about executed SQL statements and PL/SQL program units. These statistics can include elapsed time, CPU time, logical reads, physical reads, physical writes, and so on. Oracle8i introduced a PL/SQL Profiler that allows you to profile your PL/SQL code. For each executed line of PL/SQL code you can determine the execution time, and how many times it was executed.

Querying

To query the data in the database, you can use a SQL window to execute any SQL statement. All executed statements are kept in a history buffer, so you can easily re-execute them. Any query results are conveniently displayed in a separate grid that you can subsequently use to insert, update, or delete records. The result grid can additionally be used in a Query By Example mode, so that you can easily find the information you need.


To query database objects you can use the Object Browser. All relevant properties of database objects such as tables, views, sequences, functions, procedures, packages, types and triggers can be viewed, including any dependencies between the objects. The Object Browser uses a tree view similar to the explorer in Windows for easy point-and-click browsing

Running SQL scripts

PL/SQL Developer includes a Command Window that can be used to run SQL scripts or execute SQL statements. You can additionally execute commands that are very similar to the SQL*Plus commands that you may be familiar to.

Creating and modifying table definitions

You can easily create and modify table definitions with using any SQL statement. Just fill in the definition in a dialog window to modify columns, constraints, indexes, privileges, storage information, comments, and so on. You can apply this definition in the database, and view, modify and save the resulting SQL.

Diagrams

To visualize the database objects of your application or project and their relations, you can create diagrams. A diagram can be used for documentation purposes, but can also serve as a workspace to work with related objects.

Reporting

PL/SQL Developer comes with a number of standard reports, which are HTML based. You can view these reports within PL/SQL Developer, print them, or save them as HTML files. You can also create your own custom reports. Reports can be made easily accessible from the reports menu

Graphics

The Graph Window can be launched from within a SQL Window or Report Window to obtain a graphical representation of the queried data.

Projects

To organize your work you can use PL/SQL Developer’s project concept. A project consists of a number of files and database objects. These objects are easily accessible through the Project Items Window, and can be compiled through a single mouse-click.

Tools

PL/SQL Developer provides several tools that can be helpful during development. These tools include a Find Database Object tool, allowing you to search for text in database object sources, a Compile Invalid Objects tool, to quickly compile objects that have become invalid during development, Export and Import tools, a Data Generator tool to create test data, an Export User Objects tool to export the DDL statements of a user’s objects, a Compare User Objects tool to compare the object definitions of 2 users, a Session information tool, an Event monitor, a Compare Table Data tool to compare and equalize table contents, and a DBMS Scheduler tool to view and manage your scheduler objects and jobs. In addition to these standard tools, you can define your own tools and include them in PL/SQL Developer’s tools menu.

If you need to download the Oracle 11gR2 64 bit file click here.
To follow the installation process  Oracle 11gR2

If you like this post then share your view in the comment box.

To install SQL Developer click here

Copy of Copy of Copy of Copy of Copy of Copy of Copy of Copy of Music Video YouTube Thumbnail (1)

Introduction to sql

SQL (Structured Query Language) is a language used to communicate with database to retrieve / manipulate data from it. Like how we are communicating each other.. likewise SQL also needs some language to communicate with. So they have introduced a language called SQL. If we need anything from database we must learn this language to communicate with database.

Retrieve means getting or fetching the already stored data from database.
Manipulate means changing the already stored data

What is DATABASE and its STRUCTURE

DATABASE is used to store information or data

A database is an organized collection of structured information, or data, typically stored electronically in a computer system. A database is usually controlled by a database management system (DBMS).

Structure of DBMS (relational database)

The structure of relational database consists of rows and columns. In the above image the horizontal arrangement called Rows and vertical arrangement called Columns. Due to this it can be easily accessed, managed, modified, updated, controlled, and organized. Most databases use structured query language (SQL) for writing and querying data.

How to Query DATA

In order to query or fetch the data from database we need to use below keywords…

sql developer

SQL developer 4.1.4.21: How to install it

In this article, we are going to see how to install SQL Developer 4.1.4.21. Installation guide can be handy especially if you are new to a particular platform or software. Therefore, in this blog, I will be providing you the detailed stepwise procedure for installing Oracle sql developer 4.1.4.21 in PC with windows.

Please follow the below steps to install it.

Installation step for SQL Developer 4.1.4.21

Step 1: Download the file using the below link

To download the file click here

To visit our channel for Installation, click here

Next click Download button to download the file as shown below. 

download image for SQL Developer 4.1.4.21
download image

Then, click download anyway (see below) to download the file.

Step 2:After downloading the file, create a new folder and paste the file you have downloaded to that folder

Step 3:You are now required to extract the file present in the zip file. So, in order to unzip the file, right-click the zipped file and click on ’Extract Here’ options as shown in the image below.

Step 4:Rename the file “sqldeveloper_orginal” to “sqldeveloper“. Then, copy that file and paste it to the below location (see below)

C:applearncodeproduct11.2.0dbhome_1

In the above path or location…

learncode –> user name

11.2.0  –> oracle DB version

Step 5:To create desktop shortcut. Open the sqldeveloper folder and right click the sqldeveloper icon and click send to and select Desktop (see below)


I believe this sql developer 4.1.4.21 post will helpful for you. If you like this post then share your view in the comment box.

To download sql developer 4.1.4.21 click here

To install Oracle 11g R2 click here

oracle 11g R2

Step by Step Guide for Installation of Oracle 11g R2 Enterprise Edition – 64 bit

In this article, we are going to see how to Install Oracle database 11g R2 Enterprise Edition – 64 bit. Installation guide can be handy especially if you are new to a particular platform or software. Therefore, in this blog, I will be providing you the detailed stepwise procedure for installing Oracle 11g R2 Enterprise Edition in PC with windows.

Please follow the below steps to install the Oracle 11g R2

Step 1: 

Download the file using the below link

To download Oracle 11g R2 64 bit file click here.

To install Oracle 11g R2 32 bit, please click here to follow the steps

To visit our channel for Installation, click here

Next click Download button to download the file as shown below.

Oracle 11g R2 download screen

Then, click download anyway (see below) to download the file.

Google scan virus image

Step 2:

After downloading the file, create a new folder and paste the file you have downloaded to that folder

Step 3:

You are now required to extract the file present in the zip file. So, in order to unzip the file, right-click the zipped file and click on ’Extract Here’ options as shown in the image below.

How to Extract Oracle 11g R2 image

Step 4:

After that, you can view the contents present in the zip file as shown in the image below.

Step 5:

Now, go inside the folder name “11gR2_64-Enterprise Edition” and open “database” folder. Then, execute the ‘setup’ file by right click on the setup and click “Run as administrator” as shown in the image below.

How to start the Oracle 11g R2 setup

Note: After you execute the setup file. A window appears as shown in the image below.

process starts image

Installation process starts

Step 6:

If you have an Oracle Support account, fill in the appropriate data and click the Next button.
 

Oracle 11g R2 installation step 1


If you do not have support account, uncheck the box and leave the fields blank and then click the Next button (shown below).

Oracle 11g R2 installation oracle support

Step 7:

You will receive a popup, If you don’t provide email, don’t worry… click Yes to continue (see below). 

Step 8:

In the next wizard you have three option to select, choose the appropriate button and click the Next button to continue (see below).  In this case I want to create and install a database

1. Create and Configure a Database :-

If you want to create and install a database then choose this option

2. Install database software only :-

To install only database software then choose this option

3. Upgrade an existing database :-

If you need to upgrade an existing database then choose this option.

Step 9:

In the next wizard you have two option to select, choose theappropriate button and click the Next button to continue (see below).  In this case I want to install it on a laptop, so I’m selecting Desktop class

1. Desktop Class

If you are installing this software on a laptop or desktop, select this option

2. Server Class

If you want to installing this software on server machine, select this option


The next wizard will appear as shown below

Oracle 11g R2 installation step 4

Step 10:

If you want to change the database edition select the appropriate one as shown below

Oracle 11g R2 installation step 4 database edition

Step 11:

Then provide the Admin password as shown below and click the Next button to continue

Note 1: Oracle recommends that the password entered should be at least string characters in length, contain at least 1 uppercase character, 1 lowercase character and 1 digit [0-9].

Note 2: Please remember this password to login sys/system user

Oracle 11g R2 installation step 4. provide admin password

Step 12:

If the provided Admin password is not under the oracle standards then below popup occurs. Don’t worry this a warning only not an error, to continue click Yes (shown below)

confirmation message

Step 13:

In the next wizard the prerequisite checks starts for the installation, please wait till it complete

Oracle 11g R2 installation step 5

Step 14:

In the next wizard copy the SID for further reference (see below) and click Finish to start the installation


If you want to save these details click Save Response File and select the location to save the file and then click save (see below) then click Finish to start the installation

Save the file

Step 15:

The installation wizard will appear as shown

Note: If you receive errors in copying the files, the safest way to recover is to exit out of the installer, then remove all of the files from the install directories (c:appLearncode in this case). You may need to stop the OracleMTSRecoveryService before removing some files).

Second Note: If there are errors moving or copying files such as orandce11.dll.dbl just click the Continue button. These are non-critical files that should not affect the Oracle functionality. 

Step 16:

If Windows shows a warning of blocking the activity of Oracle, you click on “Allow access” for allowing Oracle to work

Allow access

Step 17:

Once all of the files are copied and installed, the Database Configuration Assistant will launch. Generally there is not much you need to do at this point except allow the Assistant to finish.

copying DB files

Step 18:

Once the new database is configured, the summary screen will appear as shown below. Click on the “Password Management” button to unlock some of the accounts.

Password management


To unlock an account, click on the check mark, then supply passwords for each of the unlocked accounts. Click the OK button when done.

unlock HR user

Note: If you have forgot to unlock the user, don’t worry just follow the step 20 after the installation is complete

Step 19:

The final confirmation screen shows the URL on your local PC for accessing the Oracle Enterprise Manager system. 

Oracle 11g R2 installation step 8

Step 20:

Press windows key + R, then type cmd and press enter. (see below)

open command prompt


Then in the command prompt type sqlplus hr/admin and click enter. If HR account is locked you will receive an error. And then close this window

check HR user in cmd

Then again open the command prompt and type sqlplus system/admin and press enter to connect to the system user.

Note: Here  system/admin ….. 

system —> user name

admin –> password (ie. type the password you have given in step 11)

connect to sys admin

Then we need to unlock the HR user, to do so we need to alter the user account. Type Alter user HR account unlock and press enter.
Then we to provide the password for the HR user, to add password typeAlter user HR identified by admin and press enter

Note: Here admin is the password for the HR user, you can provide any password you want.

Release the lock for HR user

Then connect to HR schema/user to see if it works. Type sqlplus hr/admin then press enter

Note: Here  hr/admin ….. 

hr—> user name

admin –> password provided in the above step

Then type the below query and press enter.
select count(*) from employees;

check and connect HR user

To download the Oracle 11gR2 64 bit file click here.
I believe this Oracle 11gR2 post will helpful for you. If you like this post then share your view in the comment box.

To install SQL Developer click here