toad dba module guide

83
® USER'S GUIDE

Upload: smruti2012

Post on 27-Oct-2015

66 views

Category:

Documents


1 download

DESCRIPTION

TOAD DBA Module Guide

TRANSCRIPT

Page 1: TOAD DBA Module Guide

®

USER'S GUIDE

Page 2: TOAD DBA Module Guide

This guide contains proprietary information, which is protected by copyright. The information inthis guide is subject to change without notice and does not represent a commitment on the part ofQuest Software. The software described in this guide is furnished under a license or nondisclosureagreement. This software may be used or copied only in accordance with the terms of thisagreement. No part of this guide may be reproduced or transmitted in any form or by any means,electronic or mechanical, including photocopying and recording, for any purpose other than thepurchaser’s personal use without the written permission of Quest Software, Inc.

© 2000 Quest Software, Inc. All Rights Reserved.Quest™ is a trademark of Quest Software, Inc.

TOAD® is a registered trademark of Quest Software, Inc.Quest Software, Inc.

8001 Irvine Center DriveIrvine, CA 92618

USATel. 949-754-8000 / Fax 949-754-8999

[email protected]@quest.comwww.quest.com

TOAD® is a registered trademark of Quest Software, Inc. Other trademarks and registeredtrademarks used in this guide are the property of their respective owners.

Page 3: TOAD DBA Module Guide
Page 4: TOAD DBA Module Guide
Page 5: TOAD DBA Module Guide

Contents

C O N T E N T S

TOAD DBA Module User’s Guide

1 INTRODUCTION 7

2 CREATE MENU 9

DIRECTORY 10LIBRARY 11POLICY 12PROFILE 13ROLE 15ROLLBACK SEGMENT 16SNAPSHOT/M-VIEW 18TABLESPACE 25

3 DBA MENU 27

TOAD MONITOR 28REPAIR CHAINED ROWS 32IDENTIFY SPACE DEFICITS 33EXPORT UTILITY WIZARD 34IMPORT UTILITY WIZARD 42SQL*LOADER INTERFACE 50GENERATE SCHEMA SCRIPT 55COMPARE SCHEMAS 56

4 SCHEMA BROWSER DBA FUNCTIONS 59

DIRECTORIES 60JOBS 61LIBRARIES 63POLICIES 64PROFILES 67ROLES 69ROLLBACK SEGMENTS 70SNAPSHOTS 73TABLESPACES 75USERS 77

5 VIEW MENU 79

ORAINIT PARAMETERS 80

Page 6: TOAD DBA Module Guide

6 TOAD User’s Guide

NLS PARAMETERS 81

Page 7: TOAD DBA Module Guide

Introduction

TOAD DBA

This manual covers the optional TOAD DBA Module. TOAD DBA adds databaseadministration functionality for common database management tasks throughoutbase TOAD.

NOTE: A few DBA Options are on the View > Options > DBA page and arediscussed in the TOAD Monitor, Export Utility Wizard, Import Utility Wizard, andSQL*Loader Interface chapters.

Use TOAD DBA to

� Manage Disk Space

� Create or Modify User Accounts

� Create or Schedule Batch Jobs

� Compare Schemas

� Implement Database Security

� Run DBA Reports

This guide is for users who have the optional TOAD DBA Module. The guide coversthe following features:� DBA Options� Create Menu DBA features� DBA Menu� Schema Browser DBA functions

Page 8: TOAD DBA Module Guide

8

Note that this TOAD DBA Module Guide was prepared in December 2000. New orchanged TOAD features (including TOAD DBA features) since December 2000 arenot reflected in this version of the TOAD DBA Module User's Guide.

For details on base TOAD, including navigation and main windows, refer to theTOAD User's Guide. For details on installing and uninstalling TOAD, refer to theTOAD Getting Started Guide.

Remember, you can always access TOAD Help while in TOAD by pressingthe F1 Key.

Page 9: TOAD DBA Module Guide

Create Menu

The DBA Module adds the following menu items to the Create Menu: Directory,Library, Policy, Profile, Role, Rollback Segment, Snapshot/M-View, andTablespace.

Page 10: TOAD DBA Module Guide

10

DirectoryYou get to this window from the Create > Directory menu item or from the SchemaBrowser > Directory page > Create Directory button.

This window is used to create a new directory object. A directory object is an alias toa directory on the server's file system where external binary large objects (BFILEs)are stored.

You enter the Name and Path. A drilldown button opens a Browse for folderwindow where you can select a directory and click OK and the selected path isautomatically entered in the Path textbox.

The Show SQL button opens a SQL statement window where your Create DirectorySQL statement is displayed. The Clipboard button on the window copies thestatement to the clipboard. The Save to File button opens the Save As dialog whereyou can choose a path and enter a file name.

Page 11: TOAD DBA Module Guide

Chapter 2 Create Menu 11

Library

You get to this window from the Create > Library menu item or from the SchemaBrowser window > Libraries page > Create new Library button.

This window lets you create a new library object. A library object is an alias to anoperating system shared library (like a .DLL) that can be used in SQL or PL/SQL toallow calls to external functions.

Choose a Schema from the dropdown. This will be the schema that owns the library.

Textboxes let you enter the library Name (alias name for the library) and File Name.The Show SQL button displays the SQL Statement window where the CreateLibrary statement is displayed and can be copied via the Clipboard button or savedvia the Save to File button.

