Manual de Teste

 

Embed or link this publication

Description

Testando o serviço

Popular Pages


p. 1

pl/sql developer 8.0 user s guide july 2009

[close]

p. 2



[close]

p. 3

pl/sql developer 8.0 user s guide 3 contents contents 3 1 introduction 9 2 installation 13 2.1 system requirements 13 2.2 workstation installation 13 2.3 server based installation 13 2.4 scripted installation 13 2.5 uninstalling pl/sql developer 14 3 writing programs 15 3.1 creating a program 15 3.2 saving a program 16 3.3 modifying a program 17 3.4 compiling a program 17 3.5 compiler preferences 18 4 testing programs 19 4.1 creating a test script 19 4.2 executing a test script 20 4.3 variable types 21 4.4 saving test scripts 22 4.5 tracking run-time errors 23 4.6 package states java session states 23 4.7 viewing result sets 23 4.8 viewing dbms_output 23 4.9 viewing htp output 24 4.10 debugging 24 4.11 tracing execution 27 4.12 regression testing 28 5 optimizing 29 5.1 using the explain plan window 29 5.2 automatic statistics 30 5.3 the pl/sql profiler 31 5.4 sql trace 32 6 ad hoc sql 34 6.1 using the sql window 34 6.2 result grid manipulation 35 6.3 query by example mode 40 6.4 linked queries 41 6.5 substitution variables 41 6.6 updating the database 42 6.7 viewing and editing xmltype columns 43 6.8 direct query export 43 6.9 saving sql scripts 43 6.10 creating standard queries 44 7 the command window 45 7.1 entering sql statements and commands 45 7.2 developing command files 46 7.3 supported commands 47

[close]

p. 4

4 pl/sql developer 8.0 user s guide 8 creating and modifying non-pl/sql objects 50 8.1 the table definition editor 50 8.2 the sequence definition editor 62 8.3 the synonym definition editor 62 8.4 the library definition editor 63 8.5 the directory definition editor 63 8.6 the job definition editor 64 8.7 the queue definition editor 64 8.8 the queue table definition editor 65 8.9 the user definition editor 66 8.10 the role definition editor 69 8.11 the profile definition editor 70 8.12 the database link definition editor 70 9 dbms scheduler 71 9.1 creating objects 76 9.2 editing objects 76 9.3 deleting objects 76 9.4 viewing job runs 76 9.5 viewing running jobs 77 10 diagrams 78 10.1 creating a diagram 78 10.2 zooming 81 10.3 saving and opening a diagram file 81 10.4 updating a diagram 81 10.5 printing a diagram 82 10.6 exporting a diagram 82 11 reports 83 11.1 standard reports 83 11.2 custom reports 84 11.3 variables 85 11.4 refining the layout 88 11.5 the style library 95 11.6 options 95 11.7 the reports menu 97 12 graphics 98 13 projects 100 13.1 creating a new project 100 13.2 saving a project 101 13.3 adding files to a project 101 13.4 adding database objects to a project 101 13.5 working with project items 102 13.6 compiling a project 103 14 to-do items 104 14.1 creating a to-do item 105 14.2 editing a to-do item 105 14.3 closing a to-do item 106 14.4 deleting a to-do item 106 15 windows database sessions and transactions 107 15.1 session mode 107 15.2 execution in multi session or dual session mode 107

[close]

p. 5

