Oracle Tutorial
Oracle Tutorial
Mariusz Piorkowski, Dr. Andrea Valassi, Sebastien Ponce, Zbigniew Baranowski, Jose Carlos Luna Duran, Rostislav Titov
CERN IT Department CH-1211 Geneva 23 Switzerland
www.cern.ch/it
Agenda
Oracle DB administrative tools Me Java Rostislav OCI Andrea OCCI Sebastien Perl Jose Carlos Luna Python Zbigniew
www.cern.ch/it
Oracle DB administrative tools Agenda How to install and configure it? How they work? How efficiently we can use them?
Tips & hints,
Examples
www.cern.ch/it
DB administrative tools - 3
DB administrative tools
What tools: PL/SQL Developer,
SQL Developer, Golden 6.0, SQLPLUS rlwrap,
www.cern.ch/it
DB administrative tools - 4
PL/SQL Developer
What is PL/SQL Developer?
PL/SQL Developer is an
on PL/SQL development. But dont underestimate the possibilities of the SQL Command Window.
DB administrative tools - 5
4) Unpack it under C:\ProgramFiles\InstantClient, 5) Create directories C:\ProgramFiles\InstantClient\network\admin, 6) Create or past inside above directory tnsnames.ora file, 7) Launch PL/SQL Developer,
DB administrative tools - 7
you can select the Oracle Home with the correct TNSNAMES.ORA file.
DB administrative tools - 8
New Window
New Connection
Execute (F8)
DB administrative tools - 10
PL/SQL Developer
SQL Window - Develop, run, test, tune etc
DB administrative tools - 11
PL/SQL Developer
SQL Window Single query window
DB administrative tools - 12
PL/SQL Developer
SQL Window Run multiple SQL statements
DB administrative tools - 13
PL/SQL Developer
SQL Window Create a graph based on the result
DB administrative tools - 14
PL/SQL Developer
SQL Window Export query results
DB administrative tools - 15
PL/SQL Developer
SQL Window Previous or Next SQL query
DB administrative tools - 16
PL/SQL Developer
Command Window
DB administrative tools - 17
PL/SQL Developer
Command Window SQL *Plus like environment
DB administrative tools - 18
PL/SQL Developer
Command Window Built in script editor
DB administrative tools - 19
PL/SQL Developer
Program Window
- Multi-level undo & redo,
- Bookmarks
- Block indent & unindent - Powerful find & replace with
reqular expressions
- A macro recorder and library - Column editing
- Split editing
- And more
DB administrative tools - 20
PL/SQL Developer
Program Window
DB administrative tools - 21
PL/SQL Developer
Test/Debug Window
DB administrative tools - 22
- Dont Break
- Use Pass Count
DB administrative tools - 23
PL/SQL Developer
Table editor create table directly by predefine interface
DB administrative tools - 24
PL/SQL Developer
Table editor Define table Define columns Define constraints Define indexes Etc
DB administrative tools - 25
PL/SQL Developer
Table editor get the SQL script
Save SQL to file
DB administrative tools - 26
PL/SQL Developer
Diagram Window
DB administrative tools - 27
PL/SQL Developer
Diagram Window Create diagrams by dragging objects Setting automatic foreign key relations Show and hide specific items
DB administrative tools - 28
Tips & Tricks - Drag a table, view or procedure to a SQL or Program Window, - Right click on any database-object anywhere, - Change the hotkeys to fit your needs, - Place frequently used connect strings in the log-in pop-list,
DB administrative tools - 29
Export User Objects Compare User Objects in two schemas Event Monitor (monitor messages sent to pipes) Sessions overview Export/Import tables
SQL Inserts Oracle export format PL/SQL Developer dump format
More info:
http://www.allroundautomations.com/plsqldev.html
DB administrative tools - 30
SQL Developer
What is Oracle SQL Developer? - Oracle SQL Developer is a free graphical tool for database
development. Using SQL Developer, you can browse database objects, run SQL statements and SQL scripts, and edit and debug PL/SQL statements. Free download from Oracle website:
http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
System requirements
- SQL Developer can connect to any Oracle Database version 9.2.0.1 and later and runs on Windows, Linux, and Mac OSX.
DB administrative tools - 31
SQL Developer
Advantages
No need to install anything, simple unzip downloaded
NOT NECESSERY, SPECIALLY WHEN YOU MISSED TEST DATABASE WITH PRODUCTION
DB administrative tools - 32
SQL Developer
First connection
New DB connection
DB administrative tools - 33
SQL Developer
Main window
DB administrative tools - 34
SQL Developer
Run a query
DB administrative tools - 35
SQL Developer
Generate explain plan (F10) really handy to optimize SQL queries
DB administrative tools - 36
SQL Developer
SQL Tuning Advisor (Ctrl+F12) written recommendations how improve SQL statement
DB administrative tools - 37
SQL Developer
Query Builder
DB administrative tools - 38
SQL Developer
Edit objects
DB administrative tools - 39
SQL Developer
Export results interesting option Publish to APEX
DB administrative tools - 40
SQL Developer
Publish to APEX
DB administrative tools - 41
SQL Developer
Extensions
DB administrative tools - 42
SQL Developer
Extensions e.g. Insider (live monitoring)
DB administrative tools - 43
SQL Developer
Much more features like:
- Reports, - DBA tools, - you can create your own database, - Data modeler, - Browser, - Migration wizard - Enables the migration of third party database on to Oracle - etc
More info:
http://docs.oracle.com/cd/E12151_01/index.htm
DB administrative tools - 44
Golden 6.x
- Is much more simpler tools that two previous one but still quite handy for SQL statements.
System requirements
- Golden is available only for Windows, however the same like for PL/SQL Developer we can use workaround to install it on MacOS and Linux, - Oracle Instant Client 32-bit is necessary.
DB administrative tools - 45
DB administrative tools - 47
DB administrative tools - 48
DB administrative tools - 49
DB administrative tools - 50
DB administrative tools - 51
DB administrative tools - 52
rlwrap
Finally something only on Linux - rlwrap compiles and runs on most Unix(-like) systems, including cygwin Installation
gunzip rlwrap*.gz tar -xvf rlwrap*.tar cd rlwrap* ./configure make make check make install
DB administrative tools - 53
rlwrap
Usage together with SQL*Plus or RMAN
Questions?