Page 12: TOAD DBA Module Guide

12

Policy

You get to this window from the Create > Policy menu item or from the SchemaBrowser window > Policies page > Create new policy toolbar button

This window lets you create a new policy through the DBMS_RLS package. If youdo not have DBMS_RLS you cannot use this function in TOAD. Refer to the Oracledocumentation for more information.

A textbox lets you enter the Policy Name.

A dropdown lets you select the Schema from which you will select the table or view.Radio buttons let you choose either Tables or Views.

A dropdown lets you select the Table (if the radio button selection is Tables) orView (if the radio button selection is Views).

Additional dropdowns let you select the Schema containing the predicate package,Predicate Package, and Predicate Function.

Checkboxes let you select the statement type(s): Select, Insert, Update, Delete.

Another checkbox allows you to Enable the Policy at Creation.

The Execute button Creates the Policy.

Page 13: TOAD DBA Module Guide

Chapter 2 Create Menu 13

Profile

You get to this window from the Create > Profile menu item or from the SchemaBrowser window > Profiles page > Create New Profile button.

This window lets you create a new profile. A profile is a set of limits on databaseresources. If you assign the profile to a user, that user cannot exceed those limits.

Page 14: TOAD DBA Module Guide

14

The Resource Parameters and Password Parameters tabs contain dropdownswhere you can select Default or Unlimited for numerous parameter items.

The Show SQL button opens the QParserBrowser window which displays SQLStrings, SQL Text, Clause Text, and Values.

Page 15: TOAD DBA Module Guide

Chapter 2 Create Menu 15

Role

You get to this window from the Create > Role menu item or from the SchemaBrowser window > Roles page > Create new Role button.

Name

Type in the Name of the Role.

Identification radio buttons

Select the desired identification method

Not Identified

By Password (type in the password in the password textbox)

Externally

Globally

Page 16: TOAD DBA Module Guide

16

Rollback Segment

You get to this window from the Create > Rollback Segment menu item or fromthe Schema Browser window > Rollback Segments page > Create new RollbackSegment button.

This window lets you create a new rollback segment. A rollback segment is an objectthat Oracle uses to store data necessary to reverse (undo) changes made bynon-completed transactions.

You enter the Name in the textbox and choose the Tablespace where you want therollback segment created from the dropdown.

Check the Public checkbox if you want the Rollback Segment to be public (availableto any instance). The default is unchecked.

There are dropdowns for Extents and Size.

Initial Extent specifies the size of the object's first extent.

Next Extent specifies the size of the next extent allocated to the object.

Min Extents specifies the total number of extents to allocate when the object iscreated.

Page 17: TOAD DBA Module Guide

Chapter 2 Create Menu 17

Max Extents specifies the maximum number of extents that can be allocated.

Optimal Size specifies an optimal size for the rollback segment.

The Show SQL button displays the SQL Statement window which displays thecreate statement for your new rollback segment. The Clipboard button lets you copythe statement to the clipboard. The Save to File button lets you save the statement.

Page 18: TOAD DBA Module Guide

18

Snapshot/M-View

You get to this window from the Create > Snapshot/M-View menu item or from theSchema Browser window > Snapshots page > Create New Snapshot button.

Page 19: TOAD DBA Module Guide

Chapter 2 Create Menu 19

The Snapshot/MView window lets you create, update, or modify a snapshot (alsoreferred to as a materialized view).

A snapshot is basically a partial (subset) or complete copy of a table. You can setyour TOAD snapshots to be read-only or updateable (which allows users to insert,modify, or delete rows). Snapshots can be stored in the same database as the mastertable or in a different database. Snapshots provide an easy way to copy a table, forexample from corporate to remote offices, so that everyone can have access to thedata without having to access information across a network. So, network traffic isminimized and system performance is maximized. Snapshots can also be used tooffload information.

The dropdown button lets you choose your Schema for the new snapshot.

Name lets you enter the name for the new snapshot.

The Show SQL button opens the SQL Statement window which shows thecorresponding Create SQL statement. You can copy the statement to the clipboardvia the Clipboard button or save it via the Save to File button.

The window has 4 tabs: Snapshot Info, Physical Attributes, Snapshot SubQuery, andPartitions.

Snapshot Info tab

Cluster checkbox

If checked, TOAD will create the snapshot as part of the cluster specified.

Cluster textbox

This is where you enter the name of the cluster.

Cluster List box

This displays the cluster columns. You can modify this list with the Add, Edit, andDelete buttons.

Page 20: TOAD DBA Module Guide

20

Tablespace dropdown

Select the tablespace in which you want your snapshot to be created.

Logging checkbox

If checked, TOAD will log the creation of the snapshot, partition, or LOB storagecharacteristics in the redo log file.

Cache checkbox

If checked, then data blocks will be placed in the buffer cache when a table scan isperformed.

Parallel checkbox

If checked, the snapshot will be parallelized.

Parallel Number box

If the Parallel checkbox is checked, this input box is enabled. You enter the degree ofparallelism (the number of threads used) or you can use the up down arrows to scrollthrough the numbers.

Using Index checkbox

If checked, TOAD lets you specify parameters for the snapshot indexes. If thisoption is checked, the drilldown button is enabled. The drilldown button invokes thePhysical Attributes window.

Allow Updates checkbox

If checked, you can update the snapshot (read-write). If unchecked, the snapshot isread-only.