pl/sql developer 8.0 user s guide 5 16 browsing objects 108 16.1 using the object browser 108 16.2 object browser filters 114 16.3 object browser folders 115 17 browsing files 117 17.1 setting up the file browser 118 17.2 using the file browser 119 18 preferences 120 18.1 oracle ­ connection 121 18.2 oracle ­ options 122 18.3 oracle ­ compiler 123 18.4 oracle ­ debugger 125 18.5 oracle ­ output 126 18.6 oracle ­ trace 127 18.7 oracle ­ profiler 127 18.8 oracle ­ logon history 128 18.9 oracle ­ hints 129 18.10 user interface ­ options 131 18.11 user interface ­ toolbar 133 18.12 user interface ­ object browser 133 18.13 user interface ­ editor 135 18.14 user interface ­ fonts 138 18.15 user interface ­ code assistant 139 18.16 user interface ­ key configuration 140 18.17 user interface ­ appearance 141 18.18 user interface ­ nls options 142 18.19 window types ­ program window 143 18.20 window types ­ sql window 145 18.21 window types ­ test window 147 18.22 window types ­ plan window 147 18.23 tools ­ differences 148 18.24 tools ­ data generator 148 18.25 tools ­ to-do list 149 18.26 tools ­ recall statement 149 18.27 files ­ directories 150 18.28 files ­ extensions 151 18.29 files ­ format 152 18.30 files ­ backup 152 18.31 files ­ html/xml 153 18.32 other ­ printing 154 18.33 other ­ updates news 155 18.34 preference sets 156 19 tools 158 19.1 object browser 158 19.2 find database objects 158 19.3 compile invalid objects 159 19.4 export tables 160 19.5 import tables 163 19.6 export user objects 165 19.7 text importer 166 19.8 odbc importer 169

[close]

p. 6

6 pl/sql developer 8.0 user s guide 19.9 data generator 171 19.10 compare user objects 174 19.11 compare table data 176 19.12 event monitor 178 19.13 sessions 179 19.14 user defined tools 181 19.15 test manager 186 20 the editor 189 20.1 selection functions 189 20.2 column selection 189 20.3 code assistant 190 20.4 recalling statements 191 20.5 special copy 191 20.6 context sensitive help 192 20.7 database object popup menu 193 20.8 explain plan 193 20.9 macros 193 20.10 bookmarks 194 20.11 color marks 195 20.12 code contents 196 20.13 code hierarchy 197 20.14 code folding 198 20.15 split editing 198 20.16 hyperlink navigation 199 20.17 navigation buttons 199 20.18 refactoring 200 20.19 search bar 200 21 the large data editor 202 21.1 editing plain text 203 21.2 editing rtf 203 21.3 editing xml 204 21.4 editing images 205 21.5 editing hex data 205 21.6 invoking an external viewer or editor 206 22 the query builder 208 22.1 creating a new select statement 208 22.2 modifying an existing select statement 211 22.3 manipulating the query definition 211 22.4 query builder preferences 212 22.5 query builder plug-ins 213 23 the pl/sql beautifier 214 23.1 defining the options 214 23.2 defining the rules 215 23.3 using the beautifier 216 23.4 suppressing formatting 216 24 templates 217 24.1 the template window 217 24.2 using a template 218 24.3 creating and modifying templates 219

[close]

p. 7

pl/sql developer 8.0 user s guide 7 25 26 window list 224 dockable and floating tools 225 27 authorization 227 27.1 enabling authorization 227 27.2 defining authorization 228 27.3 disabling authorization 229 28 oracle file system ofs 230 28.1 ofs manager 230 28.2 ofs usage 232 29 help systems 234 29.1 ms help files 234 29.2 html manuals 234 30 customization 238 30.1 preferences 238 30.2 window layout 238 30.3 on-line documentation 238 30.4 command-line parameters 240 30.5 sql pl/sql command java and xml keywords 242 30.6 plug-ins 242

[close]

p. 8

8 pl/sql developer 8.0 user s guide

[close]

p. 9

pl/sql developer 8.0 user s guide 9 1 introduction pl/sql developer is an integrated development environment ide for developing stored program units in an oracle database using pl/sql developer you can conveniently create the server-part of your client/server applications as a worst-case scenario up to now you might have been working like this · you use a text editor to write program units procedures triggers etc · you use oracle sqlplus to compile the source files · if there is a compilation error you have to find out where it is located in the source file correct it switch back to sqlplus to recompile it only to find the next error · you use sqlplus or the client-part of your application to test the program unit · in case of a runtime error again you have a hard time locating the cause of the problem and correcting it · you use the explain plan utility or tkprof to optimize your sql statements · to view or modify other objects and data in your database you use sqlplus or yet another tool these tasks editing compiling correcting testing debugging optimizing and querying can all be performed without leaving pl/sql developer s ide furthermore pl/sql developer provides several other tools that can be helpful during everyday pl/sql development editing pl/sql developer like any other serious development environment assumes that you store your source files on disk other tools just let you edit sources in the database but this does not allow for any version control or deployment scheme the source files can be run through sqlplus so you can

