Click here to Skip to main content
15,880,905 members
Articles / Programming Languages / SQL
Article

Sql180 Developer

Rate me:
Please Sign up or sign in to vote.
4.75/5 (18 votes)
25 Oct 2008CPOL6 min read 47K   1.7K   44   10
A Graphic tool for Oracle developers and DBAs

Introduction

This article will introduce you to a graphic tool called "Sql180 Developer", which is intended to be used by Oracle developers and Oracle DBAs. If you are an Oracle developer, you can easily write and compile PL/SQL code with this code or just work and develop in an Oracle environment. If you are a DBA or an Oracle security specialist, you can manage the DB, monitor it and its performance and also check security issues and problems about your Oracle Database.

Background

The development of this project was triggered due to our college studies and from our experience as DBAs at the place we work. We searched extensively for a simple and easy tool for developing, specially for managing and monitoring our databases at our facility. We found some tools but most of them were complex and not relevant, so we decided do develop our own tool.

Brief Description

Sql180 Developer enables you to do the following tasks:

  • Editing
  • Compiling
  • Correcting
  • Optimizing
  • Querying

This software also provides several other tools that can be helpful during everyday PL/SQL development or DBA's routine activities.

First of all, the software has a "SQL Window" that provides you the ability to execute any Oracle command (DML, DDL, SELECT). The data retrieved from SELECT statements is shown with the DataGridView object. You can also show the explain plan of your SELECT statement in order to optimize your code. We have also implemented a command-line tool called "Command Window" that imitates the way SQL*PLUS works with the 'SQL>' prompt. Both "SQL window" and "Command window" can save a history of your commands that were executed and can manage Oracle transactions. All the fetching of Oracle data and the handling of Oracle connections and transactions were implemented by the ODP.NET Framework that provided us the classes of OracleCommand, OracleConnection, OracleDataReader, etc. Here, for example, is the "SQL Window":

Image 1

We also implemented a PL/SQL editor that parses the text you enter and colors Oracle keywords and comments. With the editor, you can of course compile and store the PL/SQL code in your DB, or check for compilation errors that are marked on the text itself with yellow color. If the text is a SELECT statement, you can also lay out the SELECT command. All these features were implemented by extending the RichTextBox class. For example, this is an editor that shows the code of an Oracle trigger: 

Image 2

The Object browser - This is a very useful tool located at the left of the main screen which allows you to browse all Oracle objects stored in the DB. It has the following filters: "my objects" to show the current logged user's objects, "all objects" to show all objects that the current logged user can see, "invalid objects", and "all-non system objects". With the browser, you can also manipulate any object you want. You can view, edit, compile, rename, etc. (by right clicking on the relevant object).

The Objects creation wizards - Our software also has wizards for creating, editing and viewing the common Oracle objects (tables, views, synonyms, jobs, users, roles, DB links, etc.) You can create a new object by pressing the New menu or by right clicking the Object browser. All object wizards have a tab called "DDL" that can show you the exact real Oracle commands of the object creation/altering, that will be executed when you press the "OK" button. For example, here is a screenshot of the wizard for creating a new table. It has the following tabs - general, storage, constraints and indexes (You can also see the Object Browser on the left):

Image 3

Another important advantage is the Tools menu that provides you with some more benefits for common tasks of the DBA. It has the session screen that helps the DBA to see the activity on her/his database, and manipulate the logged sessions. There is also the Object Finder that can help you find any object in a quick and easy way. There is the Object Compiler that can find all invalid objects of your current schema and compile them for you with one click. You can also compute statistics on your schema's objects or even on all DBs (if you have the right permissions, of course...).

The highlight of our software is, in my opinion, the advanced DBA & Security options that really improve the DBA's work in real life! These options are provided by the DBA and Security menus on the main screen. Both options are enabled only if you logged to the database with the SYSDBA/SYSOPER privilege.

At the DBA menu - you can find the "General" screen. This screen displays global system 'health' parameters and general details of your database. On this screen, you can examine, by the different shown ratios, how much sorting, I/O, parsing, or CPU activity is performed on your DB. In one click, you can find out what is wrong with your DB performance!

You can also check the memory of your Oracle instance by showing the current SQL area - there you can find the highest loading activity on your database, and from where it is coming. The DBA menu also provides you the ability to investigate your tables and indexes: It can check for you if there are any unnecessary indexes that cause bad performance, columns with foreign keys that have no index on them, tables without indexes at all, and so on. It also recommends you to build indexes that can improve your system performance. The DBA menu can also provide you reports - like the "free space" report (This report checks for each tablespace about how much free space is left for it).

Here is a screen shot of one of the performance screens that shows you with colors of red, yellow or green as to what the state of your DB is.

Image 4

The last thing is the Security menu, that helps you to investigate security breaches and issues that occur in your system. It can show you, for example, users that have wick passwords (that can be cracked easily), or users with default profiles (which is also bad). It can also check for very powerful privileges and dangerous packages stored in the DB, and who has them, or has privileges to them. It also checks the auditing state of your system. The following screenshot is an example for the checking of dangerous or public packages:

Image 5

Assumptions 

  1. Our project has been tested on an Oracle 10g environment. In order to use this code, you must have a database in this version to connect to and also an Oracle Client installed on the computer which runs our software. 
  2. The code was written with .NET Framework 2.0, and tested on Windows XP and Windows Vista.

Known Issues

  1. There is a bug - When you query from a table, then modify the table metadata (add/remove columns), and then invoke the same case sensitive query, the query will ignore the metadata changes (it will provide the previous metadata from a cache).
  2. The command window executes Oracle DDL/DML commands perfectly, but for SELECT statements, it will not show the data retrieved. You can use the SQL window for that. 

History

  • 25th October, 2008: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Israel Israel
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMy vote of 5 Pin
Joe Sonderegger9-Jan-12 18:21
Joe Sonderegger9-Jan-12 18:21 
GeneralMy vote of 2 Pin
fangpipig20-Apr-11 19:43
fangpipig20-Apr-11 19:43 
QuestionPL/SQL question Pin
pemola8-Feb-11 0:43
pemola8-Feb-11 0:43 
Generalsome problems in MS VS 2008 Pin
maratsh28-Aug-09 1:55
maratsh28-Aug-09 1:55 
After building th application under MS VS 2008:
- perssing Ctrl+Left results to invisible cursor (focus changed to other control)
- big DDL edited very slowly (fulll change of RichTextBox.Text property is not right solution)

But - thank you... Smile | :)
GeneralThe Reports Pin
wayne19753-Nov-08 1:06
wayne19753-Nov-08 1:06 
GeneralYou Should Mention That Oracle Data Access Components (ODAC) for Windows is Needed Pin
avnersimon28-Oct-08 12:16
avnersimon28-Oct-08 12:16 
QuestionNice tool Pin
Pablo Aliskevicius28-Oct-08 3:28
Pablo Aliskevicius28-Oct-08 3:28 
AnswerRe: Nice tool Pin
Guy Haim28-Oct-08 6:01
Guy Haim28-Oct-08 6:01 
GeneralRe: Nice tool Pin
Geekian_senate22-Feb-11 5:18
Geekian_senate22-Feb-11 5:18 
Generalvery useful utility Pin
Member 460005127-Oct-08 7:05
Member 460005127-Oct-08 7:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.