Enable Query Rewrite checkbox

If checked, the snapshot is enabled for query rewrite.

Page 21: TOAD DBA Module Guide

Chapter 2 Create Menu 21

Build checkbox

If checked, you can specify when to populate the snapshot. If checked, the radiobuttons are enabled. You can choose to build Immediate or build Deferred.Immediate will populate the snapshot immediately. Deferred populates the snapshotduring the next refresh.

On Prebuilt Table checkbox

If checked, the table will be registered to the preinitialized snapshot. The table andsnapshot must have the same name. If checked, the radio buttons are enabled. If youselect Without Reduced Precision, the precision of the table or snapshot columnsmust match exactly with the precision of the subquery results. If you select WithReduced Precision, the precision of the table or snapshot view columns do not haveto exactly match the subquery results.

Refresh checkbox

If checked, you can customize how Oracle will automatically refresh the snapshot. Ifchecked, the refresh options are enabled.

Never Refresh checkbox

If checked, the snapshot will not automatically refresh.

Refresh Options

Refresh Mode dropdown Fast, Complete, Force

Fast - only updates data in the snapshot log associated with master/detail table

Complete – re-executes the snapshot view

Force - If fast refresh is possible then it performs a fast refresh, otherwise itperforms a complete refresh

Page 22: TOAD DBA Module Guide

22

On Demand checkbox

This is mutually exclusive to the On Commit checkbox. If checked, snapshots will berefreshed on demand.

On Commit checkbox

This is mutually exclusive to the On Demand checkbox. If checked, snapshots willrefresh automatically during the next commit.

Date

Start With

This is mutually exclusive to the Next checkbox. If checked, you can use thedropdown to pull up a calendar where you select a date for the first automatic refreshtime.

Next

This is mutually exclusive to the Start With checkbox. If checked, you can use thedropdown to pull up a calendar where you select a date to calculate intervals betweenauto refreshes.

With

Primary Key radio button

If selected, a primary key snapshot will be created.

Rowid radio button

If selected, a rowid snapshot will be created.

Page 23: TOAD DBA Module Guide

Chapter 2 Create Menu 23

Rollback Segment checkbox

This lets you specify the rollback segment to use. If checked, it enables the Masterand Local radio buttons.

Master radio button

If the Rollback Master option is selected, the remote rollback segment will be used atthe remote master for the snapshot.

Local radio button

If the Rollback Local option is selected, the remote rollback segment will be used forthe snapshot that is in the local refresh group.

Default Segment checkbox

If checked, the snapshot will use the default rollback segment. If unchecked, theRollback Segment textbox is enabled.

Rollback Segment textbox

This is enabled if the Default Segment checkbox is unchecked. You type in therollback segment that will be used.

Physical Attributes tab

The physical attributes tab contains dropdowns and value boxes that let you definephysical options such as percent free, storage extents, and buffer pool.

Snapshot/MView Subquery tab

This lets you enter the subquery that is to be used to generate the snapshot.

Page 24: TOAD DBA Module Guide

24

Partitions tab

In order for this tab to be enabled you must enter a valid subquery into the snapshotsubquery tab. You select columns from the Available Columns list to determinewhich columns the partition will be based upon. Double-click on the column name or(Click on the column and Click the single right arrow) to move the selected columnsinto the Partitions Columns list.

Add a Partition

Once you select columns for the partitions to be based upon, you can then add apartition.

For range partitions, you do this by clicking the Add button. The Add Partitiondialog displays, and you can provide a partition name. You must enter the upperrange for each column within the partition, or select Maxvalue from the dropdownlist on that dialog. (NOTE: String value upperbounds must be enclosed in singlequotes within the grid, e.g. for a Last Name column with a datatype of varchar2, anupper bound could be 'Smith'. The single quotes must be entered into the grid.)

To add a hash partition, select the tablespaces to use for the hash partition.

You can also alter snapshots through the Schema Browser window > Snapshotspage > Alter button.

Page 25: TOAD DBA Module Guide

Chapter 2 Create Menu 25

Tablespace

You get to this window from the Create > Tablespace menu item or from theSchema Browser window, Tablespaces page, Create New Tablespace button.

Page 26: TOAD DBA Module Guide

26

Textboxes let you enter names. Dropdowns let you specify extents. Radio buttons letyou specify Temporary or Permanent objects.

With Extent Management checked you can choose Dictionary, if you want thetablespaces to use the SQL dictionary tables to track space usage. If you chooseLocal, then bit maps will track space usage.

Page 27: TOAD DBA Module Guide

DBA Menu

All the items in the DBA Menu are part of the TOAD DBA Module. The DBA Menuitems are: TOAD Monitor, Repair Chained Rows, Identify Space Deficits, ExportUtility Wizard, SQL*Loader Interface, Generate Schema Script, and CompareSchemas.

Page 28: TOAD DBA Module Guide

28

TOAD Monitor

You get to this window from the DBA > TOAD Monitor menu item.

TOAD Monitor lets you monitor database performance with six charts: Logical IO,Physical IO, Event Waits, Sessions, Call Rates, and Miss Rates.

TOAD Monitor must be launched in order to work. You can launch it manually, oryou can set Monitor to launch automatically by checking the Open a monitorwindow for each connection checkbox on the View > Options > DBA page.

TNS Ping checkbox