[close]

p. 10

10 pl/sql developer 8.0 user s guide deploy them on any platform without using pl/sql developer you can edit many files at once through a standard multiple document interface the editor offers a wide range of assistance to the programmer there is context sensitive help on sql statements and pl/sql statements we ve all been there you start typing substr but have forgotten the exact meaning of the parameters now you can simply hit f1 and you re taken to the appropriate topic in the sql reference manual tables views and program units can be described for you in a roll-up window from within the editor in the same way a code assistant is integrated into the editor that automatically displays information of database objects as you type their name allowing you to browse and pick elements from this description for large package or type bodies the program editor provides a tree view with the code contents for easy navigation highlights code structures and variable references allows you to fold/unfold code sections and provides hyperlink navigation the query builder allows you to graphically create select statements pl/sql developer s extensible templates make it easy to insert standard sql and pl/sql code into your programs al editors use the appropriate sql pl/sql and sqlplus syntax highlighting to make your code more readable compiling correcting from within the editor you can compile a source file in case of a compilation error you are automatically taken to the appropriate source line all compilation errors are reported in a list at the bottom of the editor this list can include hints for code that may indicate common programming errors or violations of user-defined naming conventions because you can compile a source file without saving it you can safely explore many alternatives of solving a problem the editor keeps track of the fact that you have changed the file without saving or compiling it testing debugging to test your program unit you can write a test script the body of the test script contains a pl/sql block in which you can program the test-code any variables that you want to use in the pl/sql block can be declared assigned a value for input and viewed after execution when you execute a test script a runtime error might occur in this case pl/sql developer allows you to view the sources of the error stack each source line of the error stack that was involved in the runtime error is highlighted so you can easily backtrack to the cause of the problem if you are using oracle 7.3.4 or later you can use pl/sql developer s integrated debugger you can step through your code set breakpoints view/set variables view the call stack and so on on oracle8i and later you can additionally use the dbms_trace feature to log selected events of a program run this can help you analyze the program flow and exceptions output from calls to the dbms_output and the pl/sql web toolkit packages are automatically shown in a corresponding tab page of the test window for regression testing you can use the test manager to quickly run and verify a set of test scripts optimizing to optimize the sql statements in your program units oracle s explain plan utility can be a big help therefore it is integrated into pl/sql developer s ide by simply selecting the sql statement in the source file and pressing f5 the query plan is visually presented to you in a separate explain plan window you can then modify the statement to optimize its query plan outside the source file and copy it back afterwards you can also view statistics about executed sql statements and pl/sql program units these statistics can include elapsed time cpu time logical reads physical reads physical writes and so on.

[close]

p. 11

pl/sql developer 8.0 user s guide 11 oracle8i introduced a pl/sql profiler that allows you to profile your pl/sql code for each executed line of pl/sql code you can determine the execution time and how many times it was executed querying to query the data in the database you can use a sql window to execute any sql statement all executed statements are kept in a history buffer so you can easily re-execute them any query results are conveniently displayed in a separate grid that you can subsequently use to insert update or delete records the result grid can additionally be used in a query by example mode so that you can easily find the information you need to query database objects you can use the object browser all relevant properties of database objects such as tables views sequences functions procedures packages types and triggers can be viewed including any dependencies between the objects the object browser uses a tree view similar to the explorer in windows for easy point-and-click browsing running sql scripts pl/sql developer includes a command window that can be used to run sql scripts or execute sql statements you can additionally execute commands that are very similar to the sqlplus commands that you may be familiar to creating and modifying table definitions you can easily create and modify table definitions with using any sql statement just fill in the definition in a dialog window to modify columns constraints indexes privileges storage information comments and so on you can apply this definition in the database and view modify and save the resulting sql diagrams to visualize the database objects of your application or project and their relations you can create diagrams a diagram can be used for documentation purposes but can also serve as a workspace to work with related objects reporting pl/sql developer comes with a number of standard reports which are html based you can view these reports within pl/sql developer print them or save them as html files you can also create your own custom reports reports can be made easily accessible from the reports menu graphics the graph window can be launched from within a sql window or report window to obtain a graphical representation of the queried data projects to organize your work you can use pl/sql developer s project concept a project consists of a number of files and database objects these objects are easily accessible through the project items window and can be compiled through a single mouse-click tools pl/sql developer provides several tools that can be helpful during development these tools include a find database object tool allowing you to search for text in database object sources a compile invalid objects tool to quickly compile objects that have become invalid during development export and import tools a data generator tool to create test data an export user objects tool to export the ddl

