Home >> FAQs/Tutorials >> Oracle DBA FAQ

Oracle DBA FAQ - Introduction to Oracle SQL Developer

By: FYIcenter.com

Part:   1  2   3  4  5  6 

(Continued from previous part...)

How To Connect to a Remote Server?

If you have an Oracle server running remotely on a network, and you know all the access information needed, you can following steps to connect your Oracle SQL Developer:

  • Start Oracle SQL Developer
  • Right-click on Connections
  • Select New Database Connection
  • Enter Connection Name as: Remote_Server
  • Enter Username as: _username_
  • Enter Password as: _password_
  • Enter Hostname as: _hostname_
  • Enter SID as: _sidname_
  • Click Test
  • Click Connect, if you see Status changed to Success

You will see the SQL Statement area opened ready to take any SQL statements.

How To Run SQL Statements with Oracle SQL Developer?

Once a connection is established with an Oracle server, you can enter any SQL statements in the SQL Statement area. Try yourself with the following steps:

  • Go to the SQL Statement area
  • Enter SELECT username, default_tablespace FROM USER_USERS;
  • Press F9 or click the Execute Statement icon

You will see the statement results in the Results area.

How To Export Your Connection Information to a File?

SQL Developer allows you to export your connection information into an XML file. Here is how to do this:

  • Right-click on Connections
  • Select Export Connection...
  • Enter File Name as: \temp\connections.xml
  • Click OK

Open \temp\connections.xml, you should see an XML message like this:

<?xml version = '1.0'?>
<!DOCTYPE connections>
<connections>
   <connection>
      <JDBC_PORT>1521</JDBC_PORT>
      <HOSTNAME>127.0.0.1</HOSTNAME>
      <ConnectionType>JDBC</ConnectionType>
      <DeployPassword>false</DeployPassword>
      <user>HR</user>
      <ConnectionName>Local_XE</ConnectionName>
      <SID>XE</SID>
      <JdbcDriver>oracle.jdbc.driver.OracleDriver
         </JdbcDriver>
      <PWD>
         <![CDATA[0519D91AA309BF15EA9E54BF55F863710496...]]>
      </PWD>
      <ORACLE_JDBC_TYPE>thin</ORACLE_JDBC_TYPE>
   </connection>
</connections>

How To Run SQL*Plus Commands in SQL Developer?

Most of the time, you only run SQL statements in SQL Worksheet, the SQL statement area. But you can also run some SQL*Plus commands in SQL Worksheet. The example below shows you how to run the DECRIBE command in SQL Developer:

  • Go to SQL Worksheet - SQL statement area
  • Enter DESCRIBE USER_USERS
  • Press F9 to run the command

You will see the following output:

Name                           Null     Type              
------------------------------ -------- ------------------
USERNAME                       NOT NULL VARCHAR2(30)      
USER_ID                        NOT NULL NUMBER            
ACCOUNT_STATUS                 NOT NULL VARCHAR2(32)      
LOCK_DATE                               DATE              
EXPIRY_DATE                             DATE              
DEFAULT_TABLESPACE             NOT NULL VARCHAR2(30)      
TEMPORARY_TABLESPACE           NOT NULL VARCHAR2(30)      
CREATED                        NOT NULL DATE              
INITIAL_RSRC_CONSUMER_GROUP             VARCHAR2(30)      
EXTERNAL_NAME                           VARCHAR2(4000) 

The DESCRIBE command returns you the detailed information about the specified table.

How To Work with Data Objects Interactively?

You can work with data objects through SQL statements in statement area. If you want to work with data objects interactively, you should use the object browser. The following tutorial steps help you to browse data objects:

  • Click the Connetions tab.
  • Open the Connections icon.
  • Open a connection, like Local_XE. You see a list of data object types.
  • Open the Connections icon.
  • Open Tables. You see list of existing tables.
  • Open a table, like EMPLOYEES. You see a list of columns.
  • Double-click a table, like EMPLOYEES. You see a list of tabs opened for this table.

Once a table opened, SQL Developer offers you many views on this table, like Columns, Data, Indexes, Constraints, Statistics, Triggers, etc.

(Continued on next part...)

Part:   1  2   3  4  5  6 

Related Articles:

More...


Other Tutorials/FAQs:

More...


Related Resources:

More...


Selected Jobs:

More...