If checked, TOAD will ping the Oracle server (using TNS ping) before it runs thequery.

Ping checkbox

If checked, TOAD will perform a TCP/IP ping to the Oracle server before it runs thequery.

Page 29: TOAD DBA Module Guide

Chapter 3 DBA Menu 29

Right–click on a graph to access a right-click menu that contains the menu itemsZoom (displays the enlarged graph in its own window) and Print.

You can set up numerous thresholds and alerts in the View > Options > Monitorpage

Each item in the series list corresponds to one line on the graph. You can enter theminimum and maximum threshold values.

Checkboxes let you Enable alerts and Use Tray Icon. If Enable alerts is checked,TOAD alerts you when a threshold has been exceeded. Use Tray Icon will display ablinking TOAD icon in your system tray if you have an alert and you have enabledalerts. The TOAD Monitor window must be open for alerts to be enabled. (InWindows NT you can click on the blinking TOAD and the TOAD Monitor windowwill display in the foreground). You can also have alerts emailed to you.

Page 30: TOAD DBA Module Guide

30

The Email button invokes the Email Alerts window which is where you set up thesender and receiver information.

You should consult your email administrator to determine the proper settings.

From box

Enter your email address. This is where you wish to receive email alerts.

To, Cc, Bcc boxes

Enter the recipients’ email addresses.

Subject

This is the subject of the email. The default entry is TOAD Monitor Alert, but youcan edit this if you wish.

The body of the email will contain the alert message.

Page 31: TOAD DBA Module Guide

Chapter 3 DBA Menu 31

NOTE: The SMTP Server must be specified and may not be the same as theexchange server.

Port

This is the port number on the machine where the SMTP server is listening. Thedefault is 25.

If you click the Alerts button a history of alerts will display. Alerts are stored inmemory until you close TOAD Monitor.

Page 32: TOAD DBA Module Guide

32

Repair Chained Rows

You get to this window from the DBA > Repair Chained Rows menu item.

This window shows tables that have chained rows.

When data for a row in a table cannot fit into a single data block, it is stored in achain of data blocks (more than one data block). The original row of data points tothe new block or blocks of data. A result of chained rows is that Oracle must scanmore than one block of data to retrieve information.

Analyze tab

Click the ADD button to bring up a Select Tables to Analyze menu where you canselect the schema (from a dropdown list) and table(s) from a list of tables in theschema to analyze. Click in the checkbox preceding the table(s) to select or unselectthe table(s). Select All and Select None buttons help with quick selection.

Data tab

This displays the schema, table name, and the number of rows chained in the table.

Repair tab

This creates an intermediate table, copies chained rows to it, deletes the chained rowsfrom the existing table(s), and then copies the rows back into the existing table(s).You might need to increase the existing table(s)' data block size to completelyeliminate chaining completely.

After selecting your table(s) you name your intermediate table. You can also select arollback segment from the dropdown.

Results tab

The Results tab lists the tables that were not repaired and the reasons.

Page 33: TOAD DBA Module Guide

Chapter 3 DBA Menu 33

Identify Space Deficits

You get to this window from the DBA > Identify Space Deficits menu item.

This displays tables that do not have enough free disk space to allocate their nextextent.

The Alter Tablespace button invokes the Alter Tablespace window for the selectedtablespace which you can then modify.

Page 34: TOAD DBA Module Guide

34

Export Utility Wizard

You get to this window from the DBA > Export Utility Wizard menu item

Use this window to export a schema script using Virtual DBA routines.

NOTE: You can set Export to execute in either the Foreground or Backgroundthrough the View > Options > DBA page.

This is a wizard that lets you easily transfer data objects between Oracle databases.

In the first step radio buttons let you choose what you want to export. The choicesare:

Tables - exports selected tables and all dependent objects

Users - exports all objects from the users that you select

Database - exports an entire database

After you make your selection click the Next button.

Page 35: TOAD DBA Module Guide

Chapter 3 DBA Menu 35

Tables

If you select tables from the first wizard window and click the Next button, the nextwindow to display will be a table selection window.

The top dropdown lets you select the Schema.

Tables from that schema will then display in the left panel from which you can selectwhich table(s) you want to export. Your selections will display in the SelectedTables List (right panel).

Select the table or tables by double-clicking, or single-click and click the appropriatesingle arrow. Double arrows move the entire list from one panel to another.

After your selections are complete, click Next to advance to the next window.

Page 36: TOAD DBA Module Guide

36

The next window contains checkboxes for selecting or deselecting additionalparameters for your export file.

Parameters checkboxes

Compress

If checked, export will flag table data for consolidation into one initial extent uponexport.

Export Table Rows

If checked, the rows of table data will be exported.

Direct Path

If checked, TOAD will use a direct path instead of a conventional path for export.

Record

If checked, records incremental or cumulative export in SYS tables INCEXP,INCFIL, and INCVID.

Page 37: TOAD DBA Module Guide

Chapter 3 DBA Menu 37

Indexes

If checked, indexes will be included in the export.

Constraints

If checked, constraints will be included in the export.

Grants

If checked, object grants will be included in the export.

Consistent

If checked, TOAD will ensure that data does not change during the execution of theexport.

Buffer entry box

This is where you specify the size in bytes that the buffer uses to fetch rows. (0=1row at a time)

Record Length entry box

This is where you specify the file record length, in bytes.

Statistics dropdown

You can choose Estimate, Compute, or None.

