Oracle Tutorial

March 25, 2018 | Author: Sai Kyaw Htike | Category: Pl/Sql, Oracle Database, Sql, Databases, Information Technology Management


Comments



Description

Oracle Tools and Bindings with languagesMariusz 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 CERN IT Department CH-1211 Geneva 23 Switzerland Oracle Tools and Bindings with languages - 2 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 CERN IT Department CH-1211 Geneva 23 Switzerland DB administrative tools - 3 DB administrative tools What tools: • PL/SQL Developer, • SQL Developer, • Golden 6.0, • SQLPLUS – rlwrap, •… •… •… •… www.cern.ch/it CERN IT Department CH-1211 Geneva 23 Switzerland DB administrative tools - 4 PL/SQL Developer What is PL/SQL Developer? • PL/SQL Developer is an Integrated Development Environment that is specifically targeted at the development. • PL/SQL Developer has its focus on PL/SQL development. But don’t underestimate the possibilities of the SQL Command Window. DB administrative tools - 5 Net 10 or Net 11 version.fr/2010/09/plsql-developer-on-osx. 10g and 11g on any platform.PL/SQL Developer .x. 8i.but you can run on Virtual Machine like CrossOver more installation info: http://dgielis.installation System requirements • PL/SQL Developer will run on: – Windows all release so far.6 .html • The supported Oracle Server versions are 7.x. • To connect to an Oracle database. in other hand it require Oracle Instant Client (32-bit) DB administrative tools . PL/SQL Developer requires a 32-bit SQL*Net. 9i. 8.fr/2008/09/plsql-developer-onlinux.html – Linux – not support as well . Net 9.but on a Linux box you can use Wine – more info: http://johanlouwers. – Mac OS – is not supported .blogspot. Net 8.blogspot. 5) Create directories C:\ProgramFiles\InstantClient\network\admin.installation Easy installation? – steps (for Windows) 1) Download PL/SQL Developer (9.ora file.PL/SQL Developer . http://www. DB administrative tools .7 . 3) Download Oracle Instant Client 32-bit version from Oracle site.0.com/technetwork/database/features/instant-client/index-097480.6) from DFS: G:\Applications\AllroundAutomations 2) Run the setup. 6) Create or past inside above directory tnsnames.html 4) Unpack it under C:\ProgramFiles\InstantClient.oracle. 7) Launch PL/SQL Developer. ORA file. go to: Tools > Preferences > Oracle / Connection you can select the Oracle Home with the correct TNSNAMES.8 . tnsnames.dll library location DB administrative tools .ora file directory OCI.PL/SQL Developer – first start up If you started PL/SQL Developer without connecting to DFS. 9 .ora tnsnames.ora file will be always up to date DB administrative tools .setup at CERN We don’t need to create additional network/admin directories inside InstantClient directory.ora file on DFS: G:\Applications\Oracle\ADMIN\tnsnames. Instead of that we can specify location of tnsnames.PL/SQL Developer – first start up PL/SQL Developer . 10 .PL/SQL Developer – first start up • Main window New Window New Connection Execute (F8) DB administrative tools . 11 . tune etc… DB administrative tools .PL/SQL Developer • SQL Window . run. test.Develop. 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 . 16 .PL/SQL Developer • SQL Window – Previous or Next SQL query DB administrative tools . PL/SQL Developer • Command Window DB administrative tools .17 . 18 .PL/SQL Developer • Command Window – SQL *Plus like environment DB administrative tools . 19 .PL/SQL Developer • Command Window – Built in script editor DB administrative tools . .Powerful find & replace with reqular expressions .Bookmarks .20 .Multi-level undo & redo.And more… DB administrative tools .A macro recorder and library .PL/SQL Developer • Program Window .Column editing .Split editing .Block indent & unindent . 21 .PL/SQL Developer • Program Window DB administrative tools . 22 .PL/SQL Developer • Test/Debug Window DB administrative tools . Use Message .Set breakpoints .Unconditionally .Use Pass Count DB administrative tools .Debug your program .Show values of variables .Use Condition .PL/SQL Developer • Test Window .23 .Don’t Break . 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 … Copy SQL to clipboard Open in command window DB administrative tools .26 . PL/SQL Developer • Diagram Window DB administrative tools .27 . 28 .PL/SQL Developer • Diagram Window Create diagrams by dragging objects Setting automatic foreign key relations Show and hide specific items DB administrative tools . . DB administrative tools .Right click on any database-object anywhere.29 . view or procedure to a SQL or Program Window. .PL/SQL Developer – Tips & Tricks • Tips & Tricks .Drag a table. .Place frequently used connect strings in the log-in pop-list.Change the hotkeys to fit your needs. com/plsqldev.html DB administrative tools .30 .allroundautomations.PL/SQL Developer – Other features • • • • • 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. Free download from Oracle website: - http://www.1 and later and runs on Windows.com/technetwork/developer-tools/sql-developer/downloads/index.html System requirements . Using SQL Developer. DB administrative tools .0. and Mac OSX.31 .Oracle SQL Developer is a free graphical tool for database development. and edit and debug PL/SQL statements.oracle. run SQL statements and SQL scripts.2.SQL Developer What is Oracle SQL Developer? . Linux. you can browse database objects.SQL Developer can connect to any Oracle Database version 9. 32 . NOT NECESSERY.SQL Developer Advantages • No need to install anything. simple unzip downloaded package and software is ready to use. • Portable – copy unzipped files on flash drive and you can use it on any PC. • You can connect in parallel to several different databases. SPECIALLY WHEN YOU MISSED TEST DATABASE WITH PRODUCTION … DB administrative tools . SQL Developer • First connection New DB connection DB administrative tools .33 . 34 .SQL Developer • Main window DB administrative tools . SQL Developer • Run a query DB administrative tools .35 . 36 .SQL Developer • Generate explain plan (F10) – really handy to optimize SQL queries DB administrative tools . 37 .SQL Developer • SQL Tuning Advisor (Ctrl+F12) – written recommendations how improve SQL statement DB administrative tools . 38 .SQL Developer • Query Builder DB administrative tools . 39 .SQL Developer • Edit objects DB administrative tools . 40 .SQL Developer • Export results – interesting option Publish to APEX DB administrative tools . SQL Developer • Publish to APEX DB administrative tools .41 . 42 .SQL Developer • Extensions DB administrative tools . Insider (live monitoring) DB administrative tools .SQL Developer • Extensions – e.g.43 . etc… More info: http://docs.DBA tools. .com/cd/E12151_01/index. .Data modeler.Enables the migration of third party database on to Oracle . . .44 .Reports.you can create your own database.oracle.Browser.SQL Developer • Much more features like: .Migration wizard .htm DB administrative tools . . 45 . however the same like for PL/SQL Developer we can use workaround to install it on MacOS and Linux.Is much more simpler tools that two previous one but still quite handy for SQL statements. DB administrative tools .x . .Golden is available only for Windows.Oracle Instant Client 32-bit is necessary.x • Golden 6. • System requirements .Golden 6.Benthic . ora to C:\Oracle .Copy tnsnames.Benthic .Copy the Instant Client dll's to C:\Oracle .Set the OCI DLL field of Golden's Login Options window to "C:\Oracle\oci.Put C:\Oracle at the beginning of PATH system variable.dll" (you will have to restart Golden after setting this value).x • Installation steps .Golden 6. . .Add the system variable TNS_ADMIN with a value of C:\Oracle . Golden 6.x • Login DB administrative tools .Benthic .47 . 48 .Benthic .x • Main window – simple view but sometimes is exactly what we need DB administrative tools .Golden 6. Golden 6.x • Simple query building DB administrative tools .Benthic .49 . 50 .Benthic .Golden 6.for PL/SQL scripts DB administrative tools .x • DBMS Output window (F10) . com/ DB administrative tools .Golden 6.51 .benthicsoftware.Benthic .x • More info: http://www. Cherry on the cake • rlwrap . a small utility that uses the GNU readline library to allow the editing of keyboard input for any command.is a 'readline wrapper'.52 . DB administrative tools . including cygwin Installation gunzip rlwrap*.53 ./configure make make check make install • DB administrative tools .rlwrap compiles and runs on most Unix(-like) systems.tar cd rlwrap* .gz tar -xvf rlwrap*.rlwrap • Finally something only on Linux  . rlwrap • Usage – together with SQL*Plus or RMAN . Questions? .
Copyright © 2024 DOKUMEN.SITE Inc.