Chatee ahora con Soporte
Chat con el soporte

SQL Navigator for Oracle 8.0 - User Guide

Quick Overview Working With SQL Navigator Navigation Oracle Logon Code Editor Visual Object Editors Team Coding and Version Control Systems Modules, Windows And Dialogs
Analyze Tool Auto Describe Tool Benchmark Factory Bookmarks Dialog Capture Web Output Change Logon Password Dialog Code Analysis Code Assistant Code Road Map Code Templates Code Test Database Source Code Search Dialog DB Navigator Describe Difference Viewer Edit Data ER Diagram Explain Plan Tool Export Table Find and Replace Dialog Find objects Dialog Find Recycle Bin Objects Dialog Formatting Options HTML Viewer Import HTML as PL/SQL Import Table Java Manager Job Scheduler Locate In Tree Output Window PL/SQL Profiler Profile Manager Project Manager Publish Java to PL/SQL Quick Browse Rename Object Search Knowledge Xpert Select DB Object Dialog Server Output Server Side Installation Wizard Session Browser Source Preview SQL Modeler SQL Optimizer Task Manager Web Support Configuration Dialog Wrap Code
View | Preferences About Us

HTML Viewer

Show HTML in the integrated viewer.

This eliminates the need to switch from your coding environment to an external browser.

TIP:

  • Enable Capture Web Output so each time you execute PL/SQL code, the generated HTML is displayed in the integrated viewer. If the PL/SQL procedure is run under the debugger, the HTML output is not visible until the procedure is complete.

  • You can select links and submit forms from the integrated viewer. If the link or submit target is another PL/SQL generated page then that page appears in the viewer. If it is an external link then an error message will appear. You must fill in the Web Support Configuration Dialog for this to work correctly.
  • Use the Web Support Configuration Dialog to specify where images can be loaded or enter the details of your web server's configuration.

  • Click View in External Web Browser to open the page in your default Windows web browser.

    This is useful for testing links to pages that are not PL/SQL generated. SQL Navigator will map images as defined in the Web Support Configuration Dialog, but this mapping will only apply to the generated page. All links, frame sources and your browser and Web server, not SQL Navigator, will handle form posting.

  • Click File | Print to print the page.

 

Stored Procedure > HTML

Developing Oracle Web server applications involves programming with PL/SQL using the PL/SQL Web toolkit supplied with Oracle Web Server. SQL Navigator provides an integrated development environment with advanced coding, testing and debugging of PL/SQL programs for Oracle Web server.

Actions Description

Enable the web server

Select Session | Capture Web Output.

Open the procedure for editing.

Code Web Server Procedures in the Code Editor.

The editor includes drag and drop coding for Web toolkit packages, including htp and htf items.

Execute the procedure.

Execute the procedure in the Code Editor.

Note: You can use the SQL Navigator Debugger to step through the stored procedure, if you want to debug the generation of HTML. However, the HTML will not be displayed until the stored program has completed execution.

Preview HTML output

View the translated HTML page in the HTML Viewer

TIP: Use the drag and drop feature as you would for any script development. The Web Server Syntax allows you to drag Web server syntax directly into your script. The results of dragging and dropping syntax into your program are displayed.

Compile and save your script.

Use the Code Editor.

See also Import HTML as PL/SQL for HTML > Stored Procedure.

Import HTML as PL/SQL

 

Convert a HTML file into a PL/SQL stored procedure. The stored procedure will in turn output the HTML code via the Oracle Web Toolkit.

Actions Description
Enable the web server Select Session | Capture Web Output.
Open the Code Editor. Click View | Code Editor.
New Stored Object Create a new stored object in the Code Editor. Enter the name and the parent schema of the new procedure.

Import HTML file as PL/SQL

Click Tools | Import HTML as PL/SQL

The import process wraps each line of the imported HTML file inside the htp.print ( … ); markers.

PL/SQL statements can be embedded in HTML code inside comments; for example:

<!--PLSQL a_random_plsql_statement; -->