Provide a feedback dot... box

Here you specify how many rows you want exported before a feedback dot isdisplayed.

Select the Next button to advance to the next window in the wizard.

Page 38: TOAD DBA Module Guide

38

The next window is where you enter the filenames. Drilldown buttons let you searchthrough your files.

Output File name box

You can enter a name for your export file.

Log File name box

Enter the name of your log file. This is the file that will receive informational anderror messages.

Parameter Filename box

Enter the parameter filename. This is the file that contains a list of export parameters.

Click the Next button to advance to the next window in the wizard.

Page 39: TOAD DBA Module Guide

Chapter 3 DBA Menu 39

The next window is where you select your export action from a radio button list ofactions. The choices are:

Execute Now

Schedule to run later

Simply close after building the parameter file

Page 40: TOAD DBA Module Guide

40

Users

If you select the Users export radio button in the first wizard window then your nextwindow will be a users selection window.

Available Users will display in the left panel. Select the User(s) you want to export(which will move to the Selected Users list) by double-clicking or single-click andclick the appropriate single arrow. Double arrows move the entire list from one panelto another.

Select the user or users by double-clicking, or single-click and click the appropriatesingle arrow. Double arrows move the entire list from one panel to another.

After your selections are complete, click Next to advance to the next window.

The following windows are the same as the last 3 windows in the Database Optionwhere you select your parameters, specify file names, and choose your export action.

Page 41: TOAD DBA Module Guide

Chapter 3 DBA Menu 41

Database

If you choose Database, the following windows are the same as the last 3 windows inthe Tables Option where you select your parameters, specify file names, and chooseyour export action.

Page 42: TOAD DBA Module Guide

42

Import Utility Wizard

You get to this window from the DBA > Import Utility Wizard menu item.

This is a wizard that lets you easily transfer data objects between Oracle databases.

Note: You can set Import to execute in either the Foreground or Backgroundthrough the View > Options > DBA page.

In the first step radio buttons let you choose what you want to import. The choicesare:

Tables – imports tables and their associated objects

Users – imports schemas

Database – imports the entire export file

After you make your selection click the Next button.

Page 43: TOAD DBA Module Guide

Chapter 3 DBA Menu 43

Page 44: TOAD DBA Module Guide

44

Tables

If you select tables from the first wizard window and click the Next button, the nextwindow to display will be a table selection window.

A checkbox lets you Show only users who own objects.

The top dropdown lets you select the Schema.

Tables from that schema will then display in the left panel from which you can selectwhich table(s) you want to import. Your selections will display in the SelectedTables List (right panel).

Select the table or tables by double-clicking, or single-click and click the appropriatesingle arrow. Double arrows move the entire list from one panel to another.

After your selections are complete, click Next to advance to the next window.

Page 45: TOAD DBA Module Guide

Chapter 3 DBA Menu 45

In the next window, checkboxes let you select which objects to import. You cancheck multiple boxes. The checkboxes are Grants, Indexes, Table rows, andConstraints (enabled for Oracle 8.1 or later).

Record length box

You can specify the length of the file record, or leave it blank which will default touse the platform’s BUFSIZ value.

You can also select additional options including:

Buffer size box

Specify the size in bytes that the buffer uses to fetch rows. (0=1 row at a time)

Provide a feedback dot... box

Specify how many rows you want imported before a feedback dot is displayed.

Select the Next button to advance to the next window in the wizard.

Page 46: TOAD DBA Module Guide

46

The next window is where you enter the filenames. Drilldown buttons let you searchthrough your files.

Export file name box

Enter a name for your export file.

Log File name box

Enter the name of your log file.

Index File name box

Enter the name of your index file.

Parameter Filename box

Enter the parameter filename. This file contains a list of import parameters.

Page 47: TOAD DBA Module Guide

Chapter 3 DBA Menu 47

The next window is where you select your export action from a radio button list ofactions. The choices are:

Import Now

Schedule to run later

Just build the parameter file

After you make your selection, click Finish.

Page 48: TOAD DBA Module Guide

48

Users

If you select the Users import radio button in the first wizard window then your nextwindow will be a users selection window.

A checkbox lets you Show only users who own objects.

Select the users you are importing from and to from the From and To dropdowns.

You can remove users from the selection list by clicking on the name and clickingthe Remove button.

After your selections are complete, click Next to advance to the next window.

The following windows are the same as the last 3 windows in the Tables Optionwhere you select your parameters, specify file names, and choose your export action.

Page 49: TOAD DBA Module Guide

Chapter 3 DBA Menu 49

Database

If you select the Database radio button the next window contains radio buttons foryou to select a schema.

You can also select the type of incremental export. Note that you can choose not tohave an incremental export.

Click Next to continue.

The following windows are the same as the last 3 windows in the Tables Optionwhere you select your parameters, specify file names, and choose your export action.

Page 50: TOAD DBA Module Guide

50

SQL*Loader Interface

For more information on the SQL*Loader Interface, including step-by-stepexamples, see the Overview of the TOAD SQL*Loader Interface, a PDF documentthat is included in your TOAD DBA installation.

You get to this window from the DBA > SQL*Loader Interface menu item.

NOTE: If you have difficulty running SQL*Loader, make sure that you have thecorrect version installed. You can do this by running the executable with noparameters in a command prompt window. Note that the executable on the servercan only be run from the server.