[close]

p. 12

12 pl/sql developer 8.0 user s guide statements of a user s objects a compare user objects tool to compare the object definitions of 2 users a session information tool an event monitor and a compare table data tool to compare and equalize table contents in addition to these standard tools you can define your own tools and include them in pl/sql developer s tools menu.

[close]

p. 13

pl/sql developer 8.0 user s guide 13 2 installation there are basically two ways to install pl/sql developer · · workstation installation in this case you install the software locally on each workstation that it will be used on server installation in this case you install the software on a server at a location that can be accessed from each workstation that it will be used on both installation types will be explained here 2.1 system requirements pl/sql developer will run on windows 2000 and later and is compatible with oracle server version 7.0 and later to connect to an oracle database pl/sql developer requires a 32-bit oracle client version 7.0 or later if you are using a 64-bit version of the oracle client and/or server on your workstation you will need to install an additional 32-bit oracle client 2.2 workstation installation to install pl/sql developer locally on a workstation run the setup program from the installation medium after doing this the following dialog will appear you can select a destination directory for the program files a folder in the start menu a location for a shortcut to pl/sql developer on the desktop and installation options after pressing the finish button on the final page the program files are copied and the shortcuts are created 2.3 server based installation for multi-user licenses you can create a single pl/sql developer installation on a file server and provide access to all licensed users to do so you can run the setup program on the file server in the same way as described in the previous section you must choose a destination directory that is shared to the users that will use the software when pl/sql developer is first run on a workstation this type of installation is automatically detected and local installation is then completed without the user noticing it pl/sql developer can be installed into a directory where the users have only read access 2.4 scripted installation in addition to the installation procedure described above you can also create a script for unattended installation read the included install.txt file for detailed information.

[close]

p. 14

14 pl/sql developer 8.0 user s guide 2.5 uninstalling pl/sql developer if for some reason you wish to uninstall pl/sql developer you can remove it using add/remove program in the control panel.

[close]

p. 15

pl/sql developer 8.0 user s guide 15 3 writing programs in an oracle database you can distinguish five different types of stored program units functions procedures packages types and triggers the program editor allows you to create and modify these five types of program units in one uniform way 3.1 creating a program to create a new program press the new button on the toolbar and select the program window item and for example the function sub item you are now prompted for various variables that are relevant to this program type in this case where we are creating a function the name of the function the parameter list and its return type as the title of this dialog suggests this information comes from a template pl/sql developer provides several standard templates which you can modify as needed you can also define new templates information about defining templates is provided in chapter 24 after you have entered the variables and pressed the ok button a program editor window appears with a template function in it each program you create in the program editor unit must start with the familiar create or replace sql syntax in this case we are creating a function even and the source file could look like this at the left side of the editor you see the code contents which displays the structure of the program unit this is useful when navigating large program units such as package bodies and type bodies this feature is described in detail in chapter 20.12 above the editor you see the code hierarchy which displays the hierarchy from the cursor position in this case it shows that you are located at a statement the return statement within a sequence of statements within a function for complex programs this can be helpful to see where exactly you are

[close]

Comments

no comments yet

YOUBLISHER
About
What Others Say
Sitemap
Impressum

PUBLISHERS
Login
Signup
Tutorials
FAQ
Support

BUSINESS
Overview
Advertising
Support

DEVELOPERS
API

LEGAL
Report a Copyright Violation
Copyright FAQ
Terms of Use
Privacy Policy