Day 4: How to submit SQL commands to Oracle database

Posted by Paola Pullas | Posted in Administración, Base de Datos, Oracle | Posted on 05-09-2010

Tags: , , , , , , ,

4

There are different tools to access Oracle database in order to submit SQL commands. In this section I will show you 3 Oracle tools that you have with no extra cost. Before to review this tutorial review this links:

SQL*Plus

The firs tool is SQL*Plus, this is a command-line interface tool to access to Oracle database. You use SQL*Plus to execute many administrative tasks for example: start up and shut down the database, set database initialization parameters, create and manage users, create and alter database objects (such as tables and indexes), and more. In addition SQL*Plus can be used to insert and update data and run SQL queries.

The format to establish a connection using SQL*Plus is:

  • CONN[ECT] [logon] [AS {SYSOPER | SYSDBA}]
  • {username | /}[@connect_identifier]

In the next screen I will show you some examples in order to gain access to database from SQL*Plus.

  • sqlplus /nolog

  • connect sys/oracle as sysdba

  • conn sys/oracle@eva as sysdba

  • conn system/oracle

  • connect system/oracle@eva

  • connect system/oracle as sysdba

  • conn system/oracle as sysoper

  • conn hr/hr

  • conn hr/hr@eva

Enterprise Manager Dbconsole

Oracle Enterprise Manager Dbconsole is an intuitive graphical interface to administer the database.

In order to gain access to Enterprise Manager you should be a user defined like administrator in the application dbconsole. In the next screen I will show you the users that can login in the Oracle Enterprise Manager Dbconsole. In order to acess this screen you should login in Enterprise Manager Dbconsole like sys user and then go to Setup link in the right upper corner of the application:

In the next screens I will show you some examples in order to login in Enterprise Manager Dbconsole. The url to access have the format https://server_ip:em_port/em. If you don’t know the port to access the application you can find this in the file portlist.ini located in $ORACLE_HOME/install:

SQL Developer

Start the application with sqldeveloper command from a operating system terminal, and next create a connection in the graphical interface like I show you in the next screens:

Author: Paola Pullas
Do you need to buy support?: Contact me at pp@refundation.com

If you think that this tutorial helped you. Make a donation to this initiative. We appreciate your support. Also your donation can help me to buy more coffee or Red Bull.





Day 3: How to install SQL Developer in Linux

Posted by Paola Pullas | Posted in Aplicaciones, Base de Datos, Oracle | Posted on 04-09-2010

Tags: , , , , ,

5

In this post I will show you how to install Oracle SQL Developer in a Linux box. First, you should download the SQL Developer software from http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html.

Next, if you downloaded the software without JDK included, you need to download a JDK 1.6.11 version or above from http://www.oracle.com/technetwork/java/javase/downloads/index.html

Install JDK

First install the JDK version in your Linux box in any directory. I will install the JDK in /u01/app/oracle like I show you in the next screens:

  • chmod a+x jdk-6u-linux-i586.bin
  • ./jdk-6u-linux-i586.bin

Install SQL Developer

Then install SQL Developer rpm using the next command:

  • rpm -Uhv sqldeveloper-2.1.1.64.45-1.noarch.rpm

Next, verify if the file jdk contains the JDK’s path. This file is located in $HOME/.sqldeveloper. If the JDK’s path that you installed previously isn’t registered in the jdk file, the first time that you launch the application, you should be prompted to provide the path.

Finally execute sqldeveloper with the next command:

  • sqldeveloper

Author: Paola Pullas
Do you need to buy support?: Contact me at pp@refundation.com

If you think that this tutorial helped you. Make a donation to this initiative. We appreciate your support. Also your donation can help me to buy more coffee or Red Bull.