The TOAD SQL*Loader Interface is a utility that lets you graphically build a controlfile for use with the SQL*Loader, a database server application. It can also runSQL*Loader in either the foreground or the background. (The ForegroundBackground radio button options are on the View > Options > DBA page.) It canschedule the SQL*Loader execution as a Windows Job for later execution.

Source Files tab

This is where you enter the list of the data files that you want to load into one ormore tables. You must have at least one input file.

Page 51: TOAD DBA Module Guide

Chapter 3 DBA Menu 51

Input File

This is the data file which can be in stream, fixed, or variable format. The defaultformat is stream.

Bad File

This file will contain rejected records. It’s named the same as the input file bydefault, with a .BAD extension.

Discard File

This contains the records that were not inserted during the load, because they did notmatch any of the selection criteria.

Add button

Click Add to add your data file. The Add input file dialog will display.

Click the drilldown next to the Input file name entry box to choose the data file.

The Bad file and Discard file textboxes are automatically entered with their defaultextensions.

Page 52: TOAD DBA Module Guide

52

Record Format radio buttons

Stream Format

This is the default. Lines are read until an end-of-record marker is found (end-of-linecharacter, by default).

Fixed Record Format

Each record must be a fixed number of bytes in length.

Variable Record Format

Each record may be a different length, as specified by a special field – the first fieldin each record. (You must specify the length of this field.)

end of record box

If you leave this field empty the end-of-line character will be the end-of-record bydefault.

Discard up to _____ records box

This field indicates the maximum number of records to put into the discard file. Ifyou leave this box empty, it indicates that you want all records.

Once you have entered all the data click OK.

You can select many different input files if desired, but they must all have the samerecord layout. (They could have a different record format.)

Destination Tables tab

This is where you select the destination table(s).

Click the Add button and the Table Name Select window will display.

Page 53: TOAD DBA Module Guide

Chapter 3 DBA Menu 53

Double-click on a table or click on a table and click OK to select a table from the list.

The Tables Parameters tab and the Columns Parameters tabs let you enter theparameters for your destination table(s).

Parameters tab

You can name the control file whatever you wish, including the extension.

The Parameters tab also contains numerous options. You can always move yourmouse over a field to display microhelp information.

Preview Control File tab

This displays a preview of the contents of the control file. Simply click on this tab atany time to preview your control file.

Save button

Click Save at any time to save the control file. The control file is also automaticallysaved whenever you click Execute Now.

Execute Now button

This executes your control file and displays the SQL*Loader Status window.

SQL*Loader Status window

This window contains a Messages tab and a Log File tab.

Messages tab

If any errors occurred when running the loader, they are displayed in the messagestab. This tab also contains version information about the SQL*Loader and the time itwas executed.

Log File tab

This displays detailed information about what occurred during execution.

Page 54: TOAD DBA Module Guide

54

NT Job Scheduler

The SQL*Loader has a scheduler which lets you schedule the load as a windowstask. Clicking the Schedule button opens the NT Job Scheduler window. It lets youset the time for it to run and the frequency. Once you click OK your job is added.

In Windows Explorer, if you then click on the Scheduled Tasks folder you’ll seeyour job and its schedule information.

Page 55: TOAD DBA Module Guide

Chapter 3 DBA Menu 55

Generate Schema Script

You get to this window from the DBA > Generate Schema Script menu item. Thiswindow takes the current schema and builds DDL for all objects you select.

This is useful, for example, if your database crashes because you'll have a script torecreate all your objects.

If you choose the radio button Extract from Schema, it produces a schema script.

If you choose the radio button to Extract from Schema Definition File it producesa .def file.

You can check or uncheck the desired Objects and Options checkboxes.

Page 56: TOAD DBA Module Guide

56

Compare Schemas

You get to this window from the DBA > Compare Schemas menu item. Thiswindow lets you compare two schemas and tells you what has changed from theoriginal reference source to the comparison source.

Schemas tab

Select the Reference Source and the Comparison Source. Radio buttons let youchoose either Schema or a Definition File. If you choose Schema you choose theConnection and the Schema.

Options tab

Checkboxes let you select options and what object types will be compared.

Page 57: TOAD DBA Module Guide

Chapter 3 DBA Menu 57

Results are automatically displayed in the Comparison Results window.

Comparison Results window

Hierarchy tab

A Venn diagram symbol on the left of each numbered item indicates if it's new orhas been deleted.

The list details the new and deleted items.

Detailed Migration Report tab

This lists the code for the new and deleted items.

Statistics tab

This shows comparison totals for different elements such as the total deletions forgrants.

Page 58: TOAD DBA Module Guide
Page 59: TOAD DBA Module Guide

Schema Browser DBA functions

This chapter discusses the new Schema Browser DBA pages and functions.

Page 60: TOAD DBA Module Guide

60

Directories

You can create a new directory or alter an existing directory.

Objects Panel

This disbox letsthroughtarget p

You canwhich w

This let

This let

DetailThe De

y

Create a New Director

plays the Directory window. Type in the Name in the Name box. The Path you type in the path, or you can click the drill down button and browse your directory folders until you find your destination, click OK, and theath will display in the Path textbox.

also create a new directory through the Create > Directory menu itemill invoke the Directory window.

s you Alter the selected directory.

Alter Directory

y

Drop Director

s you drop the selected directory.

s Paneltails panel shows the directory path.