These comments must start with the string

<!--PLSQL

and end with

-->

You can put things in the declaration section of the procedure (to declare a cursor, for example) by ensuring they come first in the file, before the first <HTML> tag. For example:

<!—PLSQL

CURSOR emp_cur IS

SELECT ename

FROM emp;

Save the program to the database. When the HTML is imported into the stored program, you can save the program to the database.

See also HTML Viewer for Stored Procedure > HTML.

 

Sample code for displaying query results in a HTML page

The following example code will display details from a query in a web browser.

First, create a table named emp with a column ename. Add some data to the ename column, and then run the following procedure with the SQL Navigator Web Development Module enabled.

 

PROCEDURE PLH_EXAM1 is—this procedure generated from "\\phanevski1\c$\docs\EXEone.HTM".—warning: any changes made to this procedure will not be—reflected in the original HTML file.

CURSOR emp_cur IS

SELECT ename

FROM emp;

 

begin

htp.print(‘ ‘);

htp.print(‘<HTML>’);

htp.print(‘<HEAD>’);

htp.print(‘<TITLE>Embedded PL/SQL Example</TITLE>’);

htp.print(‘</HEAD>’);

htp.print(‘<BODY>’);

htp.print(‘<H1>Employee Names</H1>’);

htp.print(‘<TABLE>’);

htp.print(‘ ‘);

FOR emp_rec IN emp_cur LOOP

htp.print(‘ <TR>’);

htp.print(‘ <TD>’);

htp.print(emp_rec.ename);

htp.print(‘</TD>’);

htp.print(‘ </TR>’);

htp.print(‘ ‘);

END LOOP;

htp.print(‘</TABLE>’);

htp.print(‘</BODY>’);

htp.print(‘</HTML>’);

end;

Import Table

Open the Import Tables window

Open the Import Tables window from Object Menu | Import Table.

 

Select the tables to import (1)

Option Further Options and Description

Import all tables

Import all tables in the DMP file into the current user's schema regardless of which user the tables belong to.

Specify From User To User

Import all the tables owned by the From User to the To User. Specify the from and to users in the relevant fields.

To import tables from more than one user, use a space or comma (,) to separate the user names.

Manually enter table names

Type the names of the tables to import and click Add.

Do not include the schema prefix in the table name.

 

Select import options (2)

Option Description

Objects to export

Select the objects you want imported to the database from the DMP file.

Additional Parameters

Field Description

Reuse existing data files

Reuses the existing datafiles making up the database. Selecting this parameter causes the Import utility to include the Reuse parameter in the datafile clause of the CREATE TABLESPACE statement. This results in the Import utility reusing the original database's datafiles after deleting their contents.

Note:

  • The export file contains the datafile names used in each tablespace. If you select this parameter and attempt to create a second database on the same system the Import utility will overwrite the first database's datafiles when it creates the tablespace. In this situation, it is recommended that this parameter is deselected so that an error occurs if the datafiles already exist when the tablespace is created. In addition, if you need to import into the original database, select the Ignore errors parameter to add to the existing datafiles without replacing them.
  • If datafiles are stored on a raw device, deselecting this parameter does not prevent files from being overwritten.

Commit after each array insert

Sets the Import utility to commit after each array insert.

By default, the Import utility commits only after loading each table. If an error occurs, a rollback is performed before continuing with the next object.

Selecting this parameter prevents rollback segments from growing inordinately large and improves the performance of large imports. If the table has a uniqueness constraint it is recommended that this parameter is selected. If a table does not have a uniqueness constraint, the Import utility could produce duplicate rows if you reimport the data.

If a table has nested table columns or attributes, the contents of the nested tables are imported as separate tables. Therefore, the contents of the nested tables are always committed in a transaction distinct from the transaction used to commit the outer table.

If this parameter is not selected and a table is partitioned, each partition and subpartition in the export file are imported in a separate transaction.

For tables containing LONG, LOB, BFILE, REF, ROWID, UROWID, or DATE columns, array inserts are not done. If this parameter is selected, the Import utility commits these tables after each row.