Page 61: TOAD DBA Module Guide

Chapter 4 Schema Browser DBA Functions 61

JobsYou can create, alter, execute, and drop jobs. You can also place jobs online oroffline and view job details.

Objects Panel

This displays the job definition window which includes a job number box, entryboxes for next date of execution and Interval, and a box for what to execute.

This displays a job definition window for the selected job, which you can then alter.

This button is only enabled when the selected job is Offline. This places the selectedjob Online, available for transactions.

This button is only enabled when the selected job is Online. This places the selectedjob Offline, unavailable for transactions.

This executes the selected job.

This drops the selected job.

Create New Job

Alter Jobs

Place Online

Drop Job

Place Offline

Execute Job Immediately

Page 62: TOAD DBA Module Guide

62

Details PanelThe upper details panel shows various parameters for the selected job, such as LOGUSER, NEXT DATE, and INTERVALS.

Page 63: TOAD DBA Module Guide

Chapter 4 Schema Browser DBA Functions 63

LibrariesYou can create, alter, or drop libraries. You can also view details.

Objects Panel

This displays the Library window where you can choose a schema from the schemadropdown list, enter the library name, and enter the file name.

This displays the Alter Library window for the selected library.

This drops the selected library.

Details PanelThe Details Panel lists the File Spec, Status, and Dynamic for the selected library.

Create Library

Drop Library

Alter Library

Page 64: TOAD DBA Module Guide

64

PoliciesYou can create, enable, disable, edit and drop policies. You can also view policydetails.

Create Policies is discussed in the Create Policy section of the Create chapter.

Page 65: TOAD DBA Module Guide

Chapter 4 Schema Browser DBA Functions 65

Objects Panel

Displays the Policy Definition window which has a textbox for the policy name. Italso has dropdowns for the Schema, Table/View (with radio buttons where youchoose Table or View), Schema Containing Predicate Package, and PredicateFunction.

Checkboxes let you check one or more of the following statement types: Select,Insert, Update, and Delete. A checkbox also lets you check whether or not you wantto enable the policy at creation.

This button is only enabled if the selected policy is disabled. This enables theselected policy.

This button is only enabled if the selected policy is enabled. This disables theselected policy. Disabled policies will have a red X preceding them in the object list.

This refreshes the selected policy.

This lets you edit the selected Policy's Predicate Package Source.

This d

Create New Policy

Enable Policy

Disable Policy

Refresh Policy

Edit Policy Predicate Package Source

y

Drop Polic

rops the selected policy.

Page 66: TOAD DBA Module Guide

66

Details PanelThe details panel displays various parameters for the selected policy such as theName, the Predicate Package, and the Predicate Function.

Page 67: TOAD DBA Module Guide

Chapter 4 Schema Browser DBA Functions 67

ProfilesYou can create, modify, and drop profiles. You can also view resource details.

Objects Panel

This creates and copies the SQL script to the clipboard.

This displays the Create Profile window which is discussed in the Create chapter ofthis guide.

This displays the Modify Profile window for the selected window, which has thesame features as the Create Profile window.

This drops the selected Profile.

Create New Profile

Drop Profile

Modify Profile

Create Scripts

Page 68: TOAD DBA Module Guide

68

Details PanelThe details panel lists the resource names, resource types and limits.

Page 69: TOAD DBA Module Guide

Chapter 4 Schema Browser DBA Functions 69

RolesYou can create, alter, and drop roles. You can also view roles and privileges details.

Objects PanelThe Objects Panel lists the roles.

This creates and copies the SQL script to the clipboard.

This invokes the Create Role window which is discussed in the Create chapter of thismanual.

This invokes the Alter Role window for the selected role.

This drops the selected role.

Details PanelThe Details Panel contains tabs for Roles details and Privileges details.

Create Role

Alter Role

Drop Role

Create Scripts

Page 70: TOAD DBA Module Guide

70

Rollback Segments

You can create, alter, and drop rollback segments. You can place rollback segmentsonline or offline. You can also view details of the parameters of rollback segments.

Objects Panel

This dis

You entpublic, kilobyte

This dis

This burollbacksegmen

P

Create New Rollback Segment

plays the Rollback Segment window for you to create rollback segments.

er the name, choose a tablespace from the dropdown, check or uncheckand enter extents (or choose the defaults). Notice the extents can be ins or megabytes from the dropdown menu.

plays an Alter Rollback Segment window for the selected rollback segment.

tton is only enabled if the rollback segment is offline. This places the selected segment online and makes it available for transactions. The info tab for thet (in the details panel) will list the status value as ONLINE.

lace Online

Alter Rollback Segment

Page 71: TOAD DBA Module Guide

Chapter 4 Schema Browser DBA Functions 71

This button is only enabled if the rollback segment is online. This places the selectedrollback segment offline and makes it unavailable for transactions. The info tab forthe segment (in the details panel) will list the status value as OFFLINE. Offlinesegments will have a red X icon displayed to the left of them in the segments list (onthe left panel).

This drops the selected Rollback Segment. A confirmation window will ask you ifyou are sure you want to drop the selected segment. Click YES to drop the segment.

Drop Rollback Segment

Place Offline

Page 72: TOAD DBA Module Guide

72

Details PanelThe Details Panel has Info and Stats tabs that list parameters and their values

The Info Tab on the Details Panel

The Stats Tab on the Details Panel