Ignore errors

Specifies how object creation errors should be handled. If selected, the Import utility overlooks object creation errors when it attempts to create database objects, and continues without reporting the errors. Note that only object creation errors are ignored; other errors, such as operating system, database, and SQL errors, are not ignored and may cause processing to stop.

In situations where multiple refreshes from a single export file are done and this parameter is selected, certain objects may be created multiple times (although they will have unique system-defined names). You can prevent this for certain objects (for example, constraints) by deselecting the Constraints parameter when importing. If you do a full import with the Constraints parameter deselected, no constraints for any tables are imported.

If a table already exists and the Ignore errors parameter is selected, then rows are imported into existing tables without any errors or messages being given. This may be helpful when importing data into tables that already exist in order to use new storage parameters or because you have already created the table in a cluster.

If this parameter is not selected, the Import utility logs or displays object creation errors before continuing. If a table already exists, then errors are reported and the table is skipped with no rows inserted. Objects dependent on tables, such as indexes, grants, and constraints, will not be created.

Note: When importing into existing tables, if no column in the table is uniquely indexed, rows may be duplicated.

Show export file contents only

When this parameter is selected the contents of the export file are displayed and not imported. The SQL statements contained in the export are displayed in the order in which the Import utility will execute them.

Buffer size (leave blank for default)

The size of the buffer, in bytes, through which the data rows are transferred.

BUFFER determines the number of rows in the array inserted by the Import utility. The following formula gives an approximation of the buffer size that inserts a given array of rows:

buffer_size = rows_in_array * maximum_row_size

For tables containing LONG, LOB, BFILE, REF, ROWID, UROWID, or DATE columns, rows are inserted individually.

The size of the buffer must be large enough to contain the entire row, except for LOB and LONG columns. If the buffer cannot hold the longest row in a table, the Import utility attempts to allocate a larger buffer.

Note: See your Oracle operating system-specific documentation to determine the default value for this parameter.

Record Length

The length, in bytes, of the file record.

The RECORDLENGTH parameter is necessary when you must transfer the export file to another operating system that uses a different default value.

If you do not define this parameter, it defaults to your platform-dependent value for BUFSIZ. For more information about the BUFSIZ default value, see your Oracle operating system-specific documentation.

You can set RECORDLENGTH to any value equal to or greater than your system's BUFSIZ. (The highest value is 64 KB.)

Changing the RECORDLENGTH parameter affects only the size of data that accumulates before writing to the database. It does not affect the operating system file block size.

You can also use this parameter to specify the size of the Import I/O buffer.

Note: Note: See your Oracle operating system-specific documentation to determine the proper value or how to create a file with a different record size.

Provide a feedback dot each time n rows are exported

Displays a period each time the number of specified rows has been imported.

For example, if you specify 10, Import displays a period each time 10 rows have been imported.

Note: The FEEDBACK value applies to all tables being imported; it cannot be set on a per-table basis.

Specify files

Field Description

Dump file name

The name of the export file to import.

The default file extension is .dmp. This field is mandatory.

Parameter file name (.dat)

The name of the file that contains the list of import parameters.

This field is mandatory.

Log file name (.log)

The name of the log file.

All informational and error messages are written to the log file (if specified).

 

Results (3)

When execution is complete there are three tabs in the Import Tables window. The results of the import are shown on the Output tab. The Log and Parameter file tabs show the contents of their respective files.

Java Manager

The Java Manager is a convenient alternative to the Oracle LoadJava and UnloadJava command line utilities. Use the Java Manager to load and unload multiple Java source files, classes, resources and archives.

Field Description

Files to Load, Add & Remove

Manage the list of objects to load.

Options

Set the command line switches found in the Oracle LoadJava and UnloadJava command line utilities.

For details, consult the Oracle documentation.

Documentos relacionados

The document was helpful.

Seleccionar calificación

I easily found the information I needed.

Seleccionar calificación