Page 73: TOAD DBA Module Guide

Chapter 4 Schema Browser DBA Functions 73

Snapshots

You can create, alter, refresh, and drop snapshots. You can also viewdetails. Snapshot are discussed in detail in the Snapshots/M-Views sectionof the Create Menu chapter of this guide.

Objects Panel

Displays the Snapshot window where you can create a new snapshot. Seethe Create Snapshot/M-View topic for more information.

This lets you alter the selected snapshot.

Refreshes and re-executes the snapshot view.

This drops the selected snapshot.

Create New Snapshot

Refresh Snapshot

Alter Snapshot

Drop Snapshot

Page 74: TOAD DBA Module Guide

74

Details Panel

The details panel contains tabs for Info, Snapshot Query, and Script.

Info tab

This lists the various parameters and values for the selected snapshot,such as the Generated Table, the Snapshot View, and whether or not thesnapshot is updateable.

Snapshot Query tab

This generates the SQL query for the selected snapshot.

Script tab

This displays the SQL script for the selected snapshot.

Page 75: TOAD DBA Module Guide

Chapter 4 Schema Browser DBA Functions 75

Tablespaces

You can create, alter, and drop tablespaces. You can place tablespaces online oroffline. You can also view details of tablespaces.

Objects Panel

This brings up the Tablespace window that lets you create a new tablespace.

This displays the alter tablespace window for the selected tablespace.

This button is only enabled if the selected tablespace is offline. This lets you placethe selected tablespace online.

This button is only enabled if the selected tablespace is online. This lets you placethe selected tablespace offline, unavailable for transactions.

This drops the selected tablespace.

Create New Tablespace

Alter Tablespace

Place Online

Place Offline

Drop Tablespace

Page 76: TOAD DBA Module Guide

76

Details PanelThe details panel has tabs for Datafiles, Free Space, Fragmentation, Objects,Quotas, and Extents.

Page 77: TOAD DBA Module Guide

Chapter 4 Schema Browser DBA Functions 77

UsersYou can create, modify, and drop users. You can also create and copy the SQL scriptto the clipboard. You can view details for roles and privileges.

This creates and copies the SQL script to the clipboard.

This invokes the Create User window.

This invokes the Modify User window for the selected user.

This invokes the New User Info window where you choose the user name for thecopy and the password.

This drops the selected user.

Modify User

Drop User

Copy This User

Create New User

Create Script

Page 78: TOAD DBA Module Guide

78

Details PanelThe details panel contains tabs for Info, Roles, and Privileges.

The Roles and Privileges tabs contain Revoke and Revoke all buttons whichRevokes the selected Role or Privilege (Revoke) or revokes all the Roles orPrivileges (Revoke all).

Revoke all

Revoke

Page 79: TOAD DBA Module Guide

View Menu

This chapter discusses the View menu items that have added functionality in theDBA Module. The View > Options menu has the additional category TOADMonitor which is discussed in the DBA chapter in the TOAD Monitor section.

View > Options also contains an Executables page where you can enter the paths ofSQL*Plus, SQL*Loader, Import, Export, TNS Ping, and Ping Executables.

Page 80: TOAD DBA Module Guide

80

Orainit Parameters

You access this window through the View > Oracle Parameters menu item. TheDBA Module lets you modify or edit the System Modifiable and Session Modifiableoptions.

If the option is modifiable (as indicated by a YES) the Edit button will let you editthe setting. Double-clicking on modifiable options also lets you change the setting.

Page 81: TOAD DBA Module Guide

Chapter 5 View Menu 81

NLS Parameters

You access this window through the View > NLS Parameters menu item.

This window is used to view the Session, Instance, and Database parameter settingsand to change Session and/or Instance parameters.

The window includes tabs for Session, Instance, and Database.

To change a NLS (National Language Support) setting, double-click on a parameterand enter the new setting in the popup window OR single-click on the parameterline, click the Edit button, then enter the new setting in the popup window.

If a parameter cannot be edited, the edit button will be disabled.

Notice that changing a value in one cell can cause a change in other cells. Forexample, if you change the NLS_TERRITORY from America to Japan, notice theNLS_CURRENCY symbol changes from the dollar to the yen.

Page 82: TOAD DBA Module Guide

INDEX

B

BFILEs 10

C

Chained Rows 32Cluster 19Compare Schemas 56Comparison Results Window 57Control File 50

D

Data Block 32DBMS_RLS 12Directory 10, 60Directory Object 10

E

Export Utility Wizard 34Extent 16, 26

Initial 16Extract from Schema 55Extract from Schema Definition File 55

G

Generate Schema Script 55

H

Help 8

I

Identify Space Deficits 33Import Utility Wizard 42

J

Job 61

L

Library 11, 63

N

National Language Support See NLS ParametersNLS Parameters 81NT Job Scheduler 54

O

Optimal Size 17Oracle Parameters 80

P

Partitions 24Policy 12, 64Profile 13, 67

Q

Quest SoftwareContact Information 2

R

Repair Chained Rows 32Role 15, 69Rollback Segment 16, 70

S

Schema Browser 59Snapshot/M-View 18, 73SQL*Loader Interface 50

Page 83: TOAD DBA Module Guide

Chapter 3 DBA Menu 83

T

Tablespace 25, 75TOAD DBA Module 7TOAD Getting Started Guide 8

TOAD User's Guide 8

U

User 77