Embarcadero RAPID SQL XE5 and 8.6 User Guide

Add to My manuals
1163 Pages

advertisement

Embarcadero RAPID SQL XE5 and 8.6 User Guide | Manualzz

Product Documentation

Embarcadero® Rapid SQL™

User Guide

Version 8.6/XE5

Published February, 2014

© 2014 Embarcadero Technologies, Inc. Embarcadero, the Embarcadero Technologies logos, and all other Embarcadero Technologies product or service names are trademarks or registered trademarks of Embarcadero Technologies, Inc. All other trademarks are property of their respective owners.

This software/documentation contains proprietary information of Embarcadero Technologies, Inc.; it is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright law. Reverse engineering of the software is prohibited.

Embarcadero Technologies, Inc. is a leading provider of award-winning tools for application developers and database professionals so they can design systems right, build them faster and run them better, regardless of their platform or programming language. Ninety of the Fortune 100 and an active community of more than three million users worldwide rely on Embarcadero products to increase productivity, reduce costs, simplify change management and compliance, and accelerate innovation. Founded in 1993, Embarcadero is headquartered in San Francisco, with offices located around the world. To learn more, please visit h

ttp://www.embarcadero.com

.

February 11, 2014

CORPORATE HEADQUARTERS

100 CALIFORNIA STREET

12TH FLOOR

SAN FRANCISCO, CALIFORNIA

94111 USA

EMEA HEADQUARTERS

YORK HOUSE

18 YORK ROAD

MAIDENHEAD, BERKSHIRE

SL6 1SF, UNITED KINGDOM

ASIA-PACIFIC HEADQUARTERS

L7. 313 LA TROBE STREET

MELBOURNE VIC 3000

AUSTRALIA

CONTENTS

Contents

Welcome to Rapid SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Additional Product Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Prerequisites and Preliminary Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Technical Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Database Support and Connectivity Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

More Information on Using this Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Application Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Starting Rapid SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Product Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Tutorial exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

Session 1: Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

Session 2: Productivity Enhancers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

Session 3: Scripting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

Session 4: Working with Code Workbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

Session 5: Building a Database Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

Session 6: Visual Query Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

Session 7: Live Data Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

Session 8: Code Analyst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

Session 9: SQL Debugging and Profiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

Specifying Rapid SQL application and feature options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

Configuring Feature Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

Explorer Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

Locking Down Rapid SQL Features Using the Registry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

Datasource and Server Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

Registering Datasources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

Specifying a Datasource Catalog Storage Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

Manually Registering or Editing Datasources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

Automatically Discovering Datasources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

Importing and Exporting Datasource Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

Working With Datasources from a Connect Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

Viewing Datasource Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

Unregistering Datasource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

RAPID SQL 8.6/XE5 USER GUIDE 3

CONTENTS

Connecting to Datasources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

Connecting to a Datasource From the Navigator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

Connecting to Datasources from an Alphabetical Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

Disconnecting from a Datasource. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

Trouble-shooting Client Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

Trouble-shooting Sybase Connectivity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

Trouble-shooting Oracle Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

Trouble-shooting DB2 LUW and DB2 z/OS Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

Trouble-shooting SQL Server Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

Using the Datasource Navigator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

Hiding and Displaying the Datasource Navigator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

Connected/Selected Datasource options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

Working with Bookmarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

Initiating Object Actions in the Navigator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

Working with Supplementary Organizer Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

Customizing the Navigator Display. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

Using the Manage Datasources Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174

Database Object Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

Supported Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

Asymmetric Keys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

Blob Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

Certificates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

Chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

Check Constraints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

Clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

Database Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

Database Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

DBSpaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191

Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

Domains. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

Encryption Keys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

Extended Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

4 RAPID SQL 8.6/XE5 USER GUIDE

CONTENTS

External Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

Foreign Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

Full-text Catalogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199

Full-text Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

Generators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

Java Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

Java Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

Java Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

Jobs (Oracle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

Job Queues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

Join Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

Logins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213

Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215

Materialized Query Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215

Materialized Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216

Materialized View Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

Outlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

Package Bodies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

Partition Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

Partition Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

Plans. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

Primary Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224

Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

Recycle Bin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228

Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228

Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

Schedules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

Segments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232

Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

RAPID SQL 8.6/XE5 USER GUIDE 5

CONTENTS

Shadows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

Structured Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

Symmetric Keys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235

Synonyms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236

System Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

System Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

System Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

Tablespaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242

Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243

Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245

Type Bodies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245

Unique Keys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246

User Datatypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247

User Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248

Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249

Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252

Creating objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

Overview and Common Usage of Object Wizards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

IBM DB2 for Linux, Unix, and Windows Object Wizards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258

IBM DB2 for z/OS Object Wizards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285

InterBase/Firebird Object Wizards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312

Microsoft SQL Server Object Wizards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331

MySQL object wizards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368

Oracle Object Wizards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376

Sybase ASE Object Wizards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428

Modifying objects using editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452

Overview and common usage of object editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452

IBM DB2 for Linux, Unix, and Windows Object Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460

IBM DB2 for z/OS Object Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479

InterBase/Firebird Object Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497

Microsoft SQL Server Object Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509

MySQL editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531

Oracle Object Editors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535

Sybase ASE Object Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565

Object actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584

Overview of object actions/operations execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584

Available object actions by DBMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588

6 RAPID SQL 8.6/XE5 USER GUIDE

CONTENTS

SQL Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716

ISQL Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716

Preprocessing #define and #include Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718

Toolbar Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722

ISQL Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723

DDL Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735

Open Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736

What Type of File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737

Insert File into Current File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738

Splitting Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739

Find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740

Replace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741

Regular Expressions Support in Rapid SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742

Goto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743

Sending SQL Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744

Renaming and Closing Query Window Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744

Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745

Saving and Closing Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747

Editing Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749

Executing Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759

Results Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780

Configuring Result Set Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780

Exporting Data to Other Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783

Setting Result Windows to Read Only Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783

Result Window Status Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783

Mailing Result Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783

Closing and Renaming Result Window Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784

Saving and Closing Result Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785

Editing Result Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786

Formatting Result Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 792

Notes on XML Types and Unicode Display in the Results Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . 797

Permissions Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798

Explicit Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798

Cascading Permissions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798

Using Roles to Grant Permissions and Privileges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799

Using Roles to Revoke Permissions and Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799

Grant Privilege(s) To . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799

Revoke Privilege(s) From . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800

RAPID SQL 8.6/XE5 USER GUIDE 7

CONTENTS

Deny Privileges From . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801

Project Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802

Project support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802

Create a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803

Working with Projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810

Version Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826

Version Control Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826

Version Control Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 828

Using Version Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831

Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848

Find in Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849

Database Search. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850

Database Search Wizard - Panel 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850

Database Search Wizard - Panel 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851

Database Search Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851

Script Execution Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 852

File Execution Facility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 852

Completing the Script/File Execution Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853

Script Execution Facility - Script Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853

File Execution Facility - Files Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854

File/Script Execution Facility - Target Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854

File/Script Execution Facility - Output Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855

File/Script Execution Facility - Notify Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855

Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856

Microsoft Task Scheduler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856

ETSQLX Command Line Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856

Visual Difference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857

Comparing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857

Comparing Database Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858

Navigating in the Visual Difference Dialog Box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859

Printing a Pane of the Visual Difference Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859

Searching in the Visual Difference Dialog Box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859

Setting Options in the Visual Difference Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 860

Query Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861

Query Builder Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862

Using Query Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871

8 RAPID SQL 8.6/XE5 USER GUIDE

CONTENTS

Data Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 902

Data Editor Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 902

Code Generation Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 911

Import Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912

Import Data Wizard - Panel 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 913

Import Data Wizard - Panel 2 for Text Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 914

Import Data Wizard - Panel 3 for Text Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 914

Import Data Wizard - Panel 2 for Excel Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 914

Embarcadero Products. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 915

Code Workbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 915

Enabling the Code Templates and Auto Replace Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 915

Maintaining Code Template Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 916

Maintaining Auto Replace Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917

Loading and Saving Custom Code Workbench Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 918

Code Analyst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919

Code Analyst DBMS Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 920

Code Analyst Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 924

Installing Code Analyst. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 924

Uninstalling Code Analyst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 925

Code Analyst Product Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 926

Code Analyst Tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928

Using the Code Analyst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 933

Rapid SQL Add-On Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 942

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . 942

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows Features. . . . . . . 943

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows Interface . . . . . . 946

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows Functionality . . . 950

Using the Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows . . . . . . 959

Embarcadero SQL Debugger for Microsoft SQL Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 961

Embarcadero SQL Debugger for Microsoft Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 962

Embarcadero SQL Debugger for Microsoft Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 969

Embarcadero SQL Debugger for Microsoft Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 972

Using the Embarcadero SQL Debugger for Microsoft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 980

Debugging a Sample Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 982

Embarcadero SQL Debugger for Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 992

Debugging Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 993

Embarcadero SQL Debugger for Oracle Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 995

RAPID SQL 8.6/XE5 USER GUIDE 9

CONTENTS

Embarcadero SQL Debugger for Oracle Functionality. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 998

Using the Embarcadero SQL Debugger for Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1006

Debugging a Sample Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1009

Embarcadero SQL Debugger for Sybase ASE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1019

Embarcadero SQL Debugger for Sybase ASE Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1020

Embarcadero SQL Debugger for Sybase ASE Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1022

Embarcadero SQL Debugger for Sybase ASE Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1025

Using Embarcadero SQL Debugger for Sybase ASE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1033

Rapid SQL PL/SQL Profiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1035

Setting Up Rapid SQL PL/SQL Profiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1036

Rapid SQL PL/SQL Profiler Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1036

Rapid SQL PL/SQL Profiler Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1037

Using Rapid SQL PL/SQL Profiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1044

Code Analyst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1052

Code Analyst DBMS Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1053

Code Analyst Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1056

Installing Code Analyst. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1056

Uninstalling Code Analyst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1057

Code Analyst Product Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1058

Code Analyst Tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1060

Using the Code Analyst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1065

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1130

10 RAPID SQL 8.6/XE5 USER GUIDE

W

ELCOME TO

R

APID

SQL

Rapid SQL is an integrated cross-platform database development environment that provides a highly-intuitive and well-integrated interface. Its graphical facilities simplify SQL scripting, object management, reverse-engineering, database project management, version control, and schema deployment. Additionally, it provides comprehensive tools for tuning and editing code to ensure high-performance and quality.

Rapid SQL offers support for all major databases including IBM DB2, InterBase/Firebird,

Microsoft SQL Server, MySQL, Oracle, Teradata, and Sybase.

The table below describes the major sections of Help.

Section

Getting Started

Datasource and Server

Management

Database Object

Management

Coding Environments/

Editors

Tools

Project Management

Rapid SQL Add-On

Tools

Description

Provides an introduction for new users and helps you set up Rapid SQL. Included is an investigation of the major user interface elements, detailed tutorial exercises, and instructions on configuring Rapid SQL features.

Shows you how to register the datasources that Rapid SQL will work against.This chapter also describes the extensive datasource management facilities.

Describes how to create new database objects, edit existing objects, and provides details on the operations you can perform against database objects.

Describes the development/execution/testing environments offered.

Tools provide search, script and file execution, scheduling, visual difference, a visual query builder, data import, a DML generation facility, a data editor, and an auto-replace tool for the scripting environment.

Rapid SQL provides project support and version control system integration.

License-dependent add-ons include:

Debuggers - Rapid SQL provides debugging environments for DB2 LUW, SQL Server,

Oracle, and Sybase ASE.

Oracle PL/SQL Profiler - captures metrics of various PL/SQL programmable objects as they are executed

Code Analyst - helps you identify time-consuming lines of code.

A

DDITIONAL

P

RODUCT

I

NFORMATION

The Embarcadero Web site provides access to information and resources useful through the life of your product. This includes access to:

• Technical Support

• Case studies, video presentations, webinars and white papers

• Product communities through the Embarcadero Developer Network

• Free trials of related products

RAPID SQL 8.6/XE5 USER GUIDE 11

PREREQUISITES AND PRELIMINARY TASKS > PREREQUISITES AND PRELIMINARY TASKS

See www.embarcadero.com/support :

P

REREQUISITES AND

P

RELIMINARY

T

ASKS

The following topics provide information on requirements that must be satisfied and initial setup tasks that must be performed before using Rapid SQL:

Technical Requirements

Database Support and Connectivity Options

Licensing

T ECHNICAL R EQUIREMENTS

Before using Rapid SQL, please verify that your environment meets the following requirements:

• Hardware Requirements

Operating System Requirements

NOTE: Users need full registry privileges during the installation and access to the keys under

HKEY_CURRENT_USER in the registry after installation.

H ARDWARE R EQUIREMENTS

Embarcadero Technologies recommends the following minimum hardware requirements:

• Pentium 4-level processor

• 1 GB of memory

• 1 GB of disk space

• 1024 x 768 display

O PERATING S YSTEM R EQUIREMENTS

Rapid SQL supports the following operating systems:

• Windows XP SP2 (32-bit and 64-bit)

• Windows Vista (32-bit and 64-bit)

• Windows 7 (32-bit and 64-bit)

12 RAPID SQL 8.6/XE5 USER GUIDE

PREREQUISITES AND PRELIMINARY TASKS > PREREQUISITES AND PRELIMINARY TASKS

• Windows 8

For more detailed information, see the following topics:

• XP Support

• Vista and Windows 7 Support

• 32-bit Versus 64-bit Operating System Support and Restrictions

XP S UPPORT

Windows XP has two user security groups:

• Users

• Power Users

Microsoft intentionally does not grant members of the Users Group the authority to install applications or make global changes to the system. Restricted Users are members of the Users

Group. Standard users belong to the Power Users Group. Microsoft grants members of the

Power Users Group the authority to install programs. You must be a member of the

Administrators Group in order to install and use Embarcadero Technologies applications.

Because Restricted Users are members of the Users Group, they cannot install and run

Embarcadero Technologies applications.

CAUTION: You must be a member of the Administrators Group in order to install and use

Embarcadero Technologies applications.

To open the Group Membership tab where you can determine your group and review the

Microsoft security guidelines:

1 On the Control Panel , open User Accounts .

2 On the Users tab, select a user and then click the Properties button.

3 Click the Group Membership tab.

V ISTA AND W INDOWS 7 S UPPORT

Windows Vista UAC and Windows 7 provide two user types:

• Standard user

• Administrator

Rapid SQL can be installed or uninstalled by an administrator or by a standard user using an administrator token. Standard users can run Rapid SQL.

CAUTION: For the purposes of running Rapid SQL, default standard user token privileges should not be modified. Modifying standard user token privileges can result in licensing issues which will prevent Rapid SQL from operating properly.

RAPID SQL 8.6/XE5 USER GUIDE 13

PREREQUISITES AND PRELIMINARY TASKS > PREREQUISITES AND PRELIMINARY TASKS

32BIT V ERSUS 64BIT O PERATING S YSTEM S UPPORT AND R ESTRICTIONS

If you install the 64-bit version of Rapid SQL and you are using custom drivers, you must be using

64-bit versions of those drivers when using the 64-bit version of Rapid SQL. Similarly, 32-bit versions of custom drivers must be used with the 32-bit Rapid SQL installation.

D ATABASE S UPPORT AND C ONNECTIVITY O PTIONS

Rapid SQL provides dedicated DBMS platform support with the following connectivity options:

• For use with IBM DB2, SQL Server, MySQL, Oracle, and Sybase ASE datasources, Rapid SQL is packaged with a set of proprietary drivers that work in conjunction with a supported set of clients that must be installed.

InterBase requires both client and driver software to be installed. Firebird requires driver software.

For information on the DBMS clients or client/driver combinations that must be installed, see " Packaged Embarcadero Drivers with Native Client Support " on page 15.

• Alternatively, you can connect to a supported DBMS using a Type 4 JDBC driver packaged with Rapid SQL. For a listing of the third-party JDBC drivers, see " Third-party JDBC drivers " on page 15.

The following table lists the DBMS platform versions for which dedicated support is provided, and the connectivity options supported:

DBMS Version

Firebird 2.0

IBM DB2 for z/OS 8, 9, and 10

IBM DB2 LUW 9.0 - 10.0

InterBase 2007, InterBase 2009, and InterBase XE3

Microsoft SQL Server 2005, 2008, and 2012

For SQL Server 2005 and 2008, only object types like users, logins, roles, config parameters, etc., are supported. We do NOT support

Microsoft .NET extensions at this time.

MySQL 4.x.

(Rapid SQL is tolerant of 5.x but does not support Stored

Procedures, Triggers, or Views)

Oracle 9i, 10g, 11g, and 12c

Sybase ASE 12.5 - 15.7

Sybase IQ 12.7 - 15.4



















Native

Embarcadero

Driver Support

















Packaged Thirdparty JDBC Client

Support



Lastly, generic JDBC and ODBC is provided for non-dedicated DBMS platforms and other

datasources. For details, see " Generic JDBC and ODBC Support " on page 16.

14 RAPID SQL 8.6/XE5 USER GUIDE

PREREQUISITES AND PRELIMINARY TASKS > PREREQUISITES AND PRELIMINARY TASKS

P ACKAGED E MBARCADERO D RIVERS WITH N ATIVE C LIENT S UPPORT

If you are using a native Embarcadero connectivity option to connect to supported DBMS platforms, ensure that the relevant client or driver/client combination is installed and configured:

DBMS

Firebird

IBM DB2 for z/OS

IBM DB2 for Linux, Unix, and Windows

Microsoft SQL Server

MySQL

Client

Firebird ODBC driver

DB2 UDB Client for Windows 9 or later

IBM DB2 LUW Client for Windows 9 or later

Oracle

Sybase ASE

Interbase

Sybase IQ

Teradata

Microsoft SQL Server Client Library

MySQL Connector/ODBC Driver 5.2.x Driver - MySQL Connector/ODBC driver 3.51.x

Driver

Oracle SQL*Net Client

Note: If the Oracle SQL*Net Client is not installed, Rapid SQL will attempt to connect using the Oracle Database Instant Client.

Sybase Open Client

DataDirect ODBC driver for InterBase and the InterBase Client

SQL Anywhere ODBC drivers for Sybase IQ 12.7

Sybase IQ 32-bit ODBC drivers

Teradata ODBC driver for Windows (version 14 recommended)

T HIRD PARTY JDBC DRIVERS

If policy or preference dictates use of Type 4 JDBC drivers, the following table includes the drivers supplied for each supported DBMS platform:

Platform

Firebird

IBM DB2 for Linux, Unix and Windows

IBM DB2 for z/OS

InterBase

Microsoft SQL Server

JDBC Driver

Jaybird JDBC Driver

IBM Data Server Driver for JDBC

MySQL

Oracle

Sybase ASE

Sybase IQ

Teradata

InterBase JDBC driver jTDS Type 4 JDBC Driver for Microsoft SQL Server

Microsoft SQL Server JDBC Driver

MySQL Connector/J JDBC Driver

Oracle JDBC Thin Driver

jTDS Type 4 JDBC Driver for Microsoft SQL Server

Sybase jConnect JDBC Driver

Sybase jConnect JDBC Driver for Sybase IQ

Teradata JDBC Driver

RAPID SQL 8.6/XE5 USER GUIDE 15

PREREQUISITES AND PRELIMINARY TASKS > PREREQUISITES AND PRELIMINARY TASKS

E MBARCADERO C ONNECT S UPPORT

Rapid SQL can make use of datasource definitions stored on an Embarcadero Connect server.

For details, see " Working With Datasources from a Connect Repository " on page 147.

G ENERIC JDBC AND ODBC S UPPORT

Generic JDBC/ODBC connectivity to non-dedicated DBMS systems or non-database datasources is also provided. Rapid SQL can connect to a datasource using a customerprovided, third-party JDBC version 3.0 or ODBC version 3.0 driver. Minimal Rapid SQL functionality is provided, including a basic Explorer tree and SQL querying.

IBM DB2 FOR Z/OS S TORED P ROCEDURE R EQUIREMENTS

When working against an IBM DB2 for z/OS data source, Rapid SQL relies on the following stored procedures, provided as an optional installation step in setting up the DB2 subsystem:

• DSNWZP

• DSNUTILS

• ADMIN_COMMAND_DSN

• ADMIN_COMMAND_DB2

Prior to using Rapid SQL against an IBM DB2 for z/OS data source, ensure that these components are installed on the server. See http://publib.boulder.ibm.com/infocenter/dzichelp/ v2r2/topic/com.ibm.db2.doc.inst/stpadd.htm#stpadd for more information.

L ICENSING

Each Embarcadero client application requires one or more licenses in order to run. An

Embarcadero product, such as Rapid SQL or ER/Studio, has a baseline license which provides basic feature support for that product. In addition, incremental licenses may be required to support specific DBMS platforms, product add-ons, or other functions.

For more information, see the following topics:

• Licensing Overview

• Licensing Your Application

• Selecting a License Category During Startup

Online/Offline Mode and Concurrent License Checkout

16 RAPID SQL 8.6/XE5 USER GUIDE

PREREQUISITES AND PRELIMINARY TASKS > PREREQUISITES AND PRELIMINARY TASKS

L ICENSING O VERVIEW

The following topics provide a high-level discussion of key licensing topics and directs you to sources of more detailed information.

• Viewing Your License Type and Modules

• Understanding Trial, Workstation, and Networked Licenses

• Rapid SQL License Modules, DBMS Support, and Feature Availability

• Rapid SQL XE License Modules, DBMS Support, and Feature Availability

• Directing Queries Regarding Licenses

V IEWING Y OUR L ICENSE T YPE AND M ODULES

The About...

dialog, available from the Help menu, displays your license type and each individual license module currently registered.

U NDERSTANDING T RIAL , W ORKSTATION , AND N ETWORKED L ICENSES

Three kinds of licenses are available: Trial, Workstation, and Networked.

Trial licenses

Workstation licensing

Networked licensing

A license for a 14-day, full-featured trial version of the product. The trial license must be registered before you can use the product.

A license or set of licenses is tied to a particular workstation. The product can only be used on that workstation.

Networked licenses are administered and distributed by a central License Server

(Embarcadero License Center or Acresso FLEXnet Publisher). There are two types of networked licenses: Concurrent and Networked Named User . With Concurrent licensing, users on different machines take turns using licenses from a shared pool. With

Networked Named User licensing, licenses are pre-assigned to specific users setup on the license server's user list. Those users are guaranteed to have licenses available any time.

NOTE: Concurrent licenses can be borrowed for use without a network connection. For

details, see " Online/Offline Mode and Concurrent License Checkout " on page 20.

For a detailed description of licensing options, see http://www.embarcadero.com/softwarelicensing-solutions .

R APID SQL L ICENSE M ODULES , DBMS S UPPORT , AND F EATURE A VAILABILITY

Individual license modules correspond to the DBMS platforms you are licensed to use. In addition, each DBMS license module corresponds to a product edition. Feature availability for each license module edition is as follows:

• Standard - Provides baseline support including datasource management, object management, SQL editing and execution, and standard tools and utilities.

• Professional - Standard edition features plus SQL Debugger, SQL Profiler, and Code

Analyst.

RAPID SQL 8.6/XE5 USER GUIDE 17

PREREQUISITES AND PRELIMINARY TASKS > PREREQUISITES AND PRELIMINARY TASKS

R APID SQL XE L ICENSE M ODULES , DBMS S UPPORT , AND F EATURE A VAILABILITY

An XE license provides access to all supported DBMS platforms. XE module and feature availability is as follows:

• XE Pro - Provides baseline support including datasource management, object management, SQL editing and execution, and standard tools and utilities, SQL Debugger,

SQL Profiler, and Code Analyst.

D IRECTING Q UERIES R EGARDING L ICENSES

Questions regarding license availability, feature availability, and client or server licensing, should be directed as follows:

• If you work in an organization that uses networked licensing, direct any questions to your site’s Rapid SQL administrator.

• If you are using workstation licensing, direct licensing questions to your Embarcadero

Technologies representative.

L ICENSING Y OUR A PPLICATION

See the following topics for details on registering your product:

• Registering a Trial or Workstation License during Installation

• Registering a Workstation License After Application Startup

• Registering By Phone

• Registering a Networked License

R EGISTERING A T RIAL OR W ORKSTATION L ICENSE DURING I NSTALLATION

Shortly after initiating download of a trial version of an Embarcadero product, you should receive an email with a serial number you must register during installation. Similarly, if you purchase an

Embarcadero product while no trial version is active, you will receive a serial number that must be registered during installation.

1 Start the installation. An Embarcadero License Registration dialog appears.

2 Copy the serial number from the email and paste it in the Serial Number field.

3 Enter your Embarcadero Developer Network account credentials in the Login or Email and

Password fields. If you have not previously created an EDN account, or have forgotten your password, click I need to create ...

or I’ve lost my password .

4 Click Register .

Your activation file should be downloaded and installed automatically. If this does not happen, click the Trouble Connecting? Try Web Registration link and follow the prompts. If you still have problems, see " Registering By Phone " on page 19.

18 RAPID SQL 8.6/XE5 USER GUIDE

PREREQUISITES AND PRELIMINARY TASKS > PREREQUISITES AND PRELIMINARY TASKS

R EGISTERING A W ORKSTATION L ICENSE A FTER A PPLICATION S TARTUP

The following instructions assume that you have received a workstation license by email and that you currently have a valid trial license. If you did not install a trial version or the trial period has expired, follow the instructions in " Registering a Trial or Workstation License during Installation " on page 18 instead.

1 On the Help menu select About and then on the dialog that opens, click Manage to open a license manager dialog.

2 On the Serial menu, select Add .

3 Copy the serial number from the email and paste it in the Add Serial Number dialog, then click OK .

4 Right-click on the serial number you added, and then select Register from the context menu. A registration dialog opens.

NOTE: The Registration Code box shows a machine-specific identifier required with other registration methods.

5 Ensure that the Register using Online Registration radio box is selected.

6 Provide Developer Network credentials in the DN Login name or Email and DN Password boxes. If you have not previously created an EDN account, or have forgotten your password, click I need to create ...

or I’ve lost my password .

7 Click Register .

8 If prompted to restart the application, click Yes .

Your activation file should be downloaded and installed automatically. If this does not happen, click the Trouble Connecting? Try Web Registration link and follow the prompts. If you still have problems, see " Registering By Phone " on page 19.

R EGISTERING B Y P HONE

If you have problems with either of the above procedures, you can register licenses by phone.

You will have to provide:

• Developer Network credentials

• The registration code displayed in the Embarcadero License Registration dialog that appears when you start an unlicensed application

• The product base license serial number

• The license serial numbers for any additional features you have purchased.

For North America, Latin America and Asia Pacific, call (415) 834-3131 option 2 and then follow the prompts. The hours are Monday to Friday, 6:00 A.M. to 6:00 P.M. Pacific time.

For Europe, Africa and the Middle East, call +44 (0)1628-684 494. The hours are Monday to

Friday, 9 A.M. to 5:30 P.M. U.K. time.

RAPID SQL 8.6/XE5 USER GUIDE 19

PREREQUISITES AND PRELIMINARY TASKS > PREREQUISITES AND PRELIMINARY TASKS

Shortly after phoning in, you will receive an email containing an activation file. Then do the following:

1 Save the file to the desktop or a scratch directory such as c:\temp .

2 On the Help menu select About and then on the dialog that opens, click Register . A registration dialog opens.

3 Select the I have received an activation file (*.slip or reg*.txt) radio box.

4 Click the Browse button and use the Select License Activation File dialog to locate and select the activation file you installed.

5 Click the Import button to import the activation file and when complete, click the Finish button.

6 If prompted to restart the application, click Yes .

R EGISTERING A N ETWORKED L ICENSE

If you work in an organization using Networked licensing, an administrator, department head, or someone performing a similar function will provide you with an activation file.

Once you receive the file, save it to the

license

subfolder of your product’s main installation folder (typically

C:\Program Files\Embarcadero\<product><version>\license\

), then restart the application.

No additional steps are necessary.

S ELECTING A L ICENSE C ATEGORY D URING S TARTUP

During Rapid SQL startup, if multiple concurrent license categories are available, you are prompted to select a category to use for this Rapid SQL session. Multiple license categories can be set up to provide differing feature access or access to different DBMS versions. Feature and

DBMS version access are typically distributed across multiple license categories to optimize use of a site’s purchased licenses.

NOTE: This dialog also includes the option to remember your selection on subsequent startups. If you select that option, you can subsequently use the Select Licenses button on the About ... dialog ( Help > About ) to select a different license.

Contact your License Administrator for details on individual license categories or requests for additional feature or DBMS support.

O NLINE /O FFLINE M ODE AND C ONCURRENT L ICENSE C HECKOUT

Concurrent licenses can be used in both online and offline modes. In online mode, you must have a continuous network connection to your License Center. Licenses are checked out when you start Rapid SQL and checked back in when you shut Rapid SQL down.

20 RAPID SQL 8.6/XE5 USER GUIDE

PREREQUISITES AND PRELIMINARY TASKS > PREREQUISITES AND PRELIMINARY TASKS

You can also use a license in offline mode. When you explicitly check out a license for offline use, you can use Rapid SQL without a connection to your License Center for a specified duration.

This lets you work while travelling or commuting, work away from your primary work area, or use

Rapid SQL when a network connection is unavailable or not required.

NOTE: Contact your site administrator for information on offline license availability, the maximum duration, offline license policy at your site, or any other issues arising from online license usage.

To check out a license for offline use:

1 On the Help menu, select Checkout License . The Check Out Licenses For Offline Use dialog opens.

2 Select the check box associated with each individual license you want to check out.

3 In the Checkout Duration box, type the number of hours that you can use the offline license without a network connection to the License Center.

4 Click OK .

You can work offline for the specified duration. The duration period begins immediately.

If you subsequently establish a network connection to the License Center before the license duration expires, you can indicate to the License Center that the offline license is no longer required.

To indicate that an offline license is no longer required:

1 On the Help menu, select Checkin License .

There is no interruption in Rapid SQL usage. The license is not actually checked in until you shut down Rapid SQL.

M ORE I NFORMATION ON U SING THIS D OCUMENT

The following topics provide additional information that is useful when working with product documentation:

Accessing Third Party Documentation

Shorthand for Third Party Product References

A CCESSING T HIRD P ARTY D OCUMENTATION

Many Rapid SQL features provide support for functionality available in the supported third party

DBMS platforms. In object management for example, properties available when creating or editing objects and actions available against object types, are direct equivalents of clauses, options, or keywords available for use with the third party equivalent.

RAPID SQL 8.6/XE5 USER GUIDE 21

PREREQUISITES AND PRELIMINARY TASKS > PREREQUISITES AND PRELIMINARY TASKS

In such cases, no attempt is made to duplicate detailed documentation by third parties. Casual descriptions are provided, noting the third party equivalent. You can consult the third party documentation for details or clarifications. The following links provide access to online documentation for DBMS platforms supported by Rapid SQL:

• IBM DB2 for Linux, Unix, and Windows documentation

• IBM DB2 for z/OS documentation

• InterBase/Firebird documentation

• Microsoft SQL Server documentation

• MySQL documentation

• Oracle documentation

• Sybase ASE and Sybase IQ documentation

S HORTHAND FOR T HIRD P ARTY P RODUCT R EFERENCES

To save space in headings and table columns, shorthand is used to represent versions and variations of the DBMS platforms supported by Rapid SQL.

DB2 LUW

• DB2 z/OS

• ITB/FBD

• MySQL

• ORCL

• SQL SVR

• SYB ASE

SYB IQ

DB2 LUW

DB2 LUWis used as shorthand for IBM DB2 for Linux, Unix, and Windows.

DB2 Z /OS

DB2 z/OS is used as shorthand for IBM DB2 for z/OS.

ITB/FBD

ITB/FBD is used as shorthand for InterBase/Firebird.

22 RAPID SQL 8.6/XE5 USER GUIDE

PREREQUISITES AND PRELIMINARY TASKS > PREREQUISITES AND PRELIMINARY TASKS

M Y SQL

MySQL is used as shorthand for the MySQL RDBMS.

ORCL

ORCL is used as shorthand for Oracle.

SQL SVR

SQL SVR is used as shorthand for Microsoft SQL Server.

SYB ASE

SYB ASE is used as shorthand for Sybase Adaptive Server.

SYB IQ

SYB IQ is used as shorthand for Sybase IQ.

TERA

TERA is used as shorthand for Teradata.

RAPID SQL 8.6/XE5 USER GUIDE 23

PREREQUISITES AND PRELIMINARY TASKS > PREREQUISITES AND PRELIMINARY TASKS

24 RAPID SQL 8.6/XE5 USER GUIDE

G

ETTING

S

TARTED

The following sets of topics are intended for new users. They provide learning curve material and tell you how to configure Rapid SQL:

Application Basics

Rapid SQL Tutorial

Introduces the major user interface elements.

Provides detailed tutorial exercises that introduce the basic areas of Rapid SQL functionality.

Specifying Rapid SQL application and feature options

Tells you how to configure Rapid SQL.

RAPID SQL 8.6/XE5 USER GUIDE 25

GETTING STARTED

26 RAPID SQL 8.6/XE5 USER GUIDE

A

PPLICATION

B

ASICS

Application Basics is designed to situate you within the application and to provide information about what Rapid SQL offers in the way of design, navigation, and application features. The information presented here is high-level and conceptual.

Application Basics is divided into two sections, the table below describes each section:

Section

Starting Rapid SQL

Product Design

Specifying Rapid SQL application and feature options

Description

Describes the various ways to start the application.

This section describes the Rapid SQL user interface.

This section describes how to customize Rapid SQL’s configuration to suit your specific needs.

S TARTING R APID SQL

There are three ways to start the Rapid SQL application:

• Starting an Installed version of Rapid SQL from the Start Menu

• Starting an Installed version of Rapid SQL from the Command Line

Starting a .ion version of Rapid SQL

S TARTING AN I NSTALLED VERSION OF R APID SQL FROM THE S TART M ENU

The Start menu sequence for DBArtisan is always in the form Programs > Embarcadero

DBArtisan version identifier > Embarcadero DBArtisan version identifier , where version identifier reflects the version you are running.

S TARTING AN I NSTALLED VERSION OF R APID SQL FROM THE C OMMAND L INE

Command line startup is primarily aimed at identity management systems working in conjunction with Rapid SQL. Such systems can be configured to start Rapid SQL and connect to a specific datasource using credentials that are invisible to the user. Other applications that hide credentials, force connection to a specific datasource, administer usage audits, or otherwise automate startup of Rapid SQL can make use of this feature.

Two forms of command line startup are available. Syntax and parameters are as follows: rsql.exe -D datasource -U username -P password

For example, rsql.exe -D torlabsy01 -U myusername -P mypassword rsql.exe -R connectionstring -D datasource -U username -P password

RAPID SQL 8.6/XE5 USER GUIDE 27

APPLICATION BASICS

For example, rsql.exe -R "oracle://

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=TORLABORCL10g_2)(PORT=1521))(C

ONNECT_DATA=(SID=ORASID)))" -D torlabora10g_2 -U sys -P squeal

NOTE:

For details on valid connection strings, see " -R Switch Values by Platform " on page 29.

Keep the following points in mind when using command line startup:

• Credentials remain valid until the user disconnects from the datasource.

• When you try disconnect, a confirmation message box includes a warning message that the connection has external credentials that will be lost if you choose to proceed with disconnect.

• Once disconnected, a user must connect to the previously disconnected datasource using

specified, valid credentials or rely on Auti-connect. For more information, see " Manually

Registering or Editing Datasources " on page 130.

• Command line credentials override the default credentials provided if a datasource is registered using the Auto-connect setting.

Regarding the switch specifications:

• The password switch/value pair is optional and the P switch can be provided without a value.

• The switches are case-sensitive while the datasource is case-insensitive;

• The order of these switches doesn't matter;

• Switches can be specified with the minus sign or with a slash and any combinations are allowed. For example, RSQL.-D ROMLABSQL08 /U sa /P .

• If you specify a switch multiple times, it's last valid occurrence from left to right is used. We auto-connect a single datasource, no matter the number of times a -D switch is specified;

• The -p switch (with lower case) prints a file;

• If -R is specified then one of the following will occur:

• If -D is also specified, it will check to see if that datasource already exists. If it does exist, it will check to see if its connection information matches the provided -R parameter. If it matches, startup behavior will be the same as if -R was not specified. If it doesn't match, a modified form of the datasource name is generated using the -D-provided name to ensure uniqueness and give it the connection information specified by -R. If the datasource doesn't exist, a new datasource is generated using the name provided by -D and the remaining connection information provided by -R.

• •If -D is not specified, the -R-provided datasource is checked for a match against existing datasources. If a match is found, ithat datasource is connected. If no match is found, a new datasource is generated using the -R-provided information to create a unique name.

NOTE: If connecting to an existing datasource with auto-connect enabled, if -U and -P values were provided, then auto-connect will be disabled and the provided -U and -P values are used.

28 RAPID SQL 8.6/XE5 USER GUIDE

APPLICATION BASICS

-R S WITCH V ALUES BY P LATFORM

The following table lists the valid connection strings that can be used with the -R switch for a command line startup.

Platform

DB2 LUW and

DB2 z/OS

ITB/FBD

Connect String db2://<HOST>/<DB> db2://<HOST>:<PORT>/<DB> db2:@<ALIAS> where ALIAS is the name from the DB2 client registration interbase://<HOST>/<DB> interbase://<HOST>:<PORT>/<DB>

Notes

If the DB2 ODBC/CLI driver is installed on the system, that driver will be used for DB2 connections. Otherwise the IBM Data Server

Driver for JDBC will be used.

Using "db2p" will make the datasource created permanent

If the InterBase ODBC driver is installed on the system, that driver will be used for an InterBase connection. Otherwise, the InterBase JDBC driver will be used.

Using "interbasep" will make the datasource created permanent.

MySQL

ODBC

ORCL

firebirdsql://<HOST>/<DB> firebirdsql://<HOST>:<PORT>/<DB> mysql://<HOST> mysql://<HOST>/<DB> mysql://<HOST>:<PORT> mysql://<HOST>:<PORT>/<DB>

If the Firebird ODBC driver is installed on the system, that driver will be used for Firebird connections. Otherwise, the Jaybird JDBC driver will be used.

Using "firebirdsqlp" will make the datasource created permanent

If the MySQL ODBC driver is installed on the system, that driver will be used to make the connection. Otherwise, the MySQL Connector/

J JDBC driver will be used.

Using "mysqlp" will make the datasource created permanent

Using "odbcp" will make the datasource created permanent.

odbc://<CONNECT_STRING> where connect string can be the a System DSN name on it's own or the full ODBC connection string containing at least one of the following tags: DSN=, FILEDSN= or DRIVER= oracle://<CONNECT_DESCRIPTOR> oracle:@<ALIAS> where CONNECT_DESCRIPTOR is in the same form as in the TNSNames.ora file. i.e.

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(

HOST=<HOST>)(PORT=<PORT>))(CONNECT

_DATA=(SID=<SID>))) where ALIAS is the name from the

TNSNAMES.ora file

If OCI is installed on the system, that driver will be used. Otherwise, the Oracle Instant Client will be used.

Using "oraclep" will make the datasource created permanent

RAPID SQL 8.6/XE5 USER GUIDE 29

APPLICATION BASICS

Platform Connect String

SQL SVR

sqlserver://<HOST> sqlserver://<HOST>/<DB> sqlserver://<HOST>:<PORT> sqlserver://<HOST>:<PORT>/<DB> sqlserver://<HOST>\<INSTANCE> sqlserver://<HOST>\<INSTANCE>/<DB> sqlserver://<HOST>\<INSTANCE>:<PORT> sqlserver://<HOST>\<INSTANCE>:<PORT>/

<DB> sqlserver:@<ALIAS> sqlserver:@<ALIAS>/<DB> where ALIAS is the name from the Network

Library Configuration

SQL SVR

Azure sqlserverazure://<HOST> sqlserverazure://<HOST>/<DB>

SYB ASE

Notes

The latest Microsoft ODBC driver for SQL

Server installed on the system is used to make the connection.

Using "sqlserverp" will make the datasource created permanent

The latest Microsoft ODBC driver for SQL

Server installed on the system is used to make the connection.

Using "sqlserverazurep" will make the datasource created permanent

If CTLIb is installed on the system that driver will be used. Otherwise the Sybase jConnect JDBC driver will be used.

Using "sybasep" will make the datasource created permanent

SYB IQ

Teradata sybase://<HOST> sybase://<HOST>/<DB> sybase://<HOST>:<PORT> sybase://<HOST>:<PORT>/<DB> sybase:@<ALIAS> sybase:@<ALIAS>/<DB> where ALIAS is the name from the SQL.ini file sybaseiq://<HOST> sybaseiq://<HOST>/<DB> sybaseiq://<HOST>:<PORT> sybaseiq://<HOST>:<PORT>/<DB> teradata://<HOST> teradata://<HOST>/<DB> teradata://<HOST>:<PORT> teradata://<HOST>:<PORT>/<DB>

If the Sybase IQ ODBC driver is installed on the system it will use that, otherwise it will use the

Sybase jConnect JDBC driver.

Using "sybaseiqp" will make the datasource created permanent

If the Teradata ODBC driver is installed on the system it will use that, otherwise it will use the

Teradata JDBC driver.

Using "teradatap" will make the datasource created permanent.

For more general information, see " Starting an Installed version of Rapid SQL from the

Command Line " on page 27.

S TARTING A .

ION VERSION OF R APID SQL

Start the application by double-clicking the file you downloaded.

30 RAPID SQL 8.6/XE5 USER GUIDE

APPLICATION BASICS

P RODUCT D ESIGN

The Rapid SQL window opens with the Database Explorer on the left, the

Workspace on the

right, and all

toolbars docked at the top of the application. The

Output Window

is not automatically displayed. Rapid SQL also offers you a number of desktops, or workspaces, that you can toggle among while you work.

D ATABASE E XPLORER

Rapid SQL organizes the wealth of information pertaining to your servers through its Database

Explorer. The Database Explorer provides a fast and efficient way to access your database objects and scripts. The Database Explorer is a separate window containing a tree object that you can select and expand. The tree object organizes and nests subjects as branches. By expanding or collapsing the tree, you can efficiently browse multiple datasources. The Database

Explorer window is dockable so that you can maneuver through the application efficiently.

For details on the Explorer and datasource management, in general, see the following topics:

• " Datasource and Server Management " on page 128

• " Using the Datasource Navigator " on page 157

TIP: You can also set these options on the Explorer tab of the Options Editor. For details, see

Explorer Options - Main Tab .

R APID SQL W INDOWS

The Rapid SQL interface includes several windows to help you develop your program. The windows include:

Topics

• Describe Window

• Output Window

• Browsers

• Workspaces

• Preview Dialog Boxes

D ESCRIBE W INDOW

Rapid SQL offers a floating Describe window for procedures, tables, views, and functions (Oracle and IBM DB2 LUW for Open Systems only). In the Describe window, you can view columnar information (for tables and views) or input parameter information (for procedures and functions).

RAPID SQL 8.6/XE5 USER GUIDE 31

APPLICATION BASICS

Opening the Describe Window

Rapid SQL offers three ways to open the Describe window:

1 In an editor, right-click an object and then click Describe from Cursor.

2 On the Explorer Tab, select an object and then click Describe.

3 On the Explorer Tab or in an editor, select an object and then press CTRL+D.

Using the Describe Window

In the Describe window:

1 Click the Name list and then click a name to view a list of types of objects in the database.

2 Click the Owner list and then click an owner to view a list of all owners of objects in the database.

3 Click the Type list and then click a type to view columnar information (for tables and views) or input parameter information (for functions and procedures).

O UTPUT W INDOW

Rapid SQL incorporates a separate window to capture all messages returned by the server and to log entries about the progress of operations started by the application.

For more information, see

Configuring the Output Window

C ONFIGURING THE O UTPUT W INDOW

Rapid SQL lets you display, hide, or dock the Output Window anywhere in the application.

Displaying the Output Window

1 On the View menu, click Output .

OR

On the Main toolbar, click Output.

Rapid SQL displays the Output Window.

Hiding the Output Window

1 On the View menu, click Output .

OR

On the Main toolbar, click Output.

OR

Right-click the Output Window and then click Hide.

Rapid SQL hides the Output Window.

32 RAPID SQL 8.6/XE5 USER GUIDE

APPLICATION BASICS

Docking the Output Window

Right-click the Output Window and then click Docking View .

Rapid SQL docks the Output Window to the bottom of the application frame.

Undocking the Output Window

Right-click the Output Window and then click Docking View .

Rapid SQL displays the Output Window as a floating window in the application.

M ESSAGES IN THE O UTPUT W INDOW

The Output Window lets you save, print, copy, and clear server messages.

Saving Server Messages

1 Right-click the Output Window and then click Save .

Rapid SQL opens the Save As dialog box.

2 Enter the location and name of the file in the File Name box.

NOTE: Rapid SQL defaults the file extension to .msg.

3 To save the file, click OK .

Printing Server Messages

1 Right-click the Output Window and then click Print .

Rapid SQL opens the Print dialog box.

NOTE: Rapid SQL prompts you with information on the size of the print job before opening the Print dialog box.

2 Configure your print job.

3 Click OK to print the file.

Copying Server Messages

1 Right-click the target Server Messages and then click Copy .

Rapid SQL copies the selected text to the Microsoft Windows Clipboard.

2 Paste the contents of the clipboard into target applications.

Clearing Server Messages

1 Right-click the Output Window and then click Clear.

Rapid SQL clears your Server Messages .

RAPID SQL 8.6/XE5 USER GUIDE 33

APPLICATION BASICS

B ROWSERS

Browsers are a flexible environment where you can examine, extract, and execute database objects and their dependencies. Browsers provide the means to view objects types across multiple database platforms and connections. You can simultaneously view and work with objects from InterBase/Firebird, Oracle, Microsoft SQL Server, Sybase Adaptive Server, and IBM

DB2 LUW for Open Systems.

The benefit of using Browsers is the ability to see detailed information about specific object types. You can also print, search, copy, and sort the contents of a Browser window.

Topics

• Browser Toolbar

• Opening Browsers

• Browser Object Types

• Column filtering in the Browser

• Extracting DDL from Browsers

• Displaying Dependencies from Browsers

• Refreshing Browsers

B ROWSER T OOLBAR

You can place the floating Browser toolbar anywhere on the Rapid SQL workspace.

For more information, see

Browsers .

O PENING B ROWSERS

Browsers let you view all types of database objects, including the SQL procedures used to build them. Browsers let you:

• Copy database objects

• Modify database objects

• Test database objects

The ability to browse dependencies is especially useful, particularly when modifying SQL code in procedures and triggers. For example, in a situation where a trigger enforces a rule that does not let you update a particular box, you can use the Browser to do the following:

• Browse the triggers to find the offending trigger.

• Extract the DDL for that trigger into one window.

• In another window, drop the offending trigger, make your update to the box, then execute the corrected trigger DDL to replace the trigger in the database.

34 RAPID SQL 8.6/XE5 USER GUIDE

APPLICATION BASICS

Opening a Browser Window

Rapid SQL offers two ways to open a Browser:

1 On the Browse menu, click the target object type.

OR

In the workspace, right-click, click Browser , then click the target object.

Rapid SQL opens a Browser.

For more information, see

Browsers .

B ROWSER O BJECT T YPES

Rapid SQL's Browsers read the appropriate object types for specific databases. A select statement is issued against the appropriate systems table based on the requested object to bring back a listing of the objects in the database. The table below contains a list of the

Browsers available for each database platform:

Object Type DB2 LUW DB2 z/OS

Aliases

InterBase/Firebird SQL Server Oracle Sybase

Blob Filters

Check

Constraints

Clusters

Databases

Database

Links

Defaults

Directories

Domains

Encrypted

Keys

Event

Monitors

RAPID SQL 8.6/XE5 USER GUIDE 35

APPLICATION BASICS

Object Type DB2 LUW DB2 z/OS

Exceptions

InterBase/Firebird

Extended

Procedures

External

Functions

Foreign Keys

Functions

Generators

Groups

Indexes

Libraries

Packages

Plans

PL/SQL Code

Profiling

Primary Keys

Procedures

Profiles

Roles

Rules

Rollback

Segments

SQL Server Oracle Sybase

36 RAPID SQL 8.6/XE5 USER GUIDE

APPLICATION BASICS

Tablespaces

Triggers

Types

Type Bodies

Unique Keys

User

Datatypes

User

Messages

Users

Views

Object Type DB2 LUW DB2 z/OS

Segments

InterBase/Firebird

Sequences

Shadows

Snapshots

Snapshot

Logs

Materialized

Views

Materialized

View Logs

Synonyms

Tables

SQL Server Oracle Sybase

RAPID SQL 8.6/XE5 USER GUIDE 37

APPLICATION BASICS

W ORKING WITH B ROWSERS

Browsers offer a versatile method of browsing and managing the contents of your databases. To help you maintain and organize your databases, you can:

• Print the contents of a Browser

• Search the contents of a Browser

• Copy the contents of a Browser

• Sort the contents of a Browser

Printing Browsers

1 Open a Browser for the desired object type.

2 On the File menu, click Print to open the Print dialog box.

3 In the Name box, click the list, which contains a list of local and network printers that you can access (if you do not see any listed, then your computer is not configured for any printers).

4 Click the target printer.

5 In the Print Range box, click the appropriate option button to indicate print range.

6 In the Number of copies text box of the Copies box, click the Up or Down arrow or enter the number of copies.

7 Click OK .

Rapid SQL prints the selection.

Searching Browsers

1 Open a Browser for the desired object type.

2 On the Edit menu, click Find .

Rapid SQL opens the Find box.

3 In the Find What text box, enter the search string.

4 To make the search case sensitive, select the Match Case check box.

5 To specify the direction to search, in the Direction box, click the Up or Down option button.

6 Click Find Next.

Rapid SQL finds the next occurrence of your search string.

Copying Browsers

1 Open a Browser for the desired object type.

2 Select the objects to copy.

38 RAPID SQL 8.6/XE5 USER GUIDE

3 On the Edit menu, click Copy .

4 Place the pointer at the position where you want to paste the objects, and then on the Edit menu, click Paste.

Sorting Browsers

1 Open or

Create a

Browser for the desired object type.

2 Double-click the column header for the column of data to sort and Rapid SQL lists the contents of the column in ascending order.

3 Double-click the column header again and Rapid SQL lists the contents of the column in descending order.

For more information, see

Browsers .

C OLUMN FILTERING IN THE B ROWSER

Two methods of filtering are available when database objects are displayed in the Browser. Both make use of the text boxes appearing below column names in the display.

To show only rows for which a given column value contains one or more contiguous characters

1 Type those characters into the text box below that column name.

To make use of regular expressions in column filtering

1 Ensure that regular expression usage is enabled. For details, see" Explorer Options - Main

Tab " on page 100.

2 Type a valid regular expression search criteria into the text box below that column name. For

more information, see " Regular Expressions Support in Rapid SQL " on page 742.

NOTE: The RegEx ON/RegEx OFF button lets you enable or disable regular expression usage on-the-fly for a given Explorer window.

RAPID SQL 8.6/XE5 USER GUIDE 39

APPLICATION BASICS

E XTRACTING DDL FROM B ROWSERS

For each database type, Rapid SQL provides an appropriate Browser. The Browsers are mutually exclusive object windows, showing only objects of a given type. If you connect to multiple datasources, you have access to a number of objects that are not available based on the database platform. Rapid SQL includes intelligence to determine the valid object types in the underlying datasource.

Using the Main Menu

1 On the Browse menu, click the target object type.

Rapid SQL opens the appropriate Browser:

2 In the Browser, double-click the target object type to extract the object type DDL into a DDL

Editor.

Using the Browser Toolbar

1 On the Browser toolbar, click Tables.

Rapid SQL opens the Table Browser:

2 Click the scroll bar arrow to locate the target table.

3 Double-click the target table.

Rapid SQL extracts the schema DDL into a DDL Editor.

Using the Shortcut Menu

1 Right-click an open area of the workspace, click Browsers, and then click the target object type.

2 In the Browser, double-click the target object type.

Rapid SQL extracts the schema DDL into a DDL Editor.

For more information, see

Browsers .

D ISPLAYING D EPENDENCIES FROM B ROWSERS

You can display object dependencies for an object from its corresponding object Browser. Rapid

SQL displays the dependencies in a separate result set window.

Displaying Dependencies

Rapid SQL offers three ways to display dependencies from Browsers:

1 Open a Browser for an object type.

2 In the Browser, click the target object.

40 RAPID SQL 8.6/XE5 USER GUIDE

APPLICATION BASICS

3 On the Object menu, click Dependencies.

OR

On the Browser toolbar, click Dependencies.

OR

Right-click the target object and then click Dependencies.

Rapid SQL displays dependencies in a separate window.

For more information, see

Browsers .

R EFRESHING B ROWSERS

Rapid SQL lets you refresh and display the results of a Browser operation.

Refreshing the Browser

1 On the Object menu, click Refresh.

OR

On the Browser toolbar, click Refresh.

OR

Right-click the Browser workspace and then click Refresh.

Rapid SQL refreshes the results of the browser operation.

For more information, see

Browsers .

W ORKSPACES

Workspaces are a convenient way to maximize your desktop. You can use workspaces to multiply the amount of scripting, script execution, and development resources you have available at any one time. Rapid SQL lets you open and use several workspaces at one time. Using more than one workspace lets you:

• Execute long running scripts in one workspace while working in other workspaces.

• Develop strategies for working on scripts and result sets in one workspace while other scripts reside in one or more of the other workspaces.

Toggling Between Workspaces

Rapid SQL offers two ways to toggle between workspaces:

1 On the Main toolbar, click Workspace.

OR

Right-click the current workspace and then click the target workspace.

Rapid SQL brings the target workspace forward.

RAPID SQL 8.6/XE5 USER GUIDE 41

APPLICATION BASICS

For more information, see:

Managing Workspaces

M ANAGING W ORKSPACES

Rapid SQL provides you with three default workspaces. You manage the workspaces in the

Workspace dialog box. Using the Workspace dialog box you can:

• Differentiate between workspaces by changing the background color or wallpaper.

• Toggle among workspaces.

• Create, delete, rename, and specify the order of workspaces.

Managing Workspaces

The Workspace dialog box lets you manage all open windows in your workspace.

1 On the Windows menu, click Windows.

Rapid SQL displays the Workspace dialog box. Any open windows in the current workspace display in the list.

The table below describes the options and functionality on the Workspace dialog box:

Option

Activate

OK

Save

Close Window

Help

Description

Sets the focus onto the window you have selected in the list and closes the Workspace dialog box.

Closes the Workspace dialog box and accepts any changes you have made to the windows in the current workspace.

Saves the contents of the window you have selected in the list.

You are prompted to provide a name and location for the file you are saving if you have not done so already.

Closes the window you have selected from the list. If you have not saved the contents of the window, you are prompted with a save file alert.

Initiates and displays this Help topic in the Rapid SQL Help.

S ET S ORT C OLUMNS D IALOG B OX

The Set Sort Columns dialog box lets you sort multiple columns, and sort column identification, in the Right Pane of the application.

For more information, see

Completing the Set Columns Dialog Box.

42 RAPID SQL 8.6/XE5 USER GUIDE

APPLICATION BASICS

C OMPLETING THE S ET C OLUMNS D IALOG B OX

To complete the Set Columns dialog box, do the following:

1 In the right pane of the application, right-click a column heading and select Sort Multiple

Columns.

Rapid SQL opens the Set Sort Columns dialog box.

2 In Column Name select the column(s) to use to sort the information in the right pane of the application.

3 Click the right arrow to move the column(s) to the Column Name box.

4 Click the up and down arrows to change the order of the sort columns.

For more information, see

Set Sort Column Dialog Box

.

P REVIEW D IALOG B OXES

Before executing any code, Rapid SQL offers Preview dialog boxes to let you confirm actions before execution. In the Preview dialog boxes, you can:

• Preview the code to execute.

• View the SQL of the code on your database.

• Create a report detailing the affect of executing code on your database.

• Schedule execution of the code.

• Save the code to execute.

• Open your e-mail program with the code to execute as an attachment.

• Print the code to execute.

M ENUS

Rapid SQL offers two context-sensitive menus to let you access all the application’s features. The

Main Menu is always on the top of the application window. The shortcut menu is accessible from almost anywhere in the application. Right-click to view the available shortcut menu. Rapid SQL lets you customize the Tools menu to help you tailor the application to your needs.

Topics

• Main Menu

• Shortcut menus

• Customizing General User Interface Appearance

RAPID SQL 8.6/XE5 USER GUIDE 43

APPLICATION BASICS

M AIN M ENU

Rapid SQL's features can all be accessed from the Main Menu by clicking the menu name and selecting from the submenu. The menus are context sensitive and change based on the tasks you want to perform. The table below describes the Rapid SQL menus:

Menu Item

File

Datasource

Project

Browse

Logfile

View

Tools

Bookmarks

Help

Query

Object

Edit

Format

Window

Description

Create, open, close, print, send, and save script files and result sets. Set application options and defaults.

Create, modify, select, connect to, and disconnect from datasources. Access the database search facility.

Available only when a project is open. Configure project management, build projects, and use version control functions.

Browse any object type a datasource connection.

Activate/deactivate, open, set options, and flush the Rapid SQL application log.

Arrange the Rapid SQL environment. Display or hide the

Database Explorer, toolbars, Output Window, Describe window, activate full-screen mode.

Choose any of Rapid SQL's tools, such as Database Search and the Visual Diff Utility. Customize and add tools of your own.

Access and manage bookmarks.

Access HTML Help.

Available only when an Editor is open. Execute and set options for your SQL scripts.

Available only when a browser is open. Execute, view dependencies, extract, and refresh objects in a database.

Available only when an Editor is open. Edit and manipulate the text in your scripts.

Available only when a Result Window is active. Format the contents of result sets.

Cascade and tile open windows. Toggle among open windows.

For more information, see

Menus

.

E XPLORER B OOKMARKS

The Bookmarks menu lets you access and manage explorer bookmarks. Explorer bookmarks let you quickly access nodes in the Database Explorer.

Creating Explorer Bookmarks

1 On the Database Explorer, right-click the target node, and then select Add Bookmark.

Rapid SQL opens the Add Friendly Bookmark Name dialog box.

2 Type the explorer bookmark name.

44 RAPID SQL 8.6/XE5 USER GUIDE

APPLICATION BASICS

3 Click OK.

Rapid SQL displays the explorer bookmark under the Bookmarks menu. Explorer bookmarks are organized by platform.

Editing Explorer Bookmarks

1 On the Main Menu, select Bookmarks.

2 Select Bookmark Manager.

Rapid SQL opens Bookmark Manager.

3 To rename the explorer bookmark, select the target explorer bookmark, and then click

Rename.

Rapid SQL opens the Edit Bookmark Name dialog box.

4 Type the new explorer bookmark name.

5 Click OK.

6 To delete an explorer bookmark, select the target explorer bookmark, and then click Delete.

TIP: To add explorer bookmarks without using the Add Friendly Bookmark Name dialog box, select Do not show ‘Add Friendly Bookmark Name’ dialog option.

S HORTCUT M ENUS

Rapid SQL incorporates context-sensitive menus to give you another way to access object functionality. These menus mirror the functionality that you can access from application toolbars or the main menu.

Opening Shortcut Menus

1 Right-click anywhere on the Rapid SQL desktop to open the appropriate shortcut menu.

For more information, see

Menus

.

T OOLBARS

Rapid SQL toolbars change to reflect the element of the application you are using. The toolbars contain icons that are the fastest way to access commonly used features of Rapid SQL. You can move the toolbars to horizontal or vertical positions anywhere on the screen, and you can toggle them off and on by using the shortcut menu when the pointer is positioned over one of Rapid

SQL's toolbars. For more information, see the following topics:

Available Toolbars

• Using Toolbar Viewing Options

RAPID SQL 8.6/XE5 USER GUIDE 45

APPLICATION BASICS

Moving Toolbars

NOTE:

For related information, see Customizing General User Interface Appearance

.

A VAILABLE T OOLBARS

The following list represents Rapid SQL's toolbars:

Datasource Toolbar

Registration Toolbar

Main Toolbar

Windows Toolbar

Tools Toolbar

Project Toolbar

46 RAPID SQL 8.6/XE5 USER GUIDE

APPLICATION BASICS

SQL Edit Toolbar

Browsers Toolbar

U SING T OOLBAR V IEWING O PTIONS

Rapid SQL offers standard Windows toolbar options such as docking, floating, and positioning toolbars.The only application-specific viewing option is the hiding or display of the individual toolbars.

To hide or display a toolbar

1 On the View menu, select Toolbars and then select the specific toolbar you want to display or hide.

For information on the toolbars available, see Available Toolbars

.

M OVING T OOLBARS

1 Click the pointer at the right edge of any toolbar.

2 Drag the toolbar to the new position.

For more information, see

Toolbars

.

C USTOMIZING G ENERAL U SER I NTERFACE A PPEARANCE

Rapid SQL lets you choose from a set of general visual application styles, dictate hiding or display of particular items, and select preferences for specific user interface elements.

RAPID SQL 8.6/XE5 USER GUIDE 47

APPLICATION BASICS

To customize the general look and feel of Rapid SQL

1 On the View menu, select Toolbars and then select Customize . The Customize dialog opens.

2 Use the following table as a guide to understanding and setting options on tabs of the

Customize dialog:

Tab

Toolbars

Application Visual

Style

Tools

Keyboard

Options

Settings and tasks

Select the toolbars you want to display in the application. For information on the toolbars

available, see Available Toolbars

.

Select a visual style such as Microsoft Windows XP or one of the .NET options from the dropdown. Depending on your selection, the following options may or may not be enabled:

Use default WIndows XP colors , OneNote style tabs , Docking Tab Colors , Allow MDI Tab

Swapping , Enable Smart Docking , Enable Tab Menu , and 3D Rounded Docking Tabs .

Menu animations Lets you specify a menu animation style of UNFOLD, SLIDE, or

FADE.

Menu Shadows Displays shadowed 3D effects.

Lets you define external applications to run from the Tools menu of Rapid SQL: the text displayed on the Tools menu command ( Menu contents ), the path and file name of the executable ( Command ), optional Arguments , and an optional Initial DIrectory .

For detailed information on providing arguements, see

Specifying an Argument for a Tools

Menu Command .

Category

Commands

Description

Set Accelerator for

Current Keys

Press New Shortcut

Key

Show ScreenTips on toolbars

Show shortcut keys in

ScreenTips

Select a general category for a hot key for the command.

Select a hot key command, based on the general category.

Displays the command description.

Select application area where you want new hot key to be active.

Displays current hot key.

Press keyboard key or an unassigned F key.

Select to display a ScreenTip when you hover your mouse over a button. For example, when you hover your mouse over the New button, Rapid SQL displays the ScreenTip “New.”

Select to display a shortcut key in the ScreenTip when you hover your mouse over a button. For example, when you hover your mouse over the New button, Rapid SQL displays the ScreenTip

“New (CTRL+N).”

3 Click Apply at any time to implement any changes you have made and when finished, click

Close .

S PECIFYING AN A RGUMENT FOR A T OOLS M ENU C OMMAND

You can specify an argument to be passed to a program for newly added commands by

choosing one of Rapid SQL's predefined arguments

or entering a command-line argument.

48 RAPID SQL 8.6/XE5 USER GUIDE

APPLICATION BASICS

The table below provides scenarios of how to use command-line arguments:

Command

NOTEPAD.EXE

ISQL.EXE

SQLPLUS.EXE

Argument

$$FilePath$$

Description

Starts Microsoft Notepad displaying the contents of the $$FilePath$$ argument.

-U$$CurUserID$$ -P$$CurPwd$$

-S$$CurConString$$ i$$FilePath$$

Starts ISQL, automatically connects to the current datasource using the current user name and password, and executes the contents of

$$FilePath$$.

$$CurUserID$$/

$$CurPwd$$@$$CurConString$$

@$$FilePath$$

Starts SQL*Plus, connects to the current datasource using the current user name and password, and executes the contents of

$$FilePath$$.

The table below provides scenarios of how to use Rapid SQL’s predefined arguments:

Argument

$$FilePath$$

$$FileDir$$

$$FileName$$

$$FileExt$$

$$CurLine$$

$$CurCol$$

$$CurText$$

$$CurDir$$

$$CurDatasource$$

$$CurUserID$$

$$CurPwd$$

$$CurConString$$

Description

The complete filename of the current source (defined as drive+path+filename); blank if a non-source window is active.

The directory of the current source (defined as drive+path); blank if a non-source window is active.

The filename of the current source (defined as filename); blank if the non-source window is active.

The filename extension of the current source; blank if a non-source window is active.

The current cursor line position within the active window.

The current cursor column position within the active window.

The current text (the word under the current cursor position, or the currently selected text, if there is one).

The current working directory (defined as drive+path).

The name of the current datasource as defined in Rapid SQL.

The name of the current datasource user.

The current datasource password.

The current connection string or server name.

RAPID SQL 8.6/XE5 USER GUIDE 49

APPLICATION BASICS

P REDEFINED A RGUMENTS

Rapid SQL provides a number of predefined arguments that you can pass to programs that you have added to the Tools menu. The table below lists the available predefined arguments:

Argument

$$FilePath$$

$$FileDir$$

$$FileName$$

$$FileExt$$

$$CurLine$$

$$CurCol$$

$$CurText$$

$$CurDir$$

$$CurDatasource$$

$$CurUserID$$

$$CurPwd$$

$$CurConString$$

Description

The complete filename of the current source (defined as drive+path+filename); blank if a non-source window is active.

The directory of the current source (defined as drive+path); blank if a non-source window is active.

The filename of the current source (defined as filename); blank if the non-source window is active.

The filename extension of the current source; blank if a non-source window is active.

The current cursor line position within the active window.

The current cursor column position within the active window.

The current text (the word under the current cursor position, or the currently selected text, if there is one).

The current working directory (defined as drive+path).

The name of the current datasource as defined in Rapid SQL.

The name of the current datasource user.

The current datasource password.

The current connection string or server name.

NOTE: Arguments are case-sensitive.

K EYBOARD S HORTCUTS

Rapid SQL provides a number of keyboard shortcuts to help you expedite your tasks. The table below lists the taxes and related shortcuts:

General Editing

Delete one character to the left

Delete one character to the right

Cut selected text to the Clipboard

Undo the last action

Redo the last undo operation

Copy text

Paste the Clipboard contents

Keyboard Command

BACKSPACE

DELETE

CTRL+X

CTRL+Z

CTRL+Y

CTRL+C

CTRL+V

50 RAPID SQL 8.6/XE5 USER GUIDE

To Extend a Selection

One character to the right

One character to the left

To the end of a word

To the beginning of a word

To the end of a line

To the beginning of a line

One line down

One screen up

To the beginning of a document

To the end of a document

To include the entire document

To Move the Insertion Point

One character to the left

One character to the right

One word to the left

One word to the right

One line up

One line down

To the end of a line

To the beginning of a line

One screen up (scrolling)

One screen down (scrolling)

To the end of a document

To the beginning of a document

Bookmarks

Toggle bookmark on/off

Go to next bookmark

Go to previous bookmark

Keyboard Command

SHIFT+RIGHT ARROW

SHIFT+LEFT ARROW

CTRL+SHIFT+RIGHT ARROW

CTRL+SHIFT+LEFT ARROW

SHIFT+END

SHIFT+HOME

SHIFT+DOWN ARROW

SHIFT+PAGE UP

CTRL+SHIFT+HOME

CTRL+SHIFT+END

CTRL+A

Keyboard Command

LEFT ARROW

RIGHT ARROW

CTRL+LEFT ARROW

CTRL+RIGHT ARROW

UP ARROW

DOWN ARROW

END

HOME

PAGE UP

PAGE DOWN

CTRL+END

CTRL+HOME

Keyboard Command

CTRL+F2

F2

SHIFT+F2

RAPID SQL 8.6/XE5 USER GUIDE

APPLICATION BASICS

51

APPLICATION BASICS

Splitter Windows

Go to next pane

Go to previous pane

Keyboard Command

F6

SHIFT+F6

Debugger Operations

Start Debugging

Stop Debugging

Step Over

Step Into

Run to Cursor

Step Out

Describe from Cursor

Insert or Remove Breakpoint

Toggle (Enable or Disable) Breakpoint

Edit Breakpoint

Go

Restart

Keyboard Command

CTRL+F5

SHIFT+F5

F10

F11

CTRL+F10

SHIFT+F11

CTRL+D

F9

CTRL+F9

ALT+F9

F5

CTRL+SHIFT+F5

Debugger Windows

Open or Close Watch Window

Open or Close Variables Window

Open or Close Call Stack Window

Keyboard Command

ALT+3

ALT+4

ALT+5

Open or Close Dependency Tree Window ALT+6

Other Windows

Go to the Result Tab

Go to the Query Tab

Open the Describe window (for highlighted object)

Toggle between Workspaces

Toggle between Datasource Explorer and

ISQL Window.

Keyboard Command

CTRL+ALT+R

CTRL+ALT+Q

CTRL+D

CTRL+W

CTRL+ALT+E

52 RAPID SQL 8.6/XE5 USER GUIDE

F ULL S CREEN M ODE

Rapid SQL has full screen mode capabilities so you can conceal the application framework and use the entire monitor area. Full screen mode hides any other applications running on the computer and uses every available pixel for the application. Main menu functionality is accessible through keyboard commands when you use full screen mode.

Activating Full Screen Mode

Rapid SQL offers two ways to activate full screen mode:

1 On the View menu, click Full Screen.

OR

On the Main toolbar, click Full Screen.

Rapid SQL expands the application to fit the entire monitor area.

NOTE: The Full Screen mode icon is a stand-alone floating toolbar.

Dismissing Full Screen Mode

1 Click Full Screen to expand the application to fit the entire monitor area.

TIP: If you closed the Full Screen mode toolbar, right-click the top of the Rapid SQL desktop to bring the toolbar back.

2 Click Full Screen to restore the application to the default size.

RAPID SQL 8.6/XE5 USER GUIDE 53

APPLICATION BASICS

54 RAPID SQL 8.6/XE5 USER GUIDE

TUTORIAL EXERCISES

T

UTORIAL EXERCISES

The exercises that follow walk you through the Rapid SQL’s major functional areas. After completing these exercises, you will have the foundation you need to explore the many features and benefits of Rapid SQL. You’ll have learned how to competently manage the major database administration and development tools provided.

This guide is divided into a set of sessions:

Session 1: Getting Started

Session 2: Productivity Enhancers

Session 3: Scripting

Session 4: Working with Code Workbench

Session 5: Building a Database Project

Session 6: Visual Query Builder

Session 7: Live Data Editor

Session 8: Code Analyst

Session 9: SQL Debugging and Profiling

You can use this basic tutorial as a roadmap of product highlights, but also to help you find your own path to explore Rapid SQL.

Once you’ve started, you can select Help Topics from the Help menu to find many additional resources that complement and build on many of the activities shown in this tutorial.

NOTE: The tutorial exercises make use of the sample SQL Server database, AdventureWorks .

Since this is not part of a typical install, you can obtain the files from installation CDs or online sources to install and attach that database. Alternatively, you can perform the tasks targeted for the AdventureWorks database against another available database.

No destructive actions are initiated in the exercises.

S ESSION 1: G ETTING S TARTED

Before anything else, you must perform the following tasks:

Starting Rapid SQL

Registering Cross-Platform Datasources

S TARTING R APID SQL

How you start Rapid SQL depends on the type of application you are evaluating:

• InstantOn version - start the application by double-clicking the file you downloaded.

RAPID SQL 8.6/XE5 USER GUIDE 55

TUTORIAL EXERCISES

• Fully-installed version - The Start menu sequence for Rapid SQL is always in the form

Programs > Embarcadero Rapid SQL version identifier > Embarcadero Rapid SQL version identifier , where v ersion identifier reflects the version you are running.

To get started

1 Run Rapid SQL.

The first time Rapid SQL starts, a dialog opens, prompting you to set up datasources. In addition to letting you manually set up individual datasources, a number of more automated methods are available. If you have installed and used other Embarcadero tools,

Rapid SQL can find any active datasources being used by those tools. In addition, Rapid

SQL provides a Discover Datasources feature that automatically searches the DBMS configuration files on your system for datasources that are not currently registered. Since other Embarcadero tools let you export datasource definitions to file, you also have the option of importing these definitions.

2 For the purpose of this tutorial, click Cancel . You will be registering a datasource manually.

The main Rapid SQL window opens.

RAPID SQL 8.6/XE5 USER GUIDE 56

TUTORIAL EXERCISES

R EGISTERING C ROSS -P LATFORM D ATASOURCES

For now, you will register a datasource manually.

1 On the Datasource menu, select Register Datasource . A Datasource Registration Wizard opens.

2 Choose Microsoft SQL Server as the DBMS type and then click Next . The next panel opens.

3 Ensure that a Registration type of User defined is selected, specify the Host name of an

SQL Server datasource on your network, override the Datasource Name with

SAMPLE_DATASOURCE and then click Next .

4 Provide valid credentials in the User ID and Password boxes, and then select the Auto-

Connect? checkbox to eliminate having to provide credentials each time you connect to this datasource.

5 In the left-hand pane, select Datasource Group , select the MS SQL Server folder, and then click Finish .

NOTE: The Datasource Group panel also lets you assign a category to a datasource. This provides a means to visually distinguish between different server purposes, development vs. production, for example, in your enterprise. Categorization is a customizable feature.

6 Select Yes when prompted to connect to the new datasource.

RAPID SQL 8.6/XE5 USER GUIDE 57

TUTORIAL EXERCISES

Rapid SQL offers the same easy-to-use Datasource Registration Wizard for all supported DBMS platform connections. The connection information only needs to be set up one time for each platform and can be saved locally or in a common datasource catalog for use by other

Embarcadero products.

By default, Rapid SQL stores datasource definitions in the Windows Registry. There is also a local, file-based option. Embarcadero products supporting these methods can share datasource catalogs on the same machine.

There is also a network-shared storage option. Lastly, datasource definitions can be stored centrally on an Embarcadero Connect server for use by Rapid SQL users.

Rapid SQL also offers the ability to import and export datasource definitions. This lets you share definitions among users and across datasource storage methods.

S ESSION 2: P RODUCTIVITY E NHANCERS

This session focuses on some commonly used time-saving features:

The Datasource Navigator Tree

Creating an Object Using the Object Creation Wizard

Working With an Existing Object Using the Object Editor

Object Documentation and Reporting

Working With Code, Files and Data

Setting Environment Options

Favorites Tab

Working with Scripts and Files

Viewing Data

Retaining Datasource Navigator View Settings

Datasource Navigator Bookmarks

Setting Keyboard Shortcuts and Hotkeys

Referencing Most Recently Used Datasources

RAPID SQL 8.6/XE5 USER GUIDE 58

TUTORIAL EXERCISES

T HE D ATASOURCE N AVIGATOR T REE

Rapid SQL makes it easy and intuitive to navigate between datasources and to drill-down into atomic database objects within the Datasource Navigator tree. The Datasource Navigator displays all registered datasources and serves as the entry-point for much of Rapid SQL’s advanced functionality.

1 Click on the Navigator’s dropdown and ensure that Organize By Object Type is selected.

2 Select and expand the SAMPLE_DATASOURCE > Databases > AdventureWorks node to display the database object sub-nodes.

RAPID SQL 8.6/XE5 USER GUIDE 59

TUTORIAL EXERCISES

C REATING AN O BJECT U SING THE O BJECT C REATION W IZARD

From within the Navigator tree you can create any database object using simple Object Creation

Wizards. The following is an example of how to use the Table Object Creation Wizard. It is similar to the Object Creation Wizards available within Rapid SQL for all database objects and other supported elements.

1 Right-click on the Tables node and select Create . A Create Table Wizard opens.

2 Select a Schema and provide a Name of SAMPLE_TABLE . Leave the remaining default settings and click Next .

3 Add a column, using a Name of Sample_Column1 and select a Type of char. Experiment with the Add Column and Delete buttons, and with selecting a column and modifying its attributes.

4 Click Finish . The DDL View panel opens showing the DDL that will be used to create the new table.

5 Deselect the Launch Object Editor After Execute and then click Execute .

Rapid SQL builds the platform-specific SQL code, syntactically-correct and ready to run the first time. There is no SQL coding required in any of the Rapid SQL Object Creation Wizards.

RAPID SQL 8.6/XE5 USER GUIDE 60

TUTORIAL EXERCISES

W ORKING W ITH AN E XISTING O BJECT U SING THE O BJECT E DITOR

While the wizard offered you the option to automatically open an editor on creating the table, you can also manually open an editor.

1 In the Navigator, ensure that the Tables node is expanded and then right-click on your new table and select Open .

Object Editor features are as follows:

• All Object Editors provide standardized, multi-tabbed windows for each database object type.

• All Object Editors provide fully-functional toolbars for easy object management.

• Rapid SQL has full knowledge of the underlying DBMS system catalog, syntax and alteration rules, so the user can concentrate on what needs to be done, not on how to do it.

• Drop-down boxes allow you to easily move between owners and objects.

• The Rapid SQL Object Editors easily perform operations that would normally require painstaking and error-prone scripting, such as deleting or inserting columns in a table while preserving data, dependencies and permissions. Rapid SQL analyzes the database catalog to determine its structure, and then automatically generates the SQL script required for the extended alteration. For instance, when a full table alteration is required,

Rapid SQL automatically unloads and reloads the data, eliminating tedious work.

2 Close the Object Editor window.

RAPID SQL 8.6/XE5 USER GUIDE 61

TUTORIAL EXERCISES

O BJECT D OCUMENTATION AND R EPORTING

Rapid SQL provides rich, detailed HTML Reporting for all database objects. Building a browserready report for any object is only a few mouse-clicks away.

1 Expand the Tables node, right-click on any table and select Report from the menu. A

Report dialog opens.

2 Enter a destination Report Home Page File Name . This can be a network web server directory.

3 Enter a Report Title and click Execute .

The HTML report will automatically be displayed in the Rapid SQL application workspace.

For example:

The HTML report can be saved to a new file or referenced in the file named above.

NOTE: All HTML reports are browser-ready and suitable for posting directly to the web.

W ORKING W ITH C ODE , F ILES AND D ATA

Rapid SQL provides many features and powerful development tools for creating and executing

SQL code and working with data.

NOTE: For purposes of this exercise, we are only covering high-level functionality of the major features and tools within Rapid SQL.

RAPID SQL 8.6/XE5 USER GUIDE 62

TUTORIAL EXERCISES

S ETTING E NVIRONMENT O PTIONS

The Options dialog allows you to set the Rapid SQL development environment to meet your needs.

1 Select File > Options from the menu. The Options dialog opens.

The Options dialog has one page per option category. Select an option category in the lefthand pane and you can subsequently set options on that page. Options are applied when you click OK .

2 Close the Options dialog.

F AVORITES T AB

The Favorites Explorer provides a drag-and-drop library interface of all supported DBMS syntax,

SQL syntax, built-in functions, optimizer hints, and SQL-conditional syntax. Additionally, it provides the ability to create custom folders to store commonly-used code for quick and efficient access, as needed.

To open the Favorites Explorer:

1 Select View > Favorites . The Favorites window opens.

2 Expand the Microsoft node and then expand the Schema sub-node.

RAPID SQL 8.6/XE5 USER GUIDE 63

TUTORIAL EXERCISES

3 Right-click the Procedures node and select Open . The selected code opens in the SQL

Editor window and is ready for execution.

4 Right-click in the editor window and select Close from the context menu.

To add a custom folder to the Favorites Explorer

1 Right-click the Favorites > Schema folder.

2 Select New Folder from the menu. A new folder is added to the bottom of the Schema folder.

To close the Favorites Explorer:

1 Select View > Favorites .

W ORKING WITH S CRIPTS AND F ILES

Rapid SQL extends the auto-generation of SQL code by allowing you to run your scripts across multiple databases at the same time.

F ILE E XECUTION F ACILITY

Files containing SQL scripts can be added to the File Execution Facility and executed immediately or scheduled to run later.

1 On the Tools menu, select File Execution Facility . Rapid SQL opens the File Execution

Facility dialog box.

2 To locate the file you want to execute, click Add . Use the Add Files dialog box to locate and select a file.

3 On the Target tab, select the datasources to run the script against.

4 On the Output tab, select the desired output option. For the purposes of this example, select Graphical Output .

NOTE: To enable the scheduling function for the script, you must select the File Output option.

5 If you want to send notification that the script has executed, on the Notify tab, complete the target information.

6 Click Execute if you want Rapid SQL to run the script against the target datasources.

Otherwise, close the dialog without executing.

NOTE: Separate script output windows are created for each selected datasource.

RAPID SQL 8.6/XE5 USER GUIDE 64

TUTORIAL EXERCISES

S CRIPT E XECUTION F ACILITY

The Tools menu also offers a Script Execution Facility. Similar to the File Execution facility, it lets you type or paste the script to be executed.

V IEWING D ATA

Rapid SQL provides several options for browsing data. In addition, it gives you the ability to construct even the most complex SQL statements with point-and-click ease.

S ELECT * B ROWSING

1 On the Datasource Navigator, expand the MS SQL Servers node.

2 Expand any database you know has table data, expand the Tables node, right-click a table, and then click SELECT * FROM .

All columns and rows from the table are displayed in the active workspace.

3 Close the workspace window.

R ETAINING D ATASOURCE N AVIGATOR V IEW S ETTINGS

1 Click on the dropdown at the top of the Datasource Navigator.

2 Select Retain View Settings .

The Navigator will open the next time just as you left it. All connections that were present when you closed Rapid SQL will be re-established.

RAPID SQL 8.6/XE5 USER GUIDE 65

TUTORIAL EXERCISES

D ATASOURCE N AVIGATOR B OOKMARKS

Rapid SQL allows you to set bookmarks for frequently visited database objects.

1 Right-click on any node in the Datasource Navigator.

2 Select Add Bookmark and use the Add Friendly Bookmark Name dialog to optionally provide a new name, and create the bookmark.

After Bookmarks are defined you can use them to easily navigate to commonly used datasource resources. In this case, you would select the dropdown at the top of the

Datasource Navigator, selecting Bookmarks > SQLServer and then selecting the bookmark you just created.

The Bookmark Manage r handles maintenance of Bookmarks.

RAPID SQL 8.6/XE5 USER GUIDE 66

TUTORIAL EXERCISES

3 Select the dropdown at the top of the Datasource Navigator and then select Bookmarks >

Bookmark Manager .

4 Close the Bookmark Manager dialog.

S

ETTING

K

EYBOARD

S

HORTCUTS AND

H

OTKEYS

1 On the Tools menu, select Customize .

2 In the Customize dialog, go to the Keyboard tab.

The Keyboard tab can be used to set keyboard shortcut hotkeys for all areas of Rapid SQL functionality.

3 Close the Customize dialog.

RAPID SQL 8.6/XE5 USER GUIDE 67

R EFERENCING M OST R ECENTLY U SED D ATASOURCES

1 Select File > Recent Datasources and then select a datasource.

TUTORIAL EXERCISES

This will automatically place you on the datasource within the Navigator, ready to work with active connection.

S ESSION 3: S CRIPTING

This session looks at Rapid SQL’s development environment:

Generating Code

Right-click feature

Automated error detection and coding assistance

Other coding aids

G ENERATING C ODE

By providing several code generation and assistance options, Rapid SQL makes cross-platform development easy for developers of all experience levels.

NOTE: The following examples build on the SAMPLE_DATASOURCE registered earlier in this

Evaluation Guide. These examples can be applied to any registered datasource for any of the supported platforms.

C ODE G ENERATION F ACILITY

The Code Generation Facility can be used to create complete procedures, functions or packages revolving around views or tables.

1 From the menu, open Tools > Code Generation Facility .

2 Select the SAMPLE_DATASOURCE datasource, the AdventureWorks database, and the

Purchasing schema from the dropdown list boxes.

RAPID SQL 8.6/XE5 USER GUIDE 68

TUTORIAL EXERCISES

3 Select the Vendor table, Name as the input column and all columns for output.

4 Select Select as the code option.

5 Select a file to save the generated script and check Open .

6 Click OK and the DDL to create the procedure will be generated and displayed in an editable window, called the DDL Editor. You can edit the name of the new procedure and any of the generated code at this time. Name the new procedure sample_select_vendors .

RAPID SQL 8.6/XE5 USER GUIDE 69

TUTORIAL EXERCISES

7 Click on the Execute button to submit the DDL and create the procedure.

The indicated file will be saved on the selected directory.

NOTE: No SQL statement coding is required to generate complete stored procedures and packages. If applicable, Rapid SQL allows all generated code to be previewed and edited to fit any development need.

R IGHT CLICK FEATURE

Similar to the Code Generation Facility, the “right-click” code generation feature can be used to create complete procedures, functions or packages revolving around views or tables.

1 From the Datasource Navigator tree, expand the SAMPLE_DATASOURCE >

AdventureWorks > Tables sub-node.

2 Right-click on the Vendors table.

3 Select Generate > Procedure > Select .

4 Select Name as the input column, and leave all output columns selected.

5 Click OK and the DDL to create the procedure will be generated and displayed in the DDL

Editor. You can edit the name of the new procedure and any of the generated code. Name the new procedure sample_select_vendors2 .

6 Click on the Execute or Step Execute button to submit the DDL and create the procedure.

A UTOMATED ERROR DETECTION AND CODING ASSISTANCE

Rapid SQL provides a range of features that detect or help you avoid errors and save keystrokes in developing your scripts.

RAPID SQL 8.6/XE5 USER GUIDE 70

TUTORIAL EXERCISES

To enable these features:

1 On the File menu, select Options . The Options dialog opens.

2 In the left-hand pane, expand the ISQL node and then select Code Assist .

3 On the Code Assist panel:

• Ensure that Enable Code Complete is selected.

• Ensure that Severity levels for semantic validation problems has Warning selected.

• Ensure that Enable Real-time syntax checking is selected.

4 Click OK .

To see these features in action:

1 On the File menu, click New , and then SQL .

Rapid SQL opens the SQL Editor window. You can add SQL code via your method of choice

(free-form typing, retrieve from a file, paste copied code, etc.).

2 Type SELECT * FROM and stop typing.

Note the error condition.

Rapid SQL can run a syntax check any time there is an interval of 1.5 seconds between keystrokes. You can also disable automatic syntax checking and only run a check when you manually initiate it. Syntax error annotation persists until you correct the problem.

3 This time type a fragment that includes the name of a nonexistent object, SELECT * FROM

NON.OBJECT

, for example. For now, ignore any popups. The warning condition is a result of on-the-fly semantic validation.

Rapid SQL notifies you when a script contains a reference to an object that Rapid SQL cannot resolve.

RAPID SQL 8.6/XE5 USER GUIDE 71

TUTORIAL EXERCISES

4 Type SELECT * FROM followed by a space and then stop typing. If no popup appears, press

CTRL+SPACE. The Code Complete suggestion box lets you select from objects or object name components such as databases or schema. This feature saves keystrokes and minimizes typing errors. See the online Help for full descriptions of these features.

5 Close the current SQL Editor window.

To restore Rapid SQL settings:

1 On the File menu, select Options . The Options dialog opens.

2 On the Code Assist panel, click the Restore defaults button.

3 Click OK .

O THER CODING AIDS

Rapid SQL provides extensive, easy-to-use coding aids for all of the supported DBMS platforms, throughout the application. Aids are provided in the form of ready-to-use code templates and blocks of syntactically correct code.

P ASTE SQL

1 From the Datasource Navigator tree, expand the SAMPLE_DATASOURCE >

AdventureWorks sub-node.

2 Select File > New > SQL to open an SQL Editor window.

3 Select Edit > Paste SQL Statement to open the Paste SQL window.

4 On the Paste SQL dialog, select Sample_Datasource from the Datasource dropdown,

AdventureWorks from Database , All Owners from Owner , and an Object Type of Tables .

RAPID SQL 8.6/XE5 USER GUIDE 72

TUTORIAL EXERCISES

5 In the Tables list, select Purchasing.Vendor

.

6 Under the Columns list, click ALL .

7 Click the Select radio button.

8 Click Paste Statement to copy the generated code to the SQL Editor window.

You can use the statement as is, or modify the code as needed.

P ASTE SQL S YNTAX

1 Select File > New > SQL to open a fresh SQL Editor window.

2 Select Edit > Paste SQL Syntax to open the SQL Syntax for SQL Server window.

RAPID SQL 8.6/XE5 USER GUIDE 73

TUTORIAL EXERCISES

3 Select a template and click Paste to copy the code template into the SQL Editor window.

4 Add your own code to complete the needed operation.

S ESSION 4: W ORKING WITH C ODE W ORKBENCH

The Code Workbench lets you configure resources for two SQL Editor features:

• Code Templates

• Auto Replace

Code templates are complete code blocks that can be easily added to open windows or scripts with a few keystrokes. When you type CTRL+SPACE, the Code Assist menu opens, letting you select a code template for insertion in the editor window.

RAPID SQL 8.6/XE5 USER GUIDE 74

TUTORIAL EXERCISES

Auto Replace lets you define shortcuts consisting of a few characters that represent longer character strings. Instances of these Auto Replace expressions are automatically replaced by the replacement string on activation events such as typing SPACE, TAB, or RETURN. This feature is useful for creating shortcuts for one-line commands or SQL statement subsets, or even to detect and fix common typographical errors such as teh for the .

For example, consider an Auto Replace definition with an expression of sel to represent

Select * From :

If the associated activation event includes a SPACE, then on typing sel followed by pressing

SPACE, the following replacement occurs.

Rapid SQL loads a default set of Auto Replace and Code template definitions at startup, but you can also add, edit, and delete definitions. In addition, you can save sets of definitions to file and subsequently load specific sets of definitions, allowing you to customize your templates to different platforms or development projects.

To invoke Code Workbench settings:

1 Select Tools > Code Workbench .

The Settings tab lets you enable the Auto Replace and Code Template features.

2 Inspect the Code Templates and Auto Replace tabs.

3 Click OK .

RAPID SQL 8.6/XE5 USER GUIDE 75

TUTORIAL EXERCISES

S ESSION 5: B UILDING A D ATABASE P ROJECT

C REATING A NEW R APID SQL P ROJECT

Rapid SQL provides an excellent team development environment by allowing you to reverse engineer live database objects into off-line SQL source code files. You can subsequently perform tasks such as distribute the files or add them to a Version Control System (VCS). This example will reverse engineer the table objects from the Microsoft SQL Server AdventureWorks database into a Rapid SQL project

1 Select File > New > Project to open the wizard.

2 Enter sample_project as the name, and accept the default target directory. Select From

Database and click OK .

3 On the Connection page, select SAMPLE_DATASOURCE and click Next .

4 On the Catalogs page, select AdventureWorks and click Next .

5 Click Schemas to open the Schema Selection dialog. Select Human Resources ,

Purchasing , and Sales , and then click OK . The Object Selection page opens.

6 Under Object Types , select Tables . Then, under Objects , expand the Tables node and select the Purchasing.Vendor

, Sales.SpecialOffer

, and HumanResources.Employee

tables. Click Next .

7 On the Options page, leave the default selections and click Finish .

8 When the Execute page shows that reverse engineering is complete, click Continue .

The Project tab displays the results of the reverse engineering.

RAPID SQL 8.6/XE5 USER GUIDE 76

TUTORIAL EXERCISES

Before closing the Project tab, investigate the individual project elements. In addition, check the File and Project menus for project and version control options.

S ESSION 6: V ISUAL Q UERY B UILDER

Rapid SQL gives you the ability to construct complex SQL statements with point-and-click ease using the Visual Query Builder.

1 From the Navigator tree, right-click on the HumanResources.Employee

table and select

Build Query .

The table is automatically added to the Query Builder workspace.

2 On the Tables/Views tab, right-click on the Department table and select Add .

3 Similarly, on the Tables/Views tab, right-click on the EmployeeDepartmentHistory table and select Add .

4 Rearrange the contents of the window to look like the following graphic.

5 Select the columns indicated in the graphic.

RAPID SQL 8.6/XE5 USER GUIDE 77

TUTORIAL EXERCISES

Note that the tables are automatically identified as being joined by any columns with the same name and datatype. Also, note that the query is being built in the lower pane.

6 Click on the DML tab to expose the visual query building clauses and options. You can rightclick on any clause to easily add the code to the query.

7 Experiment with adding, deleting, and modifying clauses.

8 Click the Execute button to execute the query.

The results will display in the lower window.

RAPID SQL 8.6/XE5 USER GUIDE 78

TUTORIAL EXERCISES

Before closing the Query Builder, experiment with additional options. Try selecting a different statement type, such as Insert or Update , from the dropdown at the top of the Query Builder window. Use the different clauses on the DML tab.

NOTE: Any visual query builder session can easily be saved to a file for later use.

S ESSION 7: L IVE D ATA E DITOR

1 From the Navigator, right-click on the Purchasing.Vendor

table and select Edit Data .

2 In the Data Editor Filter dialog, click Add All to add all columns to the editing session.

At this point, you can add a WHERE clause that will filter for only the desired data. Note that

Rapid SQL builds the SQL to retrieve the data to be edited in the Select Statement area.

3 Click OK . A Data Editor opens.

Note the dropdown at the left of the toolbar. The editing window has LIVE and BATCH modes:

• LIVE mode commits your changes each time you move to a new row.

• BATCH mode will allow you to move within the window and commit your changes when ready. Changes made in BATCH mode can be cancelled by selecting the Reload Data icon.

At any time during the session, you can change the filter parameters by selecting the Filter Data icon.

RAPID SQL 8.6/XE5 USER GUIDE 79

TUTORIAL EXERCISES

S ESSION 8: C ODE A NALYST

The Code Analyst allows you to capture run-time statistics on executable database objects, including stored procedures and functions. Not only can you capture statistics for single objects, but you can group more than one object.

To get started

1 Select Tools > Code Analyst .

NOTE: In order for Code Analyst to run, 5 repository tables will be created on the database.

Select the database you would like the tables to be installed on and press OK . Once the tables are installed, you’re ready to start defining a session.

2 On the Code Analyst toolbar, click the Create New Collection button.

3 On the Code Analyst Object Selection dialog, provide a Session Name , locate and select the objects to be executed, and click Next .

4 Use the Code Analyst Object Initialization dialog to initiate providing input parameters as required, change the order of execution, and when ready, click Finish .

Once the session has been run, the total time for the execution is displayed in the Run

Summary tab.

RAPID SQL 8.6/XE5 USER GUIDE 80

TUTORIAL EXERCISES

5 Select the other tabs to view the tabular and graphical representation of the execution details on your selected objects. For example:

• The Run Detail tab shows a breakdown of the different objects that make up the session.

• The Unit Detail tab contains the specific time measurements for individual SQL statements.

6 Close the Code Analyst window.

S ESSION 9: SQL D EBUGGING AND P ROFILING

Rapid SQL offers the following facilities that help you test and optimize code:

SQL Debugging

SQL Profiling- Oracle Only

SQL D EBUGGING

The SQL Debugger is another database productivity tool that lets you debug SQL Server,

Oracle, Sybase ASE or DB2 stored procedures, as well as Oracle functions. SQL Debugger simplifies the task of finding coding errors.

1 In the Navigator, expand the Procedure or Function node.

2 Right-click the object and select Debug from the context menu.

3 If the procedure or function takes input parameters, the Procedure Execution window prompts you to enter values.

RAPID SQL 8.6/XE5 USER GUIDE 81

TUTORIAL EXERCISES

4 Enter input values and press Continue .

TIP: Rapid SQL allows the user to save the input variable values to a file for later use. This is very helpful for procedures/functions with many input variables that need to be run repeatedly.

The application opens the SQL Debugger Interface.

RAPID SQL 8.6/XE5 USER GUIDE 82

TUTORIAL EXERCISES

The Debugger features basic execution, line-by-line execution, breakpoint support, and other common debugging features. For details, refer to the relevant online Help topics.

SQL P ROFILING - O RACLE O NLY

The SQL Profiler within Rapid SQL provides the ability to capture the metrics of various PL/SQL programmable objects as they are executed in the database. It quickly identifies performance bottlenecks by first calculating the overall runtimes of objects like Oracle packages, and then computing the amount of time each line of PL/SQL code spends executing. Information is presented in an easily viewed, drill-down format.

1 To start a profiling session, use the Tools menu option and select SQL Profiler > Start .

2 Enter a name for the profiling session or select an existing name from the dropdown. Press

OK . The Profile session is now active.

RAPID SQL 8.6/XE5 USER GUIDE 83

TUTORIAL EXERCISES

3 Execute the programmable object (i.e. Stored Procedure) you wish to capture metrics on.

4 When finished, select Tools > SQL Profiler > Stop . The SQL Profiler – Stop dialog window prompts you to select an option.

5 Press Stop .

6 On the Navigator, expand the PL/SQL Code Profiling node.

RAPID SQL 8.6/XE5 USER GUIDE 84

TUTORIAL EXERCISES

7 Right-click on the profile session and select Run Summary . The Run Summary window opens.

8 Select a session and select Run Detail from the right-click menu. The Run Detail screen appears allowing you to view the metrics for this execution in both a graphical and text format.

9 To drill down further into the data, highlight a unit and select Unit Detail from the right-click menu. Scroll through the Source window to view the times for each statement.

10 To compare 2 cases, select the 2 cases you wish to compare (shift-click to select the second case) from the Run Summary screen and select Compare from the right-click menu. The

SQL Profiler Run Comparison screen appears.

See the relevant online Help topics for more information on profiling.

RAPID SQL 8.6/XE5 USER GUIDE 85

S

PECIFYING

R

APID

SQL

APPLICATION AND FEATURE OPTIONS

The following topics show you how Rapid SQL lets you customize the application configuration for your specific needs:

Configuring Feature Options

Locking Down Rapid SQL Features Using the Registry

C ONFIGURING F EATURE O PTIONS

All Rapid SQL application settings are available in the Options Editor, which is organized in a tabular format based on feature sets.

To specify options for the Rapid SQL application or a particular feature

1 On the File menu, select Options .

Rapid SQL opens the Options Editor.

2 Click the tab corresponding to the feature you want to customize:

Connect Options

Browsers Options

Code Analyst Options

Data Editor Options

Data Editor Options

Data Transfer Options

Explorer Options - Main

Tab

Datasource Options

Lets you integrate with the Embarcadero Connect data governance matadata repository.

Lets you specify appearance of browser windows.

Lets you set dependency profiling level, alarm and threshold, and oracle options for

Code Analyst.

Specifies the timeout parameters, packet size for a connection, and ANSI to OEM settings.

Specifies settings for Data Editor.

Sets default directories when performing data unload and load and data export and import operations.

Sets defaults for the organization of objects in the Datasource Navigator.

DBMS_Java Options

DB2 Utilities Options

DDL Extract Options

Debug Options

Directories Options

General Options

Specifies general datasource management options and Datasource Navigator preferences.

Specifies load Java files and drop Java files.

Sets default directories for executables used by DB2 LUW.

Specifies whether or not Rapid SQL should include DROP statements when extracting the schema of different database object types.

Sets the duration of your debug initialization and debug session, enable or disable

DBMS_OUTPUT, and enable the refresh option.

Sets the default directories for placing the output of different operations such as HTML reports or schema extractions.

Sets defaults for automatic login, restoring the last session, and other general application options.

RAPID SQL 8.6/XE5 USER GUIDE 86

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Grid Properties (Results window) Options

ISQL Options

Dictates the physical appearance of the results window grid.

Java Options

LDAP Configuration

Options

Sets defaults for the maximum allowable errors before aborting the execution of a SQL script, executing selected text, and the position of Query and Results tabs.

Lets you specify Java Virtual Machine options.

Sets preferences for LDAP Server usage

Logging Options

Sets defaults for SQL Logging.

MySQL Utilities Options

Specifies paths to MySQL utilities.

Oracle Utilities Options

Specifies the location of the Oracle Utilities.

Perf Center Options

Specifies Performance Center’s integration with Rapid SQL.

Query Builder Options

Results (ISQL) Options

Specifies global settings for Query Builder.

Specifies auto format result sets, sets the display and format of Result Windows, and the mail file type and default fonts.

Lets you specify defaults for your outgoing mail notifications.

SMTP Mail Options

Version Control Options Lets you select which version control system you want Rapid SQL to use as the underlying version control system

Warnings Options

Activates specific warnings when undesirable actions are attempted against a database.

3 Set feature options on the tab and then click OK .

NOTE: If there is an open document, Rapid SQL opens the Update Document Statement

Properties dialog. The Update Document Statement Properties dialog lets you override changes you made to a current document or documents with new setting you made in the Options Editor.

C ONNECT O PTIONS

The Connect tab of the Options Editor integrates Rapid SQL with Embarcadero Connect, a data governance metadata repository.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

The table below describes the options and functionality on the Connect tab:

Option

Use Connect

Connect URL

Description

Enables use of the Embarcadero Connect repository to manage datasources.

The login URL of the Connect repository.

NOTE:

These controls can be set or disabled using registry entries. For details, see " Locking

Down Rapid SQL Features Using the Registry " on page 126.

For more information on repository-based datasources, see " Working With Datasources from a

Connect Repository " on page 147.

87 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

C ONNECTION O PTIONS

The Connection tab of the Options Editor lets you specify common connectivity options and provides access to DBMS-specific options.

NOTE:

For general information on DBMS version support and client options, see " Database

Support and Connectivity Options " on page 14.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

The table below describes the options and functionality on the Connection tab:

Option Description

Login Timeout Specifies the number of seconds that the application should wait for a response to a connection request from server. If server does not respond within the specified period, the application aborts the connection and returns an error message.

Default

30

Query Timeout Specifies the number of seconds that the application should wait for a response to a query from the server. If the server does not respond within the specified period, the application terminates its query process and returns an error.

Host Name Name of the client computer.

0

Local name

See the following topics for DBMS platform-specific options:

Connection Options - Sybase

Connections Options - Sybase IQ

Connections Options - SQL Server

Connections Options - Oracle

C ONNECTION O PTIONS - S YBASE

The Connection > Sybase tab of the Options Editor lets you select an installed client other than the active/default client version for Embarcadero driver connections. It also lets you override default client/server settings.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE:

For more general connectivity options, see " Connection Options " on page 88.

Group Setting

Use Quoted

Identifiers

Description

If you plan to use delimited identifiers, select this option.

RAPID SQL 8.6/XE5 USER GUIDE 88

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Group

Client Selection

Connection

Settings

Setting Description

This group of controls apply only to use of the Embarcadero drivers with native Sybase clients.

Enable Client

Selection

Selecting this check box lets you override the default/active Sybase client specified by the SYBASE, SYBASE_OCS, and/or SYBROOT environment variables.

This control enables and disables the Client Home Directory and

Client OCS Directory controls.

Browse to the root directory of the client to be used.

Client Home

Directory

Client OCS

Directory

SQL INI File

Select the OCSwant to use.

directory corresponding to the client version that you

Packet Size , Max

Connections , and

Client Character

Set

Browse to locate and select the specific, SQL.INI-formatted file containing server-configuration information. The file does not have to be named SQL.INI

.

These settings let you create a set of default parameters used in setting up connections to Sybase ASE datasources.

These settings can be overridden when registering a Sybase ASE

datasource. For details, see " Providing Sybase ASE Connection

Information When Registering Datasources " on page 137.

C ONNECTIONS O PTIONS - S YBASE IQ

The Connection > Sybase IQ tab of the Options Editor lets you specify DBMS-specific connection options.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE:

For more general connectivity options, see " Connection Options " on page 88.

Setting Description

Use Quoted Identifiers If you plan to use delimited identifiers, select this option.

C ONNECTIONS O PTIONS - SQL S ERVER

The Connection > SQL Server tab of the Options Editor lets you specify DBMS-specific connection options.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE:

For more general connectivity options, see " Connection Options " on page 88.

Setting Description

Use Quoted Identifiers If you plan to use delimited identifiers, select this option.

89 RAPID SQL 8.6/XE5 USER GUIDE

Setting

Packet Size

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Description

This control lets you specify a default packet size parameter used with SQL Server connections.

This setting can be overridden when registering a SQL Server datasource. For details, see

" Providing SQL Server Connection Information When Registering Datasources " on page 136.

C ONNECTIONS O PTIONS - O RACLE

The Connection > Oracle tab of the Options Editor lets you select an installed client other than the active/default client version for Embarcadero driver connections. It also lets you override default client/server settings.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE:

For more general connectivity options, see " Connection Options " on page 88.

Group Setting Description

Hide time portion of DATE datatype if zero If selected, the time portion (HH:MM:SS) of DATE datatype results are suppressed in the ISQL Editor’s Results window, if the time portion is all zeroes.

Client Selection This group of controls apply only to use of the Embarcadero drivers with native Oracle clients.

If no client is specified using these controls, Rapid SQL will use the following sequence in determining the client to use for Oracle connections.

- The driver specified in the ORACLE_HOME environment variable

- The first driver found in the PATH environment variable

- The Oracle Instant Client driver (v. 11) bundled with DBArtisan

Enable Client Selection Selecting this check box lets you override the default/active client specified by Oracle environment variables.

This control enables and disables the Oracle Home control.

Oracle Home Select the directory of the Oracle client you wish to use.

RAPID SQL 8.6/XE5 USER GUIDE 90

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Group

TNSNAMES.ORA

Setting

Directory Path of

Oracle configuration files

Description

Browse to locate and select the directory containing the

TNSNAMES.ORA

file to use. Ensure that no file name is included with the path.

If no file is specified using this control, Rapid SQL will use the following sequence in determining the TNSNAMES.ORA

file to use for Oracle connections.

-The directory specified in the TNS_ADMIN environment variable

- The directory specified in the TNS_ADMIN key at the top level in

HKLM\SOFTWARE\ORACLE

- The directory specified in the TNS_ADMIN key in the client subkey (HOME or KEY_ prefixed) corresponding to the value of the ORACLE_HOME (if there is a particular client specified by the user, its TNS_ADMIN subkey will be used if present)

- The directory ORACLE_HOME\NETWORK\ADMIN (if there is a particular client specified by the user, ORACLE_HOME is the client's full path)

- The directory ORACLE_HOME\net80\ADMIN (if there is a particular client specified by the user, ORACLE_HOME is the client's full path)

- All directories in PATH environment variable

B ROWSERS O PTIONS

The Browsers tab of the Options Editor lets you set a number of options for your browser windows, including browser appearance, mail file type options, and default object owner.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE:

For information on Browser features, see " Browsers " on page 34.

The table below describes Browser options:

Option Description Interface

Element

Window

Default

Show Toolbar Toggles the Browser window toolbar. Commands can also be activated from the shortcut menu that displays when you rightclick in an open Browser window.

Show Status

Bar

Toggles the status bar at the bottom of the Browser window. The status bar displays the cell location of the current focus and the number of rows in the Browser window itself.

Detailed

Listing

Toggles detail columns for a given object type. Each object contains object specific details, such as creation date, segment, and so on. When Detailed Listing is turned off, only the names of objects and the numbers of rows of data for a table are displayed.

Selected

Selected

Not selected

91 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Interface

Element

Appearance

Option Description Default

Text Color

Background

Color

Sets the text color for all Browsers of that object type. Select the row appropriate to a particular object type, then click a color in the Text column. Remember that text colors appear best against contrasting background colors, such as black on white.

Sets the background color for all Browsers of that object type.

Select the row appropriate to a particular object type, then click a color in the Background column. Remember that text colors appear best against contrasting background colors, such as black on white.

Available

Available

Browser File Mail File Type Specifies what file type you want the browser file saved as when sent as e-mail to another user on a MAPI compliant mail system.

The valid types are the proprietary Rapid SQL Results type, Tab delimited, Comma separated, and HTML, which formats the results in a simple HTML table.

Default Owner All Owners

Current User

Indicates that the Browser Window should default to displaying database objects in the browsers for all owners in the database.

Indicates that the Browser Window should default to displaying database objects owned exclusively by the current user.

Specific Owner Indicates that the Browser Window should default to displaying only the database objects owned by a specific owner. If you select this option, you must provide an owner name in the box.

Results

Not

Selected

Selected

Not

Selected

C ODE A NALYST O PTIONS

Code Analyst is a utility that helps you identify time-consuming lines of code. The Code Analyst tab of the Options Editor lets you specify Code Analyst operational parameters.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE:

For information on using Code Analyst, see " Code Analyst " on page 1052.

The table below describes Code Analyst options:

Group

Dependency profiling level

Oracle

Options and descriptions

All Dependencies Code Analyst will use all levels of dependencies when profiling the session.

Dependencies up to level

List Package objects

Lets you specify how many levels of dependencies the Code

Analyst will use when profiling the session.

Use SQL Profiler

Code Analyst lists the procedures within a package and functions that are found in the Oracle database.

Code Analyst uses Oracle's DBMS_Profiler package to collect time metrics.

Code Analyst displays the actual run time on the database, and does not include the time it takes to get to the server.

RAPID SQL 8.6/XE5 USER GUIDE 92

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Group Options and descriptions

Alarms and Thresholds Lets you set an alarm for each type of object that is collected. For each supported

Object Type (procedure, function, package, trigger, type), you can provide the following settings:

Alarm % - lets you specify the percentage of total run time a line of code takes when an alarm appears. If the object took more than specified percent of total time, Code Analyst alerts the user by changing the color of the text

Ignore 100% - lets you ignore lines of code that take all of the total run time

Show Code Analyst

Confirmation Dialog

When you create or execute a session, Code Analyst displays a message that the Code

Analyst will run longer than the actual code. You can also select the Please do not show me this dialog again option in the dialog.

D ATA E DITOR O PTIONS

The Data Editor tab of the Options Editor lets you provide preferences that dictate behavior of

Rapid SQL’s table data editor.

NOTE: Option parameters set in the Options Editor override options set within Query Builder and Data Editor.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE: For information on using the Data Editor, see

" Data Editor " on page 902 .

The table below describes the options and functionality on the Data Editor tab :

Interface Element Option

Default Execution

Mode

Live Mode

Description

lets you execute changes one row at a time. Batch Mode lets you make unlimited changes prior to execution. Batch Mode offers three sub-options: Ignore errors-continue processing , Prompt on Error , and

Stop after error(s) (number of errors allowed before stopping execution)

Data Editor File

Grid Font

Printer Font

Auto Format

(Best Fit)

Mail File Type Sets the default mail output style as Results, Tab

Delimited, Comma Separated, or HTML.

Includes column titles when saving.

Include column titles when saving

Customizes font style, and size for the Data Editor and the Results Grid.

Sets font style, and size for printing output.

Fits formatting to match your desktop.

Begin and End

Transaction

Statements

Default Date/

Time Format

Adds a beginning and ending transaction on each statement.

Displays the current date/time format and lets you customize the date/time display.

Default

Live Mode

Results

Not selected

Available

Available

Selected

Selected

Results

93 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Interface Element Option

Use Calendar

Control as default

Confirmation

Dialog Options

Description

If selected, Rapid SQL uses the Calendar Control window.

2 digit year system setting warning

If selected, Rapid SQL sends a warning when you use a two digit year system setting.

Enabling Show Delete Confirmation Dialog , Show Update Confirmation

Dialog , or Show Update LOB Confirmation Dialog lets you display a confirmation dialog when you use a delete command, update a row, or update a LOB, respectively.

Default

Not selected

Selected

Selected

D ATA T RANSFER O PTIONS

After opening the Options editor (see

Specifying Rapid SQL application and feature options

), you can make changes to the Data Transfer tab.

You can configure Rapid SQL to use default directories when performing data unload and load and data export and import operations. Setting a default directory saves time because it describes a single reference point for loading or unloading, exporting and importing table or view data files.

The table below describes the options and functionality on the Data Transfer tab :

Option

Data Unload

Data Load

Oracle Export (for Oracle)

Oracle Import (for Oracle)

Description

Specifies the name and location of the default directory in the Data Unload box.

Specifies the name and location of the default directory in the Data Load box.

Specifies the name and location of the default directory in the Oracle Export box.

Specifies the name and location of the default directory in the Oracle Import box.

RAPID SQL 8.6/XE5 USER GUIDE 94

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

D ATASOURCE O PTIONS

The Datasource tab of the Options Editor lets you provide datasource categorization and storage preferences.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

Option

Datasource Storage

Management

Recent Datasource List

Contains

Default to Alias Usage

When Defining New

Datasources

Datasource Category

Settings

Description

Rapid SQL offers both registry-based and file-based datasource catalog management. Prior to changing methods, see Understanding the

Datasource Catalog .

The following options are offered:

Windows Registry datasource catalog - The datasource catalog is stored and managed locally, in the Windows registry. This user can add and delete datasources and edit the registration details of existing resources. Any changes are retained across startups of Rapid SQL.

File based datasource catalog - The datasource catalog is stored locally and is file-based ( %APPDATA% \Embarcadero\Data Sources\ in a default installation). This user can add and delete datasources and edit the registration details of existing resources. Any changes are retained across startups of Rapid SQL.

Network shared datasource catalog - The datasource catalog is filebased, and obtained from the location specified in the Location of shared datasources file control. Changes such as new datasources, deleted datasources or edited datasource registrations are lost as soon as this user shuts down Rapid SQL.

Changing methods does not delete datasource definitions stored using the current method. When you change methods, Rapid SQL does not automatically convert existing catalog definitions to the new method

Lets you specify number of datasources to display when you select

Datasources from the File menu.

For DBMS that support alias usage, defaults the tab to alias usage selection.

Recent

Connection Information

Lets you select the optional user interface elements that are to be colorcoded or labelled for datasources that have been assigned a category:

Color the status bar using the datasource’s category color

Color the tabs using the datasource’s category color

Include category short name in the datasource toolbar combo

For an introduction to datasource categorization and related tasks, see

Categorizing datasources using color-coding and labelling .

Default

Windows

Registry

8

Unselected

N/A

NOTE: For information on using Embarcadero Connect repository-based datasource usage,

see " Connect Options " on page 87.

95 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

DBMS_J AVA O PTIONS

The DBMS_JAVA tab of the Options Editor lets you choose between use of the DBMS_JAVA package and the loadJava.bat batch file when loading or dropping Java classes.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

The table below describes the options and functionality on the DBMS_Java tab:

Description Interface

Element

Option

Load Java files Use the DBMS_JAVA package

Use batch file (oracle_home/bin/ loadJava.bat)

Default Encoding option

Drop Java files Use the DBMS_JAVA package

Use batch file (oracle_home/bin/ dropJava.bat)

Lets you schedule your SQL.

Uses batch file (oracle_home/bin/ loadJava.bat)

Leave blank to use the default.

Lets you schedule your SQL.

Uses batch file (oracle_home/bin/ dropJava.bat)

For related information, see the following object actions:

• " Drop Java " on page 634

• " Load Java " on page 654

Default

Selected

Not selected

Default

Selected

Not selected

DB2 U TILITIES O PTIONS

Some Rapid SQL functionality against DB2 LUW datasources makes use of native DB2 utilities.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

The table below describes the options and functionality of the DB2 Utilities tab:

Option db2cmd.exe

db2.exe

Description

Use this control to specify the location of the directory containing the db2cmd.exe utility.

Use this control to specify the location of the directory containing the db2.exe utility.

RAPID SQL 8.6/XE5 USER GUIDE 96

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

DDL E XTRACT O PTIONS

The DDL Extract tab of the Options Editor lets you specify results-handling preferences for use of the Extract object action.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE: For information on using the Extract

object action, see " Extract " on page 645 .

Common options

The table below describes the options and functionality on the DDL Extract tab , main view, of the Options Editor:

Option

Extract to multiple windows

Extract in dependency order

Script Use Statement

Grouping Extracted

DDL

Description

Select to extract the schema for each object into separate DDL windows.

NOTE: This option only works when you extract DDL for multiple objects.

This is the default.

When you select a number of objects as part of an extraction job, this option ensures objects will be extracted in the proper dependency order.

If the option is not selected, errors may result when you execute the script.

It’s also true, however, that loading the dependencies can add significant overhead when you are extracting numerous objects.

This option is for Sybase. Optimizes extraction through generating Use statements in the generated script.

There are two option as to how the DDL is generated for an extract operation:

Group the Drop and Create DDL for each object together - Objects are extracted one at a time. In the DDL generated by the extract, the Drop statement for a selected or referenced object is followed by the Create statement for that object.

Group DDL statements by type - all Drop statements, then all Create statements - In the DDL generated by the extract, Drop statements for all selected or referenced objects are grouped to precede Create statements for those objects. This method ensures that all dependencies are respected.

For more information on DROP options and dependencies, see

DBMS-specific DDL

Extract Options

.

DBMS-specific DDL Extract Options

The DBMS-specific views of the DDL Extract tab let you specify:

• The object types to include DROP statements for

• The default dependent object types for each object type included in extraction/migration operations

97 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

You can choose to include DROP statements before you perform ad hoc DDL extractions. You can use this feature to modify and to re-compile database objects. To recompile a database object, drop it before recreating it. This option drops any existing objects of the same name before recreating the object. The data in the existing table is not saved when you specify a

DROP statement for extracted DDL.

CAUTION: Because dropping an object is a destructive action, you should carefully consider including drop statements before activating this option.

You can also specify dependent object types included in extraction/migration operations. Each

DBMS-specific view of the DDL Extract tab lets you specify the object dependencies for each object type. Dependent object types selected on that view are by default selected when you run an extraction/migration operation and can be overridden using those wizards. For more information see

Extract .

D EBUG O PTIONS

The Debug tab of the Options Editor lets you specify operational preferences for the Rapid SQL

Debugger.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE:

For information on using the Rapid SQL Debugger, see " Rapid SQL Add-On Tools " on page 942

.

The table below describes the options and functionality on the Debug tab:

Tab Option Description Default

General

Profiler

Oracle

Dependency Tree

Option

Profiler Time Unit

Save Profiler Reports

Initialization Timeout

(seconds)

Debug Session Timeout

(seconds)

Enable DBMS Output

Refresh Dependencies for each run

Lets you specify pre-fetch levels.

Lets you select a unit of milliseconds, seconds or minutes.

Lets you save profiler reports and type or browse for the report path.

Specifies the point at which the application stops trying to initialize the debugger. If it cannot initialize the debugger in the specified time, it displays message in the Debug Output window.

Specifies the point at which the application terminates your debug session due to idle time.

Enables the Oracle built-in package, DBMS_OUTPUT, letting you send messages from stored procedures, packages, and triggers.

Pre-Fetch All

Dependencie s

Milliseconds

Not Selected

60

7200

Selected

Refreshes the dependencies each time you run the debugger. Not selected

RAPID SQL 8.6/XE5 USER GUIDE 98

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Tab

DB2

Option Description Default

Compile with Debug

Option

Debug Session Timeout

(seconds)

Compile with Debug

Option before Debug

Session

When debugging a procedure against an Oracle datasource,

Rapid SQL performs a compilation before debugging. During a compilation, Oracle invalidates referencing objects. For example, if procedures A2 and A3 both reference procedure

A1, debugging procedure A1 in Rapid SQL, will result in procedures A2 and A3 being marked as invalidated.

The Compile with Debug Options settings let you control compilation of dependent objects while debugging.

Specifies the point at which the application terminates your debug session due to idle time.

Lets you specify options.

Compile dependent options

300

Prompt

Always

D IRECTORIES O PTIONS

The Debug tab of the Options Editor lets you configure default directories when performing certain operations. You can set the default directories for:

• Wizard operations

• Report generation

• Schema extraction

• HTML templates for customizing reports

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

The table below describes the options and functionality on the Directories tab:

Option

Wizard

Definitions

HTML

Reports

Schema

Extraction

Description

Specifies the name and location of the default directory for saving wizard operations. This option applies to wizard operations in which you have the option to save the definition file, such as data unload/load or schema migration operations.

Default

C:\Documents and Settings \ user name \Application

Data\Embarcadero\RapidSQL\DefFil es

Specifies the name and location of the default directory for the output from generated HTML reports.

For information on generating reports, see " Report " on page 692.

Specifies the name and location of the default directory for placing the output from schema extraction operations.

C:\Documents and Settings \ user name r\Application

Data\Embarcadero\RapidSQL\Repor t

C:\Documents and Settings\ name \Application user

Data\Embarcadero\RapidSQL\Extra ct

99 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Option

HTML

Template

User SQL

Scripts

Job Config

Files

#include

Files

Description

Specifies the name and location of the default directory where Rapid SQL can find the HTML template on which to base HTML reports. This feature lets you customize your

HTML reports.

Specifies the name and location of the default directory for

SQL Scripts.

Specifies the location of any ETSQLX job configuration files you have set on your local machine.

For more information, see

ETSQLX Command Line Utility

.

Default

C:\Program

Files\Embarcadero\RSQL <version identifier> \HtmlTpl

C:\Documents and Settings \ user name \Application

Data\Embarcadero\RapidSQL\UserS

QLScripts

C:\Documents and

Settings\davidt\My

Documents\Embarcadero\RapidSQL

\Directories\ETSQLXJobCf g

Specifies the name and location of the directory searched for files specified by a #include directive in the ISQL editor,

Procedure Object Editor, or Package Body Object Editor if there are no paths specified on the Datasource Properties tab of the Datasource Registration Editor. For more information, see Registering or editing datasources .

For information on using compiler directives, see " SQL

Preprocessing: #define and #include " on page 792.

C:\Documents and

Settings\davidt\My

Documents\Embarcadero\RapidSQL

\Directories\IncludeFiles

E XPLORER O PTIONS

The Explorer options are available on the following Options Editor tabs:

• Explorer Options - Main Tab

• Explorer Options - Organization Tab

• Explorer Options - Limits Tab

• Explorer Options - Browsers Tab

E XPLORER O PTIONS - M AIN T AB

The Options Editor’s Explorer tab controls the appearance and behavior of the Rapid SQL

Datasource Navigator.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE:

For related information, see " Using the Datasource Navigator " on page 157 .

RAPID SQL 8.6/XE5 USER GUIDE 100

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Use the following table as a guide to modifying settings on this tab

Setting

Refresh after Object

Commands

Retain View Setting on

Close

Column filters use regular expressions by default

Description

Refreshes the Explorer automatically after an object has been modified or created.

Select to retain the current state of the Datasource Explorer so that it opens the same way the next time you start Rapid SQL.

Column filters use regular expressions by default - Lets you use regular expressions when defining criteria for display of database objects in the Browser. For more

information, see " Working with Browsers " on page 38

.

E XPLORER O PTIONS - O RGANIZATION T AB

The Options Editor’s Explorer > Organization tab controls the appearance and behavior of the

Rapid SQL Datasource Navigator.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE:

For related information, see " Using the Datasource Navigator " on page 157 .

Use the following table as a guide to modifying settings on this tab

Setting

Explorer organization

Show System Objects and Show Only My

Objects (available if you are organizing the

Datasource Explorer by object type)

Description

Lets you select a default grouping option of Organize by Object Owner (groups objects, by object type, for each user ) or Organize by Object Type (groups objects by object type for all users in the same list). Grouping by object owner is most efficient if you are working with databases containing a high number of objects.

You can change the organization manually during a Rapid SQL session.For details, see

" Basic Viewing Options in the Navigator " on page 163.

Lets you select a default Datasource Explorer tree display options for system objects and objects that you own. Available options in the two groups are:

Never - the relevant objects are not displayed by default.

Always - the relevant objects are always displayed by default.

Use datasource filter - The relevant default datasource filter is enabled. For more

information, see " Filtering in the Navigator " on page 170.

You can change the Show System Objects and Show Only My Objects settings

manually during a Rapid SQL session. For details, see " Using the Default Filters " on page 174.

101 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

E XPLORER O PTIONS - L IMITS T AB

The Options Editor’s Explorer > Limits tab controls the appearance and behavior of the Rapid

SQL Datasource Navigator..

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE:

For related information, see " Using the Datasource Navigator " on page 157 .

While Rapid SQL queries the DBMS as necessary when you navigate the node hierarchy, it also caches nodes for the purpose of quickly repopulating if you move away from and then back to a node. For example if you open a Tables node and then an Indexes node and then again select the Tables node, the cached Tables sub-nodes are displayed.

Use the following table as a guide to controlling caching details:

Setting

Cache Expiration Time

Maximum number of children to display per tree node

Description

The duration node is cached. Selecting a node after this expiration interval results in a fresh population.

Lets you place an upper limit of the number of nodes to display per node.

E XPLORER O PTIONS - B ROWSERS T AB

The Options Editor’s Explorer > Browsers tab controls the appearance and behavior of the

Rapid SQL Database Navigator

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

Use the following table as a guide to modifying settings on this tab

Interface Element

Default Owner

Mail File Type

Browser colors

Setting

All Owners

Current User

Specific Owner

Description

Indicates that the Browser Window should default to displaying database objects in the browsers for all owners in the database.

Indicates that the Browser Window should default to displaying database objects owned exclusively by the current user.

Indicates that the Browser Window should default to displaying only the database objects owned by a specific owner. If you select this option, you must provide an owner name in the box.

Specifies what file type you want the browser file saved as when sent as e-mail to another user on a MAPI compliant mail system. The valid types are the proprietary Rapid SQL Results type,

Tab delimited, Comma separated, and HTML, which formats the results in a simple HTML table.

Lets you specify foreground and background colors for object types displayed in the Browser

RAPID SQL 8.6/XE5 USER GUIDE 102

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

G ENERAL O PTIONS

The General tab of the Options Editor lets you specify general application options.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

The table below describes the options and functionality on the General tab :

Tab

Main tab

Option

Confirm on Exit

Max Editors in a

Single Open

Operation

Max Entries in

Output Window

Description

Instructs Rapid SQL to issue a message confirming the operation before exiting the application.

Specifies the maximum number of editors allowable from a single Open operation.

5

Default

Selected

Specifies the maximum number of messages that can appear in the Output Window before the contents are flushed. This option conserves memory resources. You can clear the Output window or raise the maximum number allowed at any time.

1500

The General tab also offers the following DBMS-specific aub-tabs:

103 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Oracle sub-tab

Option

Data Dictionary View

Usage

Preserve Case in Object

Identifiers

Description Default

Lets you synchronize Rapid SQL use of the Oracle Data Dictionary DBA and ALL/USER views with the privileges associated with the role used in creating and using the datasource.

Role-based Views - Rapid SQL will use views based on the user’s role. That is, users with DBA privileges will use DBA views.

DBA Views - Rapid SQL always uses DBA views.

All Views - Rapid SQL always uses ALL views.

Use Datasource Configuration for Views - lets you set up Data Dictionary usage on a view-by-view basis when editing or registering a datasource. For more information,

see " Registering Datasources " on page 128.

Preserves case of the database object.

Not selected

Sybase and SQL Server sub-tabs

Option

Rename action style

Description

Lets you specify whether user-defined objects or datatypes are renamed using an extended ALTER or using the sp_rename procedure.

Default extended alter

InterBase/Firebird sub-tab

Option

Preserve Case in

Object Identifiers

Description

Preserves case of the database object.

Default

Not selected

G RID P ROPERTIES (R ESULTS WINDOW ) O PTIONS

The Grid Properties tab of the Option editor lets you set preferences for the layout and appearance of the grid in an Results window.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

The table below describes the options and functionality on the Grid Properties tab:

Interface Element Options and descriptions

Titles and Gridlines 3D-Buttons Enables or disables a 3-D appearance on row and column headings in the grid.

Enables or disables ruling between rows of the grid.

Horizontal

Gridlines

Vertical Gridlines Enables or disables ruling between columns of the grid.

Default

Set

Set

Set

RAPID SQL 8.6/XE5 USER GUIDE 104

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Interface Element Options and descriptions

Preview

Default

Mark Headings Enables or disables highlighted row and column headings. Set

Displays a preview of the settings currently selected in the TItles and Gridlines group.

ISQL O PTIONS

The ISQL options are available on the following Options Editor tabs:

ISQL Options - Main Tab

ISQL Options - Oracle Tab

ISQL Options - DB2 Tab

ISQL Options - Sybase Tab

ISQL Options - Sybase IQ Tab

ISQL Options - Sybase IQ Tab

ISQL Options - MySQL Tab

ISQL Options - DB2 OS390 Tab

• ISQL Options - InterBase Tab

ISQL Options - Editor Tab

ISQL Options - Auto format Tab

ISQL Options - Code Assist Tab

ISQL O PTIONS - M AIN T AB

The Options Editor’s ISQL tab and its sub-tabs control the appearance and behavior of the

Rapid SQL SQL Editor.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE: For information on using the SQL Editor, see " Coding Environments/Editors " on page 781 .

Use the following table as a guide to modifying settings on this tab:

Max Errors Before

Aborting Execution

Sets the maximum number of errors allowed before aborting the execution of a script. A zero indicates that the option is inactive and that you recognize no limit to the number of errors allowed. Rapid SQL refers to this value when step executing SQL scripts.

Execute Selected Text Executes a portion of a selected SQL script.

105 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Check Syntax When

Executing

Automatically lock connection

Prompt to lock database connection

Tabs

File Association

Query Plan Layout

For DB2, required to execute DB2 call statements in the ISQL Window.

When disabled, a prompt to commit or rollback the transaction is displayed when you close the ISQL editor window. Enabling this options disables the prompts and locks the connection automatically.

Locks the database connection on execution.

Sets the appearance of the ISQL Window tabs to either the top or bottom of the ISQL

Window.

Specifies whether the application should open an unknown file type automatically into an

ISQL Window or prompt you with a message that Rapid SQL does not recognize the file type.

Sets the default orientation of a graphical query plan. For more information, see " Setting up the Execution Environment with Query options " on page 813.

ISQL O PTIONS - O RACLE T AB

The Options Editor’s ISQL > Oracle tab controls the appearance and behavior of the Rapid SQL

SQL Editor when executing against an Oracle environment.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE: For information on using the SQL Editor, see " Coding Environments/Editors " on page 781 .

Use the following table as a guide to modifying settings on this tab:

Option

Enable DBMS Output

Description

Lets you specify Buffer size. 0 is the default.

Auto-Commit changes Applies auto commit status changes to all open windows.

View xmltype as clob When enabled, xmltype columns are displayed as CLOBs in the Results grid and the Data editor. Without this option selected, SELECT statements that qualify xmltype columns produce an OciTypeBinder conversion error. With the option selected, the SELECT submitted by Rapid SQL is modified to include a getclobval() method call.

Retain connection in pool after use

This option determines what happens to a connection after it is unlocked by the ISQL window. If selected, the connection will be returned to the application connection pool. If unselected, the unlocked connection will be disconnected.

Default Query Plan Lets you select the default display, tree-based or graphical, when you generate a query plan. For more information, see " Using the Query Plan Facility " on page 828.

RAPID SQL 8.6/XE5 USER GUIDE 106

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Option

Load Query Options

Description

If this option is not enabled, Rapid SQL loads a set of default query options that customize your execution environment, and periodically sends those settings to the server. Enabling this option and specifying an XML file, forces Rapid SQL to load a previously saved query options file each time an ISQL windows opens against this DBMS platform. This lets you override Rapid SQL’s default query options.

You can also enable this option when saving a query options file. For information on other load and save options, specific query options offered, manually updating query options, and conditions for which query options are sent to the server, see " Setting up the Execution Environment with Query options " on page 813.

ISQL O PTIONS - DB2 T AB

The Options Editor’s ISQL > DB2 tab controls the appearance and behavior of the Rapid SQL

SQL Editor when executing against aDB2 LUW environment.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE: For information on using the SQL Editor, see " Coding Environments/Editors " on page 781 .

Use the following table as a guide to modifying settings on this tab:

Option

Set Isolation Level

Auto-Commit changes Applies auto commit status changes to all open windows.

Create Explain plan tables if required

If set to TRUE, Explain Plan tables are created, as necessary. If set to FALSE and you don’t manually create tables, Explain Plan operations will fail.

Create explain plan tables on the

SYSTOOLS schema

If set to TRUE, Explain Plan tables are created on the SYSTOOLS schema. If the tables already exist in the user’s default schema, Rapid SQL continues to use those tables. Refer to DB2 documentation for a listing of Explain Plan tables that must be deleted in order to use the SYSTOOLS option. If set to FALSE, Explain Plan tables are created under the user’s default schema.

Retain connection in pool after use

Load Query Options

Description

Sets the default for the value of the Isolation Level option on the Query Options dialog.

For details, see " Setting up the Execution Environment with Query options " on page 813.

This option determines what happens to a connection after it is unlocked by the ISQL window. If selected, the connection will be returned to the application connection pool. If unselected, the unlocked connection will be disconnected.

If this option is not enabled, Rapid SQL loads a set of default query options that customize your execution environment, and periodically sends those settings to the server. Enabling this option and specifying an XML file, forces Rapid SQL to load a previously saved query options file each time an ISQL windows opens against this DBMS platform. This lets you override Rapid SQL’s default query options.

You can also enable this option when saving a query options file. For information on other load and save options, specific query options offered, manually updating query options, and conditions for which query options are sent to the server, see " Setting up the Execution Environment with Query options " on page 813.

107 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

ISQL O PTIONS - S YBASE T AB

The Options Editor’s ISQL > Sybase tab controls the appearance and behavior of the Rapid SQL

SQL Editor when executing against a Sybase ASE environment.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE: For information on using the SQL Editor, see " Coding Environments/Editors " on page 781 .

Use the following table as a guide to modifying settings on this tab:

Option Description

Auto-Commit changes Applies auto commit status changes to all open windows.

Retain connection in pool after use

This option determines what happens to a connection after it is unlocked by the ISQL window. If selected, the connection will be returned to the application connection pool. If unselected, the unlocked connection will be disconnected.

Load Query Options If this option is not enabled, Rapid SQL loads a set of default query options that customize your execution environment, and periodically sends those settings to the server. Enabling this option and specifying an XML file, forces Rapid SQL to load a previously saved query options file each time an ISQL windows opens against this DBMS platform. This lets you override Rapid SQL’s default query options.

You can also enable this option when saving a query options file. For information on other load and save options, specific query options offered, manually updating query options, and conditions for which query options are sent to the server, see " Setting up the Execution Environment with Query options " on page 813.

ISQL O PTIONS - S YBASE IQ T AB

The Options Editor’s ISQL > Sybase IQ tab controls the appearance and behavior of the Rapid

SQL SQL Editor when executing against aSybase IQr environment.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE: For information on using the SQL Editor, see " Coding Environments/Editors " on page 781 .

Use the following table as a guide to modifying settings on this tab:

Option

Enable Set Query

Options

Description

Sets the default value of the Send Set Options setting on the Query Options dialog. For details, see " Setting up the Execution Environment with Query options " on page 813.

Changing this value does not affect ISQL sessions currently open.

Auto-Commit changes Applies auto commit status changes to all open windows.

Retain connection in pool after use

This option determines what happens to a connection after it is unlocked by the ISQL window. If selected, the connection will be returned to the application connection pool. If unselected, the unlocked connection will be disconnected.

RAPID SQL 8.6/XE5 USER GUIDE 108

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Option

Load Query Options

Description

If this option is not enabled, Rapid SQL loads a set of default query options that customize your execution environment, and periodically sends those settings to the server. Enabling this option and specifying an XML file, forces Rapid SQL to load a previously saved query options file each time an ISQL windows opens against this DBMS platform. This lets you override Rapid SQL’s default query options.

You can also enable this option when saving a query options file. For information on other load and save options, specific query options offered, manually updating query options, and conditions for which query options are sent to the server, see " Setting up the Execution Environment with Query options " on page 813.

ISQL O PTIONS - SQL S ERVER T AB

The Options Editor’s ISQL > SQL Server tab controls the appearance and behavior of the Rapid

SQL SQL Editor when executing against aSQL Server environment.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE: For information on using the SQL Editor, see " Coding Environments/Editors " on page 781 .

Use the following table as a guide to modifying settings on this tab:

Option

Enable Set Query

Options

Description

Sets the default value of the Send Set Options setting on the Query Options dialog. For details, see " Setting up the Execution Environment with Query options " on page 813.

Changing this value does not affect ISQL sessions currently open.

Auto-Commit changes Applies auto commit status changes to all open windows.

Retain connection in pool after use

This option determines what happens to a connection after it is unlocked by the ISQL window. If selected, the connection will be returned to the application connection pool. If unselected, the unlocked connection will be disconnected.

Load Query Options If this option is not enabled, Rapid SQL loads a set of default query options that customize your execution environment, and periodically sends those settings to the server. Enabling this option and specifying an XML file, forces Rapid SQL to load a previously saved query options file each time an ISQL windows opens against this DBMS platform. This lets you override Rapid SQL’s default query options.

You can also enable this option when saving a query options file. For information on other load and save options, specific query options offered, manually updating query options, and conditions for which query options are sent to the server, see " Setting up the Execution Environment with Query options " on page 813.

109 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

ISQL O PTIONS - M Y SQL T AB

The Options Editor’s ISQL > MySQL tab controls the appearance and behavior of the Rapid

SQL SQL Editor when executing against a MySQL environment.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE: For information on using the SQL Editor, see " Coding Environments/Editors " on page 781 .

Use the following table as a guide to modifying settings on this tab:

Option

Retain connection in pool after use

Load Query Options

Description

This option determines what happens to a connection after it is unlocked by the ISQL window. If selected, the connection will be returned to the application connection pool. If unselected, the unlocked connection will be disconnected.

If this option is not enabled, Rapid SQL loads a set of default query options that customize your execution environment, and periodically sends those settings to the server. Enabling this option and specifying an XML file, forces Rapid SQL to load a previously saved query options file each time an ISQL windows opens against this DBMS platform. This lets you override Rapid SQL’s default query options.

You can also enable this option when saving a query options file. For information on other load and save options, specific query options offered, manually updating query options, and conditions for which query options are sent to the server, see " Setting up the Execution Environment with Query options " on page 813.

ISQL O PTIONS - DB2 OS390 T AB

The Options Editor’s ISQL > DB2 OS390 tab controls the appearance and behavior of the

Rapid SQL SQL Editor when executing against a DB2 z/OS environment.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE: For information on using the SQL Editor, see " Coding Environments/Editors " on page 781 .

Use the following table as a guide to modifying settings on this tab:

Option

Retain connection in pool after use

Description

This option determines what happens to a connection after it is unlocked by the ISQL window. If selected, the connection will be returned to the application connection pool. If unselected, the unlocked connection will be disconnected.

RAPID SQL 8.6/XE5 USER GUIDE 110

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Option

Load Query Options

Description

If this option is not enabled, Rapid SQL loads a set of default query options that customize your execution environment, and periodically sends those settings to the server. Enabling this option and specifying an XML file, forces Rapid SQL to load a previously saved query options file each time an ISQL windows opens against this DBMS platform. This lets you override Rapid SQL’s default query options.

You can also enable this option when saving a query options file. For information on other load and save options, specific query options offered, manually updating query options, and conditions for which query options are sent to the server, see " Setting up the Execution Environment with Query options " on page 813.

ISQL O PTIONS - I NTER B ASE T AB

The Options Editor’s ISQL > InterBase tab controls the appearance and behavior of the Rapid

SQL SQL Editor when executing against an InterBase/Firebird environment.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE: For information on using the SQL Editor, see " Coding Environments/Editors " on page 781 .

Use the following table as a guide to modifying settings on this tab:

Option

Retain connection in pool after use

Load Query Options

Description

This option determines what happens to a connection after it is unlocked by the ISQL window. If selected, the connection will be returned to the application connection pool. If unselected, the unlocked connection will be disconnected.

If this option is not enabled, Rapid SQL loads a set of default query options that customize your execution environment, and periodically sends those settings to the server. Enabling this option and specifying an XML file, forces Rapid SQL to load a previously saved query options file each time an ISQL windows opens against this DBMS platform. This lets you override Rapid SQL’s default query options.

You can also enable this option when saving a query options file. For information on other load and save options, specific query options offered, manually updating query options, and conditions for which query options are sent to the server, see " Setting up the Execution Environment with Query options " on page 813.

ISQL O PTIONS - E DITOR T AB

The Options Editor’s ISQL > Editor tab controls the appearance and behavior of the Rapid SQL

SQL Editor window.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE: For information on using the SQL Editor, see " Coding Environments/Editors " on page 781 .

111 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

The table below describes the options and functionality on the Editor tab:

Group

Window

Option

Show Toolbar and Show

Status Bar

Maximize on new or open

Description

Enables/disables these ISQL Window user interface elements.

Default

Selected

File Tracking

Auto-Reload

File

Indicates that Rapid SQL should maximize the ISQL Editor. If you already have an active MDI Window that is maximized, the default behavior is to maximize a new child window. To deactivate this option, ensure you do not have any active MDI Windows, such as the

Explorer.

Indicates that the ISQL Editor should use the File Tracking Facility to monitor the status of a file. If a file has been modified and saved outside the application, the application loads the most current version of the file into the IISQL Editor based on the options set for

Auto-Reload File (see above.)

Selected

Selected

If File Tracking is enabled, indicates that the application should automatically reload a file that has been externally modified without prompting you. If you turn this option off, Rapid SQL prompts you before reloading your file if external changes have been saved.

Not selected

Command

History

Auto-Save File Indicates that files in the ISQL Editor should automatically be saved at the indicated time interval. Backup files are saved to

C:\Documents and Settings\ username \Application

Data\Embarcadero\RapidSQL\Backup\ .

Backup files use a naming convention of the form ~ET xxxx .tmp

., See the registry under

HKEY_CURRENT_USER\Software\Embarcadero\RapidSQL\ versio n \Backup for a listing of backup file names and the path of the file to which they correspond.

Save File

Before

Overwriting

Specifies the action you want the application to take when selecting a command from the Command History box. You have the option to be reminded to save a file before overwriting (Ask First), to automatically save a file before overwriting (Always), or to automatically overwrite the file with the command (Never).

Selected

(5 minutes)

Ask First

15 Save Most

Recent

Specifies the number of commands you want to save in the

Command History list in the top of the ISQL Window toolbar. The maximum value is 99.

Lets you select common printer options.

Printing

Appearance Enable Syntax

Highlighting

Sets syntax highlighting on so that all keywords and comments are colored for easier reading and debugging.

Places line numbers in the left column of an ISQL Window.

Show Line

Numbers

Enable

Outlining

Enables and disables outlining.

Selected

Selected

Selected

Enable Text

Wrapping

Enables and disables a typical text wrap feature.

Editor Font Sets the font face, style, and size displayed in the editor.

Syntax Colors Sets syntax coloring for keywords, comments, quotes, and default text for various file types and scripts from the Syntax Coloring dialog.

Selected

Available

Available

RAPID SQL 8.6/XE5 USER GUIDE 112

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Group

Formatting

Option

Auto Indent

Clipboard

Line Endings

Expand Tabs and Tab Size

None

Line Endings

Description

Sets automatic indentation for each carriage return, new line in your

SQL script.

Sets tabs as the specified number of spaces in result sets.

Default

Selected

When copying text from the editor, no substitution is made for endof-line characters. This provides the fastest cut and paste operation.

When copying text from the editor, end-of-line characters are replaced with platform-specific equivalents (Windows - CR LF, UNIX -

LF, Macintosh - CR). This lets you copy text into environments such as

Notepad, that require platform-specific end-of-line characters.

This option avoids unnecessary characters and incorrect display, but cut-and-paste operations take more time to complete.

Selected

(4)

Selected

ISQL O PTIONS - A UTO FORMAT T AB

After opening the Options editor (see

Specifying Rapid SQL application and feature options

), you can make changes to the Auto Format tab. of the ISQL pane.

The Options Editor’s ISQL > Auto Format tab lets you specify the style and spacing of SQL statements in an ISQL window when you choose to auto format SQL in the ISQL editor.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE: For information on using the SQL Editor, see " Coding Environments/Editors " on page 781 .

On opening, the Preview area shows an SQL statement formatted according to the current

Auto Format settings. Click Edit to open the Auto Format Options dialog. Use the following table as a guide to understanding and modifying the settings in this dialog:

Setting

Keywords

Description

Lets you select a character case (UPPERCASE, LOWERCASE, INITIALCAPS, or NOCHANGE) formatting treatment for SQL keywords.

Right Margin

New line before keyword

Specifies the maximum number of characters per line.

If enabled, a new line is forced before every SQL keyword. If disabled, lines are only forced for statement type and clause type keywords.

BEGIN..END block If enabled, empty BEGIN..END blocks occupy a single line.

Stack lists

List indent size

If enabled, a new line and indenting is forced for each item in comma-separated list such as argument lists.

If Stack lists is enabled, this control lets you specify the number of spaces each list item will be indented from the current offset.

Parenthesis indent size

Lets you specify the number of indenting spaces for forced lines following an open parenthesis.

113 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Setting

Conditions format style

Description

Specifies how conditions in clauses are formatted:

CONDITIONS_WRAPPED - lines are not forced before conditions.

CONDITIONS_STACKED_WITH_LEADING_OPERATORS - a new line is forced for each condition in a clause, with logical operators, if present for a line, displayed at the start of the line.

CONDITIONS_STACKED_WITH_TRAILING_OPERATORS - a new line is forced for each condition in a clause, with logical operators, if present for a line, displayed at the end of the line.

Conditions stack threshold

For Conditions format style selections that specify stacking, this value specifies the minimum number of conditions that must appear in a clause before conditions are stacked.

THEN statements If enabled, simple THEN clauses are kept to a single line.

ISQL O PTIONS - C ODE A SSIST T AB

Code assist options are available on the following tabs:

• ISQL Options - Code Assist - Main Tab

ISQL Options - Code Assist - Advanced Tab

ISQL O PTIONS - C ODE A SSIST - M AIN T AB

The Options Editor’s ISQL > Code Assist tab lets you activate and select options for coding assistance and error-detection features available from the ISQL editor:

• Code Complete - lets you insert or replace object names, selected from suggestion lists, as you edit a script. For more information, see " Code Complete " on page 801.

• Semantic validation - detects object name references to objects not present in the datasource index. For more information, see " Semantic Validation " on page 800.

• Real-time syntax checking - on-the-fly syntax checking is performed as you type. For more information, see " Syntax Checking " on page 799.

• Hyperlinks - lets you invoke object actions against objects referenced in a script. For more information, see Hyperlink Object Actions .

• Object metadata display - lets you view Connect server metadata for referenced objects.

For details, see " Viewing Embarcadero Connect Model Metadata in the SQL Editor " on page 810.

RAPID SQL 8.6/XE5 USER GUIDE 114

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

The ISQL - Code Assist tab has the following settings:

Group/Option

Code Complete

Code Validation

DB Action Menu

Restore defaults

Metadata

Enable Code Complete

Enable auto-activation

Auto-activation delay

Fully qualify completions automatically

and

Insert single proposals automatically

Description

Lets you enable or disable the Code Complete feature.

When disabled, Code Complete cannot be invoked automatically or manually.

Because of the overhead in maintaining internal resources used in implementing this feature, a slight performance increase can result from disabling the feature.

When auto-activation is disabled, the Code Complete feature must be invoked manually. When auto-activation is enabled, the Code Complete feature is invoked automatically each time the interval between keystrokes exceeds the specified Auto-activation delay .

Specifies that if a Code Complete suggestion list would contain only a single suggestion, that suggestion is inserted automatically.

Specifies that Code Complete results are returned fully qualified, rather than the minimum required to identify the object.

Enable Real-time syntax checking

Severity levels for semantic validation problems

If enabled, syntax-checking is performed as you type. If disabled, syntax checks must be initiated manually.

Lets you select the severity level (ERROR, WARNING, or

IGNORE) associated with detected semantic errors. The

WARNING option provides a contrast to syntax errors, which are always flagged with a severity level of ERROR.The

IGNORE setting disables the feature. For more information, see " Semantic Validation " on page 800.

Places an upper limit on the size of files for which automatic syntax checking and semantic validation are active.

Perform syntax and semantic validation on files smaller than

Enable DBAction menu in the editor

Show DB Actions in submenu

Enables the Hyperlinks feature.

If unselected, Hyperlink menu actions are available as first level options in the context menu. If selected, Hyperlink menu actions are available as a DB Actions submenu.

Key used in conjunction with right-mouse

Lets you select the key (CTRL, SHIFT, or CTRL+SHIFT) used in conjunction with right-clicking, that activates the object action menu against a supported object type reference in a script.

The default keystroke combination is CTRL+right-click.

Restores all settings on the tab to the original defaults.

Enables display/use of metadata for referenced objects, obtained from a Connect server repository, in the following user interface elements: tooltips, window gutter, code and complete proposals. You can also have metadata added as comments when formatting code.

For detailed information on setting up and using this feature, see " Viewing Embarcadero

Connect Model Metadata in the SQL Editor " on page 810.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL

115 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

application and feature options " on page 86 .

NOTE: For information on using the SQL Editor, see " Coding Environments/Editors " on page 781 .

ISQL O PTIONS - C ODE A SSIST - A DVANCED T AB

Coding assistance and error detection features such as Hyperlink object actions, Code

Complete, and Semantic Validation rely on:

• Parsing of SQL entered in the SQL Editor into keywords, object name references, data, and so on

• A database object index that Rapid SQL generates for a connected datasource. On the first connection to a datasource, Rapid SQL generates an index of specified object types, with an imposed, configurable, upper limit on the number of objects contained in the index. On each subsequent connection, Rapid SQL updates the index to reflect any additions or changes on the datasource.

NOTE: The object index is stored in a persistent database with a database path of %TEMP% .

With that in mind, the index may be deleted by the system administrator or automated administration-related processes.

When coding assistance and error detection features are enabled, Rapid SQL queries the index for the names of objects referenced in your scripts queries. This information is then used for tasks such as recognizing object types, detecting misspelled object names, and populating suggestion lists.

The Options Editor’s ISQL > Code Assist > Advanced tab lets you force parsing, if required, and customize how the index is generated. Since there is performance overhead associated with generation and usage of the index, you can control the properties and usage of the index.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

The table below describes the options and functionality on the ISQL > Code Assist >

Advanced Tab of the Options Editor:

Option

Scan entire file for context

Limit scanning to files smaller than

Description

This control is enabled only if the ISQL > Code Assist tab’s Enable

Real-time syntax checking check box is deselected and the Severity levels for semantic validation problem s is set to IGNORE.

When this control is enabled, Rapid SQL will continue to parse SQL

Editor content. That is, if you have disabled real-time syntax checking and effectively disabled semantic validation, you can still use the

Hyperlinks feature.

Lets you place an upper limit on the size of files parsed for Code Assist features.

RAPID SQL 8.6/XE5 USER GUIDE 116

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Option

Object types to be indexed

Recycle cache space when index size exceeds

The maximum number of results to return when querying the object index

Refresh

Description

Lets you select specific object types (aliases, synonyms, functions, packages, procedures, tables, or views) that will be included in the object index. While this can be used to reduce the index size and therefore improve performance, Hyperlinks, Semantic Validation, and

Code Complete functionality associated with object types not included in the index will not be available.

This imposes a soft ceiling on the number of objects stored in the index. After updating the index on connection to a datasource, the total number of objects in the index is compared to this value. If the value is exceeded, Rapid SQL deletes the oldest definitions.

Specifies the number of results when querying against the cache databases, to improve performance when working with large databases. This limit is applied per object type.

Each time you open an ISQL editor window, Rapid SQL obtains schema information for the object types supported for the Code

Complete and Semantic Validation features. That information is updated with any modifications that you make and persists until the window is closed. The Refresh button ensures that the information is current in case other users or applications are modifying the schema while the current SQL editor session window is open.

J AVA O PTIONS

Rapid SQL requires a JDBC connection. The Options Editor’s Java tab lets you set or change options that apply to the Java virtual machine (JVM) that is running on the client.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

The table below describes the options and functionality of the Java tab:

Option

Initial Heap Size

Maximum Heap Size Set the upper limit for your heap size.

Maximum Perm Gen Set the upper limit for the permanent generation size.

Additional Options

Description Default

JVM Options:

Set the size, in MB, for the repository where live and dead objects comingle with free memory. If memory runs out, JVM executions stop so the garbage can be collected and expunged. Each platform responds differently, so trial and error can help you maximize performance.

64 MB

Add options here ONLY in consultation with Embarcadero Technical Support.

64 MB

Versionspecific

N/A

117 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

LDAP C ONFIGURATION O PTIONS

When using the Discover Datasources feature, Rapid SQL can search an LDAP Server for datasources. Similarly, when manually registering a datasource, you can select from server names obtained from an LDAP Server. The LDAP Configuration tab of the Options Editor lets you provide the information required to establish a session with the LDAP Server and obtain the required datasource information.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

The table below describes the options and functionality on the LDAP Configuration tab:

Group

Server

Option

Enable LDAP

Host Port

Search Base DN and

Suggest

Authentication Anonymous Login

Description

Enables LDAP lookup. This check box must be selected in order for the

Discover Datasources feature to search an LDAP Servers or for server names obtained from an LDAP server to be available when manually registering datasources.

The FQDN or IP address of the LDAP server.

Lets you provide the distinguished name to be used as the search base.

The Suggest button is only enabled after you select an authentication type and provide details, as required. It queries the server for possible

DNs and populates the combo box with the results.

Selecting this check box directs Rapid SQL to send LDAP requests without performing a bind. This also disables the other Authentication controls.

Let you provide the credentials used when sending LDAP requests.

Options

User , Password , and

Remember

Size Limit and Time

Limit

Protocol Version

Lets you specify the maximum number of entries returnable and the maximum time, in seconds, to wait for the search to complete.

The LDAP protocol version.

For more information, see:

Manually Registering or Editing Datasources on page 130

Automatically Discovering Datasources on page 143

L OGGING O PTIONS

After opening the Options editor (see

Specifying Rapid SQL application and feature options

), you can make changes to the Logging tab. The Logging tab lets you set defaults that specify the behavior and placement of SQL Logging and Output Logging.

RAPID SQL 8.6/XE5 USER GUIDE 118

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

The table below describes the options and functionality on the Logging tab:

Option

Log all SQL

Statements to a File

Description

Indicates that the application should log all of the SQL that it executes to a file. SQL logging provides an audit trail for Rapid SQL. You can examine this log to determine the

SQL executed to complete a task.

Logfile Path If you choose to log the SQL generated by the application, specify the drive, directory, and file name.

Default

Not selected

None

Max File Size Specifies the maximum size for the logfile. When the logfile reaches this threshold, it automatically starts deleting lines in the logfile (starting with the oldest statements) to remain within the specified size limit.

Truncate Empties the entire contents of the logfile.

1024 KB

Log all

Output

Messages to a File

Indicates that the application should log all server messages sent to the Output window.

This type of logging lets you monitor only messages issued by the server versus all SQL logged by the application. You can examine this log to determine all messages the server issued.

Logfile Path If you choose to log the server messages generated in the Output window, specify the drive, directory, and file name.

Max File Size Specifies the maximum size for the output logfile. When the output logfile reaches this threshold, it automatically starts deleting lines in the file (starting with the oldest statements) to remain within the specified size limit.

Truncate Empties the entire contents of the output logfile.

Not available

Not selected

None

1024 KB

Not available

M Y SQL U TILITIES O PTIONS

Rapid SQL integrates with MySQL utilities. For Rapid SQL to access these utilities, you need to specify their location in the MySQL Utilities tab of the Options Editor. You can use the MySQL

Dump and Import Utilities.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

The table below describes the options and functionality on the MySQL Utilities tab

Option mysqldump mysqlimport

Description

Specifies a path for the MySQL dump utility, mysqldump.exe. By default, MySQL installs this utility in the C:\mysql\bin directory.

Specifies a path for the MySQL import utility, mysqlimport.exe. By default, MySQL installs this utility in the C:\mysql\bin directory.

119 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

O RACLE U TILITIES O PTIONS

Rapid SQL integrates with multiple Oracle utilities. For Rapid SQL to access these utilities, you need to specify their location on the Oracle Utilities tab of the Options Editor. You can use the

Oracle Export, Import Utilities, and SQL * Loader.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

The table below describes the options and functionality on the Oracle Utilities tab:

Option

Data Pump Export

Data Pump Import

Export

Import

SQL*Loader

Default Bind Size

Description

Specifies a path for the Oracle expdp.exe utility.

Specifies a path for the Oracle impdp.exe utility.

Specifies a path for the Oracle Export utility. By default, Oracle installs to C:\Orant\Bin directory.

Specifies a path for the Oracle Import utility. By default, Oracle installs to C:\Orant\Bin directory.

Specifies a path for the SQL * Loader utility. By default, Oracle installs to C:\Orant\Bin directory.

Specifies the bind size. Default is set to 70KB.

P ERF C ENTER O PTIONS

Rapid SQL lets you customize Performance Center’s integration with Rapid SQL. The Options

Editor’s Performance Center tab lets you provide connection details.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

The table below describes the options and functionality on the Perf Center tab:

Option

Computer Name or IP Address

Port Number

Test

Connect to the server using

Description Default

Specify where the Performance Center Server is installed. localhost

Specify the port for the Apache server or IIS web server.

80

Verifies the settings.

Specify if you want Rapid SQL to open the Web Client or the Performance Center file ( PerfCntr.exe

) within Rapid

SQL.

Web

Client

RAPID SQL 8.6/XE5 USER GUIDE 120

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Q UERY B UILDER O PTIONS

The Options Editor’s Query Builder Options tab lets you specify operational and execution preferences for the Query Builder. Option parameters set on the Options Editor elicit a prompt if there are different options set on an open individual session. Global options override properties set within individual Query Builder sessions.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE:

For information on using the Query Builder, see " Query Builder " on page 861

.

The table below describes the options and functionality on the Query Builder tab :

Interface

Element

Code

Generation

Execution

General

Auto Join

Option Description Default

Generate Use Database statement

Adds a line of SQL code indicating which database or instance is used in the statement.

Generate owner names Adds a line of SQL code showing the table owner name as part of the query.

Include Row Count limits

Generate SQL/92 if supported by DBMS

Includes the output row limit set in the Execution settings.

SQL/92 is a standard for relational database management systems.

To set the maximum number of rows in your result set, type the number in the dialog. This lessens congestion of server processes when queries execute by setting row count limits.

Selected

Selected

Not selected

Not selected

1000 rows

Show Column Data types in Query Diagram

Run Automatically

Reveals the data type in each column for tables in the

SQL Diagram pane.

Not selected

Confirm on Item delete Opens a Confirm Delete dialog when an item is deleted. Selected

Auto Populate Views Checks syntax every time an execute statement, refresh or copy statement begins.

Not

Selected

Auto Format Automatically sets style and spacing of display. Selected

Automatically detects names and data types, and create joins for multiple tables.

Selected

Display

Require Indexes Joins only indexed columns. Requires an indexed column for joins.

Require same data type Automatically joins columns with the same data type.

Syntax Checker Automatic Syntax

Check

Automatically checks SELECT and CREATE VIEW statements for errors.

Warn on non index join Returns a warning when it detects a join against a nonindexed column, or a column not participating in a primary key

Lets you sets the style, size, and color of Column Font and set the background Table Color for the SQL Diagram Pane.

Title Font . Also lets you

Selected

Selected

Selected

Not selected

Available

121 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

R EPORTS O PTIONS

The Options Editor’s Reports tab lets you:

• Append a date and timestamp to report file names. This prevents existing reports from being overwritten.

• Save reports in date-specific folders.

• Save reports in PDF format as opposed to HTML.

• Let you include a provided image and title to reports.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE: For information on generating reports, see

" Report " on page 692 .

R ESULTS (ISQL) O PTIONS

The Options Editor’s Results tab lets you specify operational and appearance details for Rapid

SQL’s SQL Editor.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE: For information on using the SQL Editor, see " Coding Environments/Editors " on page 781 .

The table below describes the options and functionality on the Results tab :

Interface Element Options and descriptions

Results Option pane

Result Window Single Window - Displays all results in one tabbed result window. Multiple result sets together in the window. Single Window and Multiple Windows options are mutually exclusive.

Multiple Windows - Displays multiple result sets one result set per window.

Attached to Editor - Sets results as tabbed windows attached to the ISQL window. Used in conjunction with Single Window option or Multiple

Window option. Attached and Unattached options are mutually exclusive.

Unattached - Sets results appear separate from the ISQL Window. Used in conjunction with Single Window option or Multiple Windows option.

Reuse Window - Sets new result sets to overwrite any current result sets in an open Result Window. Only valid for Single and Attached to Editor combination.

RAPID SQL 8.6/XE5 USER GUIDE 122

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

Interface Element Options and descriptions

Results File Mail File Type - Selects the file type to use when sending result sets via a

MAPI-compliant mail package. Valid formats include the proprietary Results type, Tab delimited, Comma separated, and HTML.

Schedule File Type - Selects the schedule file type. Valid formats include

Tab delimited, Comma separated, and HTML.

Include column titles when saving - Includes column titles when saving a result set. If this option is turned off, column titles Rapid SQL does not save result sets.

Result Set

Options

Format pane

Sort Type

Column

Formatting

Default Rowcount - Lets you limit the number of rows returned to the result window of the ISQL window (default 0).

Sybase ASE and SQL Server: Text Size (bytes) - Lets you specify the text size (default 8192).

Oracle:LONG Size (bytes) - Lets you specify the LONG size (default 8192).

LOB Preview: Text Size (bytes) - Specifies the length of the preview of

LOB column data (default 4096).

Lets you select a result sorting: Alphameric or Lexicographic .

Auto Format (Best Fit) - Sets column widths automatically to accommodate the longest piece of data in a column. Large queries depend on the longest row formatting, so activating this option can affect performance.

Use pre-defined column - Lets you select column type and character length

Enable Date/

Time Format

Format

Lets you select the date/time format.

Standard Grid - Displays all result sets in a standard grid format. Rapid

SQL displays result sets in grid format in IISQL Editors that are opened after you have selected this option. Rapid SQL does not display IISQL Editors that are already open.

HTML - Displays all result sets as HTML tables. Rapid SQL displays result sets in HTML format in ISQL Editors that are opened after you have selected this option. Rapid SQL does not display ISQL Editors that are already open.

ASCII Text - Displays all result sets as ASCII Text. Rapid SQL displays result sets in ASCII Text format in ISQL Editors that are opened after you have selected this option. Rapid SQL does not display ISQL Editors that are already open.

Grid Font and Printer Font buttons - Open a Font dialog, letting you select the font, style, and size for the result sets grid or printed result sets.

Enable Locale - If selected, numbers are formatted (thousands separator, decimal separator) as locale-specific strings. If unselected, numbers are formatted according to the C locale.

123 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

SMTP M AIL O PTIONS

The Options Editor’s SMTP Mail Options tab lets you specify outgoing notification e-mail message options.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

The table below describes the options and functionality on the SMTP Mail tab:

Option

Send messages through

SMTP

Name

Description

Enables SMTP messaging and makes the other controls on this tab available.

Name that appear as the e-mail sender.

Default

Unselected

E-mail Address Address to send e-mails from Rapid SQL.

Authentication

User Name

Password

Host Name

Port Number

Test

Lets you specify authentication options.

User name for authentication.

Password for authentication.

SMTP server for outgoing messages. For Microsoft

Outlook, select Tools , and then Accounts . On the Mail tab, select target account, and then click Properties . On

Servers tab, copy the Outgoing Mail(SMPT) and paste.

Port number you connect to on your outgoing SMTP server.

Opens an SMTP Configuration Test e-mail addressed to your e-mail address. Click Send Mail to send the e-mail.

Your IP address the message is bound to. Bind to

Encoding

Send messages Mime encoded

E-mail encoding.

Messages encoded using Multipurpose Internet Mail

Extensions (MIME) support enriched content and attachments.

Send all messages as HTML Messages include text formatting.

Auto Connect to the

Internet

Rapid SQL connects to internet at launch.

Name you specified during installation.

E-mail address you specified during installation.

None

Not available

Not available

Host Name you specified during installation.

25

Available

ANY_IP_ADDRESS

Western Europe (ISO)

Selected

Selected

Selected

V ERSION C ONTROL O PTIONS

The Options Editor’s Version Control tab lets you select which version control system you want

Rapid SQL to use as the underlying version control system.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

NOTE:

For information on version control in Rapid SQL, see " Version Control " on page 826 .

RAPID SQL 8.6/XE5 USER GUIDE 124

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

The table below describes Version Control options:

Option

Specify Version

Control System

Optional Fields

Description

Lists the Version Control systems that integrate with Rapid SQL. Select the option button for the product you want Rapid SQL to use.

If you select Microsoft Visual SourceSafe, Rapid SQL uses your default

SourceSafe database unless you override this setting by entering the path for the SourceSafe file associated with the desired database. To use a SourceSafe database other than the default, provide a user name, password, and the location of a scrsafe.ini file.

Default

None

Optional

W ARNINGS O PTIONS

Rapid SQL lets you issue warning messages to users whenever improper operations are attempted in a database. Warning messages differ by platform. The Options Editor’s Warnings tab lets you select the DBMS-specific events that generate warnings.

NOTE: For information on opening the Options Editor, see

" Specifying Rapid SQL application and feature options " on page 86 .

The tables below describes the options of the Warnings tab:

Option

Create an index on the same tablespace as the associated table

Create an index on the same tablespace as the associated table

Create an object in the

SYSTEM tablespace

Create a user with default or temp tablespace as the

SYSTEM tablespace

Create an object in the master database

Description

Issues a warning message whenever a user tries to create or place an object on the SYSTEM tablespace.

Issues a warning message when a user is created with a default or temp tablespace on the SYSTEM tablespace.

Platform

Issues a warning message whenever a user does not create an index on a different tablespace than the table. This makes it possible for the server to read the index and table data in parallel.

DB2

Issues a warning message whenever a user does not create an index on a different tablespace than the table. This makes it possible for the server to read the index and table data in parallel.

Oracle

Oracle

Oracle

Create a table or index on the default segment

Create a non-clustered index on same segment as the associated table

Issues a warning message when an object is created in the master database.

Microsoft SQL

Server and

Sybase ASE

Issues a warning message when a table or index is created on the default segment.

Issues a warning message when a non-clustered index is created on the same segment as the associated table.

Microsoft SQL

Server and

Sybase ASE

Microsoft SQL

Server and

Sybase ASE

125 RAPID SQL 8.6/XE5 USER GUIDE

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

L OCKING D OWN R APID SQL F EATURES U SING THE R EGISTRY

Administrators can restrict certain Rapid SQL features on individual machines through registry settings. Those settings are stored in the following location:

• HKLM\Software\Embarcadero\Rapid SQL optional version identifier \Admin

The following general datasource and connection settings are available:

Name (and Type)

RestrictedPlatforms (REG_SZ)

DisableAutoConnect (REG_DWORD)

SharedDatasourceCatalogPath (REG_SZ)

Description and Supported Values

A comma-separated list ( db2=0,mssqlserver=1

, for example) dictating DBMS platform support on the machine. Valid names for the

name=value

pairs are

db2

,

os390 , mssqlserver , mysql , oracle , sybase , interbase, mssqlazure , odbc , jdbc , and sybaseiq . Any non-zero value for a name=value pair results in that platform not being unavailable to

Rapid SQL on that machine. A zero value (the default) results in the platform being available on that machine.

When set to any non-zero value, users cannot use the autoconnect feature when registering or logging in to a datasource.

Providing a path to the network shared datasource catalog forces

Rapid SQL to use that datasource catalog storage option.

Registry-based and file-based catalog storage will be unavailable on this machine.

The following settings control configuration options on the Connect page of the Options Editor

and the Connect login dialog. For details, see " Connect Options " on page 87 and "

Logging in to an Embarcadero Connect Server " on page 149.

Name (and Type)

ConnectURL (REG_SZ)

UseConnect (REG_DWORD)

AllowKeepMeSignedIn (REG_DWORD)

Description and Supported Values

The full Embarcadero Connect server URL that the user must use if use of Embarcadero Connect is enabled.

If a value is specified, the Connect URL control on the Connect page of the Options Editor is set to read-only.

If a value of 1 (TRUE) is specified, use of Embarcadero Connect is enabled. If a value of 0 (FALSE) is specified, use of Embarcadero

Connect is disabled.

If either value is specified, the Use Connect control on the

Connect page of the Options Editor is disabled.

If a value of 1 (TRUE) is specified, the Keep me signed in control on the Embarcadero Connect - Log In dialog is is set to an unchecked state and the control is disabled.

UseConnect and AllowKeepMeSignedIn is type REG_DWORD (legal values for both are 0 for

FALSE and 1 for TRUE).

Administrators not wanting to use these settings from the HKLM root key, can use the same options in HKCU root key:

• HKCU\Software\Embarcadero\Rapid SQL optional version identifier \Admin

If the option is specified in both locations, HKLM takes precedence over HKCU.

RAPID SQL 8.6/XE5 USER GUIDE 126

SPECIFYING RAPID SQL APPLICATION AND FEATURE OPTIONS

127 RAPID SQL 8.6/XE5 USER GUIDE

DATASOURCE AND SERVER MANAGEMENT > REGISTERING DATASOURCES

D

ATASOURCE AND

S

ERVER

M

ANAGEMENT

After installing Rapid SQL, you must set up datasource definitions to establish reusable connections to your database servers. The following topics describe the function of datasources, the process of establishing datasource connections, and the related options provided by Rapid

SQL:

Registering Datasources

Connecting to Datasources

Trouble-shooting Client Setup

Using the Datasource Navigator

Using the Manage Datasources Utility

Provides instructions on how to set up datasource definitions, manually and automatically.

Provides instructions on how to how to connect to datasources, manually and automatically.

Provides advice on solving common connectivity problems.

Describes the user interface mechanism that lets you browse among datasources, drill down to the database object level, and initiate datasource or object actions.

Describes a utility offering shortcuts to Rapid SQL datasource options.

R

EGISTERING

D

ATASOURCES

A datasource is the connection profile that lets you have access to a database, and, therefore, to your data. So, when you register a datasource, you’re telling Rapid SQL how to get at the database(s) you want to operate on. In fact, all database activities are performed through datasources, so you need a datasource profile for each database instance (or database server) in your enterprise. Each connection profile consisits of basics such as unique name, DBMS-specific connection parameters, and user credentials.

Collectively, datasource definitions are stored in a datasource catalog. The catalog can be registry-based, local file-based, or network shared file-based, with each method addressing

particular advantages. For details, see " Specifying a Datasource Catalog Storage Option " on page 129.

Rapid SQL offers the following options for registering datasources:

Manual registration

Automatic discovery

Import/Export

Embarcadero Connect

You can register datasources individually. For details, see " Manually Registering or

Editing Datasources " on page 130.

You can have Rapid SQL search computers or your network for datasources. For

details, see " Automatically Discovering Datasources " on page 143.

Rapid SQL lets you export and import sets of datasource registrations. For details,

see " Importing and Exporting Datasource Definitions " on page 145.

Integrating with Embarcadero Connect lets you work with datasource definitions on

a data governance metadata repository. For details, see " Working With Datasources from a Connect Repository " on page 147.

As an aid in maintaining your datasource registrations, Rapid SQL lets you quickly view basic

registration details of a datasource. For details, see " Viewing Datasource Properties " on page 152.

RAPID SQL 8.6/XE5 USER GUIDE 128

REGISTERING DATASOURCES > REGISTERING DATASOURCES

Lastly, when a datasource registration becomes obsolete, you can remove the registration from

Rapid SQL. For details, see " Unregistering Datasource " on page 153.

S PECIFYING A D ATASOURCE C ATALOG S TORAGE O PTION

A Datasource Catalog is a collection of defined datasources. On startup, Rapid SQL loads a

Datasource Catalog using one of three methods, specified using the Options editor:

• Windows Registry datasource catalog - T he datasource catalog is stored and managed locally, in the Windows registry. This user can add and delete datasources and edit the registration details of existing resources. Any changes are retained across startups of Rapid

SQL.

This method is compatible with other Embarcadero products using registry-based datasource definition storage. If more than one of those products is installed on the same machine, they can share the same Datasource Catalog.

• File based datasource catalog - The datasource catalog is stored locally and is file-based.

Each datasource definition included in the catalog is stored in a single file ( .dsd

file suffix) in the %APPDATA% \Embarcadero\Data Sources\ folder, in a default installation. This user can add and delete datasources and edit the registration details of existing resources. Any changes are retained across startups of Rapid SQL.

This method is compatible with other Embarcadero products using file-based datasource definition storage. If more than one of those products is installed on the same machine with

Rapid SQL, all can share the same Datasource Catalog.

• Network shared datasource catalog - The datasource catalog is file-based, and obtained from a user-specified location such as a network share. At each startup, Rapid SQL imports definitions from the network shared file (.etsds file suffix).

Changes such as new datasources, deleted datasources or edited datasource registrations are lost as soon as this user shuts down Rapid SQL. This method allows centralized maintenance of the Datasource Catalog and sharing of a single catalog among multiple users across a network.

NOTE: The definition files used in both the File based datasource catalog and Network shared datasource catalog methods do not store user ID and password credentials.

Credentials, links to definition files in the current user’s catalog, and folder structure are stored in the %APPDATA% \Embarcadero\Data Sources\metadata\dsuri.xml file.

NOTE: On individual computers, administrators can force use of the network shared option.

For details, see " Locking Down Rapid SQL Features Using the Registry " on page 126.

For information on choosing a method and specifying the network location of a Shared

Datasource Management definition file, see " Datasource Options " on page 95.

Regardless of the catalog storage method, the Datasource Catalog can be built manually by explicitly registering datasources or using automated methods such as the Discover Datasources

feature. For details, see " Registering Datasources " on page 128.

129 RAPID SQL 8.6/XE5 USER GUIDE

REGISTERING DATASOURCES > REGISTERING DATASOURCES

Keep in mind that changes made with Network shared datasource catalog in effect, are lost on shutdown of Rapid SQL.

In order to set up a Network shared datasource catalog scheme, you can build a catalog first using the File based datasource catalog or Windows Registry datasource catalog method. You can subsequently use the Manage Datasources facility to export your Network shared datasource catalog file to the location that others will use to load the file. For details, see

" Importing and Exporting Datasource Definitions " on page 145.

More generally, the Manage Datasources facility’s import/export functions can be used to exchange datasource definitions between users employing the different storage methods. Even more simply, these functions save time in allowing datasource definitions to be defined once and then shared with multiple users.

M ANUALLY R EGISTERING OR E DITING D ATASOURCES

Each database instance must be registered. Whether you are registering a new datasource, registering a new datasource based on an existing datasource definition, or editing preexisting connection information, you use the Datasource Registration dialog box.

To register a new datasource or edit an existing datasource

1 Use one of the following actions:

• To register a new datasource, from the Datasource menu, select Register Datasource .

• To register a new datasource based on an existing definition, select the existing datasource in the Navigator and then from the Datasource menu, select Register Like .

• To edit registration information, on the Navigator, right-click a datasource and select Edit .

2 Use the following topics as a guide to providing the information required to register or edit the datasource:

Selecting Database Type/Connectivity Options When Registering Datasources

Providing Connection Information When Registering Datasources

Providing Security Parameters When Registering Datasources

Providing Custom Driver Properties When Registering Datasources

Specifying Datasource Properties When Registering Datasources

Specifying Oracle Views Configuration When Registering Datasources

Specifying Group and Category Details When Registering Datasources

3 When ready, click Finish and respond to the prompt to connect immediately.

NOTE: The Test Connection button can be used when creating or editing a datasource to verify that a connection can be established. Keep in mind that the information currently provided in the wizard is used to test the connection and therefore connection information, credentials, and custom JDBC driver properties if appropriate, must be valid.

RAPID SQL 8.6/XE5 USER GUIDE 130

REGISTERING DATASOURCES > REGISTERING DATASOURCES

S ELECTING D ATABASE T YPE /C ONNECTIVITY O PTIONS W HEN R EGISTERING

D ATASOURCES

The Datasource Registration Wizard’s Database Type panel lets you specify the basic connectivity method for the datasource you are creating.

NOTE: Prior to registering datasources, you should be familiar with the connectivity options

available for each DBMS platform. For details, see " Database Support and

Connectivity Options " on page 14.

NOTE: The Options Editor lets you indicate preferences, select options, and provide details

not available with the Datasource Registration Wizard. For details, see " Connection

Options " on page 88.

NOTE: On individual computers, administrators can restrict the available DBMS platforms

available to Rapid SQL using registry settings. For details, see " Locking Down Rapid

SQL Features Using the Registry " on page 126.

To use Embarcadero’s default drivers requiring dedicated client software installed on the client machine

1 From the Available database types list, select one of the following:

• IBM DB2 Universal Database

• Microsoft SQL Server

• MySQL

• Oracle

• Sybase Adaptive Server

• Sybase IQ

• InterBase/Firebird

If there is currently a DBMS node selected in the Navigator, that database type is automatically selected.

NOTE: If you are connected to an Embarcadero Connect server, you can select an entry of the selected database type from the Related Connect Data Source list. This prepopulates the wizard with definitions/settings from the Connect server for that datasource and sets up the new datasource definition to be attached to the Connect server datasource.

When an item is selected from the Related Connect Data Source list, clicking Unrelate removes the Connect server settings/definitions from the current definition and cancels attaching to the Connect datasource. When no item is selected from the Related

Connect Data Source list, clicking Relate uses the (alphabetically) first matching

Connect datasource of the selected database type to populate/attach, and if there are no matching definitions, opens a dialog to let you select a definition from the Connect

server. For more information on Connect datasources, see " Working With Datasources from a Connect Repository " on page 147.

2 Click Next .

131 RAPID SQL 8.6/XE5 USER GUIDE

REGISTERING DATASOURCES > REGISTERING DATASOURCES

To specify a custom JDBC driver

1 From the Available database types list, select Generic JDBC .

2 Click Next .

To specify a generic ODBC driver or to use an ODBC connection

1 From the Available database types list, select Generic JDBC .

2 Click Next .

P ROVIDING C ONNECTION I NFORMATION W HEN R EGISTERING D ATASOURCES

Connection information is provided on a DBMS platform basis. The following topics describe platform-by-platform descriptions of the required and optional connection information:

Providing DB2 Connection Information When Registering Datasources

• Providing InterBase/Firebird Connection Information When Registering Datasources

Providing MySQL Connection Information When Registering Datasources

Providing Oracle Connection Information When Registering Datasources

Providing SQL Server Connection Information When Registering Datasources

Providing Sybase ASE Connection Information When Registering Datasources

• Providing Connection Information When Registering a Generic JDBC Datasource

Providing Connection Information When Registering a Generic ODBC Datasource

P ROVIDING DB2 C ONNECTION I NFORMATION W HEN R EGISTERING D ATASOURCES

The Datasource Registration Wizard’s Connection Information panel lets you provide details required to establish a connection to a DB2 datasource. Available options depend on the

Registration Type value selected.

The following table describes these settings:

Registration Type Option/Description

Simple

Use alias from IBM client

Host/Instance - The network name of the machine hosting the datasource.

Port - This defaults to 50000 but can be overwritten.

Database - The name of the database this user should connect to.

Datasource Name - This is the name of the datasource as it will appear in the Navigator or

Explorer.

Server - Select from the names of servers defined in the IBM client.

Datasource Name - This is the name of the datasource as it will appear in the Navigator or

Explorer.

RAPID SQL 8.6/XE5 USER GUIDE 132

REGISTERING DATASOURCES > REGISTERING DATASOURCES

Registration Type Option/Description

Use Data from the

LDAP Server

This option is only enabled if LDAP is enabled and configured on the Options Editor’s

Configuration

tab. For details, see " LDAP Configuration Options " on page 118.

Server - Select from the names of servers obtained from the LDAP server

Host/Instance - The network name of the machine hosting the datasource.

Port - This defaults to 50000 but can be overwritten.

Database - The name of the database this user should connect to.

Datasource Name - The datasource as it will appear in the Navigator or Explorer.

LDAP

Keep the following in mind when registering a DB2 datasource:

• The Options Editor lets you indicate preferences, select options, and provide details not

available with the Datasource Registration Wizard. For details, see " Connection Options " on page 88.

• Consult DB2 documentation for detailed information on general LDAP support, supported

LDAP servers, and client configuration before trying to use Rapid SQL to register LDAPspecified datasources.. For assistance, see

Accessing Third Party Documentation

.

• For more general information on registering datasources, see " Manually Registering or

Editing Datasources " on page 130.

P ROVIDING I NTER B ASE /F IREBIRD C ONNECTION I NFORMATION W HEN R EGISTERING D ATASOURCES

The Datasource Registration Wizard’s Connection Information lets you provide details required to establish a connection to an InterBase or Firebird datasource. The following table describes these setting:

Option

Host name

Port

Character Set

Database file path

Datasource Name

Description

The name of the machine where the database resides.

Optionally, provide a port number.

The default character set used for this connection.

The full path to the database file, a .gdb file for Interbase or a .fdb file for Firebird.

Optionally, override any value in this field with a value to be displayed in the Rapid SQL

Datasource Navigator tree.

For more general information on registering datasources, see " Manually Registering or Editing

Datasources " on page 130.

133 RAPID SQL 8.6/XE5 USER GUIDE

REGISTERING DATASOURCES > REGISTERING DATASOURCES

P ROVIDING M Y SQL C ONNECTION I NFORMATION W HEN R EGISTERING D ATASOURCES

The Datasource Registration Wizard’s Connection Information lets you provide details required to establish a connection to a MySQL datasource. The following table describes these setting:

Option

Server

Port (optional)

Default Database

Datasource Name

Description

Enter the name of the host, for example doctest01.

The default port is 3306. You do not need to enter this information.

You must enter the name of the default database.

This field is automatically populated with the server name, but you can rename it to whatever you want.

NOTE: The Options Editor lets you indicate preferences, select options, and provide details

not available with the Datasource Registration Wizard. For details, see " Connection

Options " on page 88.

For more general information on registering datasources, see " Manually Registering or Editing

Datasources " on page 130.

P ROVIDING O RACLE C ONNECTION I NFORMATION W HEN R EGISTERING D ATASOURCES

The Datasource Registration Wizard’s Connection Information lets you provide details required to establish a connection to an Oracle datasource. Available options depend on the

Registration Type value selected.

The following table describes these setting:

Registration Type

Simple

Use Connection

Descriptor

Options/Description

Host - Manually enter the name of the host machine.

Port -The default is 1521, but you can change it to wherever the Oracle listener is set up.

SID/Service Name -Enter the SID or Service Name to correspond with the option you select.

Instance Name - The specific name used to identify the Oracle instance (the SGA and the

Oracle processes).

Datasource Name - The field is automatically populated with the host name, but you can change it.

Connect Descriptor - provide a TNS Connect String, a connect identifier that defines the parameters that need the Oracle Net Service to connect to a database service.

Datasource Name - The field is automatically populated with the host name, but you can change it.

RAPID SQL 8.6/XE5 USER GUIDE 134

REGISTERING DATASOURCES > REGISTERING DATASOURCES

Registration Type

Use TNS Names alias

Use Data from the

LDAP Server ()

Options/Description

You can specify a non-default TNSNAMES.ORA file using the Options editor. For details,

see " Connections Options - Oracle " on page 90.

Oracle Alias - The dropdown is populated with server names from the TNSNAMES.ORA file. Select an Oracle alias.

Connect Descriptor - A read-only field that displays the TNS Connect String obtained from the alias definition from the TNSNAMES.ORA file.

Datasource Name - The field is automatically populated with the host name, but you can change it.

This option is only enabled if LDAP is enabled and properly configured on the Options

Editor’s LDAP Configuration

tab. For details, see " LDAP Configuration Options " on page 118.

Oracle Alias - The dropdown is populated with the names of servers obtained from the

LDAP server specified on the Options Editor’s LDAP Configuration tab.

Connect Descriptor - A read-only field that displays the TNS Connect String obtained from the alias definition from the LDAP server.

Datasource Name - The field is automatically populated with the host name, but you can change it.

Keep the following in mind when registering an Oracle datasource:

• You can register an Oracle ASM instance directly using the Datasource Registration Wizard.

No Datasource Navigator tree is available when connecting to the ASM instance. The ISQL

Editor is available with this type of connection.

• Consult Oracle documentation for detailed information on general LDAP support, supported LDAP servers, and client configuration before trying to use Rapid SQL to register

LDAP-specified datasources.. For assistance, see

Accessing Third Party Documentation .

• For more general information on registering datasources, see " Manually Registering or

Editing Datasources " on page 130.

135 RAPID SQL 8.6/XE5 USER GUIDE

REGISTERING DATASOURCES > REGISTERING DATASOURCES

P ROVIDING SQL S ERVER C ONNECTION I NFORMATION W HEN R EGISTERING D ATASOURCES

The Datasource Registration Wizard’s Connection Information lets you provide details required to establish a connection to a SQL Server datasource. The following table describes these setting:

NOTE: If you are registering a named instance on a server, you are restricted to use of the Use

Network Library Configuration / Alias method below. Prior to registering the datasource in Rapid SQL, use the SQL Server Configuration Manager to create an alias to the instance, making it available as an Alias selection on the Connection

Information panel.

Option

Simple

Use Network Library

Configuration

Description

Protocol ( TCP/IP or Named Pipes ) - You need to select one or the other to register a

SQL Server database.

Host - the host name.

Port - Depending on your section, you can optionally indicate the port for TCP/IP or the pipe name depending on your means of connection.

Default DB - Optionally give the default name for the database.

Datasource Name - The field is automatically populated with the host name, but you can rename to whatever you want.

Use Encryption - enables multiprotocol encryption.

Alias - Select an alias

Protocol ( TCP/IP or Named Pipes ) - You need to select one or the other to register a

SQL Server database.

Host - Displays the host name.

Port - Depending on your section, you can optionally indicate the port for TCP/IP or the pipe name depending on your means of connection.

Default DB - Optionally give the default name for the database.

Datasource Name - The field is automatically populated with the host name, but you can rename to whatever you want.

NOTE: The Options Editor lets you indicate preferences, select options, and provide details

not available with the Datasource Registration Wizard. For details, see " Connection

Options " on page 88.

For more general information on registering datasources, see " Manually Registering or Editing

Datasources " on page 130.

RAPID SQL 8.6/XE5 USER GUIDE 136

REGISTERING DATASOURCES > REGISTERING DATASOURCES

P ROVIDING S YBASE ASE C ONNECTION I NFORMATION W HEN R EGISTERING D ATASOURCES

The Datasource Registration Wizard’s Connection Information lets you provide details required to establish a connection to a Sybase ASE datasource. The following table describes these settings:

Registration Type

Simple

Use alias information from the SQL.INI FILE

Use data from the

LDAP server

Option/Description

Use SSL Encryption - If this option is selected, the JDBC connection will be established using SSL encryption

Host - Manually enter the name of the host.

Port - There is no default for this optional field.

Default DB - Optionally give the default name for the database.

Datasource Name - This field automatically populates with the server name. You can change it to whatever you want.

Sybase Server - Select a server from the dropdown

Host - Automatically populated when you select an alias.

Port - There is no default for this optional field.

Default DB - Optionally give the default name for the database.

Datasource Name - This field automatically populates with the server name. You can change it to whatever you want.

Use SSL Encryption - The connection will be established using SSL encryption.

Sybase Server - Select a server from the dropdown

Host - Automatically populated when you select an alias.

Port - There is no default for this optional field.

Default DB - Optionally give the default name for the database.

Datasource Name - This field automatically populates with the server name. You can change it to whatever you want.

NOTE: The Options Editor lets you indicate preferences, select options, and provide details

not available with the Datasource Registration Wizard. For details, see " Connection

Options " on page 88.

For more general information on registering datasources, see " Manually Registering or Editing

Datasources " on page 130.

137 RAPID SQL 8.6/XE5 USER GUIDE

REGISTERING DATASOURCES > REGISTERING DATASOURCES

P ROVIDING S YBASE IQ C ONNECTION I NFORMATION W HEN R EGISTERING D ATASOURCES

The Datasource Registration Wizard’s Connection Information lets you provide details required to establish a connection to a Sybase IQ datasource. The following table describes these settings:

Option

Host

Port

Database

Datasource Name

Description

The host name for the Sybase IQ Server.

The port that Sybase IQ is listening on.

The name for the database to connect to.

This field automatically populates with the host name. You can change it to whatever you want.

NOTE: The Options Editor lets you indicate preferences, select options, and provide details

not available with the Datasource Registration Wizard. For details, see " Connection

Options " on page 88.

For more general information on registering datasources, see " Manually Registering or Editing

Datasources " on page 130.

P ROVIDING C ONNECTION I NFORMATION W HEN R EGISTERING A G ENERIC JDBC D ATASOURCE

The Datasource Registration Wizard’s Connection Information lets you provide basic information details required to establish a connection to a generic JDBC datasource.

NOTE: For requirements and Rapid SQL functionality restrictions for generic JDBC

connections, see " Generic JDBC and ODBC Support " on page 16.

The following table describes the settings on this panel:

Description Option

JDBC driver to use

Connection URL

Datasource Name

If you are defining a datasource using a custom JDBC driver, this field is automatically populated with the value you entered in t he Template Connect URL for new data source

field. For more information. see " Providing details for a new custom JDBC driver " on page 139.

Type a valid connection URL or edit the URL template to provide a valid connection URL.

This is the name that will appear in Rapid SQL’s Navigator.

NOTE: In addition to basic connection properties, you can also specify provider-specific JDBC

properties. For details, see " Providing Custom Driver Properties When Registering

Datasources " on page 141.

RAPID SQL 8.6/XE5 USER GUIDE 138

REGISTERING DATASOURCES > REGISTERING DATASOURCES

3 Take one of the following actions: a To specify a JDBC driver that you have not used with Rapid SQL before, click Manage to register a new driver

with Rapid SQL. For more information, see " Providing details for a new custom JDBC driver " on page 139.

b To use a custom JDBC driver you have already registered with Rapid SQL, select that driver from the JDBC driver to use dropdown.

P ROVIDING DETAILS FOR A NEW CUSTOM JDBC DRIVER

When registering a datasource, if you select a generic JDBC connection, you must specify the installed JDBC driver to be used. If you have not used that driver with Rapid SQL, you can register that driver with Rapid SQL while defining a datasource.

NOTE: Before setting up a custom driver, consult the documentation for that driver to obtain details such as the driver class and connection URL for that driver type.

To specify a new custom JDBC driver

1 Open a datasource registration dialog. For details, see " Manually Registering or Editing

Datasources " on page 130.

1 From the Available database types list, select Generic JDBC .

2 On the Connection Information page, click Manage . The JDBC Driver Editor opens.

3 In the Name field, type a name or description for the new driver.

4 Click the Add button associated with the Driver Archives list and use the Open dialog to locate and select the library or archive for the driver.

5 In the Class field, type the driver class.

6 In the Template Connect URL for new data source field, provide a connection URL template. There are no constraints on the value that you enter. When providing details on the Datasource Registration Wizard’s Connection Information panel, the template will automatically be entered in the Connection URL field, letting you provide actual values for any placeholders you provide in the URL template entered here.

P ROVIDING C ONNECTION I NFORMATION W HEN R EGISTERING A G ENERIC ODBC D ATASOURCE

The Datasource Registration Wizard’s Connection Information lets you provide details required to establish a connection to a generic ODBC datasource.

NOTE: For requirements and Rapid SQL functionality restrictions for generic ODBC

connections, see " Generic JDBC and ODBC Support " on page 16.

139 RAPID SQL 8.6/XE5 USER GUIDE

REGISTERING DATASOURCES > REGISTERING DATASOURCES

The following table describes the settings on this panel:

Use Connect String

Unselected

Selected

Option/Description

Datasource Name - Provide the name that will appear in the Rapid SQL Navigator for this datasource.

DSN - Provide the DSN for the datasource.

Datasource Name - Provide the name that will appear in the Rapid SQL Navigator for this datasource.

Connect String - Provide the full connection string for the datasource.

NOTE: Consult the documentation for the ODBC driver and the datasource you are connecting to for details on DSN and connect string requirements.

P ROVIDING S ECURITY P ARAMETERS W HEN R EGISTERING D ATASOURCES

The Datasource Registration Wizard’s Security Parameters panel lets you provide user credentials and specify other DBMS-specific security settings. The following table describes these settings and their DBMS availability:

Option

User ID

Password

Connect As

Domain

(Oracle)

(SQL Server)

Auto connect?

Description

The User ID that DBArtisan will use to connect to the datasource.

The password associated with the User ID.

When relevant, choose the appropriate user/administrator level (NORMAL,

SYSDBA, or SYSOPER).

For MS SQL only. Identify the domain if the user has restricted access.

Spares the user from reentering the password every time you connect.

On individual computers, auto connect can be disabled by administrators.

For details, see " Locking Down Rapid SQL Features Using the Registry " on page 126.

Selected, no user ID or password are passed when connecting to the datasource.

Login to the server is verified using Windows/OS authentication

Omit User ID and Password (Generic

JDBC and Generic ODBC only)

Connect using Windows

Authentication or Connect using OS

Authentication (IBM DB2 for

Windows, Unix, and Linux, MySQL,

Oracle, SQL Server)

Connect using Kerberos

Authentication (Sybase ASE)

If this option is selected, login to the server is verified using Kerberos authentication.

NOTE: This is only available of the Use alias information in the SQL.INI file/

Sybase Server option on the Connection Information tab is selected. For details, see

Data Editor Options .

For more general information on registering datasources, see " Manually Registering or Editing

Datasources " on page 130.

RAPID SQL 8.6/XE5 USER GUIDE 140

REGISTERING DATASOURCES > REGISTERING DATASOURCES

P ROVIDING C USTOM D RIVER P ROPERTIES W HEN R EGISTERING D ATASOURCES

The Datasource Registration Wizard’s Custom Driver Properties panel lets you specify optional, provider-specific connection string keywords or properties beyond those offered on other panels of the wizard.

NOTE: Consult driver/client documentation for details on supported driver properties. For a listing of supported DBMS drivers and clients, see the ReadMe.htm

file for this release

( View > Release Notes ).

To add a driver property for this datasource connection

1 Click New . An Add Driver Property dialog opens.

2 Select a property name from the Name dropdown or type the name of the property. The dropdown is automatically populated with the most commonly-used properties for a platform driver. However, all properties (name/value pairs) supported for that driver can be specified.

3 Type the property value in the Value field.

4 Optionally, provide a Description .

5 Click OK .

The dialog closes and the new property’s name and value are displayed in the Property Name /

Property Value list.

Use the Edit button to initiate editing of a selected property name/value pair. Similarly, use the

Delete button to remove a selected property name/value pair from the list.

S PECIFYING D ATASOURCE P ROPERTIES W HEN R EGISTERING D ATASOURCES

The Datasource Registration Wizard’s Datasource Properties panel lets you specify properties used in conjunction with Rapid SQL features. The following table describes these settings and their DBMS availability:

Setting

#Include Search Directories

Database device default path

(Sybase ASE)

Description

Enter one or more paths on this datasource, which will be searched for files in conjunction with use of the #include directive in the ISQL editor, Procedure

Object Editor, or Package Body Object Editor. Separate multiple paths using semicolons. For example: c:\myscripts;c:\Program Files\Scripts

For more information on use of the #include directive, see SQL Preprocessing:

#define and #include .

Note that if there are no entries specified here, the directory specified on the

Directories tab of the Options editor will be searched. For more information,

see Directories Options

.

The database device default path is used when creating a new database device.

141 RAPID SQL 8.6/XE5 USER GUIDE

REGISTERING DATASOURCES > REGISTERING DATASOURCES

Setting

View in CONNECT

View Related ER Models

Edit Related Data Source

Description

If there is an attached datasource on the connected Embarcadero Connect server, opens a browser on the Connect server with the definition displayed.

Opens a dialog displaying models related to the current datasource and letting you create and delete relationships.

Opens a Registration Editor that will let you modify the associated

Embarcadero Connect datasource definition.

For more general information on registering datasources, see " Manually Registering or Editing

Datasources " on page 130.

S PECIFYING O RACLE V IEWS C ONFIGURATION W HEN R EGISTERING D ATASOURCES

The Datasource Registration Wizard’s Oracle View Config panel lets you manually configure

Rapid SQL access to Oracle Data Dictionary DBA or ALL/USER views to conform to the view privileges associated with a specific role.

NOTE: In order to enable manual configuration of Oracle Data Dictionary views for Oracle datasources and make this panel available, you must select Use Datasource

Configuration for Views in the Options Editor ( File > Options > General > Oracle ).

For more information, see

General Options

.

Only DBA views with an ALL/USER equivalent are offered on this panel. You can use the following methods to select DBA or ALL/USER type views on a view-by-view basis:

Option

Manual selection using the Use DBA View check boxes

Description

Selecting the Use DBA View check box associated with an individual view makes the DBA group version of that view available to Rapid SQL.

Deselecting the Use DBA View check box associated with an individual view makes the ALL/USER group version of that view available to Rapid

SQL.

Reset to All

Reset to DBA

Deselects all Use DBA View check boxes, making only ALL views accessible to Rapid SQL.

Selects all Use DBA View check boxes, making DBA views accessible to Rapid SQL.

Resolve Automatically (only available when editing a connected datasource)

Queries the datasource and selects the Use DBA View check box for each DBA view to which the current user has access.

Changes take effect as soon as you click the Finish button.

For more general information on registering datasources, see " Manually Registering or Editing

Datasources " on page 130.

RAPID SQL 8.6/XE5 USER GUIDE 142

REGISTERING DATASOURCES > REGISTERING DATASOURCES

S PECIFYING G ROUP AND C ATEGORY D ETAILS W HEN R EGISTERING D ATASOURCES

The Datasource Registration Wizard’s Datasource Group panel lets you specify properties that help you organize your datasources. The following table describes these settings and their

DBMS availability:

Select the datasource group folder

Select a category

Select the folder that is to contain this datasource.

If you want to use category-based user interface item color-coding and labeling for this datasource, this dropdown lets you select an existing category to assign this datasource to that category. You can also select Customize to manage your categories. For details, see " Customizing Datasource Categories " on page 170.

For an introduction to datasource categorization and related tasks, see

" Categorizing Datasources using Color-coding and Labeling " on page 168.

For more general information on registering datasources, see " Manually Registering or Editing

Datasources " on page 130.

A UTOMATICALLY D ISCOVERING D ATASOURCES

Rapid SQL lets you automate registration of datasources by importing datasource definitions from the following locations:

• DBMS configuration files/registry entries

• LDAP Servers

• TOAD product datasource definitions (specifically from TOAD for Oracle, TOAD for

Microsoft SQL Server, TOAD for MySQL, TOAD for Sybase (both ASE and IQ))

• An Embarcadero Connect repository. For detailed information, see " Working With

Datasources from a Connect Repository " on page 147

For example, if you have a multiple DBMS platform license, the Discover Datasources feature finds all unregistered datasources that Rapid SQL is licensed for. If you have an Oracle only license, Discover Datasources finds all unregistered Oracle datasources.

Use the information in " Setting up to Automatically Discover Datasources " on page 144 to ensure that you are ready to use the Doscover Datasources feature.

There are two relevant scenarios for this feature. For details, see the following topics:

Discovering Datasources on First Application Startup

Manually Discovering Datasources

In addition to Auto-Discovering your database servers, Rapid SQL automatically places the datasource within a DBMS-specific database group folder in the Navigator. For more

information, see " Categorizing Datasources using Color-coding and Labeling " on page 168.

For related information, see " Connecting to Datasources " on page 153.

143 RAPID SQL 8.6/XE5 USER GUIDE

REGISTERING DATASOURCES > REGISTERING DATASOURCES

S ETTING UP TO A UTOMATICALLY D ISCOVER D ATASOURCES

Some search targets used by the Discover Datasources feature rely on customer-provided information. The Options Editor lets you provide the following:

• The names and locations of configuration files such as the Oracle TNSNAMES.ORA file and

the Sybase ASE SQL.INI file. For details, see " Connection Options " on page 88.

• Identification and authentication details of an LDAP Server that can publish datasources. For

details, see " LDAP Configuration Options " on page 118.

• Enabling and configuration of an Embarcadero Connect server connection. For details, see

" Connect Options " on page 87. In addition, you must be logged in to the Embarcadero

Connect Server. For details, see " Logging in to an Embarcadero Connect Server " on page 149.

In addition, there are environment details that can impact this feature. For details, see " Troubleshooting Client Setup " on page 155.

D ISCOVERING D ATASOURCES ON F IRST A PPLICATION S TARTUP

The first time you run Rapid SQL a dialog box displays, giving you the option to Auto-Discover all configured datasources. If you click Yes, the Rapid SQL Auto-Discover feature searches the

DBMS configuration files on your computer and automatically discovers all the datasources that you are licensed for.

NOTE: Microsoft SQL Server datasources are registered through a Windows system call to your network. Provide login information (user name and password) the first time you

connect to a datasource. For more information, see " Disconnecting from a

Datasource " on page 155.

NOTE: IBM DB2 for Linux, Unix, and Windows databases use ODBC/CLI or DB2 (attach) to connect. Therefore, you need the proper ODBC/CLI Connection established in order for the auto-discover feature to find your IBM DB2 for Linux, Unix, and Windows databases, including registering the DB2 datasource to ODBC as a system datasource.

Although your datasources are auto-discovered, provide login information (user name and password) the first time you connect to a datasource.

M ANUALLY D ISCOVERING D ATASOURCES

Rapid SQL discovers datasources residing on your system that are not currently registered datasources. Rapid SQL can retrieve a list of discovered datasources, which includes the name of the server or instance, the type of DBMS, and source (DBMS configuration files/registry entries,

LDAP Servers, TOAD datasource definitions, Embarcadero Connect) of all unregistered datasources found on your network or local machine. Once discovered, you have the option to register datasources.

RAPID SQL 8.6/XE5 USER GUIDE 144

REGISTERING DATASOURCES > REGISTERING DATASOURCES

Completing the Discover Datasources Dialog Box

1 On the Datasource menu, click Discover Datasources .

Rapid SQL opens the Discover Datasources dialog box and when the search is complete, displays all discovered datasources. The source ( Local alias , Network , LDAP , or Toad ) and status of each is displayed.

2 Select the check box next to any datasources you want to register.

3 Click Register .

Rapid SQL registers the datasource or datasources selected.

I MPORTING AND E XPORTING D ATASOURCE D EFINITIONS

On startup, Rapid SQL loads a datasource catalog, a collection of datasource definitions that the user can work against. How the catalog is stored and whether changes to the catalog are temporary or permanent, depends on the datasource storage method used. For an introduction,

see " Specifying a Datasource Catalog Storage Option " on page 129.

NOTE: On individual computers, administrators can restrict the available DBMS platforms

available to Rapid SQL using registry settings. For details, see " Locking Down Rapid

SQL Features Using the Registry " on page 126.

Regardless of the storage method used, Rapid SQL lets you add datasources to the currently loaded catalog by importing datasource definitions from the following sources:

• Windows Registry - if you previously used the Windows Registry datasource catalog storage method but are now using one of the file-based methods

• File-based datasource catalog storage method files ( .dsd

file suffix)

• Network-shared datasource catalog storage method files ( .etsds

file suffix)

Similarly, you can export the currently loaded datasource catalog definitions to a file-based datasource catalog or network-shared datasource catalog storage method files.

The ability to export and import datasource definitions provides a number of practical advantages. For example:

• Simple sharing among users - if you have a large number of datasources to register, you can have one user walk through the process of registering each datasource and then export those definitions. Other users can then import the resulting datasource definition files.

• Sharing definitions among users employing different datasource storage methods - datasource definitions or entire catalogs created using the Windows Registry datasource catalog or File based datasource catalog methods can be exported for use by users employing any of the three methods.

145 RAPID SQL 8.6/XE5 USER GUIDE

REGISTERING DATASOURCES > REGISTERING DATASOURCES

To export one or more datasource definitions

1 On the Datasource menu, select Manage Datasources .

Rapid SQL opens the Manage Datasources dialog box.

2 Select a single datasource, multiple datasources, or a default or custom datasource group folder.

NOTE: Datasource group folder information is not exported. Datasources are exported as individual files with no higher level grouping.

3 Click Export . An Export Data Sources Folder dialog opens.

4 Take one of the following actions:

• To export datasource definitions to individual files that can be imported on a datasourceby-datasource basis, select Export Data Sources to Individual Data Source Files and use the associated control to locate and select a target folder.

• To export datasource definitions to a single file for use by installations employing the

Shared Datasource Managed catalog storage method, select Export Data Sources To a

Shared Data Source Management File and use the associated control to locate and select a target folder and provide a file name. For information on how to designate a user

as a shared datasource managed catalog storage method, see " Datasource Options " on page 95.

5 Click OK .

NOTE: User ID and password credentials are not exported to the datasource definition file.

After export, other users can then import the datasource definitions.

To add one or more datasource definitions to a catalog

1 On the Datasource menu, click Manage Datasources .

Rapid SQL opens the Manage Datasources dialog box.

2 Select the datasource group folder where the files or files are to be imported.

3 Click Import . An Import Data Sources dialog opens.

RAPID SQL 8.6/XE5 USER GUIDE 146

REGISTERING DATASOURCES > REGISTERING DATASOURCES

4 Take one of the following actions:

• If you previously used the Windows Registry catalog storage method but are currently using the Locally Managed or Shared Datasource Managed method, select Import

Previously Registered Embarcadero Data Sources From Registry to load any datasources registered when you were using the Windows Registry catalog method.

• To import datasource definitions from individual datasource definition files ( .dsd

file suffix), select Import Previously Registered Embarcadero Data Sources From File(s) , click Add , and use the Select datasource definitions to import dialog to locate and select the files to be added.

• To import datasource definitions from a single Shared Datasource Managed storage method file ( .etsds

file suffix) file, select Import Data Sources From a Shared

Datasource Management File and use the associated control to locate and select the target file.

5 Click OK .

After importing a datasource definition file, you can either edit the datasource registration to provide security parameters or provide credentials when connecting to the datasource.

W ORKING W ITH D ATASOURCES FROM A C ONNECT R EPOSITORY

Rapid SQL integrates with Embarcadero Connect, a product that allows easy distribution of data governance repository metadata to the enterprise. Specifically, the Connect repository provides dedicated support for datasource definitions.

With Rapid SQL properly configured, and subsequent login to the Connect server, a dedicated

Connect Navigator shows the available datasource definitions on the Connect server. A datasource definition on the Connect server can be registered as a local datasource.

147

NOTE: For access to Connect documentation, see docs.embarcadero.com

.

RAPID SQL 8.6/XE5 USER GUIDE

REGISTERING DATASOURCES > REGISTERING DATASOURCES

Registering a Connect server datasource as a local datasource creates a local copy of the datasource definition, accessible in the existing Navigator. Key connectivity information, the

Connection Information tab settings (excluding Datasource Name ) and a custom JDBC driver if supplied, is not editable in the resulting local datasource definition. Security Parameters tab information, such as User ID and Password ) is not copied to the local datasource definition.

By default, when you register a Connect server datasource as a local datasource, the local definition is “attached” to the Connect version. The local definition’s key connectivity information is synchronized with the Connect server definition on each attempt to connect to the datasource.

An attached datasource has a distinctive icon:

You can subsequently detach a local datasource definition from a Connect server definition.

Settings for the detached, local datasource definition are those that were active on the Connect server definition when the datasource was detached. When no longer attached to a Connect server datasource definition, a detached datasource is functionally no different than any locally registered (manually registered or automatically discovered) datasource.

The Connect Navigator lets you perform tasks such as attaching local datasources and managing datasource definitions residing on the Connect server.

Basic steps in getting started with Connect datasources are as follows:

1 Enable and configure Connect server usage

- For details, see " Connect Options " on page 87 shows you how to enable and configure Connect.

2 Log in to the Connect server from Rapid SQL - For details, on how to establish a session

with Connect, see " Logging in to an Embarcadero Connect Server " on page 149.

3 Register Connect server datasources definitions as local datasources

- See " Using the

Connect Navigator " on page 149 for information on how to use a simple Explorer interface

to manage your local/Connect datasources.

4 Connect to a Connect datasource that you have registered locally

- See " Connecting to

Datasources " on page 153.

For related information, see " Viewing Embarcadero Connect Model Metadata in the SQL

Editor " on page 810.

RAPID SQL 8.6/XE5 USER GUIDE 148

REGISTERING DATASOURCES > REGISTERING DATASOURCES

L OGGING IN TO AN E MBARCADERO C ONNECT S ERVER

Before you can work with datasource definitions on a Connect repository, you must login to the repository.

1 Ensure that Connect repository usage is enabled. For details, see " Connect Options " on page 87.

2 Select Tools > Connect > Login and then use the Embarcadero Connect - Log In dialog to provide credentials and complete the login.

NOTE: Use the Keep me signed in check box to have logins persist across startups and shutdowns of Rapid SQL .

NOTE: The Keep me signed control can be set and disabled using a registry entry. For details,

see " Locking Down Rapid SQL Features Using the Registry " on page 126.

After logging in, you can manage the definitions on the repository and register local datasources from those definitions. For details, see

Using the Connect Navigator .

U SING THE C ONNECT N AVIGATOR

The Connect Navigator displays datasources on an Embarcadero Connect server and lets you work with relationships to local datasources.

Before working with the Connect Navigator:

• Familiarize yourself with the Datasource Navigator. It offers comparable functionality. For

details, see " Using the Datasource Navigator " on page 157.

• Understand the basics of Connect server datasource support. For details, see " Working

With Datasources from a Connect Repository " on page 147.

To display the Connect Navigator

1 Ensure that Connect repository usage is enabled and that you are logged in to the Connect

Server. For details, see " Connect Options " on page 87 and "

Logging in to an Embarcadero

Connect Server " on page 149.

2 Use View > Connect Navigator to toggle display of the Connect Datasources Explorer.

The first three levels in the expandable tree are:

• Datasource groups

• Datasource definitions in the ER/Studio Portal repository

• Local datasources that were registered using definitions in the ER/Studio Portal repository

149 RAPID SQL 8.6/XE5 USER GUIDE

REGISTERING DATASOURCES > REGISTERING DATASOURCES

With the Connect Datasources Explorer displayed, you can then:

• Create a local datasource from a definition on the repository - Expand a datasource group folder, right-click a repository datasource definition, and select Register Local Datasource .

This opens a Register Datasource wizard, partially completed using information from the

repository definition. For more information, see " Manually Registering or Editing

Datasources " on page 130.

The icon for a datasource that is attached to a Connect repository shows a green arrow in the upper left.

• Detach a currently attached local datasource definition so that it is no longer synchronized with the Connect server definition - right-click the attached datasource and select Detach

Connect Data Source and select Yes when prompted to verify.

• Create a new definition on the repository - Right-click a datasource group and select Create .

This opens a Create Connect Datasource

wizard. For more information, see " Manually

Registering or Editing Datasources " on page 130.

• Edit a definition on the repository - Expand a datasource group folder, right-click a repository datasource definition, and select Edit . This opens an Edit Connect Datasource

wizard. For more information, see " Manually Registering or Editing Datasources " on page 130.

• Delete a definition on the repository - Expand a datasource group folder, right-click a repository datasource definition, select Delete and confirm when prompted.

RAPID SQL 8.6/XE5 USER GUIDE 150

REGISTERING DATASOURCES > REGISTERING DATASOURCES

• View the datasource details in Embarcadero Connect - Expand a datasource group folder, right-click a repository datasource definition, and select View in Connect .

• Filter displayed nodes by name - Type one or more characters in the filter box at the top of the Explorer to show only nodes whose name contains the typed character string and their parent nodes.

• Display nodes by attached/unattached status - Use the Filter Options menu to display all datasource definitions, only definitions from which a local datasource has been registered, or only definitions from which no local datasource has been registered.

• Work with multiple local and Connect datasources. For details, see " Reconciling Local and

Connect Datasources " on page 151.

R ECONCILING L OCAL AND C ONNECT D ATASOURCES

While the Connect Navigator provides separate, individual operations for working with the relationships between local and Connect server datasource definitions, the Reconcile Connect

Data Sources dialog lets you work simultaneously with multiple datasource definitions.

To reconcile multiple datasource definitions

1 Ensure that Connect repository usage is enabled and that you are logged in to the Connect

Server. For details, see " Logging in to an Embarcadero Connect Server " on page 149 and

" Logging in to an Embarcadero Connect Server " on page 149.

2 On the Connect Navigator dropdown, select Reconcile Data Sources . The Reconcile

Connect Data Sources dialog opens.

151 RAPID SQL 8.6/XE5 USER GUIDE

REGISTERING DATASOURCES > REGISTERING DATASOURCES

3 Reconcile your Connect and local datasources using the three list boxes as follows:

• Matching data sources - lists Embarcadero Connect server datasource definitions and local datasource definitions with identical connection information details but that are currently not attached. Selecting an entry from this list attaches the local datasource to the

Connect datasource, ensuring that any changes to the Connect server definition will be copied to the local datasource definition on the next attempt to connect to the datasource

NOTE: For more information on local, attached, and matching datasource definitions, see

" Working With Datasources from a Connect Repository " on page 147.

• Unmatched Connect data sources - lists Embarcadero Connect server datasource definitions for which there are no local datasource definitions with matching connection information. Selecting an entry from this list creates a matching local datasource definition and attaches the local definition to the matching Connect server datasource definition.

• Unmatched local data sources - lists local datasource definitions for which there are no

Embarcadero Connect server datasource definitions with matching connection information. Selecting an entry from this list creates a matching Connect server datasource definition and attaches the local definition to the Connect server datasource definition.

4 Click Reconcile .

V IEWING D ATASOURCE P ROPERTIES

Rapid SQL lets you view the name, type, version, status and mode of a connected datasource.

The Datasource Properties dialog also lets you view the middleware or connectivity software that is being used to establish a particular datasource connection. You can use this information to troubleshoot connectivity problems, determining vital information such as the server version, connectivity library used, and library version and date.

NOTE:

For information on establishing a datasource connection, see " Connecting to

Datasources " on page 153.

To view key properties of a connected datasource

1 On the Datasource Navigator, select a datasource with an established connection. For more

information, see " Using the Datasource Navigator " on page 157.

2 On the Datasource menu, select Properties.

Rapid SQL opens the Datasource Properties dialog box.

RAPID SQL 8.6/XE5 USER GUIDE 152

CONNECTING TO DATASOURCES > CONNECTING TO DATASOURCES

U NREGISTERING D ATASOURCE

Rapid SQL lets you unregister datasources when you no longer need them.

NOTE: Removing a datasource from Rapid SQL does not delete the physical database. It simply removes the datasource definition, and connection information, from the Rapid

SQL catalog.

1 In the Datasource Navigator, right-click the target datasource and select Unregister . For

more information, see " Using the Datasource Navigator " on page 157.

2 When prompted to confirm, click Yes .

NOTE: The datasource manager is shared across Embarcadero's database management products. When you remove a datasource in any of Embarcadero's database management tools the datasource is removed across all relevant products.

For related information, see " Registering Datasources " on page 128.

C

ONNECTING TO

D

ATASOURCES

Rapid SQL provides two general categories of methods for connecting to a datasource.

Automatic

Explicit

You can set datasources to automatically connect each time you open the application. You can do this when registering a datasource or as an option when explicitly connecting to a

datasource. For details, see " Registering Datasources " on page 128 and "

Manually

Registering or Editing Datasources " on page 130

If you do not use the automatic connection option for a datasource, you must rxplicitly connect to a datasource before you can use Rapid SQL against that datasource.

The following topics provide instruction on explicit connection and disconnection options:

Disconnecting from a Datasource

Connecting to Datasources from an Alphabetical Listing

Disconnecting from a Datasource

For related information, see " Registering Datasources " on page 128

C ONNECTING TO A D ATASOURCE F ROM THE N AVIGATOR

The first time you start the application, Rapid SQL prompts you to register your datasources.

During this process, you can select the Auto Connect check box, which automatically connects all registered datasource each subsequent time you open the application. For details, see

" Moving Datasources Between Groups " on page 165.

153 RAPID SQL 8.6/XE5 USER GUIDE

CONNECTING TO DATASOURCES > CONNECTING TO DATASOURCES

If you did not check the Auto Connect box, or if you clicked No when prompted to connect to a database after registering, you must connect manually, each time you want to access that datasource.

If you later want to automatically connect your datasources, you can edit the datasource to make that change.

TIP:

To configure your datasource to login automatically, refer to " Registering

Datasources " on page 128.

To manually connect to a datasource

1 In the Datasource Navigator, right-click a datasource and select Connect from the context

menu. For details on the Explorer or Navigator, see " Using the Datasource Navigator " on page 157.

Rapid SQL opens a Login to ... dialog box.

2 Type a Login ID and Password .

3 Optionally, and only if available, provide Login As , Default Schema ID , and Default

Function Path values.

4 Select Auto Connect to automatically connect to the datasource in the future.

5 Click OK .

Rapid SQL connects to the datasource and expands the datasource display to show the top level

of nodes available on that datasource. For more information, see " Working with Bookmarks " on page 160.

C ONNECTING TO D ATASOURCES FROM AN A LPHABETICAL L ISTING

The S elect Datasource dialog lets you sequentially connect to a set of datasources chosen from a list.

To connect to one or more datasources

1 On the Datasource menu, select Select . Rapid SQL opens the Select Datasource dialog.

2 For each datasource that you want to connect to, select a datasource from the Datasource list, and then click Connect to connect to the selected datasource.

3 If the last datasource you connect to supports multiple databases, you can optionally select a database from the Database list, and then click OK to have that database selected.

Rapid SQL expands the datasource display to show the top level of nodes available on the

datasources you connected to. For more information, see " Working with Bookmarks " on page 160.

RAPID SQL 8.6/XE5 USER GUIDE 154

TROUBLE-SHOOTING CLIENT SETUP > TROUBLE-SHOOTING CLIENT SETUP

D ISCONNECTING FROM A D ATASOURCE

When you disconnect from a server, the application immediately breaks the connection between any open ISQL Windows, the servers, and databases. Although your ISQL Windows are still visible, the connections are no longer valid. If you attempt to execute a script, Rapid SQL attempts to reconnect to a registered datasource, if available.

To disconnect from a datasource

1 In the Datasource Navigator, right-click a datasource and select Disconnect . For information

on the Explorer and Navigator, see " Using the Datasource Navigator " on page 157.

NOTE: If necessary, Rapid SQL opens a dialog box asking if you want to commit all pending transactions for that connection or to rollback all before disconnecting. You cannot disconnect if there is an uncommitted transaction.

T

ROUBLE

-

SHOOTING

C

LIENT

S

ETUP

If you are using native Embarcadero drivers to connect to a datasource, improperly configured client software can lead to the following symptoms:

• Failure to Auto-Discover accessible datasources.

• Inability to properly register a datasource

• Failure to manually connect to a registered datasource

• Error messages indicating missing client software files

NOTE: For details on the various ways to register and connect to datasources, see

" Datasource and Server Management " on page 128.

Regardless of the DBMS platform, your first step in trouble-shooting client connectivity is to ensure that your client is specified in the PATH environment variable.

For DBMS-specific help, see the following topics:

Trouble-shooting Sybase Connectivity

Trouble-shooting Oracle Connectivity

Trouble-shooting DB2 LUW and DB2 z/OS Connectivity

Trouble-shooting SQL Server Connectivity

T ROUBLE SHOOTING S YBASE C ONNECTIVITY

A common cause of client connectivity issues against a Sybase DBMS is the client on the workstation not being compatible with Rapid SQL or the Sybase environment on your workstation not being configured properly.

155 RAPID SQL 8.6/XE5 USER GUIDE

TROUBLE-SHOOTING CLIENT SETUP > TROUBLE-SHOOTING CLIENT SETUP

Verify that your Sybase environment variables have been set properly on your workstation. If you make any changes, restart DBArtisan

Ensure you at least have the following variables (Environment Variables accessible through the

Control Panel):

SCROOT

SYBASE

SYBASE_OCS

SYBROOT

LIB - ensure that the Sybase LIB directory is listed here

INCLUDE - ensure that the Sybase INCLUDE directory is listed here

Verify that the PATH value has only ONE SET of Sybase directories listed. You can modify this from the same Environment Variable window above in the PATH value:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\WBEM;C:\PROGRA~1\Serena\vm\wi n32\bin;C:\PROGRA~1\Serena\vm\common\bin\win32;C:\oracle\ora92\bin;C:\oracle\ora92\jre

\1.4.2\bin\client;c:\sybase\OCS-15_0\lib3p;c:\sybase\OCS-15_0\dll;c:\sybase\OCS-

15_0\bin;c:\sybase\DataAccess\ADONET\dll;c:\sybase\DataAccess\OLEDB\dll;c:\sybase\Data

Access\ODBC\dll;c:\sybase\Shared\Sybase Central 4.3;c:\sybase\ua\bin;C:\Program

Files\Internet

Explorer;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program

In order to use the Auto-Discover feature, a valid SQL.ini file must be located in the following location:

C:\sybase\ version_identifier_directory \ini

Where the version_identifier_directory is the name of the release-specific directory associated with this purpose, such as OCS-15_0 or OCS-12_5 .

T ROUBLE SHOOTING O RACLE C ONNECTIVITY

An Oracle client must be installed on the workstation. It must be defined/specified in the following locations:

• The ORACLE_HOME in the Windows Registry

• The Environment PATH value

In addition, in order for the Auto-Discover feature to work, there must be a valid Oracle tnsnames.ora

and sqlnet.ora file in the Oracle client installed. They must be installed in the

%Oracle_home\Network\Admin directory. As well, the sqlnet.ora

file must have the

NAMES.DIRECTORY_PATH

value of TNSNAMES .

A typical sqlnet.ora file:

# sqlnet.ora Network Configuration File:

C:\oracle\product\10.2.0\client_2\network\admin\sqlnet.ora

# Generated by Oracle configuration tools.

RAPID SQL 8.6/XE5 USER GUIDE 156

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

# This file is actually generated by netca. But if customers choose to

# install "Software Only", this file wont exist and without the native

# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES= (NTS)

SQLNET.INBOUND_CONNECT_TIMEOUT = 30

SQLNET.SEND_TIMEOUT = 30

SQLNET.RECV_TIMEOUT = 30

TRACE_FILENO_SERVER=3

LOG_FILE_SERVER=svr.log

TRACE_FILE_CLIENT=clientsqlnet.trc

NAMES.DIRECTORY_PATH= (TNSNAMES)

T ROUBLE SHOOTING DB2 LUW AND DB2 Z /OS C ONNECTIVITY

The client must be defined in the workstation PATH value.

In order to Auto-Discover or manually register DB2 datasources, they must be configured in the

DB2 Configuration Assistant. If Rapid SQL is not detecting DB2 datasources, have your DBA provide a Configuration Assistant profile.

T ROUBLE SHOOTING SQL S ERVER C ONNECTIVITY

In general, SQL Server datasources rarely go undetected by Rapid SQL. Each database server sends out a ping (via a service) to the network and Rapid SQL is usually able to find this. The

SQL Server client must be defined in the workstation PATH value.

U

SING THE

D

ATASOURCE

N

AVIGATOR

The Datasource Navigator provides a visual method for browsing, accessing, and manipulating objects. The Datasource Explorer contains a hierarchy consisting of groups, datasources, object type, and object nodes:

• Groups organize the datasources available to Rapid SQL. A default set of groups correspond to the DBMS platforms supported by Rapid SQL. You can also create custom

groups to organize your datasources. For more information, see " Categorizing Datasources using Color-coding and Labeling " on page 168.

• Within groups are the datasources on your network that you have registered. You must register datasources with Rapid SQL in order to work against them. For more information,

see " Registering Datasources " on page 128 and "

Connecting to Datasources " on page 153.

157 RAPID SQL 8.6/XE5 USER GUIDE

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

• With the exceptions of the Filters node, nodes immediately below the datasource level correspond to the object types supported on the DBMS platform. At the lowest level, are the individual database objects on the datasource. For a listing of object types by DBMS

platform and detailed support summaries for each type, see " Supported Objects " on page 180.

NOTE: For more information on the Filters

node, see " Filtering in the Navigator " on page 170.

Higher level nodes in the hierarchy have an associated Expand/Collapse icon, letting you drill down through the hierarchy to expose lower level nodes and objects.

Bookmarks provide another means to quickly navigate to specific Explorer object nodes. For

details, see " Working with Bookmarks " on page 160.

You can also initiate object type-specific actions and open object editors from the Explorer. For

details, see " Initiating Object Actions in the Navigator " on page 161.

Rapid SQL offers a number of viewing and organization options that let you optimize the

Explorer for your own purposes. These include:

• Basic viewing options that let you toggle between type-based or owner-based display, onestep expansion and collapse of hierarchy elements, hiding or display of system objects, saving of view option settings.

• Creating custom datasource groups to provide a deeper level of organization.

RAPID SQL 8.6/XE5 USER GUIDE 158

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

• Categorizing datasources using color-coding and labeling to quickly distinguish between datasources used for different purposes in your organization.

• Filtering the Explorer tree to display only selected nodes and objects. Rapid SQL offers the following filtering options. You can filter by name, schema or object type,

For detailed information on customizing the Explorer view, see " Customizing the Navigator

Display " on page 162.

H IDING AND D ISPLAYING THE D ATASOURCE N AVIGATOR

Display of the Datasource Navigator can be toggled on and off.

To Toggle Display of the Navigator On and Off

• Select View > Datasource Navigator .

C ONNECTED /S ELECTED D ATASOURCE OPTIONS

While you can connect to multiple datasources, at any one time only one connected datasource is the currently selected datasource. The currently selected datasource is displayed in the

Datasource toolbar. For multiple-database datasources such as SQL Server and Sybase, a currently selected database is also displayed.

Certain features, to varying degrees, depend on the currently selected datasource or selected datasource/database combination. On a fairly trivial level, availability of some features or the initial state of a feature on being invoked is dependent on the selected datasource:

• Browse menu object type availability is dependent on DBMS platform of the currently selected datasource.

• Some features, Query Builder for example, have user interface controls for selecting a datasource. On opening, these user interface items default to the currently selected datasource.

More strongly dependent on the selected datasource is the SQL Editor. A SQL Editor window not locked to a datasource, will direct all transactions to the currently selected datasource.

NOTE: For information on how to lock and unlock a SQL Editor window, see " Locking a SQL

Editor Window to a Datasource " on page 812

With a Datasource Navigator active, while an unlocked SQL Editor window is open, the selected datasource can be changed explicitly or automatically in response to Explorer navigation or related user interface actions.

159 RAPID SQL 8.6/XE5 USER GUIDE

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

This can result in the following issues:

• Active session-specific features such as execution directives and query options being sent to the wrong datasource

• Features such as Semantic Validation returning false errors

How the selected datasource changes depends on the state of the Link button appearing at the top of the Explorer pane:

Link Button State

The Explorer is linked to the

Select Datasource combo

The Explorer is NOT linked to the Select Datasource combo

Description

You can explicitly change the active datasource by selecting a datasource from the

Select Datasource dropdown. The active datasource changes automatically as datasource-associated windows such as object editors become active in the

Workspace or as you select nodes in the Explorer.

As a side effect, the associated datasource node in the Explorer tree is selected.

When linking is inactive, you can only explicitly change the active datasource when an SQL Editor window is open. The active datasource still changes automatically as datasource-associated windows such as object editors become active in the

Workspace. And when linking is inactive, the change in the selected datasource has no effect on the selected node in the Explorer tree.

To toggle between the two link states

1 Click the Link button.

W ORKING WITH B OOKMARKS

Rapid SQL supports easy datasource navigation with the Bookmarks. You can right-click any node of the Explorer tree and add a bookmark. After a bookmark is created, you can simply select it from the Bookmarks menu, and be instantly positioned and connected to the resource in the Datasource Explorer tree.

Up to 256 bookmarks can be created.

To create a bookmark

1 On the Navigator, right-click the target node, and then select Add Bookmark . Rapid SQL opens the Add Friendly Bookmark Name dialog.

2 Type the Explorer bookmark name.

3 Click OK .

NOTE: Rapid SQL will not let you create multiple bookmarks referencing the same node.

RAPID SQL 8.6/XE5 USER GUIDE 160

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

To navigate to a bookmarked node

1 Select the Options menu (designated with a down arrow, above the Navigatortree), select

Bookmarks , select a DBMS platform, and then select the bookmarked node.

Editing Explorer Bookmarks

1 Select the Options menu (designated with a down arrow, above the Navigator tree), and then select Bookmarks > Bookmark Manager . Rapid SQL opens Bookmark Manager dialog.

• Rename a bookmark by selecting it and then clicking Rename . Then use the Edit

Bookmark Name dialog to provide a new name.

• Delete a bookmark by selecting it and then clicking Delete .

I NITIATING O BJECT A CTIONS IN THE N AVIGATOR

In the Datasource Navigator, right-click options let you initiate object actions against object types or against specific objects.

For detailed instructions, see the following topics:

161 RAPID SQL 8.6/XE5 USER GUIDE

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

• " Creating objects " on page 254

• " Modifying objects using editors " on page 452

• " Object actions " on page 584

For context information, see " Working with Bookmarks " on page 160.

W ORKING WITH S UPPLEMENTARY O RGANIZER T ABS

In addition to the commonly used Explorer tab, the Organizer window offers the following tabs:

• Project - when working with Rapid SQL’s Project Management feature, this tab provides a visual method for browsing, accessing, and manipulating your projects. For more

information on working with projects, see " Project Management " on page 802.

• VC Files - when working with Rapid SQL’s Version Control feature, this tab provides access

to version control files. For more information on working with projects, see " Version

Control " on page 826.

• Favorites - lets you designate and access favorite scripts. This tab lets you view, navigate, save, recall, and execute scripts. Sample Favorite Scripts are installed for Microsoft SQL

Server, Oracle, and Sybase Adaptive Server. For more information, see Favorite Properties

Dialog Box .

F AVORITE P ROPERTIES D IALOG B OX

The table below describes the options and functionality on the Favorite Properties dialog box:

Option

Description

File Name

Hot Key

File Type

Description

Lets you enter a description.

Lets you type or browse and locate a file.

Lets you enter a Hot Key.

Hot Keys must begin with CTRL or be stand-alone function keys. Rapid SQL automatically places the CTRL command in front of any character.

Lets you select a file type.

C USTOMIZING THE N AVIGATOR D ISPLAY

Rapid SQL offers flexibility in the elements displayed and in how elements are displayed in the

Datasource Explorer and Datasource Navigator.

Basic Viewing Options in the Navigator

RAPID SQL 8.6/XE5 USER GUIDE 162

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

Categorizing Datasources using Color-coding and Labeling

Categorizing Datasources using Color-coding and Labeling

Filtering in the Navigator

B ASIC V IEWING O PTIONS IN THE N AVIGATOR

The dropdown menu, available above the Datasource Navigator tree, provides basic organization and display options.

163 RAPID SQL 8.6/XE5 USER GUIDE

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

To change basic organization and viewing options

1 From the Options dropdown menu, select an option. Use the following table as a guide to your selection.

Option

Organize by Object Owner or

Organize by Object Type

Show System Objects and Show

Only My Objects

Full Refresh

Expand All Groups

Collapse All Groups

Lets you control display of system objects and objects that you own: NEVER,

ALWAYS, or USE DATASOURCE FILTER. For information on filter options, see

Simple, on-the-fly, Character-based Tree Filtering .

Select to refresh.

Select to expand all groups.

Select to collapse all groups.

Collapse All Datasources

Retain View Settings

Bookmarks

Description

Toggling these options has the following effect:

Owner - the Navigator displays objects for each user, categorized by object type. This display mode is most efficient if you are working with databases containing a high number of objects.

Type - the Navigator displays all objects, categorized by object type, for all users in the same list. This display mode speeds or slows performance in databases that contain many objects.

Select to collapse all datasources.

Select to retain the current state of the Explorer so that the it opens the same way the next time you start Rapid SQL.

Provides access to bookmark resources. For more information, see " Working with Supplementary Organizer Tabs " on page 162.

TIP:

You can also set these options on the Explorer Options tab of the Options editor.

W ORKING WITH D ATASOURCE G ROUPS

Rapid SQL lets you define datasource groups to organize the datasources in your enterprise.

Datasource Groups behave as folders in the Windows Explorer, allowing you to group related datasources together. Anywhere that datasources are presented in a hierarchical tree format, datasource group folders expand to display one or more contained datasources.

By default, the Datasource Navigator has one group per supported DBMS platform.

RAPID SQL 8.6/XE5 USER GUIDE 164

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

Rapid SQL lets you create custom groups or subgroups. This level of organization is useful if you want to group large numbers of registered datasources or have another need to organize datasources. For basic database group maintenance tasks, see the following topics:

• " Removing, Adding, and Renaming Datasource Groups " on page 166.

• " Changing the Level of a Datasource Group in the Hierarchy " on page 167.

When you manually register a datasource, you have the option of changing the default group to which Rapid SQL will automatically assign the datasource. Subsequently, you can move a datasource from one folder to another. For details, see " Moving Datasources Between Groups " on page 165.

M OVING D ATASOURCES B ETWEEN G ROUPS

Rapid SQL offers two ways change datasource groups:

• Dragging the datasource between groups

• Invoking the Change Group dialog box.

NOTE: You should always disconnect from a datasource before changing datasource groups.

To move a datasource between groups by dragging and dropping

1 If necessary, expand groups until both the datasource and the target datasource group are visible.

2 Drag the datasource over the target folder and drop it there.

165 RAPID SQL 8.6/XE5 USER GUIDE

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

To move a datasource using the Change Datasource Group dialog box

1 If necessary, expand groups until the datasource you want to move is visible.

2 Right-click the datasource you want to move, and select Change Group .

Rapid SQL opens the Change Datasource Group dialog box.

3 Use the S elect...

tree to locate and select the target group.

4 Click OK .

For more general information on datasource groups and associated tasks, see " Categorizing

Datasources using Color-coding and Labeling " on page 168.

R EMOVING , A DDING , AND R ENAMING D ATASOURCE G ROUPS

Rapid SQL offers a set of datasource group maintenance tasks. You can remove database groups that you no longer need to access, or that have otherwise become obsolete. Keep the following in mind when removing datasource groups:

• If a datasource group contains datasources or other datasource groups, those items are deleted when you delete the containing group. You should move any contained datasources or groups before preceding. For details on moving datasources, see " Moving Datasources

Between Groups " on page 165.

• The default datasource groups correspond to the DBMS platforms supported by Rapid SQL.

If you delete a default group, it will be recreated if you subsequently register a datasource for the associated platform.

To remove a datasource group

1 If necessary, expand datasource groups in the Explorer until the datasource you want to remove is visible.

2 Right-click the datasource group, and select Remove . Rapid SQL prompts you to verify.

3 Click Yes .

Similarly, Rapid SQL lets you define datasource groups to organize the datasources in your enterprise.

RAPID SQL 8.6/XE5 USER GUIDE 166

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

To create a new datasource group

1 If creating a folder within an existing folder, expand datasource groups in the Explorer until the target group is visible.

2 On the Explorer tree take one of the following actions:

• To create a new folder at the top level, right-click in empty space and select New from the context menu.

• To create a folder within an existing folder, right-click the target folder and select New from the context menu.

Rapid SQL opens the New Datasource Group dialog.

3 In the Datasource Group Name box, type the name of the new datasource group.

4 Click OK .

Lastly, Rapid SQL lets you change the name of an existing datasource group.

To rename a datasource group

1 If necessary, expand datasource groups in the Explorer until the datasource you want to rename is visible.

2 On the Explorer, right-click the datasource group folder, and select Rename . Rapid SQL opens the Rename Datasource Group dialog.

3 In the Datasource Group Name box, type the new name of the datasource group.

4 Click OK .

For related information, see the following topics:

• See " Changing the Level of a Datasource Group in the Hierarchy " on page 167 for information on changing hierarchy levels.

• See " Categorizing Datasources using Color-coding and Labeling " on page 168 for more

general information on working with datasource groups.

C HANGING THE L EVEL OF A D ATASOURCE G ROUP IN THE H IERARCHY

Rapid SQL lets you reorganize the datasource group tree by moving individual groups up and down the hierarchy.

To move a datasource group to the top level of the hierarchy

1 If necessary, expand groups until the datasource group you want to move is visible.

2 Drag the target group to open space in the Explorer pane.

167 RAPID SQL 8.6/XE5 USER GUIDE

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

To make a datasource group a subgroup within another group

1 If necessary, expand groups until the datasource group you want to move and the target group are visible.

2 Drag the target group and drop it on the datasource group that is to be the new parent.

For related information, see the following topics:

• See " Removing, Adding, and Renaming Datasource Groups " on page 166 for information

on basic datasource tree tasks.

• See " Categorizing Datasources using Color-coding and Labeling " on page 168 for more

general information on working with datasource groups.

C

ATEGORIZING

D

ATASOURCES USING

C

OLOR

-

CODING AND

L

ABELING

Rapid SQL provides a means to visually distinguish between datasources used for different purposes in your organization. You can assign a category, such as development or production, when creating or editing a datasource. This color-codes or labels particular user interface elements associated with that datasource.

When you assign a category to a datasource, the Navigator icons for the datasource show a distinctive color-coded category indicator. Optionally, you can customize your categorization scheme to include the following user interface elements:

• A short name label included in the Datasource toolbar combo/dropdown when a categorized datasource is selected

• Color-coded tabs on windows associated with actions against a categorized datasource, editor or ISQL windows for example

RAPID SQL 8.6/XE5 USER GUIDE 168

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

• Color-coding of the status bar at the bottom of the Rapid SQL window

The default categories [and short name labels] and the associated colors are as follows:

Color Default Category

Production

Short Name Label

PROD

Development DEV

QA

Test

QA

TEST

In addition to the defaults, you can create custom category/color code/label category combinations.

To work with color-coded datasource resources, you must be familiar with the following tasks:

• Enabling the specific user interface items that can be color-coded or labelled. For details,

see " Datasource Options " on page 95.

169 RAPID SQL 8.6/XE5 USER GUIDE

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

• Customizing your category scheme. For details, see Customizing Datasource Categories .

• Assigning a category to a datasource when creating or editing it. For details, see " Manually

Registering or Editing Datasources " on page 130.

C USTOMIZING D ATASOURCE C ATEGORIES

Rapid SQL lets you customize your datasource category scheme. A datasource category has the following configurable components:

• Category name - The name displayed as a selection in the Select a category dropdown

• Short Name - The abbreviation shown in the Datasource toolbar dropdown when a categorized datasource is selected.

• Color - The color used to denote a categorized datasource in the Navigator tree icons and window tabs.

NOTE: Display of specific user items used to denote categories is configurable. For more

information, see " Datasource Options " on page 95.

To customize your datasource categories

1 On the Datasource menu select Register Datasource and then select the Datasource

Group panel.

2 From the Select a category dropdown select Customize . The Manage Datasource

Categories dialogs opens.

3 Take one of the following actions:

• Create a new category by clicking New and selecting or providing a Full name , Short name , and Color combination.

• Edit an existing category by selecting the category, clicking Edit and modifying the name and color combination.

NOTE: The short name for a category cannot be edited.

• Delete an existing category by selecting the category, clicking Delete and verifying the deletion at the prompt.

F ILTERING IN THE N AVIGATOR

For ease of navigation, Rapid SQL lets you filter the Navigator tree to display only selected nodes and objects. Rapid SQL offers the following filtering options:

• Real-time modification of the tree to show only nodes with names matching a typed character string. For details, see Simple, on-the-fly, Character-based Tree Filtering .

RAPID SQL 8.6/XE5 USER GUIDE 170

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

• Permanent object filters, enabled and disabled for individual datasources, that restrict display based on object name and owning schema (and optionally, object type). For details, see Object Name/schema Filtering .

• The ability to restrict object types displayed for each DBMS platform. For details, see Node, or Object Type, Filtering .

Two default filters applying to owned and system objects are available. For details, see Using the

Default Filters .

S IMPLE , ON THE FLY , C HARACTER BASED T REE F ILTERING

The Filter box at the top of the Navigator provides a quick, ad hoc way to restrict the nodes displayed.

To restrict the Explorer tree display to only user-defined nodes whose name contains a particular character string

• Type one or more characters in the Filter box.

The display is updated to show only nodes whose name contains the typed character string and their parent nodes.

NOTE: The Clear button in the Filter box (X) deletes the contents of the Filter box and restores the unfiltered tree display.

O BJECT N AME / SCHEMA F ILTERING

Object filters let you restrict the Navigator tree display for a datasource by name, owning schema, or name/schema combinations. These filters are defined at the DBMS platform level and are enabled or disabled on a datasource by datasource level. Multiple object filters can be created for a DBMS platform, letting you enable combinations of filters for a single datasource, ad hoc enabling and disabling of individual filters depending on your requirements, and so on.

Each filter consists of one or more ANDed conditions based on name or schema. For example, you could create a two-condition filter that restricts the Navigator tree for a datasource to display only objects belonging to the Schema QA and whose name starts with the string Test .

171 RAPID SQL 8.6/XE5 USER GUIDE

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

Each filter condition is a simple expression that tests object names for equality ( Equals , Not

Equals ), inclusion in a specified list ( In, Not In ), or using pattern matching ( Like, Not Like) .

Optionally, an object filter can also be used to restrict display of specified object types on a datasource.

To create an object filter that can be enabled for all datasources for a DBMS platform

1 Right-click in the Navigator tree and select Filter from the context menu.

The Filters dialog opens. The Object Filters tab opens by default, letting you create an object filter definition. The Node Filters tab, on the other hand, lets you perform real-time filtering of object types for all datasources on a DBMS platform. For details, see Node, or

Object Type, Filtering .

2 In the View area, select By Filter .

NOTE: The current instructions create a filter at the DBMS level. To create a filter for a single datasource, select the By Datasource view, select a specific datasource, and then proceed to step 4 .

3 Expand the icon corresponding to the DBMS for which you want to create a filter and ensure that the icon is selected.

4 Click New and type a name for the new filter.

RAPID SQL 8.6/XE5 USER GUIDE 172

USING THE DATASOURCE NAVIGATOR > USING THE DATASOURCE NAVIGATOR

5 On the Predicates tab, create one or more name-based or schema-based conditions, all of which must be satisfied when this filter is enabled. Objects that do not satisfy the conditions will be filtered from view. Use the following guidelines in constructing conditions:

• The Like and Not Like operators take pattern-matching Value s. Rapid SQL supports the wildcard characters and conventions supported on the target DBMS.

• The In and Not In operators take a comma-delimited list such as CO,CA,CU , as a Value .

• Click the associated New button to add new predicates.

6 Optionally, on the Database Elements tab, select the check boxes for all object types to which this filter is to be applied. The filter does not affect the display of any deselected object types.

7 Click OK .

By default, when you create an object filter for a DBMS platform, it is enabled for each registered datasource of that DBMS type.

To disable or enable an object filter for a datasource

1 Right-click in the Navigator tree and select Filter from the context menu. The Filters dialog opens.

2 In the View area, select By Datasource .

3 Expand the icon corresponding to the target DBMS and then expand the icon corresponding to the specific datasource for which you want to for enable or disable a filter.

4 Enable an object filter by selecting the associated check box or disable the object filter by deselecting the check box.

5 Click OK .

NOTE: You can also enable and disable filters using controls found under the Filters node for each datasource in the Navigator tree.

You can also use the Filters dialog to select and edit an object filter, rename or create a clone of an existing object filter, and delete filters.

N ODE , OR O BJECT T YPE , F ILTERING

Node filtering lets you hide specified Navigator tree nodes for a DBMS platform. For example, if you do not typically work with credential-related objects such as users, groups, profiles or logins, you may wish to filter those out of the Navigator tree. You could either disable display of the individual object types or if practical, disable display of the Security node for the DBMS.

173 RAPID SQL 8.6/XE5 USER GUIDE

USING THE MANAGE DATASOURCES UTILITY > USING THE MANAGE DATASOURCES UTILITY

To change the hidden/displayed status of object types for a DBMS platform

1 Right-click in empty space in the Navigator tree and select Filter from the context menu.

The Filters dialog opens.

The NodeFilters tab opens by default, letting perform real-time filtering of object types for all datasources on a DBMS platform. The Object Filters tab, on the other hand, lets you create permanent, name-based or schema-based filters. For details, see " Object Name/ schema Filtering " on page 171.

2 Click the Node Filters tab.

3 Expand the icon corresponding to the DBMS for which you want to create a node filter, and continue to expand nodes until all nodes for which you want to change the hidden/ displayed status, are visible.

4 Ensure that all nodes corresponding to objects types that are to be displayed, are selected.

Similarly, ensure that all nodes corresponding to objects types that are to be hidden, are deselected.

5 Click OK .

Hidden/displayed status is retained for the DBMS until you explicitly open the Filters dialog and change the current settings.

U SING THE D EFAULT F ILTERS

The Filters node for each registered datasource includes two default Navigator tree filters,

Ignore System Objects and Show Only My Objects . These filters can be enabled and disabled for each datasource but cannot be edited or deleted.

U

SING THE

M

ANAGE

D

ATASOURCES

U

TILITY

The Manage Datasources dialog box lets you manage datasources throughout your enterprise from a single vantage point. It provides concise, relevant information on your datasources in a simple grid format. It provides centralized access to common datasource operations such as adding, modifying, deleting, discovering, importing, and exporting datasources.

To open the Manage Datasources dialog box:

1 On the Datasource menu, click Manage Datasources .

Rapid SQL opens the Manage Datasources dialog box.

RAPID SQL 8.6/XE5 USER GUIDE 174

USING THE MANAGE DATASOURCES UTILITY > USING THE MANAGE DATASOURCES UTILITY

The grid format lets you access and view datasource specifications. datasources are grouped according to the default, DBMS-based folder structure and then within any custom datasource groups you have set up. The table below describes information available for each datasource entry:

Column Description

Datasource Name Uses an explorer-like interface to display all registered datasources and their groups. You can navigate this column in the same manner as the datasource explorer, by clicking on nodes to expand or collapse your view of the datasources.

Connect String Displays the full connection string for the datasource.

Default User Id

Auto-Connect?

Host Computer

Default Schema

Displays the Default User ID for the datasource.

Indicates whether the Auto Connect feature is turned on or off.

Displays the name of the Host Computer if one has been configured.

Displays view default schemas for your DB2 datasources.

In addition, you can take the following actions:

• Click the New Datasource button to register a datasource. For more information, see

" Registering Datasources " on page 128.

• Select a datasource and click the Edit Datasource button to edit that datasource definition.

• Select a datasource and click the Remove Datasource button to unregister that datasource

definition. For more information, see " Categorizing Datasources using Color-coding and

Labeling " on page 168.

175 RAPID SQL 8.6/XE5 USER GUIDE

USING THE MANAGE DATASOURCES UTILITY > USING THE MANAGE DATASOURCES UTILITY

• Click the Discover button to locate all configured datasources on your network and automate the process of registering them. For more information, see " Moving Datasources

Between Groups " on page 165.

• Import or export datasource definitions. For details, see " Importing and Exporting

Datasource Definitions " on page 145.

RAPID SQL 8.6/XE5 USER GUIDE 176

USING THE MANAGE DATASOURCES UTILITY > USING THE MANAGE DATASOURCES UTILITY

177 RAPID SQL 8.6/XE5 USER GUIDE

D

ATABASE

O

BJECT

M

ANAGEMENT

For each supported DBMS, Rapid SQL provides extensive object management facilities. AImed at both Database Administrators and Developers, Rapid SQL provides support for the most commonly used object types. The following sets of topics describe the major areas of support:

Supported Objects

Creating objects

Modifying objects using editors

Object actions

Describes the database objects and related elements supported by Rapid SQL.

In addition to a listing of all supported objects by DBMS platform, a support summary is provided for each object type.

Tells you how to create new objects using graphical wizards.

Tells you how to edit existing objects.

Provides details on the actions and operations that Rapid SQL lets you perform against database objects.

RAPID SQL 8.6/XE5 USER GUIDE 178

DATABASE OBJECT MANAGEMENT

179 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

S

UPPORTED

O

BJECTS

Rapid SQL lets you manage database objects across different database platforms. The table below indicates the objects that Rapid SQL supports by platform:

Aliases

Asymmetric Keys

Blob Filters

Certificates

Chains

Check Constraints

Clusters

Database Links

Database Triggers

Databases

DBSpaces

DBSpaces

Defaults

Directories

Domains

Encryption Keys

Domains

Exceptions

Extended Procedures

External Functions

Foreign Keys

Full-text Catalogs

Full-text Indexes

Functions

Generators

Groups

Indexes

Instance

Java Classes

Java Resources

Java Sources

RAPID SQL 8.6/XE5 USER GUIDE









 



  



















 





 













 

















































 



 

















180

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Primary Keys

Procedures

Profiles

Programs

Recycle Bin

Roles

Rules

Schedules

Segments

Sequences

Shadows

Structured Types

Symmetric Keys

Synonyms

System Indexes

System Tables

System Triggers

Tables

Tablespaces

Triggers

Job Queues

Jobs (Oracle)

Join Indexes

Libraries

Logins

Macros

Materialized Query Tables

Materialized Views

Materialized View Logs

Outlines

Package Bodies

Packages

Partition Functions

Partition Schemes

Plans

181









 











































































































 







































RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Type Bodies

Types

Unique Keys

User Datatypes

User Messages

Users

Views





























































A LIASES

Aliases let you assume the permissions of another database user without creating a separate user identity. You can use an alias when a user requires only temporary access to a database. You can also use an alias to mask a user’s identity.

Platform availability

  

Creating and editing

See the following topics:

• " Aliases Wizard (DB2 LUW) " on page 259 and "

Aliases Editor (IBM DB2 LUW) " on page 461

• " Aliases Wizard (DB2 Z/OS) " on page 286 and "

Aliases Editor (IBM DB2 Z/OS) " on page 480

• " Aliases Wizard (Sybase ASE) " on page 429 and "

Aliases Editor (Sybase ASE) " on page 566

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Drop



RAPID SQL 8.6/XE5 USER GUIDE

 

182

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Extract

Report

Transfer Ownership















A SYMMETRIC K EYS

Asymmetric keys, in addition to symmetric keys and certificates, provide Rapid SQL support for

Public Key Encryption. Asymmetric keys consist of a private key and corresponding public key and are used to secure symmetric keys.

Platform availability



Creating and editing

• " Asymmetric Keys Wizard (SQL Server) " on page 332 and "

Asymmetric Keys Editor (SQL

Server) " on page 510

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Report

Related information

• " Certificates " on page 184

• " Symmetric Keys " on page 235

B LOB F ILTERS

Rapid SQL provides support for blob filters, user-written programs that convert data stored in

Blob columns from one subtype to another.

183 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability



Creating and editing

See " Blob Filters Wizard (ITB/FBD) " on page 313 and "

Blob Filters Editor (InterBase/Firebird) " on page 497.

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Rename

Report

C ERTIFICATES

Certificates, in addition to symmetric and asymmetric keys, provide Rapid SQL support for Public

Key Encryption. Certificates are digitally signed security objects containing a public key and optionally, a private key.

Platform availability



Creating and editing

• " Certificate Wizard (SQL Server) " on page 334 and "

Certificates Editor (SQL Server) " on page 510

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Add Private Key

Backup Certificate

Drop

Extract

Report

RAPID SQL 8.6/XE5 USER GUIDE 184

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Related information

• " Asymmetric Keys " on page 183

• " Symmetric Keys " on page 235

C HAINS

The following summarizes support for named series of tasks

Platform availability



Creating and editing

Rapid SQL does not allow you to create or edit this object type.

Object actions/operations supported

No specific object actions are available for this object type/

Related Information

See details for the following, related object types:

• " Jobs (Oracle) " on page 210

• " Programs " on page 227

• " Schedules " on page 231

C HECK C ONSTRAINTS

Check constraints are data values that are acceptable in a column. They are logical expressions that verify column values meet defined acceptance criteria.

185 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability

      

Creating and editing

See " Add or Modify Check Constraint " on page 591.

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Change Status (check constraints)

Drop

Extract

Hide Text

Rename

Report

Transfer Ownership





























































C LUSTERS

Clusters provide an optional method of storing table data. A cluster comprises of a group of tables that share the same data blocks, and which are grouped together because they share common columns and are often used together. The related columns of tables stored in a cluster are known as the cluster key.

There are two types of clusters:

• Index

• Hash

Index clusters store the cluster data together and index the cluster key, which should make them faster at retrieving a range of data rows.

RAPID SQL 8.6/XE5 USER GUIDE 186

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Hash clusters apply hashing functions to the cluster key to determine the physical location of a data row, which should make them faster at retrieving specific data rows.

NOTE: To place a table on a cluster, 6 include the ON CLUSTER syntax within the CREATE

TABLE statement. Placing a table on a cluster precludes you from placing it on a tablespace or defining the associated storage parameters.

Platform availability



Creating and editing

• " Clusters Wizard (Oracle) " on page 377 and "

Clusters Editor (Oracle) " on page 536.

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Allocate Extent

Analyze

Deallocate Unused

Space

Drop

Extract

Report

Truncate

D ATABASE L INKS

Database links are named schema objects that describe a path from one database to another.

Database links are implicitly used when a reference is made to a global object name in a distributed database. To use a database link, either it is public or you own it.

NOTE: Oracle syntax does not let you alter an existing database link. To change its definition, drop and re-create it.

187 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability



Creating and editing

• " Database Links Wizard (Oracle) " on page 380 and "

Database Links Editor (Oracle) " on page 538

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Rename

Report

D ATABASE T RIGGERS

A database trigger implements a database-scope DDL trigger. These triggers fire in response to events associated with DDL statements.

NOTE: Before working with database triggers, consult Microsoft SQL Server documentation for a general understanding of DDL triggers. For more information, see

Accessing Third

Party Documentation .

Platform availability



Creating and editing

• " Database Triggers Wizard (SQL Server) " on page 336 and "

Database Triggers Editor (SQL

Server) " on page 513

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Change Status

Drop

Extract

Report

RAPID SQL 8.6/XE5 USER GUIDE 188

SUPPORTED OBJECTS > SUPPORTED OBJECTS

D ATABASES

Databases are a collection of tables, or a collection of index spaces and tablespaces. The goals of a database system are straightforward but challenging. In general, a database aims to manage large amounts of data in a multi-user environment. It should achieve high performance while letting many users access the same information concurrently without compromising data integrity. A database also must protect against unauthorized access and provide reliable solutions for failure recovery.

Platform availability

    

Creating and editing

• " Databases Wizard (DB2 LUW) " on page 259 and "

Databases Editor (IBM DB2 LUW) " on page 462

• " Databases Wizard (DB2 Z/OS) " on page 287 and "

Databases Editor (IBM DB2 Z/OS) " on page 481

• " Databases Wizard (SQL Server) " on page 335 and "

Databases Editor (SQL Server) " on page 512

• " Databases Wizard (Sybase ASE) " on page 429 and "

Databases Editor (Sybase ASE) " on page 567

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Attach Database

Checkpoint

Copy Schema

DBCC

Detach Database

Drop

Drop Automatic Storage Path(s)

Extract































189 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Hide Text

Move Log

Quiesce (Database)

Rename

Report

Resynchronize

Set Online/Offline

Shrink

Start Database

Stop Database

Unquiesce

Update Statistics





















DBMS-specific information

IBM DB2 for Linux, Unix, and Windows Instances

Microsoft SQL Server Databases

IBM DB2 for OS/390 and z/OS Instances

Sybase ASE Databases













IBM DB2 FOR L INUX , U NIX , AND W INDOWS I NSTANCES

Databases are a collection of tables, or a collection of index spaces and tablespaces. The goals of a database system are straightforward but challenging. In general, a database aims to manage large amounts of data in a multi-user environment. It should achieve high performance while letting many users access the same information concurrently without compromising data integrity. A database also must protect against unauthorized access and provide reliable solutions for failure recovery.

RAPID SQL 8.6/XE5 USER GUIDE 190

SUPPORTED OBJECTS > SUPPORTED OBJECTS

M ICROSOFT SQL S ERVER D ATABASES

Databases are a collection of tables, or a collection of index spaces and tablespaces. The goals of a database system are straightforward but challenging. In general, a database aims to manage large amounts of data in a multi-user environment. It should achieve high performance while letting many users access the same information concurrently without compromising data integrity. A database also must protect against unauthorized access and provide reliable solutions for failure recovery.

NOTE: Microsoft SQL Server recommends that you do not create any user objects, such as tables, views, stored procedures, or triggers, in the master database. The master database includes the system tables that store the system information used by SQL

Server, such as configuration option settings.

IBM DB2 FOR OS/390 AND Z /OS I NSTANCES

Databases are a collection of tables, or a collection of index spaces and tablespaces. The goals of a database system are straightforward but challenging. In general, a database aims to manage large amounts of data in a multi-user environment. It should achieve high performance while letting many users access the same information concurrently without compromising data integrity. A database also must protect against unauthorized access and provide reliable solutions for failure recovery.

S YBASE ASE D ATABASES

Databases are a collection of tables, or a collection of index spaces and tablespaces. The goals of a database system are straightforward but challenging. In general, a database aims to manage large amounts of data in a multi-user environment. It should achieve high performance while letting many users access the same information concurrently without compromising data integrity. A database also must protect against unauthorized access and provide reliable solutions for failure recovery.

DBS PACES

Rapid SQL offers support for these tablespaces made up of one or more operating systemfiles.

191 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability



Creating, and editing

Rapid SQL does not offer support for creating or editing objects of this type.

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584..

Drop

Extract

D EFAULTS

Defaults promote data integrity by supplying a default value to a table column if the user does not explicitly provide one. They are reusable objects that you can bind to table columns or user datatypes.

Platform availability

 

Creating and editing

• " Defaults Wizard (SQL Server) " on page 337 and "

Defaults Editor (SQL Server) " on page 513

• " Defaults Wizard (Sybase ASE) " on page 431 and "

Defaults Editor (Sybase ASE) " on page 568

RAPID SQL 8.6/XE5 USER GUIDE 192

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Hide Text

Rename

Report



















D IRECTORIES

Directories create an alias to an external operating system directory to your database files, which can be used for storing large binary object files. When you create a directory, provide the full path name to the outside operating system where the BFILE's are stored. This object lets you store large files, such as video, outside of the database. The directory object lets you provide a simple alias to the full path name of an outside server's file system, which you can then use to point to the files when creating procedural logic objects. This saves the developer from having to type the full path name when coding.

To create a Directory object, you need CREATE ANY DIRECTORY system privileges. You also create or have in place a corresponding operating system directory to store the file. This directory must have the correct read permissions for Oracle processes.

Platform availability



Creating and editing

• " Directories Wizard (Oracle) " on page 381 and "

Directories Editor (Oracle) " on page 538

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Report

193 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

D OMAINS

Rapid SQL provides support for domains, letting you work with these type definitions.

Platform availability

 

Creating and editing

" Domains Wizard (ITB/FBD) " on page 314 and "

Domains Editor (InterBase/Firebird) " on page 498.

NOTE: Rapid SQL does not support creation or editing of this object type against a Sybase IQ datasource.

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Rename

Report

E NCRYPTION K EYS

Rapid SQL provides support for encryption keys, used in encrypting and decrypting tables and columns.

Platform availability



Creating and editing

See " Encryption Keys wizard (ITB/FBD) " on page 315 and "

Encryption Keys editor (InterBase/

Firebird) " on page 498.

RAPID SQL 8.6/XE5 USER GUIDE 194

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Rename

Report

E VENTS

Rapid SQL provides support for events, letting you work with these state changes that can be monitored or used as trigger conditions.

Platform availability



Creating and editing

Rapid SQL does not support creation or editing of this object type against a Sybase IQ datasource.

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Object Properties

E XCEPTIONS

Rapid SQL provides support for exceptions, letting you work with these named error messages.

195 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability



Creating and editing

See " Exceptions Wizard (ITB/FBD) " on page 316 and "

Exceptions Editor (InterBase/Firebird) " on page 499.

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Rename

Report

E XTENDED P ROCEDURES

Extended Procedures are dynamic link libraries that can be used to load and execute application routines written in other programming languages, such as C or Visual Basic. Extended

Procedures function and appear in the same manner as normal stored procedures in that you can pass parameters to them and obtain results.

NOTE: Extended Procedures can only be accessed on the Master database.

Platform availability



Creating and editing

• " Extended Procedures Wizard (Sybase ASE) " on page 432 and "

Extended Procedures

Editor (Sybase ASE) " on page 568

RAPID SQL 8.6/XE5 USER GUIDE 196

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Object actions/operations supported

Drop

Rename

Describe

Report

Execute

Extract

Hide Text

E XTERNAL F UNCTIONS

Rapid SQL provides support for external functions, letting you work with declarations for existing functions.

Platform availability



Creating and editing

See " External Functions Wizard (ITB/FBD) " on page 317 and "

External Functions editor

(InterBase/Firebird) " on page 500.

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Rename

F OREIGN K EYS

Foreign keys enforce referential integrity between tables by verifying the existence of foreign key values in the parent table before letting you insert or update foreign key values in the child table.

197 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability

        

Creating and editing

• " Foreign Keys Wizard (DB2 LUW) " on page 261 and "

Foreign Keys Editor (IBM DB2 LUW) " on page 463

• " Foreign Keys Wizard (DB2 Z/OS)) " on page 288 and "

Foreign Keys Editor (IBM DB2 Z/OS) " on page 481

• " Foreign Keys Wizard (ITB/FBD) " on page 318 and "

Foreign Keys editor (InterBase/

Firebird) " on page 500

• " Foreign Keys wizard (MySQL) " on page 369 and "

Foreign Keys editor (MySQL) " on page 532

• " Foreign Keys Wizard (Oracle) " on page 382 and "

Foreign Keys Editor (Oracle) " on page 539

• " Foreign Keys Wizard (SQL Server) " on page 339 and "

Foreign Keys Editor (SQL Server) " on page 514

• " Foreign Keys Wizard (Sybase ASE) " on page 433 and "

Foreign Keys Editor (Sybase ASE) " on page 569

NOTE: Creation and editing of objects of this type is not supported against Sybase IQ datasources.

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Change Status (check constraints)

Drop

Extract

Rename

Report

Transfer Ownership



























RAPID SQL 8.6/XE5 USER GUIDE





































198

SUPPORTED OBJECTS > SUPPORTED OBJECTS

DBMS platform-specific notes

MySQL MySQL recognizes two types of tables, MyISAM and InnoDB. MyISAM tables access data records using an index, where InnoDB tables allow transactions and foreign keys.

Therefore, the discussion of foreign keys is limited to your InnoDB tables.

F ULL TEXT C ATALOGS

A full-text catalog is a set of operating system files that store full-text indexes. Full-text catalogs, along with full-text indexes and the object actions supported for these object types, provide full text search support in Rapid SQL.

NOTE: Before working with full-text catalogs, consult Microsoft SQL Server documentation for

a general understanding of full-text searching. For more information, see " Accessing

Third Party Documentation " on page 21.

Platform availability



Creating and editing

• " Full-text Catalogs Wizard (SQL Server) " on page 340 and "

Full-text Catalogs Editor (SQL

Server) " on page 515

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Rebuild (Full-text Catalogs)

Reorganize (SQL Server Full-text

Catalogs)

Report

Related information

• " Full-text Indexes " on page 200

199 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

F ULL TEXT I NDEXES

A full-text index stores information used by the Full-Text Engine to compile full-text queries that can quickly search a table for particular words or word combinations. A full-text index stores information about key words and their location within one or more columns of a table.

Full-text indexes, along with full-text catalogs and the object actions supported for these object types, provide full text search support in Rapid SQL.

NOTE: Before working with full-text indexes, consult Microsoft SQL Server documentation for

a general understanding of full-text searching. For more information, see " Accessing

Third Party Documentation " on page 21.

Platform availability



Creating and editing

• " Full-text Indexes Wizard (SQL Server) " on page 341 and "

Full-text Indexes Editor (SQL

Server) " on page 515

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Change Status (Full-text Indexes)

Drop

Extract

Population status

Report

Related information

• " Full-text Catalogs " on page 199

F UNCTIONS

Functions are subroutines that you define. Functions are useful for reusable application logic.

You can use functions to determine the best methods for controlling access and manipulation of the underlying data contained in an object.

The table below describes the types of user-defined functions that Rapid SQL lets you create:

Function

Column or External

Table Function

Description

You can write in a host programming language, such as C. This function can act on a table and returns a table value rather than a scalar value.

RAPID SQL 8.6/XE5 USER GUIDE 200

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Function

External Scalar

Function

Description

You can write in a language other than SQL, such as C++ or Java and returns a scalar value to the program. This type of function is referenced by the CREATE FUNCTION statement and can be used to perform computations on data contained in the database but cannot directly reference the data.

OLEDB Function

Sourced Function

Accesses OLE DB data in user-defined OLE DB external tables.

Inherits the semantics of another function and can be an operator.

Template Function Partial functions that do not contain any executable code. Mainly used in a federated database to map the template function to a data source function -Oracle, SQL Server, Sybase

ASE, etc. A function mapping needs to be created in conjunction with the template function.

Platform availability

       

Creating and editing

• " Functions Wizard (DB2 LUW) " on page 263 and "

Functions Editor (IBM DB2 LUW) " on page 463

• " Functions Wizard (DB2 Z/OS) " on page 289 and "

Functions Editor (IBM DB2 Z/OS) " on page 482

• " Functions wizard (MySQL) " on page 370 and "

Functions editor (MySQL) " on page 532

• " Functions Wizard (Oracle) " on page 383 and "

Functions Editor (Oracle) " on page 539

• " Functions Wizard (SQL Server) " on page 342 and "

Functions Editor (SQL Server) " on page 516

• " Functions Wizard (Sybase ASE) " on page 434 and "

Functions Editor (Sybase ASE) " on page 570

NOTE: Creation and editing of objects of this type is not supported against Sybase IQ datasources.

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.



Compile

201 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Create Synonym

Describe

Drop

Execute

Extract

Hide Text

Object Properties

Rename

Report

Transfer Ownership



























































 



Important Notes

With respect to functions and stored procedures, it can be necessary to have statements executed before and after creation of the procedure or function. This can be useful for example, if you need to create or drop temporary tables used by the function or procedure. Rapid SQL supports the use of two tag pairs, ETStart and ETEnd, that let you embed statements in the first comment block of a stored procedure or function. The following shows the expected syntax: create procedure dbo.

procname (@a numeric) as

/*

<ETStart> SQL Statement </ETStart>

<ETEnd> SQL Statement </ETEnd>

*/ begin

...

G ENERATORS

Rapid SQL provides support for generators, letting you work with these objects used to generate sequential numbers in a column.

RAPID SQL 8.6/XE5 USER GUIDE 202

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability



Creating and editing

See " Generators Wizard (ITB/FBD) " on page 319 and "

Generators editor (InterBase/Firebird) " on page 501.

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Rename

Report

G ROUPS

Groups are a defined collection of database users. The primary use of groups is to consolidate the management of permissions. By matching together similar users into groups, you can greatly reduce the number of commands required to set permissions.

Every user automatically belongs to the public group. To assign a user to another group, add the user to that group. Then the user belongs to that group and public.

NOTE: A user can only belong to one group at a time other than public.

Platform availability

 

Creating and editing

• " Groups Wizard (Sybase ASE) " on page 434 and "

Groups Editor (Sybase ASE) " on page 570

NOTE: Creation and editing of objects of this type is not supported against Sybase IQ datasources.

203 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Report











I NDEXES

Indexes are optional structures associated with tables. You can create indexes specifically to speed SQL statement execution on a table. When properly used, Indexes are the primary means of reducing disk I/O. Indexes are logically and physically independent of the data in the associated table. Unique Indexes guarantee that no two rows of a table have duplicate values in the columns that define the index.

Platform availability

        

Creating and editing

• " Indexes Wizard (DB2 LUW) " on page 266 and "

Indexes Editor (IBM DB2 LUW) " on page 464

• " Indexes Wizard (DB2 Z/OS) " on page 291 and "

Indexes Editor (IBM DB2 Z/OS) " on page 483

• " Indexes Wizard (ITB/FBD) " on page 319 and "

Indexes editor (InterBase/Firebird) " on page 502

• " Indexes, Primary Keys, or Unique Keys wizard (MySQL) " on page 371 and "

Indexes, Primary

Keys, and Unique Keys editors (MySQL) " on page 533

• " Indexes Wizard (Oracle) " on page 384 and "

Indexes Editor (Oracle) " on page 540

• " Indexes Wizard (SQL Server) " on page 343 and "

Indexes Editor (SQL Server) " on page 516

RAPID SQL 8.6/XE5 USER GUIDE 204

SUPPORTED OBJECTS > SUPPORTED OBJECTS

• " Indexes Wizard (Sybase ASE) " on page 435 and "

Indexes Editor (Sybase ASE) " on page 571

NOTE: Creation and editing of objects of this type is not supported against Sybase IQ datasources.

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Allocate Extent

Analyze

Check Index

Create Alias

Deallocate Unused Space

Disable Index

Drop

DBCC

Estimate Size

Extract

Place

Rebuild Index

Rename

Reorganize /Reorg

Report

Set Statistics

Shrink

Transfer Ownership

Update Statistics































DBMS-specific information

IBM DB2 for Linux, Unix, and Windows Indexes

IBM DB2 for OS/390 and z/OS Indexes

Microsoft SQL Server Indexes

Oracle Indexes

Sybase ASE Indexes





































































 

 

 

205 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

IBM DB2 FOR L INUX , U NIX , AND W INDOWS I NDEXES

IBM DB2 for Linux, Unix, and Windows offers two types of indexes:

• Unique

• Non-Unique

Unique Indexes guarantee that no two rows of a table have duplicate values in the columns that define the index.

M ICROSOFT SQL S ERVER I NDEXES

Microsoft SQL Server offers two types of indexes: clustered and non-clustered. Clustered indexes physically sort table data to match their logical order. Non-clustered indexes only order the table data logically. In a database, an index lets you speed queries by setting pointers that allow you to retrieve table data without scanning the entire table. An index can be unique or non-unique.

Microsoft SQL Server creates indexes as B-Trees, which are a series of pointers mapping index pages to their underlying data pages. As tables and, therefore, indexes grow, the number of levels in the B-Tree increases. The B-Tree of a clustered index is shorter than that of a nonclustered index because the leaf level of a clustered index is the data page.

A sound indexing strategy is critical to overall system performance. One pitfall to avoid is placing many indexes on a table without regard for their cumulative cost. Remember that indexes improve read but slow write performance because Microsoft SQL Server must update more information in the system catalog. Consequently, extra indexes can actually slow overall performance if data modification occurs frequently on the table. To determine the efficacy of indexes, you should tune your queries using SHOWPLAN and IO STATISTICS and analyze the selectivity of indexes using DBCC SHOW_STATISTICS.

Rapid SQL separates system indexes from user-defined indexes in the Datasource Navigator to ensure that system indexes are not accidentally altered or dropped.

O RACLE I NDEXES

Oracle offers two types of indexes. The table below describes these indexes:

Index

Table

Cluster

Description

A table index is defined on an individual table.

A cluster index is defined on a set of tables physically stored together in a cluster. In an Oracle database, both table and cluster indexes use a B-tree structure.

RAPID SQL 8.6/XE5 USER GUIDE 206

SUPPORTED OBJECTS > SUPPORTED OBJECTS

The indexing strategy, particularly with large, active tables, is critical to overall system performance. The optimal definition and number of indexes for a given table is determined by the mix of access paths to that table performing insert, update, delete and select operations.

For example, adding or changing an index can speed up your selects but slow your inserts, updates and deletes. Careful tuning and testing helps you achieve the best overall performance.

TIP: Indexes generally improve read operations in a database, but you should not place too many indexes on some tables. Since Oracle must maintain each index along with its referenced table, placing too many indexes on a table that is the object of much insert, update, and delete activity, can actually degrade performance.

Even when an index exists on a table, the way a SQL statement is coded can actually disallow the use of the index. To prevent this from happening, follow these rules of thumb:

• Try not to use SQL statements that include the NOT IN, NOT LIKE, <>, IS NULL operators because they typically suppress the use of indexes.

• When referencing concatenated indexes with queries, be sure the leading column in the index is used. If it isn't, the index won't be used at all.

• Avoid using functions in WHERE predicates.

If you must use functions, investigate the use of function-based indexes.

I NDEX P ARTITIONS

Index partitions are similar to table partitions. There ar e three types of partitioned indexes that

Oracle supports:

1 Local prefixed

2 Local nonprefixed

3 Global prefixed

NOTE: An index cannot be partitioned if it is a cluster index or if the index is defined on a clustered table.

Local prefixed and nonprefixed indexes

A local partitioned index has keys that refer to rows in a single table partition. A local partitioned index is automatically partitioned to mirror the underlying table. The number of partitions or subpartitions and the partition bounds for the partitioned index correspond with the partitions on the table. Oracle maintains this correspondence. If the table partitions are altered, the index partitions are altered accordingly.

A local partitioned index is prefixed if it is partitioned on the same column as the underlying table. The local partitioned index is nonprefixed if it is partitioned on a different column.

Global prefixed indexes

207 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

A global partitioned index can refer to rows in more than one table partition or subpartition.

Global partitioned indexes are more difficult to manage than local partitioned indexes because any change in the underlying table partition affects all partitions in a global index. As a result, there is increased partition maintenance.

NOTE: A global index can only be range partitioned but it can be defined on any kind of partitioned table.

IBM DB2 FOR OS/390 AND Z /OS I NDEXES

IBM DB2 for OS/390 and z/OS offers two types of indexes:

• Unique

• Non-Unique

Unique Indexes guarantee that no two rows of a table have duplicate values in the columns that define the index.

Non-Unique indexes let table rows have duplicate values in the columns that define the indexes.

S YBASE ASE I NDEXES

Sybase ASE offers two types of indexes: clustered and non-clustered. Clustered indexes physically sort table data to match their logical order. Non-clustered indexes only order the table data logically. In a database, an index lets you speed queries by setting pointers that let you retrieve table data without scanning the entire table. An index can be unique or non-unique.

Sybase ASE creates indexes as B-Trees, which are a series of pointers mapping index pages to their underlying data pages. As tables and, therefore, indexes grow, the number of levels in the

B-Tree increases. The B-Tree of a clustered index is shorter than that of a non-clustered index because the leaf level of a clustered index is the data page.

A sound indexing strategy is critical to overall system performance. One pitfall to avoid is placing many indexes on a table without regard for their cumulative cost. Remember that indexes improve read but slow write performance because Sybase ASE must update more information in the system catalog. Consequently, extra indexes can actually slow overall performance if data modification occurs frequently on the table. To determine the efficacy of indexes, you should tune your queries using SHOWPLAN and IO STATISTICS and analyze the selectivity of indexes using DBCC SHOW_STATISTICS.

Rapid SQL separates system indexes from user-defined indexes in the Datasource Navigator to ensure that system indexes are not accidentally altered or dropped.

I NSTANCE

NOTE: This object is support for IBM DB2 and Oracle.

RAPID SQL 8.6/XE5 USER GUIDE 208

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Rapid SQL places Instance as the first level of information under the Datasource node in the

Datasource Navigator. Instance includes:

• DB Manager Configuration

• Data sources

Available Functionality

Rapid SQL offers the following functionality for this object:

Databases Wizard

(DB2 LUW)

Quiesce (Database)

Unquiesce

J AVA C LASSES

The Java Classes contain compiled Java code. Java Classes are made up of a group of data items, with associated functions that perform operations. The data items are called fields or variables; the functions are referred to as methods.

TIP: Oracle is shipped with a JVM (Java Virtual Machine). The JVM provided by Oracle sits atop the Oracle RDBMS and interacts directly with the RDBMS instead of the operating system.

Platform availability



Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Compile

Create Synonym

Drop Java

Load Java

Report

J AVA R ESOURCES

NOTE: This object is supported by Oracle only.

The Java Resources node offers support for browsing Java resources.

209 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability



Available Functionality

• Drop

J AVA S OURCES

Java Sources contain the uncompiled Java source code.

TIP: Oracle is shipped with a JVM (Java Virtual Machine). The JVM provided by Oracle sits atop the Oracle RDBMS and interacts directly with the RDBMS instead of the operating system.

Platform availability



Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Compile

Report

Drop

Extract

Load Java

Rename

J OBS (O RACLE )

The following summarizes support for this object type, making up a combination of a schedule a program, and arguments required by the program.

RAPID SQL 8.6/XE5 USER GUIDE 210

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability



Creating and editing

• " Jobs wizard (Oracle) " on page 388 and "

Jobs Editor (Oracle) " on page 542

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Enable/Disable

(Oracle Jobs)

Extract

Run Job (Oracle

Jobs)

Stop Job

Related Information

See details for the following object types

• " Chains " on page 185

• " Programs " on page 227

• " Schedules " on page 231

J OB Q UEUES

Job Queues are built-in mechanisms that let you schedule a variety of SQL-based or commandline driven tasks.

Platform availability



Creating and editing

• " Oracle Job Queue Wizard (Oracle) " on page 387 and "

Job Queue Editor (Oracle) " on page 542

211 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Disable Job

Drop

Enable Job (Job

Queue)

Extract

Report

Run Job (job queues)

J OIN I NDEXES

Rapid SQL offers limited support for these multi-table indexes.

Platform availability

 

Creating and editing

Rapid SQL does not offer support for creation or editing of objects this type.

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract









L IBRARIES

Libraries are an object type that represent a call to an operating system shared library. After the call is made, libraries can be used by SQL or PL/SQL to link to external procedures or functions.

Libraries are only to be used on operating systems that support shared libraries and dynamic linking. Libraries serve as pointers or aliases to physical operating system shared library files and do not have existence as a physical object on their own, rather they rely on the physical existence of the files in the external operating system library to which they refer. To access the function or procedures stored in the library, you need execute privileges at the operating system level where the shared library resides.

RAPID SQL 8.6/XE5 USER GUIDE 212

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability



Creating and editing

• " Libraries Wizard (Oracle) " on page 389 and "

Libraries Editor (Oracle) " on page 543

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Rename

Report

L OGINS

Logins let you access your account. Your login account controls access to the server and all of the databases within it. Only the System Administrator or System Security Officer can create logins. Once you can log into a server, you need additional privileges to access user databases.

Specifically, each database owner adds the login as a user or alias to the database.

Platform availability

 

Creating and editing

• " Logins Wizard (SQL Server) " on page 345 and "

Logins Editor (SQL Server) " on page 517

• " Logins Wizard (Sybase ASE) " on page 436 and "

Logins Editor (Sybase ASE) " on page 572

213 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Add/Modify Login Trigger

Bind To Temporary Database

Change Password

Create Like

Drop

Drop Login Trigger

Extract

Report

Unbind From Temporary

Database

























Explorer Details

Depending on the DBMS platform, the icon associated with a login differs according to the login’s locked or unlocked state, when viewed in the Explorer.

DBMS Platform

SQL SVR

or

SYB ASE

Icon Login Accont State

Locked

Unlocked

DBMS-specific notes

Microsoft SQL Server Logins

Sybase ASE Logins

M ICROSOFT SQL S ERVER L OGINS

Logins let you access your account. Your login account controls access to the server and all of the databases within it. Only the System Administrator or System Security Officer can create logins. Once you can log into a server, you need additional privileges to access user databases.

Specifically, each database owner adds the login as a user or alias to the database.

RAPID SQL 8.6/XE5 USER GUIDE 214

SUPPORTED OBJECTS > SUPPORTED OBJECTS

S YBASE ASE L OGINS

Logins let you access your account. Your login account controls access to the server and all of the databases within it. Only the System Administrator or System Security Officer can create logins. Once you can log into a server, you need additional privileges to access user databases.

Specifically, each database owner adds the login as a user or alias to the database.

M ACROS

Rapid SQL provides support for macros, sequences of SQL statements that when called, may return one or more rows of data.

Platform availability



Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Object Properties

Rename

M ATERIALIZED Q UERY T ABLES

A materialized query table is a table whose definition is based on the result of a query. The materialized query table typically contains pre-computed results based on the data existing in the table or tables that its definition is based on. If the SQL compiler determines that a query will run more efficiently against a materialized query table than the base table or tables, the query quickly executes against the materialized query table.

215 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability



Creating and editing

• " Materialized Query Tables Wizard (DB2 LUW) " on page 267 and "

Materialized Query

Tables Editor (IBM DB2 LUW) " on page 466

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Build Query

Drop

Create Alias

Drop Materialized

Query Table

Reorganize /Reorg

Report

Transfer Ownership

Update Statistics

Create Like

Extract

Schema

Create View

Lock

Select * From

Describe

Refresh Table

Set Integrity

M ATERIALIZED V IEWS

NOTE: This object is supported by Oracle only.

Materialized views are used to dynamically copy data between distributed databases. There are two types of materialized views:

• Complex

• Simple

Complex materialized views copy part of a master table or data from more than one master table. Simple materialized views directly copy a single table. You cannot directly update the underlying data contained in materialized views.

RAPID SQL 8.6/XE5 USER GUIDE 216

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability

8.1 ^

Creating and editing

• " Materialized Views Wizard (Oracle) " on page 390 and "

Materialized Views Editor (Oracle) " on page 543

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Compile

Report

Create Synonym

Shrink

Drop

Extract

Rename

M ATERIALIZED V IEW L OGS

Materialized View logs are tables that maintain a history of modifications to the master table, and they are used to refresh simple materialized views. When you create a materialized view log,

Oracle automatically creates a log table to track data changes in the master table and a log trigger to maintain the data in the log table.

Platform availability

8.1 ^

Creating and editing

• " Materialized View Logs Wizard (Oracle) " on page 395 and "

Materialized View Logs Editor

(Oracle) " on page 545

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Report

Shrink

217 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

O UTLINES

Outlines are a set of results for the execution plan generation of a particular SQL statement.

When you create an outline, plan stability examines the optimization results using the same data used to generate the execution plan. That is, Oracle uses the input to the execution plan to generate an outline, and not the execution plan itself.

Platform availability



Creating and editing

• " Outlines Wizard (Oracle) " on page 397 and "

Outlines Editor (Oracle) " on page 546

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Change Category

Extract

Drop

Reassign By

Category

Drop By Category

Rebuild Outlines

Drop Unused

Rename

Disable Keys

Report

P ACKAGES

NOTE: This object is supported by IBM DB2 for Linux, Unix, and Windows, IBM DB2 for OS/

390 and z/OS, and Oracle only.

Packages contain all the information needed to process SQL statements from a single source file. You can use packages to process and call batches of SQL. Depending on the platform, packages can include:

• Procedures

• Functions

• Types

• Variables

• Constants

• Exceptions

• Cursors

RAPID SQL 8.6/XE5 USER GUIDE 218

SUPPORTED OBJECTS > SUPPORTED OBJECTS

• Subprograms

Packages offer a number of important advantages over using standalone procedures and functions, including the ability to:

• Modify package objects without recompiling dependent database objects.

• Declare global variables and cursors that can be shared within the package.

• Grant privileges more efficiently.

• Load multiple package objects into memory at once.

Packages usually have two parts: a header or specification and a body, although sometimes the body is unnecessary. The package header declares the members of the package while the body details the logic underlying each of the package components.

NOTE: Rapid SQL splits out package headers and package bodies in the Datasource

Navigator; however, you create both a package header and body from the packages node.

Platform availability

  

Creating and editing

• " Packages Editor (IBM DB2 LUW) " on page 467

• " Packages Editor (IBM DB2 Z/OS) " on page 485

• " Packages Wizard (Oracle) " on page 397 and "

Packages Editor (Oracle) " on page 546

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Bind Package

Compile

Create Synonym

Drop

Extract

219













RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Flush Cache

Free (Packages)

Rebind Packages

Report











 

P ACKAGE B ODIES

Package Bodies implement the package specification in that the package body includes the definition of every cursor and subprogram declared in the package specification.

Platform availability



Creating and editing

While Package Bodies are listed as a separate object in the Datasource Navigator, they are created on the Packages Editor in conjunction with Packages. For more information, see

" Package Bodies Editor (Oracle) " on page 546.

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Compile

Create Synonym

Drop

Extract

Report

P ARTITION F UNCTIONS

Partition functions are functions that maps the rows of a table or index into partitions based on the values of a specified column. Partition functions are referenced in partition scheme definitions in partitioning indexes or tables.

RAPID SQL 8.6/XE5 USER GUIDE 220

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability



Creating and editing

See the following topics:

• " Partition Functions Wizard (SQL Server) " on page 347 and "

Partition Functions Editor (SQL

Server) " on page 518

Available Functionality

Rapid SQL offers the following functionality for this object type:

Drop

Extract

Report

For related information, see the following topics:

• " Partition Schemes " on page 221 and "

Partition Schemes Wizard (SQL Server) " on page 348

• " Indexes Wizard (SQL Server) " on page 343

• " Tables Wizard (SQL Server) " on page 359

P ARTITION S CHEMES

Partition schemes map the partitions of a partitioned table or index to filegroups. The number and domain of the partitions for a partitioned table or index are specified in a partition function definition. Partition scheme definitions are referenced when partitioning indexes or tables.

Platform availability



Creating and editing

See the following topics:

• " Partition Schemes Wizard (SQL Server) " on page 348 and "

Partition Schemes Editor (SQL

Server) " on page 519

221 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Available Functionality

Rapid SQL offers the following functionality for this object type:

Drop

Extract

Next Used Filegroup

Report

For related information, see the following topics:

• " Partition Functions " on page 220 and "

Partition Functions (SQL Server) - Properties " on page 348

• " Indexes Wizard (SQL Server) " on page 343

• " Tables Wizard (SQL Server) " on page 359

P LANS

A Plan is an executable application created in the bind process. It can include one or more packages or debris.

Platform availability



Creating and editing

• " Plans Wizard (DB2 Z/OS) " on page 294 and "

Plans Editor (IBM DB2 Z/OS) " on page 486

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Free Plan

Rebind Plans

Report

P RIMARY K EYS

NOTE: This object is supported by all platforms.

Primary Keys are a set of table columns that can uniquely identify every row of a table.

RAPID SQL 8.6/XE5 USER GUIDE 222

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability

        

Creating and editing

• " Primary Keys Wizard (DB2 LUW) " on page 270 and "

Primary Keys Editor (IBM DB2 LUW) " on page 467

• " Primary Keys Wizard (DB2 Z/OS) " on page 296 and "

Primary Keys Editor (IBM DB2 Z/OS) " on page 487

• " Primary Keys Wizard (ITB/FBD) " on page 321 and "

Primary Keys editor (InterBase/

Firebird) " on page 502

• " Indexes, Primary Keys, or Unique Keys wizard (MySQL) " on page 371 and "

Indexes, Primary

Keys, and Unique Keys editors (MySQL) " on page 533

• " Primary Keys Wizard (Oracle) " on page 398 and "

Primary Keys Editor (Oracle) " on page 547

• " Primary Keys Wizard (SQL Server) " on page 349 and "

Primary Keys Editor (SQL Server) " on page 519

• " Primary Keys Wizard (Sybase ASE) " on page 439 and "

Primary Keys Editor (Sybase ASE) " on page 572

NOTE: Creation and editing of objects of this type is not supported against Sybase IQ datasources.

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Allocate Extent

Analyze

Change Status (check constraints)

Deallocate Unused Space

Disable Index

Drop

Extract

Rebuild Index





































 







223 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Rename

Reorganize /Reorg

Report































P ROCEDURES

Procedures are a reusable block of PL/SQL, stored in the database, that applications can call.

Procedures streamline code development, debugging, and maintenance by being reusable.

Procedures enhance database security by letting you write procedures granting users execution privileges to tables rather than letting them access tables directly.

Platform availability

       

Creating and editing

• " Procedures Wizard (DB2 LUW) " on page 271 and "

Procedures Editor (IBM DB2 LUW) " on page 468

• " Procedures Wizard (DB2 Z/OS) " on page 298 and "

Procedures Editor (IBM DB2 Z/OS) " on page 488

• " Procedures Wizard (ITB/FBD) " on page 322 and "

Procedures editor (InterBase/Firebird) " on page 503

• " Procedures Wizard (Oracle) " on page 400 and "

Procedures Editor (Oracle) " on page 549

• " Procedures Wizard (SQL Server) " on page 350 and "

Procedures Editor (SQL Server) " on page 521

• " Procedures Wizard (Sybase ASE) " on page 440 and "

Procedures Editor (Sybase ASE) " on page 573

NOTE: Creation and editing of objects of this type is not supported against Sybase IQ datasources.

RAPID SQL 8.6/XE5 USER GUIDE 224

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Build

Compile

Create Synonym

Describe

Drop

Execute

Extract

Hide Text

Object Properties

Rename

Report

Transfer Ownership













































































For more specific information, see the following topics:

DB2 z/OS Procedures

Sybase ASE Procedures

Executing Statements Before and After Procedure or Function Creation

















DB2 Z /OS P ROCEDURES

Only IBM DB2 for OS/390 and z/OS SQL stored procedures created by Rapid SQL, or IBM's

Stored Procedure Builder can be retrieved by Rapid SQL.

225 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

S YBASE ASE P ROCEDURES

Procedures perform procedural logic in your Sybase ASE applications. They are batches of SQL statements that are compiled and stored in the system catalog. Procedures execute faster than embedded SQL statements because they are pre-compiled and have execution plans for use by the optimizer. When you create a procedure, Sybase ASE builds a query tree, which it stores in a system table. When you execute a procedure for the first time, Sybase ASE loads it from the system table, compiles, and optimizes it. Sybase ASE places the resulting query plan in the procedure cache where it remains on a most recently used basis. In addition to better performance, procedures yield other benefits, including easier code maintenance, additional security and reduced network traffic.

NOTE: Rapid SQL also supports extended procedures. For details, see

Extended Procedures .

E XECUTING S TATEMENTS B EFORE AND A FTER P ROCEDURE OR F UNCTION C REATION

With respect to functions and stored procedures, it can be necessary to have statements executed before and after creation of the procedure or function. This can be useful for example, if you need to create or drop temporary tables used by the function or procedure. Rapid SQL supports the use of two tag pairs, ETStart and ETEnd, that let you embed statements in the first comment block of a stored procedure or function. The following shows the expected syntax: create procedure dbo.

procname (@a numeric) as

/*

<ETStart> SQL Statement </ETStart>

<ETEnd> SQL Statement </ETEnd>

*/ begin

...

P ROFILES

Profiles are a mechanism for allocating system and database resources to users. Profiles let you specify limits on:

• Number of sessions

• CPU time

• Connect time

• Idle time

• Logical reads and space in the SGA's shared pool

You can assign profiles to one or more users. The database's default profile and all of its resource limits are assigned to users without a specific profile assignment.

RAPID SQL 8.6/XE5 USER GUIDE 226

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability



Creating and editing

• " Profiles Wizard (Oracle) " on page 401 and "

Profiles Editor (Oracle) " on page 549

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Report

P ROGRAMS

The following summarizes support for this object type, making up a collection of metadata about a particular task.

Platform availability



Creating and editing

• " Programs wizard (Oracle) " on page 403 and "

Programs Editor (Oracle) " on page 550

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Enable/Disable (Oracle Jobs)

Extract

Related Information

See details for the following object types

• " Chains " on page 185

227 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

• " Jobs (Oracle) " on page 210

• " Schedules " on page 231

R ECYCLE B IN

Rapid SQL provides basic support for Oracle’s Recycle Bin feature. When enabled, dropped tables, indexes, and associated objects are stored in the Recycle Bin until explicitly purged.

Platform availability



Creating and editing

The Recycle Bin cannot be created or edited.

Object actions/operations supported

On the Database Navigator, expanding the Recycle Bin node has the same effect as issuing a

SHOW RECYCLEBIN statement. The contents of the Recycle Bin are displayed.

Related actions include:

Enable Recycle Bin

Flashback Recycle Bin Entry

Purge Recycle Bin

Purge Recycle Bin Entry

NOTE: Select * From functionality is supported as a right-click option for individual tables in

the Recycle Bin. For details on this feature, see " Select * From " on page 696.

R OLES

Roles are sets of user privileges you associate with access to objects within a database. Roles streamline the process of granting permissions. You can use roles to grant sets of permissions and privileges to users and groups.

RAPID SQL 8.6/XE5 USER GUIDE 228

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability

  

Creating and editing

• " Roles Wizard (ITB/FBD) " on page 323 and "

Roles editor (InterBase/Firebird) " on page 504

• " Roles Wizard (SQL Server) " on page 352 and "

Roles Editor (SQL Server) " on page 521

• " Roles Wizard (Oracle) " on page 404 and "

Roles Editor (Oracle) " on page 551

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Report

Role Activation

For related information

Microsoft SQL Server Roles

Oracle Roles























M ICROSOFT SQL S ERVER R OLES

Roles let you manage permissions for users to perform a set of activities based on job functions.

Roles are a mechanism for streamlining the assignment of object and system privileges to multiple users. Instead of granting sets of privileges to individual users, you can create a role, grant system and object privileges to that role, and then grant that role to all the users who should share the same privileges. You can grant one or more roles to the same user. Therefore, if you need to change the permissions for a certain role you can do so, and not have to grant or revoke the permissions for each individual user.

229 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

O RACLE R OLES

Roles are a mechanism for streamlining the assignment of object and system privileges to multiple users. Instead of granting sets of privileges to individual users, you can create a role, grant system and object privileges to that role, then simply grant that role to all the users who should share the same privileges. You can grant one or more roles to the same user.

DBMS-specific functionality

• For information on activating and deactivating roles for the current login in the current

session, see " Role Activation " on page 694.

R ULES

Rules promote data integrity by allowing you to validate the values supplied to a table column.

They are reusable objects that you can bind to table columns or user datatypes. For example, you can create a rule, bind it to a column in a table and have it specify acceptable values that can be inserted into that column.

Platform availability

 

Creating and editing

• " Rules Wizard (SQL Server) " on page 352 and "

Rules Editor (SQL Server) " on page 522

• " Rules Wizard (Sybase ASE) " on page 441 and "

Rules Editor (Sybase ASE) " on page 574

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Hide Text

Rename

Report

RAPID SQL 8.6/XE5 USER GUIDE



















230

SUPPORTED OBJECTS > SUPPORTED OBJECTS

S CHEDULES

The following summarizes support for the object type that implements a schedule defining when a job should be run or when a window should open.

Platform availability



Creating and editing

• " Schedules Wizard (Oracle) " on page 406 and "

Schedules Editor (Oracle) " on page 553

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Related Information

See details for the following object types

• " Chains " on page 185

• " Jobs (Oracle) " on page 210

• " Programs " on page 227

S CHEMA

A Schema is a container of objects that can be owned by any user.

NOTE: The Schema nodes available under DB2 LUW, DB2 z/OS, and Oracle datasources do not own a specific set of objects. They are simply an organizational container for all database objects for a datasource or database.

231 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability



Creating and editing

• " Schema Wizard (SQL Server) " on page 353 and "

Schemas Editor (SQL Server) " on page 522

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Report

S EGMENTS

NOTE: This object is supported by Sybase ASE only.

Segments are a mechanism for placing tables and indexes on specific logical partitions. You create segments on one or more fragments of a database. You can map segments to specific database fragments, which in turn reside on specific hard disks; and, mapping segments lets you increase i/o throughput by placing intensively used tables and indexes on different physical devices. You can allocate tables and indexes to segments by including placement statements at the end of CREATE TABLE or CREATE INDEX statements.

Platform availability



Creating and editing

• " Segment Wizard (Sybase ASE) " on page 442 and "

Segments Editor (Sybase ASE) " on page 574

RAPID SQL 8.6/XE5 USER GUIDE 232

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Report

S EQUENCES

Sequences are programmable database objects that generate a definable sequence of values.

Platform availability

  

Creating and editing

• " Sequences Wizard (DB2 LUW) " on page 273 and "

Sequences Editor (IBM DB2 LUW) " on page 469

• " Sequences Wizard (Oracle) " on page 407 and "

Sequences Editor (Oracle) " on page 553

• " Sequences Wizard (SQL Server) " on page 354 and "

Sequences Editor (SQL Server) " on page 523

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Create Alias

Create Synonym

Drop

Extract

Rename

Report

Restart Sequence(s)

Run Job (job queues)













233





















RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Transfer Ownership



S HADOWS

Rapid SQL provides support for shadows, letting you create one or more in-sync copies of the database stored on secondary storage devices.

Platform availability



Creating and editing

See " Shadows wizard (ITB/FBD) " on page 323 and "

Shadows editor (InterBase/Firebird) " on page 505.

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Rename

Report

S TRUCTURED T YPES

Structured types define an abstract data type or object composed of a collection of similar types of data. For example, create an structured type that defines a full address rather than the pieces of an address, such as city, state and postal code. An structured type stores the pieces of an address in a single type, storing them in the same location and allowing the full address to be accessed and manipulated as single unit rather than multiple units.

Structured types are useful for ensuring uniformity and consistency as they are defined as single encapsulated entity that can be reused in other structured types and objects. They also offer flexibility by allowing for the creation of objects that represent real-world situations which is limited in relational objects.

RAPID SQL 8.6/XE5 USER GUIDE 234

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability



Creating and editing

• " Structured Types Wizard (DB2 LUW) " on page 274 and "

Structured Types Editor (IBM DB2

LUW) " on page 470

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Report

Transfer Ownership

S YMMETRIC K EYS

Symmetric keys, in addition to asymmetric keys and certificates, provide Rapid SQL support for

Public Key Encryption. Symmetric keys consist of a private key and corresponding public key and are used to secure symmetric keys.

Platform availability



Creating and editing

• " Symmetric Keys Wizard (SQL Server) " on page 355 and "

Symmetric Key Editor (SQL

Server) " on page 523

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Report

235 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Related information

• " Certificates " on page 184

• " Asymmetric Keys " on page 183

S YNONYMS

The function and usage of synonyms differs by DBMS platform

DB2 z/OS

Oracle

SQL Server

An alternate name for an existing table, view, or alias.

An alternative name for a table, view, sequence, procedure, function, package, materialized view, java class, type, or another synonym.

A single-part name used to reference multi-part names in SQL statements. While synonyms can be created for functions, procedures, tables, and views, consult Microsoft

SQL Server documentation for restrictions on function and procedure support. For more information, see

Accessing Third Party Documentation .

Platform availability

  

Creating and editing

• " Synonyms Wizard (DB2 Z/OS) " on page 301 and "

Synonyms Editor (IBM DB2 Z/OS) " on page 490

• " Synonyms Wizard (Oracle) " on page 409 and "

Synonyms Editor (Oracle) " on page 554

• " Synonyms Wizard (SQL Server) " on page 358 and "

Synonyms Editor (SQL Server) " on page 524

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Create Synonym

Describe

Drop

RAPID SQL 8.6/XE5 USER GUIDE







 

236

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Extract

Rename

Report

















S YSTEM I NDEXES

On some DBMS platforms, Rapid SQL offers system indexes as listed separately from standard indexes.

Platform availability

  

Creating, Editing, and Object Actions Supported

Against SQL Server and Sybase ASE datasources, functionality offered for system indexes is

identical to that offered for standard indexes. For details, see " Indexes " on page 204.

Against Sybase IQ datasources, Rapid SQL does not offer support for creation or editing against this object type. The followng object actions are available:

Drop

Extract

S YSTEM T ABLES

On some DBMS platforms, Rapid SQL offers system tables as listed separately from standard tables.

237 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability

  

Creating, Editing, and Object Actions Supported

Against SQL Server and Sybase ASE datasources, functionality offered for system indexes is

identical to that offered for standard indexes. For details, see " Indexes " on page 204.

Against Sybase IQ datasources, Rapid SQL does not offer support for creation or editing against this object type. The followng object actions are available:

Drop

Extract

Object Properties

Select * From

S YSTEM T RIGGERS

Against Sybase IQ datasources, Rapid SQL offers system triggers as listed separately from standard triggers.

Platform availability



Creating, Editing, and Object Actions Supported

Rapid SQL does not offer support for creation, editing, and object actions against this object type.

RAPID SQL 8.6/XE5 USER GUIDE 238

SUPPORTED OBJECTS > SUPPORTED OBJECTS

T ABLES

Tables are a the basic unit of data storage. Tables store all the data accessible to users in rows and columns. Each column has a name, datatype and other associated properties. After you define a table, users can insert valid data into the table, which you can later query, update and delete.

NOTE: Rapid SQL separates system tables from user-defined tables in the Navigator to ensure that system tables are not accidentally altered or dropped.

Platform availability

       

Creating and editing

• " Tables Wizard (DB2 LUW) " on page 276 and "

Tables Editor (IBM DB2 LUW) " on page 472

• " Tables Wizard (DB2 Z/OS) " on page 301 and "

Tables Editor (IBM DB2 Z/OS) " on page 490

• " Tables Wizard (ITB/FBD) " on page 325 and "

Tables editor (InterBase/Firebird) " on page 505

• " Tables wizard (MySQL) " on page 372 and "

Tables editor (MySQL) " on page 533

• " Tables Wizard (Oracle) " on page 410 and "

Tables Editor (Oracle) " on page 554

• " Tables Wizard (SQL Server) " on page 359 and "

Tables Editor (SQL Server) " on page 524

• " Tables Wizard (Sybase ASE) " on page 443 and "

Tables Editor (Sybase ASE) " on page 575

NOTE: Creation and editing of objects of this type is not supported against Sybase IQ datasources.

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Allocate Extent

Analyze

Analyze Tables

Build Query

239

  









   

RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Change Access Status

Check Tables

Checksum Tables

Convert Tables

Create Alias

Create Clone

Create Insert Statements

Create Like

Create Synonym

Create View

DBCC

Deallocate Unused Space

Delete Statistics

Describe

Disable Keys

Disable/Enable Triggers

Drop

Drop Clone

Drop Unused Columns

Edit Data

Enable/Disable Filetable(s)

Enable Keys

Estimate Size

Exchange Data With Clone

Extract

Extract Data as XML

Flashback Table

Flush Tables

Hide Text

Import Data From File

Lock

Move Table

Object Properties

Optimize Tables

Place

RAPID SQL 8.6/XE5 USER GUIDE











































 

 













 

 











































 













































 





 





 



240

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Rebuild Table

Recompile

Rename

Reorganize /Reorg

Repair Tables

Report

Schema

Select * From

Set Integrity

Shrink

Transfer Ownership

Truncate

Update Statistics



































































































241 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

DBMS platform-specific notes

MySQL MySQL servers can store tables in multiple formats, including MyISAM and InnoDB.

MyISAM tables (ISAM is the acronym for indexed sequential access method) are used most often for read operations. The read operation is very fast, but you cannot include any referential integrity, such as a foreign key. Also, MyISAM tables only issue table-level locks. InnoDB tables, on the other hand, do permit transactions and foreign key constraints. InnoDB tables also lock data at the row level, which is appropriate for high transaction tables. Additional table types available are MERGE, MEMORY, FEDERATED, and ARCHIVE among others.

For a complete discussion of table types, go to the MySQL documentation of table and engine types. For more information, see

Accessing Third Party Documentation

.

T ABLESPACES

Tablespaces are storage structures that act as partitions for the database. You can create a tablespace to store table data and other objects related to table performance such as indexes or large object data. Tablespaces are used to manage large complex databases. Once you have created a tablespace, you can place objects on it.

TIP: Create separate tablespaces for your tables and indexes and put each tablespace on a different drive or file system. Segmenting tables and their corresponding indexes in this manner helps eliminate I/O contention at the server level.

NOTE: IBM DB2 for Linux, Unix, and Windows lets you assign a location for table or index data directly to physical storage devices. Each tablespace can also be broken down into a collection of containers which are the actual physical storage files or devices. You can then spread the data or database objects across multiple file systems, thereby giving you the necessary space for objects that require it.

Once you have created a tablespace, you can place individual tables and indexes on it. Because tablespaces map to physical drives, you can improve i/o performance by placing tables and their indexes on physically separated table spaces.

Platform availability

 

Creating and editing

• " Tablespaces Wizard (DB2 LUW) " on page 280 and "

Tablespaces Editor (IBM DB2 LUW) " on page 475

• " Tablespaces Wizard (Oracle) " on page 417 and "

Tablespaces Editor (Oracle) " on page 557

RAPID SQL 8.6/XE5 USER GUIDE 242

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Change Status

Coalesce

Create Alias

Drop

Extract

Lower High Water Mark

Rebalance

Rename

Reorganize /Reorg

Report

Set Default

Set UNDO

Switch Online

Transfer Ownership











































T RIGGERS

Triggers are a special type of procedure that automatically fire when defined data modification operations (insert, update, or delete) occur on a target table or view. Trigger support in Rapid

SQL differs by DBMS type, but in general offers options such as:

• Standard INSERT/DELETE/UPDATE event support

• BEFORE/AFTER timing control

• Row/statement trigger type control

• INSTEAD OF triggers

• Compound triggers

• Enabled/disabled status options

243 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability

      

Creating and editing

• " Triggers Wizard (DB2 LUW) " on page 281 and "

Triggers Editor (IBM DB2 LUW) " on page 476

• " Triggers Wizard (DB2 Z/OS) " on page 306 and "

Triggers Editor (IBM DB2 Z/OS) " on page 493

• " Triggers Wizard (ITB/FBD) " on page 327 and "

Triggers editor (InterBase/Firebird) " on page 506

• " Triggers Wizard (Oracle) " on page 421 and "

Triggers Editor (Oracle) " on page 559

• " Triggers Wizard (SQL Server) " on page 362 and "

Triggers Editor (SQL Server) " on page 526

• " Triggers Wizard (Sybase ASE) " on page 445 and "

Triggers Editor (Sybase ASE) " on page 578

NOTE: Creation and editing of objects of this type is not supported against Sybase IQ datasources.

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Change Status

Compile

Drop

Extract

Hide Text

Report

Rename

Transfer Ownership



























 





















RAPID SQL 8.6/XE5 USER GUIDE 244

SUPPORTED OBJECTS > SUPPORTED OBJECTS

T YPES

Types define an abstract data type or object composed of a collection of similar types of data.

For example, create an object type that defines a full address rather than the pieces of an address, such as city, state and postal code. An object type stores the pieces of an address in a single type, storing them in the same location and allowing the full address to be accessed and manipulated as single unit rather than multiple units.

Object types are useful for ensuring uniformity and consistency as they are defined as single encapsulated entity that can be reused in other object types and objects. They also offer flexibility by allowing for the creation of objects that represent real-world situations which is limited in relational objects.

You can choose to create a type that is incomplete, complete, a VARRAY, or a nested table or any combination of the above. An incomplete type specifies no attributes and can be used for circular references such as person - female. It lets the type be referenced before it is complete.

The VARRAY type can be used to store small sets of related data. For example, if you have ten offices (each one with a different description) at a particular division in your company, you could create a VARRAY of 10 to hold the details of these offices. The values for a VARRAY type must be fixed and known and small values as they are stored in RAW format. A nested table type can be used when data is repeated for the same entity an unknown number of times and storage is a concern.

Platform availability



Creating and editing

• " Object Types Wizard (Oracle) " on page 423 and "

Types Editor (Oracle) " on page 561

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Compile

Drop

Extract

Report

T YPE B ODIES

Type Bodies implement object type specification by containing the definition of every cursor and subprogram declared in the object type specification. While Type Bodies are listed as a separate object in the Datasource Navigator, they are created on the Types editor in conjunction with Types.

245 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability



Creating and editing

While listed as separate objects in the Datasource Navigator, type bodies are created and edited on the Body

tab of the Types Editor. For details, see " Types Editor (Oracle) " on page 561.

Object actions/operations supported

The following object actions are available for this object type. For an introduction to object

actions and details on usage of specific actions, see " Object actions " on page 584.

Compile

Drop

Extract

Report

U NIQUE K EYS

Unique keys can enforce logical keys that are not chosen as the primary key. They enforce uniqueness for specified columns in a table.

Platform availability

       

Creating and editing

• " Unique Keys Wizard (DB2 LUW) " on page 282 and "

Unique Keys Editor (IBM DB2 LUW) " on page 476

• " Unique Keys Wizard (DB2 Z/OS) " on page 307 and "

Unique Keys Editor (IBM DB2 Z/OS) " on page 494

• " Unique Keys Wizard (ITB/FBD) " on page 328 and "

Unique Keys editor (InterBase/Firebird) " on page 507

• " Indexes, Primary Keys, or Unique Keys wizard (MySQL) " on page 371 and "

Indexes, Primary

Keys, and Unique Keys editors (MySQL) " on page 533

• " Unique Keys Wizard (Oracle) " on page 423 and "

Unique Keys Editor (Oracle) " on page 561

RAPID SQL 8.6/XE5 USER GUIDE 246

SUPPORTED OBJECTS > SUPPORTED OBJECTS

• " Unique Keys Wizard (SQL Server) " on page 364 and "

Unique Keys Editor (SQL Server) " on page 527

• " Unique Keys Wizard (Sybase ASE) " on page 446 and "

Unique Keys Editor (Sybase ASE) " on page 578

NOTE: Creation and editing of objects of this type is not supported against Sybase IQ datasources.

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Allocate Extent

Analyze

Change Status

Deallocate Unused Space

Disable Index

Drop

Extract

Rebuild Index

Rename

Reorganize /Reorg

Report

Transfer Ownership













































































U SER D ATATYPES

User-defined datatypes promote domain consistency by streamlining the definition of commonly used table columns in a database. You can build a customized datatype from system datatypes and bind defaults and rules to it to enhance integrity. When you reference the user datatype in a column, the column assumes all of the properties of the user datatype.

247 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability

    

Creating and editing

• " User Datatypes (DB2 LUW) " on page 283 and "

User Datatypes Editor (IBM DB2 LUW) " on page 477

• " User Datatypes Wizard (DB2 Z/OS) " on page 310 and "

User Datatypes Editor (IBM DB2 Z/

OS) " on page 495

• " User Datatypes Wizard (SQL Server) " on page 366 and "

User Datatypes Editor (SQL

Server) " on page 529

• " User Datatypes Wizard (Sybase ASE) " on page 447 and "

User Datatypes Editor (Sybase

ASE) " on page 579

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Rename

Report

Transfer Ownership































U SER M ESSAGES

User Messages lets you catalog error messages that your database applications can re-use.

Microsoft SQL Server stores your error messages in a system table, sysmessages. To return error messages from stored procedures and triggers, you need to call a system stored procedure and pass an error number as a parameter.

RAPID SQL 8.6/XE5 USER GUIDE 248

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Platform availability

 

NOTE: On SQL Server, User Messages can only be accessed from the master database for a specific server.

Creating and editing

• " User Messages Wizard (SQL Server) " on page 365 and "

User Messages Editor (SQL

Server) " on page 529

• " User Messages Wizard (Sybase ASE) " on page 448 and "

User Messages Editor (Sybase

ASE) " on page 580

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Drop

Extract

Report













U SERS

A user is an individual with access to the DBMS.

Platform availability

       

Creating and editing

• " Users Wizard (DB2 LUW) " on page 284 and "

Users Editor (IBM DB2 LUW) " on page 478

249 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

• " Users Wizard (DB2 Z/OS) " on page 311 and "

Users Editor (IBM DB2 Z/OS) " on page 495

• " Users wizard (InterBase/Firebird) " on page 329 and "

Users editor (InterBase/Firebird) " on page 507

• " Users wizard (MySQL) " on page 375 and "

Users editor (MySQL) " on page 534

• " Users Wizard (Oracle) " on page 426 and "

Users Editor (Oracle) " on page 563

• " Users Wizard (SQL Server) " on page 366 and "

Users Editor (SQL Server) " on page 528

• " Users Wizard (Sybase ASE) " on page 450 and "

Users Editor (Sybase ASE) " on page 581

NOTE: Creation and editing of objects of this type is not supported against Sybase IQ datasources.

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.

Analyze

Change Password

Compile

Create Like

Drop

Extract

Hide Text

Report

Transfer Ownership



































































Explorer Details

Depending on the DBMS platform, the icon associated with a user differs according to the account’s locked or unlocked state, when viewed in the Explorer.

DBMS Platform

ORCL or SYB IQ

Icon User Accont State

Locked

Unlocked





Related information

• Microsoft SQL Server Users

RAPID SQL 8.6/XE5 USER GUIDE 250

SUPPORTED OBJECTS > SUPPORTED OBJECTS

• MySQL Users

• Oracle Users

• Sybase ASE Users

M ICROSOFT SQL S ERVER U SERS

Microsoft SQL Server controls access at the database level by requiring the System

Administrator or Database Owner to add a login as a database user or alias. After you create a database user, you can implement further security by the granting or revoking the privileges for that user on specific database objects. To consolidate the process of granting or revoking permissions to many users, the database owner can assign users to groups.

M Y SQL U SERS

Unlike adding new users to other platforms, MySQL doesn’t rely solely on a userid/password combination. The MySQL server must not only validate the user and password, but also the host from which the connection is being requested before the new user is admitted to the server’s inner sanctum. The Rapid SQL User Wizard and User Editor enable these validations.

O RACLE U SERS

To access an Oracle database, you need a user account authenticated with a password. A user account is what Oracle uses to permit access by the user. You can assign the following optional properties to the user:

• Default tablespace

• Temporary tablespace

• Quotas for allocating space in tablespaces

• Profile containing resource limits

S YBASE ASE U SERS

Sybase ASE controls access at the database level by requiring the System Administrator or

Database Owner to add a login as a database user or alias. After you create a database user, you can implement further security by granting or revoking the privileges for that user on specific database objects. To consolidate the process of granting or revoking permissions to many users, the database owner can assign users to groups.

251 RAPID SQL 8.6/XE5 USER GUIDE

SUPPORTED OBJECTS > SUPPORTED OBJECTS

V IEWS

Views are SQL queries stored in the system catalog that customize the display of data contained in one or more tables. Views behave like tables because you can query views and perform data manipulation operations on them. However, views do not actually store any data. Instead, they depend on data contained in their base tables. Views let you:

• View a customized selection of data from one or more tables. As a result, you can display data more cogently to different sets of users, even though the underlying data is the same.

• Restricting access to a defined set of rows and columns.

Platform availability

       

Creating and editing

• " Views Wizard (DB2 LUW) " on page 284 and "

Views Editor (IBM DB2 LUW) " on page 478

• " Views Wizard (DB2 Z/OS) " on page 311 and "

Views Editor (IBM DB2 Z/OS) " on page 496

• " Views Wizard (ITB/FBD) " on page 330 and "

Views editor (InterBase/Firebird) " on page 508

• " Views Wizard (Oracle) " on page 427 and "

Views Editor (Oracle) " on page 564

• " Views Wizard (SQL Server) " on page 367 and "

Views Editor (SQL Server) " on page 530

• " Views Wizard (Sybase ASE) " on page 451 and "

Views Editor (Sybase ASE) " on page 581

NOTE: Creation and editing of objects of this type is not supported against Sybase IQ datasources.

Object actions/operations supported

The following table lists object actions available for this object type. For an introduction to

object actions and details on usage of specific actions, see " Object actions " on page 584.



Build Query

Compile

Create Alias

Create Synonym

Describe

RAPID SQL 8.6/XE5 USER GUIDE























 

 

252

SUPPORTED OBJECTS > SUPPORTED OBJECTS

Drop

Extract

Generate Package/Procedure/

Statement

Hide Text

Object Properties

Rename

Report

Schema

Select * From

Transfer Ownership

Update Statistics



































































 



































253 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

C

REATING OBJECTS

Rapid SQL offers easy-to-use wizards and dialog boxes for creating objects. For an introduction

to object creation wizards, see " Overview and Common Usage of Object Wizards " on page 254.

Platform-by-platform discussions of wizards are discussed as follows:

• " IBM DB2 for Linux, Unix, and Windows Object Wizards " on page 258

• " IBM DB2 for z/OS Object Wizards " on page 285

• " InterBase/Firebird Object Wizards " on page 312

• " Microsoft SQL Server Object Wizards " on page 331

• " MySQL object wizards " on page 368

• " Oracle Object Wizards " on page 376

• " Sybase ASE Object Wizards " on page 428

O VERVIEW AND C OMMON U SAGE OF O BJECT W IZARDS

An object wizard lets you create new database and server objects on a datasource. For example, a Tables wizard lets you create columns, set up permissions to work with that table, provide details on physical storage for the table, and so on. Each pane on an object wizard lets you perform a logical task or collection of logical tasks for that object type. For example:

RAPID SQL 8.6/XE5 USER GUIDE 254

CREATING OBJECTS

In order to work with object wizards, you must be familiar with the following:

Opening an Object Wizard

Navigating and Setting Properties in an Object Wizard

Previewing the DDL Generated to Create the New Object .

O PENING AN O BJECT W IZARD

Object wizards are accessed from the Datasource Navigator pane of the Rapid SQL main window.

To open an Object wizard for a server or database object

1 Connect to the datasource where you want to create a new resource. For more information, see " Datasource Management " on page 131.

2 On the Datasource Explorer, expand the target datasource.

3 Continue to expand folders under the datasource until the type of object you want to create is visible.

255 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

4 On the Datasource Navigator, right-click on the specific type of object that you want to create and select Create from the context menu.

Rapid SQL opens the object wizard for that object type.

N AVIGATING AND S ETTING P ROPERTIES IN AN O BJECT W IZARD

When you invoke an object wizard, it opens on the first pane of the wizard, typically a Properties pane. As you select options or provide details, you use the navigation buttons at the bottom of the window and the pane controls at the left of the window to navigate through the wizard.

• Use the Next button to move to the next pane of the wizard.

NOTE: In some cases, the Next button is not activated until required information is provided.

Similarly, some panes of a wizard do not become accessible until activated by choice of an option or property on a previous pane. For example, a Partitions tab in a table wizard may only become available if the Clustered and Number of Partitions options on a prior tab are set accordingly.

• Use the Back button to move to the previous pane of the wizard.

• Use the pane controls at the left of the window to move to a specific pane of the wizard.

A

DDING A

C

OMMENT TO AN

O

BJECT

The object wizards for certain object types feature a Comment tab that lets you add an explanatory note to specific object definitions. Comments are stored in the REMARKS column of the object’s system-catalog.

RAPID SQL 8.6/XE5 USER GUIDE 256

CREATING OBJECTS

To add a comment to an object:

1 Open an object wizard on an object type that permits comments. For details, see " Opening an Object Wizard " on page 255.

See the topics for specific Object editors later in this chapter for information on whether that object type supports comments.

2 Click the Comment panel when enabled.

3 In the Comment area, type an explanatory note of up to 254 characters long.

S ETTING P ERMISSIONS OR P RIVILEGES FOR AN O BJECT

When you open an Object wizard to create an object with associated privileges, the Permissions

(or Privileges or Object Permissions or System Permissions ) panel for that editor displays the relevant privileges and lets you make changes accordingly:

To set permissions for an object:

1 Open an object wizard on an object type with associated permissions or privileges. For

details, see " Opening an Object Wizard " on page 255.

1 object type with associated permissions or privileges.

See the topics for specific Object wizards later in this chapter for information on whether that object type supports permissions/privileges.

2 Click the Permissions ( Privileges , Object Permissions or System Permissions ) panel when enabled.

3 For each specific permission to be granted to an entity such as a user, login, or group, select the cell corresponding to the entity and specific permission, and click the Grant button. To revoke a privilege, select a cell showing a Granted permission and click Revoke .

P REVIEWING THE DDL G ENERATED TO C REATE THE N EW O BJECT

The final pane or tab of a wizard or editor is most commonly designated DDL View or

Definition .

• A DDL View tab/panel lets you view the DDL generated by your selections on the other tabs/panels of the wizard or editor.

257 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

• A Definition tab/panel is only available for objects such as triggers and procedures, for which you must provide the additional SQL statements that provide the actions taken for that object.

In most cases you arrive at DDL View or Definition by navigating through panes or tabs, choosing options as you proceed. Alternatively, if you have provided all required information for that object type, you can click Finish or Execute to create the object.

IBM DB2 FOR L INUX , U NIX , AND W INDOWS O BJECT W IZARDS

Rapid SQL lets you create DB2 LUW objects using the following wizards:

• Aliases Wizard (DB2 LUW)

• Databases Wizard (DB2 LUW)

• Foreign Keys Wizard (DB2 LUW)

• Functions Wizard (DB2 LUW)

• Indexes Wizard (DB2 LUW)

• Materialized Query Tables Wizard (DB2 LUW)

• Nodegroups Wizard (DB2 LUW)

• Primary Keys Wizard (DB2 LUW)

• Procedures Wizard (DB2 LUW)

• Schemas Wizard (DB2 LUW)

• Sequences Wizard (DB2 LUW)

Structured Types Wizard (DB2 LUW)

• Tables Wizard (DB2 LUW)

• Tablespaces Wizard (DB2 LUW)

• Triggers Wizard (DB2 LUW)

• Unique Keys Wizard (DB2 LUW)

• User Datatypes (DB2 LUW)

• Users Wizard (DB2 LUW)

• Views Wizard (DB2 LUW)

In addition, see Create Synonym

.

RAPID SQL 8.6/XE5 USER GUIDE 258

CREATING OBJECTS

A LIASES W IZARD (DB2 LUW)

An alias offers you security and convenience so that you can refer to an object without revealing who owns it or what database it belongs to. You can create aliases for tables, views, and even other aliases. The Alias Wizard lets you create an alias without knowing the underlying commands. As you complete the Alias Wizard process, Rapid SQL constructs the necessary

CREATE ALIAS statement based on the information that you supply.

To create a new alias using a wizard:

1 Open a creation wizard for an alias. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details see

Aliases (DB2 LUW) - Properties .

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

A LIASES (DB2 LUW) - P ROPERTIES

When creating or editing an alias, this tab/panel lets you work with the following settings:

Setting

Schema

Name

Target Owner

Target Type

Target Name

Description

Select the schema that is to own the alias.

Provide a name for the alias

Select the owner of the object to which you are creating an alias.

Select the type of object to which you want to create an alias.

Select the specific object to which you are creating an alias.

For context information on the wizard and editor that include this tab/panel, see " Aliases Wizard

(DB2 LUW) " on page 259 and "

Aliases Editor (IBM DB2 LUW) " on page 461.

D ATABASES W IZARD (DB2 LUW)

The Database Wizard lets you create a database (a structured collection of data that can be updated or queried) without knowing the underlying commands. Databases can be simple, that is one file with many records and the same fields, or much more complicated with multiple files with different fields.

259 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To open the IBM DB2 for Linux, Unix, and Windows Database Wizard

On the Registration tool bar, click New UDB Database .

OR

On the Navigator right-click an instance node or the Datasources node, and then click New

UDB Database .

The tables below describe the fields you may encounter as you complete the wizard.

Naming the New Database

Required Information

What is the name of the database?

What is the datasource name for the new database?

What is the alias name of the database.

What is the comment used for the database?

Description

Each database requires a unique name. The database name should be between 1 - 8 characters and must begin with a letter A-Z. It’s wise to avoid the symbols @, #, and $ if the database will exist in a communications environment or be summoned from an area where those characters do not exist in the language (and hence, on a keyboard).

Each datasource should have a unique name. This is the name that will appear on the Navigator.

OPTIONAL: A database alias is the local synonym given to the database you are creating, and must be unique. If you don’t assign an alias, the database name becomes the default alias.

Note that a DB2 client can have connections to two different databases with the same name if those databases live on different servers and each database has its own alias.

OPTIONAL: Lets you type a comment up to 30 characters. Any comment you enter can be changed later.

Drive Path and Parameters

Required Information

On what drive/path will the database reside?

What default tablespace parameters should be used?

What global default parameters should the database use?

Description

OPTIONAL: Leave blank if you want Rapid SQL to create the database using the

DFTBPATH (default database path configuration) parameter.

OPTIONAL

Extent size: This is the number of pages of table data that will be written before data is written to the next container.

Number of segments: The default is 0. The number you designate specifies the number of extended memory segments available for the database to use. You should only set this number if you have a large amount of real memory.

Territory: The territory where the database was created. This is purely informational, for example, en_US and is related to region-specific support.

Codeset: IBM-1252 or UTF-8 are the options for language support.

Collating Sequence: Compatibility, Identity, System are your choices for comparing character data. Note: The collation sequence can’t be changed after the database has been created.

RAPID SQL 8.6/XE5 USER GUIDE 260

CREATING OBJECTS

Required Information

Finish

Description

Opens the Preview SQL dialog.

Add Catalog/Temporary/User Containers

There are three distinct wizard panels, one for each container type, that enable you to customize your database. Click Next or Finish depending on how you want to proceed.

Required Information

What container(s) will be used to store the catalog/ temporary tables?

Description

Use System Managed Space: If you select this option, the operating system’s file system manager allocates and manages the space where the catalog tables are stored. This is the default.

Use Database Managed Space: If you select this option, the database manager controls the storage space for catalog tables.

Add or Edit - For details, see

Add/Edit Container for Tablespace .

Optionally identify values for extent size, pre-fetch size, transfer rate, and overhead.

What optional default storage parameters should be used.

Finish Opens the Preview SQ L dialog.

A DD /E DIT C ONTAINER FOR T ABLESPACE

The table below describes the options and functionality on this dialog:

Required Information

Container Parameters

Directory

File Name

Device Information

Description

These parameters are enabled for modification only if you have opted to use database managed space. When enabled, you can either indicate file size parameters or specify device information.

Identify the directory where the catalog table container will be stored.

Identify a name for the file where the catalog table container will be stored.

Enable either raw partition and type a value, or raw drive, and select a value.

F OREIGN K EYS W IZARD (DB2 LUW)

Foreign keys are unique values that refer to specific columns of other tables. Thus, a foreign key links two tables together. Embarcadero Rapid SQL’s Foreign Key Wizard makes it easy for you to create a relational link between two tables, thereby speeding queries and giving you faster access to data.The Foreign Key Wizard lets you create a foreign key without knowing the underlying commands.

261 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new foreign key using a wizard:

1 Open a creation wizard for a foreign key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Foreign Keys (DB2 LUW) - Properties

• Column Mapping panel - for details, see

Foreign Keys (DB2 LUW) - Column Mapping

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

F OREIGN K EYS (DB2 LUW) - P ROPERTIES

When creating or editing a foreign key, this tab/panel lets you work with the following settings:

Setting

Table Schema

Table Name

Name

Enabled

Delete Rule

Update Rule

Description

The schema owning the table where the foreign key is being created.

This is the table where the foreign key link originates--the child table.

Lets you select a constraint name.

System Generated Name - DB2 automatically generates a name.

User Specified Constraint Name - You type the name.

TRUE enables the Foreign Key while FALSE disables the Foreign Key.

Select an action:

NO ACTION - ensures that referenced values cannot be updated or deleted if to do so would violate referential integrity.

CASCADE permits a referenced row in a child table to be deleted/updated if it is deleted/updated in the parent table. A row in the child table is SET NULL when rows in the parent table are deleted/updated.

RESTRICT prevents a command from executing if changes to referential data prompts an error.

Select an action.

NO ACTION - ensures that referenced values cannot be updated or deleted if to do so would violate referential integrity.

RESTRICT - prevents a command from executing if changes to referential data prompts an error

RAPID SQL 8.6/XE5 USER GUIDE 262

CREATING OBJECTS

F OREIGN K EYS (DB2 LUW) - C OLUMN M APPING

1 Under Referenced Table , choose the Owner and then the Name of the referenced, or parent, table.

2 Under the Main Table , select check boxes corresponding to the columns that are to reference columns in the referenced table.

F UNCTIONS W IZARD (DB2 LUW)

To create a relationship between one set of values and another, Rapid SQL offers the Function

Wizard. You can develop reusable subroutines so you can control, access, and manipulate the data that underlies an object. As you complete the Function Wizard process, Rapid SQL constructs the necessary CREATE FUNCTION statement based on the information that you supply. The Function Wizard lets you create a function without knowing the underlying commands.

NOTE: To create a user-defined function, you need CREATE ANY privileges or

IMPLICIT_SCHEMA authority on the database if the schema does not already exist.

To create a new function using a wizard:

1 Open a creation wizard for a function. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Functions (DB2 LUW) - Properties .

• Advanced panel - for details, see

Functions (DB2 LUW) - Advanced .

• Source panel (only available for a Function Type

of SOURCED) - for details, see Functions

(DB2 LUW) - Source

.

• Parameters panel ( only available for a Function Type of SQL, SOURCED, or TEMPLATE ) - for details, see

Functions (DB2 LUW) - Parameters .

• Return Scalar

panel - for details, see Functions (DB2 LUW) - Return Scalar .

• Return Columns panel ( only available when you choose a Function Type of EXTERNAL TABLE ) - for

details, see Functions (DB2 LUW) - Return Columns .

• Body

panel - for details, see Functions (DB2 LUW) - Body

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

263 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

F UNCTIONS (DB2 LUW) - P ROPERTIES

When creating or editing a foreign key, this tab/panel lets you work with the following settings:

Setting

Schema , Name , and

Specific Name

Function Type

Language

Return Type

External Name

SQL Access Level

Description

Let you select the owner of the function, provide a name for the function, and provide the Specific name to be used by some SQL statements and DB2 commands for this function.

Select the type of function:

External Scalar - written in a programming language and returns a scalar value.

External Table - written in a programming language and returns a complete table.

OLEDB - accesses OLE DB data in user-defined OLE DB external tables.

Sourced - another function is invoked to implement the function you are creating.

SQL Language - written in SQL and returns a table, scalar value, or single row.

Template: - this is a partial function and can only be invoked from a federated datasource.

For more information, see " About function types " on page 265.

If you chose a Function Type of EXTERNAL SCALAR or EXTERNAL TABLE, specify a

language of C, JAVA, or OLE. For more information, see " About function types " on page 265.

For a Function Type of SQL, select ROW, TABLE, or SCALAR. For other Function Type choices, this indicates the default return type for that choice.

Provide the External Name of the function.

Indicates whether the function can execute SQL statements.

CONTAINS SQL: Statements that don’t read or modify SQL can be executed.

NO SQL: No SQL statements can be executed.

READS SQL: Statements that cannot modify SQL can be executed.

F UNCTIONS (DB2 LUW) - A DVANCED

This tab is only available after clicking the Advanced button on the Function wizard’s Properties panel. It lets you work with the Threadsafe , Fenced , Scratchpad , Scratchpad Length , Allow

Parallel , Final Call , Parameter Style , Inherit Special Registers , DBINFO , Deterministic ,

External Action , Called on Null Input , and Parameter CCSID properties.

F UNCTIONS (DB2 LUW) - S OURCE

NOTE: This panel is only available for a Function Type of SOURCED.

Select the Schema , Name , and Specific Name of the source function. Function Parameters and

Return Type

for the selected function are displayed. For more information, see " About function types " on page 265.

F UNCTIONS (DB2 LUW) - P ARAMETERS

NOTE: This panel is only available for a Function Type of SQL, SOURCED, or TEMPLATE.

RAPID SQL 8.6/XE5 USER GUIDE 264

CREATING OBJECTS

For each parameter for this function, use the New button to add a new parameter, provide a name for the parameter, and in the Attributes area, select a Type , and if appropriate, the

Precision , Scale , and Size options.

F UNCTIONS (DB2 LUW) - R ETURN S CALAR

Under Return Datatype , select a Type and depending on your choice, provide or select

Precision , Scale , Size , and As Locator options.

To make use of a CAST FROM clause, under Cast Datatype set Enabled to True, select a Type , and if appropriate, the Scale , Size , and As Locator options

F UNCTIONS (DB2 LUW) - R ETURN C OLUMNS

NOTE: This panel is only available when you choose a Function Type of EXTERNAL TABLE.

For each column returned by this function, use the New button to add a new parameter, provide a name for the parameter, and in the Attributes area, select a Type , and if appropriate, the

Precision , Scale , Size , and As Locator options.

F UNCTIONS (DB2 LUW) - B ODY

Enter the return statement for the function.

A BOUT FUNCTION TYPES

External Scalar/Table/OLE DB Function

External scalar user-defined functions are implemented in an external programming language.

The functions are executed on the server and can read SQL data but cannot make changes to the data. These functions are often used to extend the set of built-in functions for DB2, perform logic inside a SQL query that SQL can’t perform on its own, and, encapsulate a scalar query that is often used as a subquery in SQL statements, for example, if given an ingredient, search a table for a recipe that uses that ingredient.

When specifying the Specific Name for one of these function types:

• If you are using C language, specify the full library path and the function name, otherwise

IBM DB2 Database Manager assumes the function is under the IBM DB2 library.

• If you are using Java script, specify the Class ID and the function name, otherwise IBM DB2

Database Manager assumes the function is under the IBM DB2 library.

• If you are using OLE language, specify the full library path and the function name, otherwise

IBM DB2 Database Manager assumes the function is under the IBM DB2 library.

265 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Sourced Functions

When you create a sourced function, the new function you are creating will be implemented by a preexisting (source) function that’s known to the database manager. The source function can be a built-in function or a previously created user-defined scalar function.

When you select the appropriate schema, you are really specifying an implicit schema privilege.

In other words, you’re selecting a schema/function that belongs to a user with DBAdmin privileges. If you want to use a built-in function, you must specify the function’s specific name.

SQL Language Function

The function you are creating is written in SQL. A table, scalar value, or single row is returned.

Template Function

A template function is better thought of as a template for a function. It’s a partial function that has no executable code. You create a function template for mapping it to a datasource function.

When the mapping is created, you can specify the function template be used in queries submitted to the federated server. When the query is processed, the federated server invokes datasource function where the template is mapped and returns the appropriate values.

I NDEXES W IZARD (DB2 LUW)

Comparable to an index in a book, an index gives you speedy access to particular records in a table. The Index Wizard lets you create an index without knowing the underlying commands.

To create a new index using a wizard:

1 Open a creation wizard for an index. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Indexes

(

DB2 LUW

)

- Properties .

• Columns and Include Columns

panels - for details, see Indexes (DB2 LUW) - Columns and

Include Columns

.

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

RAPID SQL 8.6/XE5 USER GUIDE 266

CREATING OBJECTS

I NDEXES ( DB2 LUW ) - P ROPERTIES

When creating or editing an index, this tab/panel lets you work with the following settings:

Setting

Parent Type , Parent

Schema and Parent

Name

Schema and Name

Description

Choose the type (TABLE or MATERIALIZED QUERY TABLE) owning schema, and name of the parent object in which the index is being created.

Choose the owner and name of the index being created.

Index Type

Clustered

Allow Reverse Scans

Index enforces uniqueness on the values of the table's index key.

Specifies that the index is the clustering index of the table. The cluster factor of a clustering index is maintained or improved dynamically as data is inserted into the associated table, by attempting to insert new rows physically close to the rows for which the key values of this index are in the same range.

If selected, a ALLOW REVERSE SCAN clause is included with the CREATE/ALTER INDEX statement, specifying that the index supports both forward and reverse scans.

Compress (9.7^) YES - Selecting this option adds a COMPRESS YES clause, enabling index compression.

NO - Selecting this option adds a COMPRESS NO clause, disabling index compression.

DEFAULT - Selecting this option specifies default compression handling to that of the parent object.

Percent Free Lets you provide a PCTFREE value, specifying the percentage of each index page to leave as free space when building the index, from 0 to 99.

Minimum Percent Used Lets you provide a MINPCTUSED value, specifyinf whether index leaf pages are merged online, and the minimum percentage threshold of space used on index leaf pages.

I NDEXES (DB2 LUW) - C OLUMNS AND I NCLUDE C OLUMNS

Index columns can be segregated into unique key columns ( Columns pane) and Include columns that are to be part of the index but do not form part of the unique key.

The steps in completing the panes for the two column types are identical.

• From the Column dropdown, select a column for the index and specify a Sort option. To add more columns, click the New button and then follow the steps in the last instruction.

Use the Delete button to drop columns.

M ATERIALIZED Q UERY T ABLES W IZARD (DB2 LUW)

A materialized query table (MQT) is a table based on the result of a query. An MQT contains information that is summarized from other tables and can save time when processing dynamic

SQL queries. The Materialized Query Table Wizard lets you create a table without knowing the underlying commands.

267 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To Open the Materialized Query Wizard

1 On the Navigator, find the datasource where you want to add the new materialized query table.

2 Expand the Schema branch, right-click Materialized Query Tables , and select New .

The table that follows describes the fields you may encounter as you complete the Materialized

Query Table Wizard.

NOTE: These options are only available if the tablespace you selected is a database managed tablespace.

Required Information

Who owns the table?

Definition Only

Description

Choose the owner of the table you’re creating from the drop-down list.

Type the name of the materialized query table you are creating.

What is the name of the table?

Select a tablespace on which to place the table:

Specify separate tablespaces for index and long data

Specify the query on which this table is based

Add the columns belonging to this table

Add the columns belonging to the partition key

Do you want the table replicated across database partitions?

OPTIONAL: No selection is the default. But you can select a tablespace that belongs to the new table’s owner if you want.

OPTIONAL: Lets you separate indexes or long data from the table.

Indexes

Long data

Write the query you want to use to create the table.

Note: Every select list element must have a name (use the AS clause for expressions)

Click Add , Insert or Edit to add or modify table columns. Click Drop to delete a selected column.

The default is no, but check the box if you do want to replicate the table.

Replicated materialized query tables can help you improve query performance by enabling collocation between tables. Replication is especially helpful when you have joins between large fact tables and small dimension tables. It’s best if tables that are to be replicated are infrequently updated.

Lets you select definition options, Include Column Defaults and Include Identity

Column Attributes.

When you select the Definition Only option, the new table is treated as if it was a base table rather than a MQT.

After you complete the wizard, Rapid SQL opens the Tables Editor.

RAPID SQL 8.6/XE5 USER GUIDE 268

CREATING OBJECTS

Required Information

Refreshable

Would you like extra information regarding SQL changes to this table to be written to the log?

Description

Lets you select refresh options:

Immediate: The table you are creating will be refreshed automatically when changes are made to the base table(s).

Deferred: Static SQL will not be optimized. Changes to the base table(s) will not be reflected.

Query Optimization:

Enabled: Queries will be routed to the MQT.

Disabled: This is the default.

Maintained by:

System: This is the default

User

After you complete the wizard, Rapid SQL opens the Material Query Tables Editor.

If you opted to replicate the table, you must make a selection here.

Yes means you want to receive error messages issued by the DB2 replication programs.

Include Longvar Columns means you want to receive error messages for these columns if long varchar data is a part of the table you’re replicating.

No

Initially Not Logged: This is an option that can reduce logging and increase performance, but also means that you cannot recover the table when rolling forward.

Logged Initially. This is the default.

Would you like to skip logging changes made to this table by Insert... and

Alter Table operations in the same unit of work in which this table is created?

What type of table lock would you like when it is being accessed?

What percent of free space to leave for load and reorganization?

Do you want data to append to the end of the table?

Do you want the access plan to this table to be based on existing statistics and optimization level?

Enter a comment

Row: This is the default. During a table or index scan, DB2 locks each row that is scanned before determining whether that row is relevant to the query.

Table: During a table scan, DB2 locks the table so no data can be added or altered while the query is executed.

-1 is the default.

Yes

No: This is the default

Volatile: A volatile table’s contents can vary from empty to huge at run time and can render collected statistics inaccurate.

Not Volatile: This is the default.

Optional

269 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

N ODEGROUPS W IZARD (DB2 LUW)

A nodegroup is a named subset of one or more database partitions. The Node Group Wizard lets you create a node group without knowing the underlying commands. When you create a nodegroup, the wizard simply asks you to name the nodegroup and select the partitions to include in the nodegroup.

To Open the Nodegroup Wizard

1 On the Navigator, find the datasource where you want to add the new Nodegroup.

2 Expand the Storage branch, right-click Nodegroups , and select New .

P RIMARY K EYS W IZARD (DB2 LUW)

A primary key is a column or group of columns that you can use to identify or access one or more specific rows in a table. A primary key is ‘constrained’ in that no values can be null and no two values are equal. You can only create one primary key for any table. The Create Primary Key

Constraint dialog lets you create a primary key without knowing the underlying commands.

When you create a primary key, specify the table owner and the table on which you want to place the primary key constraint. You name the constraint and select the column(s) you want to include.

To create a new primary key using a wizard:

1 Open a creation wizard for a primary key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Primary Keys (DB2 LUW) - Properties .

• Columns panel - for details, see

Primary Keys (DB2 LUW) - Columns .

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute

button to create the object. For more information, see Previewing the DDL Generated to Create the New Object .

P RIMARY K EYS (DB2 LUW) - P ROPERTIES

When creating or editing a primary key, this tab/panel lets you work with the following settings:

Setting

Table Schema and

Table Name

Description

Choose the owner and name of the table in which the primary key is being created.

RAPID SQL 8.6/XE5 USER GUIDE 270

CREATING OBJECTS

Setting

Name

Time period policy

Description

Choose the owner and name of the primary key being created.

This setting is for use with tables set up as business-time tables. For more information,

see " Tables (DB2 LUW v10) - Temporal Properties " on page 279.

When selected, a BUSINESS_TIME WITHOUT OVERLAPS option is specified against the column or columns defining the constraint, in the generated DDL. This ensures that values for the constraint columns are unique with respect to the time for the

BUSINESS_TIME period.

When you select this option, columns specified as business-time begin period and end period are not available as candidates on the Columns tab/panel.

P RIMARY K EYS (DB2 LUW) - C OLUMNS

From the Column dropdown, select a column for the primary key and specify a Sort option. To add more columns, click the New button and then follow the steps in the last instruction. Use the Delete button to drop columns.

P ROCEDURES W IZARD (DB2 LUW)

Procedures are a reusable block of PL/SQL, stored in the database, that applications can call.

Procedures streamline code development, debugging, and maintenance by being reusable.

Procedures enhance database security by letting you write procedures granting users execution privileges to tables rather than letting them access tables directly.

To create a new procedure using a wizard:

1 Open a creation wizard for a procedure. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Procedures (DB2 LUW) - Properties

.

• Advanced panel - for details, see

Procedures (DB2 LUW) - Advanced .

• Parameters panel - for details, see

Procedures (DB2 LUW) - Parameters

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

P ROCEDURES (DB2 LUW) - P ROPERTIES

When creating or editing a procedure, this tab/panel lets you work with the following settings:

Setting

Schema

Description

Select the owner for the procedure.

271 RAPID SQL 8.6/XE5 USER GUIDE

Setting

Name

Specific Name

Language

External Name

SQL Access Level

CREATING OBJECTS

Description

Provide the name of the function.

Optionally, provide the unique name of the procedure.

Select among C, JAVA, COBOL, OLE, or SQL. The database manager will call the procedure accordingly.

Provide the external name of the procedure.

Select an option:

MODIFIES SQL DATA - the procedure can support any SQL statement except those that cannot be supported in procedures.

CONTAINS SQL DATA - only SQL statements that neither modify nor read SQL data can be executed in the procedure.

READS SQL DATA - some SQL statements that don’t modify SQL data can be included in the procedure.

P ROCEDURES (DB2 LUW) - A DVANCED

When creating or editing a procedure, this tab/panel lets you work with the following settings:

Setting

Results Sets

External Action

New Save Point

Threadsafe

Fenced

Parameter Style

Program Type

Inherit Special

Registers

Description

Indicate the estimated upper bound of returned result sets. 0 is the default.

Select the External Action option.

Lets you specify a NEW SAVEPOINT LEVEL clause for the procedure.

Specify whether the procedure is safe to run within the same process as other routines.

If you select yes, you are saying you do not want the procedure to run in the manager operating system environment. This means the database management system will protect its internal resources from the procedure. This option can affect the procedure’s operation.

To run a procedure as not fenced, or a No selection, you must have SYSADMIN or

DBADMIN privileges because of the potential to compromise data if the procedure has not been adequately tested.

Lets you select an option: DB2DARI, DB2GENERAL, DB2SQL, GENERAL, GENERAL

WITH NULLS, JAVA, and SQL.

DB2GENERAL is for Java Language only.

DB2SQL is for C, COBOL, or OLE Language only.

GENERAL is for C Language only.

GENERAL WITH NULLS is for C or COBOL Language only.

JAVA is for Java Language only.

SQL is for C, COBOL, or OLE Language only.

MAIN: valid for C or COBOL Language and Parameter Style GENERAL, GENERAL WITH

NULLS, SQL, or DB2SQL only. In this case, parameters will be passed as an argument counter or argument vector.

SUBROUTINE: the procedure expects the parameters to be passed as separate arguments.

Lets you specify this optional clause dictating that the procedure will inherit initial values from the environment of the invoking statement.

RAPID SQL 8.6/XE5 USER GUIDE 272

CREATING OBJECTS

Setting

DBINFO

Deterministic

Parameter CCSID

Description

Specific information contains such information as the database name, application ID, database code page, and so on.

Enabling this feature specifies the procedure will always return the same result for given argument values. Disabling it means there are state values that affect the results and so the same result will not always be returned when you use identical inputs to invoke the procedure.

Select an encoding scheme of ASCII, UNICODE, or NONE for character or graphic string parameters.

P ROCEDURES (DB2 LUW) - P ARAMETERS

For each parameter for this function, use the New button to add a new parameter, provide a name for the parameter, and in the Attributes area, select a Type , specify a Parameter Mode of

INPUT, OUTPUT, or INPUT_OUTPUT, and if appropriate, the Precision , Scale , and Size options.

S EQUENCES W IZARD (DB2 LUW)

A sequence allows the automatic generation of values, something well-suited to the generation of unique key values. Sequences are not tied to particular table columns. The Sequence Wizard lets you create a sequence without knowing the underlying commands. As you complete the

Sequence Wizard, Rapid SQL constructs the necessary CREATE SEQUENCE statement from the information that you have supplied. When finished, you can instruct Rapid SQL to compile the sequence on the target Rapid SQL database or to write a script file containing the CREATE

SEQUENCE statement.

The Sequence Wizard lets you:

• Specify the name and owner of the sequence.

• Set both the value of the sequence, and an interval and ranges for incrementing it.

• Cache the sequence, cycle the sequence when it reaches its minimum or maximum values, and guarantee that Rapid SQL generates sequence numbers in the order of request.

NOTE: To create a sequence, it must belong to your schema or you need CREATE SEQUENCE privileges.

To Open the Sequence Wizard

1 On the Navigator, find the datasource where you want to add the new Sequence.

2 Expand the Schema branch, right-click Sequences , and select New .

The table that follows describes what you may encounter as you complete the Sequence Wizard:

Required Information

Who owns the sequence?

273

Description

You decide.

RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Required Information

What is the sequence name?

What numeric datatype should the

Sequence use?

What is the first sequence number to be generated?

What is the interval between sequence numbers?

What is the sequence’s minimum value?

What is the sequence’s maximum value?

Should DB2 preallocate sequence numbers and cache them for faster access?

Should the sequence continue to generate values after reaching either its maximum or minimum value?

Should the sequence numbers be generated in the order of request?

Description

Your choice.

Choose among BIGINT (big integer), decimal (choose width as well), integer, small integer.

Starting with 1 is the default.

Increment by 1 is the default.

Choose none or set a value

Choose none or set a value

Preallocating and storing values in the cache reduces synchronous I/O to the log when values are generated for the sequence.

If Yes, give number of values

No

Lets you make the sequence cycle and continue to generate numbers.

Yes or No

Select to generate sequence numbers in the order of request. The

ORDER option is useful when you are using the sequence number as a timestamp.

Yes or No

S CHEMAS W IZARD (DB2 LUW)

The Schema Wizard lets you create the structure of a database system including database objects.

To Open the Schema Wizard

1 On the Navigator, find the datasource where you want to add the new Schema.

2 Right-click Schema and select New .

All you need to do when the single-panel wizard opens is to give a unique name to the schema you’re creating.

S TRUCTURED T YPES W IZARD (DB2 LUW)

The Structured Type wizard lets you create the object type specification and define attributes for a structured type. You then use the Structured Type editor to define the methods and body for the type.

RAPID SQL 8.6/XE5 USER GUIDE 274

CREATING OBJECTS

To Open the Type Wizard

1 On the Navigator, find the datasource where you want to add the new Structured Type.

2 Expand the Schema branch, right-click Structured Type , and select Create .

3 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Structured Types (DB2 LUW) - Properties .

• Attributes panel - for details, see

Structured Types (DB2 LUW) - Attributes

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

4 Finally, use the Execute button to create the object.

On completion, the Structured Type editor opens, letting you provide method and body

specifications for the structured type. For details, see " Structured Types Editor (IBM DB2 LUW) " on page 470.

S TRUCTURED T YPES (DB2 LUW) - P ROPERTIES

When creating or editing a structured type, this tab/panel lets you work with the following settings:

Setting

Attributes

Supertype

Reference

Description

Instantiable - if disabled, no constructor function can be generated, nor can a noninstantiable type be used as the type of a table or view.

Final Type - enabled, indicates that the structured type cannot be used as a supertype.

With Function Access - If enabled, all methods of the type you are creating, and those you will create, can be accessed using functional notation. Some applications prefer functional notation over method invocation.

Without Comparisons - If enabled, indicates that there are no comparison functions supported for instances of the structured type.

Inline Length - Specifies the maximum size of an instance of a structured type in a column. If the size of a structured type instance is less than the defined maximum, the data is stored inline with the other values in the row. If the size of the structured type is larger than the defined maximum, the structured type data is stored outside of the table

(like LOBs).

Supertype Schema and Supertype Name - let you designate this structured type as a subtype by providing details of the owning supertype.

Cast (Source as Ref) With and Cast (Ref as Source) With - Lets you name the cast function, although one will be created with the default name of the structured type you are creating. The cast function “casts” a value between the reference type and the representation type in both directions.

Reference Using , Size , Precision , and Scale - Define the built-in data type used as the underlying data type for the structured type you are creating and all its subtypes.

275 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

S TRUCTURED T YPES (DB2 LUW) - A TTRIBUTES

For each attribute to be added to the structured type, click the New button, and provide a name for the attribute.

With an attribute selected, you can modify the Datatype . Depending on the datatype you choose you can provide the following datatype qualifiers:

• Width (decimal only)

• Scale (decimal only)

• Size (blob, character, clob, dbclob, graphic, varchar, vargraphic only)

• Allow log (blob, clob, dbclob only)

• Allow compact (blob, clob, dbclob only)

• For bit data (character, long varchar, varchar, only)

T ABLES W IZARD (DB2 LUW)

The Table Wizard lets you create a table without knowing the underlying commands.

To create a new table using a wizard:

1 Open a creation wizard for a table. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Tables (DB2 LUW) - Properties .

• Columns panel - for details, see

Tables (DB2 LUW) - Columns

.

• Partition panel - for details, see

Tables (DB2 LUW) - Partition .

• Tablespaces panel - for details, see

Tables (DB2 LUW) - Tablespaces .

• Dimension panel - for details, see

Tables (DB2 LUW) - Dimensions .

• Distribution Key Columns panel - for details, see

Tables (DB2 LUW) - Distribution Key

Columns .

• Indexes panel

- for details, see Tables (DB2 LUW) - Indexes .

• Temporal Properties panel

- for details, see Tables (DB2 LUW v10) - Temporal Properties .

• Constraints panel - for details, see

Tables (DB2 LUW) - Constraints .

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• Permissions

panel - " Setting Permissions or Privileges for an Object " on page 257

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

RAPID SQL 8.6/XE5 USER GUIDE 276

CREATING OBJECTS

3 Finally, use the Execute button to create the object.

T ABLES (DB2 LUW) - P ROPERTIES

When creating or editing a table, this tab/panel lets you work with the following settings:

Setting

Schema

Name

Percent Free

Lock Size

Append Data

Volatile

Compress

Row Compression

Security Policy

RestrictDrop

Log Index Build

CCSID

Description

Select the schema that is to own the table.

Provide a name for the table.

The table-level lock prevents concurrently operating applications from using or changing a table. When scanning a table for a query, a row-level lock locks the row when it is being assessed.

Enable or Disable appending data to the end of the table.

Enable this feature if a table contents may fluctuate from empty to very large. The access plan will not depend on the existing statistics for that table.

Enable or disable value compression

Enable or disable row compression.

Lets you add a security policy to a table.

Corresponds to the DB2 Restrict on Drop attribute.

Enables this level of logging when creating, recreating, or reorganizing an index.

Specify ASCII or UNICODE or leave unspecified. If specified, this is the encoding scheme for string data. If unspecified, CCSID default encoding is used.

Select a tablespace, an index tablespace, and a tablespace for Long or LOB table columns.

Tablespace, Index

Tablespace, and Long

Data Tablespace

Do not initially log

Data Capture

If enabled, all changes to the table will be flushed out at commit time. This also means that if a statement fails, the unit of work will rollback. If you are concerned about recoverability, disable this feature.

Specify additional information logged by selecting DATACAPTURE NONE, DATA

CAPTURE CHANGES, or DATA CAPTURE CHANGES INCLUDE LONGVAR.

T ABLES (DB2 LUW) - C OLUMNS

For each column in the table, click the New button to create a column and provide a name for the column. Then, in the Column Attributes area, provide details for the column.

Use the Delete button to drop a selected column.

Row Properties (V10) settings are available when you select a Type of TIMESTAMP. These settings are used in conjunction with settings on the Temporal Properties tab in setting up

system and application temporal tables. For more information, see " Tables (DB2 LUW v10) -

Temporal Properties " on page 279.

277 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Specific settings are:

• As Row Begin - adds a GENERATED ALWAYS AS ROW BEGIN option to the column specification, used to track when a row is current.

• As Row End - adds a GENERATED ALWAYS AS ROW END option to the column specification.

• Transaction Start ID - adds a GENERATED ALWAYS AS TRANSACTION START ID option to the column specification indicating that this column captures the start times for transactions that affect rows.

A column can have only one of the three settings selected.

When you select a Row Properties setting, the Scale value and if appropriate, the Allow Nulls ,

Default Value , and Expression settings are automatically adjusted for compatibility with row generation. Similarly, if one of the three Row Properties settings is selected for a column, and any of the Scale , Allow Nulls , Default Value , or Expression settings are modified, then the selected Row Properties setting is cleared.

T ABLES (DB2 LUW) - P ARTITION

Under Partition Columns , for each partition column, click the New button and then choose a column name from the dropdown. To add a Data Partition , click the New button to open a dialog that lets you add a partition.

T ABLES (DB2 LUW) - T ABLESPACES

For each Data Tablespace or Long Tablespace, click the New button and then choose a tablespace from the dropdown. To specify an Index Tablespace, select a tablespace from the dropdown.

T ABLES (DB2 LUW) - D IMENSIONS

For each column that is to make up a dimension, click the New button to open a dialog that lets you add a column.

T ABLES (DB2 LUW) - D ISTRIBUTION K EY C OLUMNS

For each column that is to make up the distribution key, click the New button and then select a column from the dropdown

T ABLES (DB2 LUW) - I NDEXES

Click Add

to open the Index wizard. For more information, see " Indexes Wizard (DB2 LUW) " on page 266.

RAPID SQL 8.6/XE5 USER GUIDE 278

CREATING OBJECTS

T ABLES (DB2 LUW V 10) - T EMPORAL P ROPERTIES

This tab/panel lets you specify temporal properties to a table, designating it as a table that records the period of time when a row is valid.

NOTE: Before using this object action, consult DB2 LUW documentation for details on setup

and use of the temporal tables feature. For more information, see " Accessing Third

Party Documentation " on page 21.

This tab/panel has the following controls:

• System-time table - selecting this option creates a table with the PERIOD SYSTEM_TIME clause, designating it as a system-period temporal table. This option is available if the table has three columns of type TIMESTAMP, and the following prerequisites have been met:

• At least one TIMESTAMP-typed column has the As Row Begin property selected

• At least one TIMESTAMP-typed column has the As Row End property selected

• At least one TIMESTAMP-typed column has the Transaction Start ID property selected

For details on column definitions, see " Tables (DB2 LUW) - Columns " on page 277.

The Row-begin column , Row-end column , and Transaction Start ID column controls are automatically populated with the columns having the corresponding property.

When you select this option, in the generated DDL, the Row-begin column and Row-end column values are used as the PERIOD SYSTEM_TIME column parameters, defining the system period.

• Business-time table - selecting this option creates a table with the PERIOD

BUSINESS_TIME clause, designating it as an application-period temporal table. This option is available if the table has two columns of type DATE or TIMESTAMP, for which no Row

Properties have been assigned.

The Begin column and End Column controls are automatically populated with the valid candidate columns from the table's column list and the first distinct column pair is automatically chosen for convenience.

• Use history table - this set of controls is only active when Business-time table is selected. It lets you associate a history table. When you select Use history table , the Owner and Name controls are activated, letting you identify the history table to associate with this table.

Note that a constraint created on a business-time table can enforce the uniqueness of the data for any point in business time via the Time period policy property that has been added in the constraint wizards. For details, see the following topics:

• " Primary Keys (DB2 LUW) - Properties " on page 270

• " Unique Keys (DB2 LUW) - Properties " on page 283

T ABLES (DB2 LUW) - C ONSTRAINTS

Selecting a constraint type and clicking Add opens the object wizard for that object type. For details see:

279 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

• " Primary Keys Wizard (DB2 LUW) " on page 270

• " Unique Keys Wizard (DB2 Z/OS) " on page 307

• " Foreign Keys Wizard (DB2 Z/OS)) " on page 288

T ABLESPACES W IZARD (DB2 LUW)

Tablespaces establish connections between the physical storage devices of your database system and the logical containers or tables being use to store data. In essence, a tablespace is a storage structure that can hold tables, indexes, large objects, and long data. The Tablespace

Wizard lets you create a tablespace without knowing the underlying commands.

To create a new tablespace using a wizard:

1 Open a creation wizard for a tablespace. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Tablespaces (DB2 LUW) - Properties

.

• Container

panel - for details, see Tablespaces (DB2 LUW) - Container

.

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• Permissions

panel - " Setting Permissions or Privileges for an Object " on page 257

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

T ABLESPACES (DB2 LUW) - P ROPERTIES

When creating or editing a tablespace, this tab/panel lets you work with the following settings:

Setting Description

Tablespace properties Type - Select REGULAR, LARGE, TEMPORARY, or USER TEMPORARY.

Use Automatic Storage and Managed By let you specify whether storage is managed automatically, by the database, or by the system.

Database Partition Group - lets you select a database partition group.

Buffer Pool - lets you select a buffer pool.

Drop Recovery - For REGULAR type tablespaces, lets you enable/disable drop recovery.

Performance properties This group lets you specify or select the Page SIze , Extent Size , Prefetch Automatic ,

Prefetch Size , Overhead , Transfer Rate , and File System Caching properties.

Automatic Storage properties

This group lets you specify or select the

Size Unlimited , and Max Size

AutoResize

attributes.

, Initial Size , Increase Size , Max

RAPID SQL 8.6/XE5 USER GUIDE 280

CREATING OBJECTS

T ABLESPACES (DB2 LUW) - C ONTAINER

For each container in the tablespace, in the Container Properties area, provide the following container properties: Database Partitions , Type (FILE or DEVICE), Name , and Size , and then click the New button.

Use the Delete button to drop a selected container.

T RIGGERS W IZARD (DB2 LUW)

A trigger defines a set of actions that take place in conjunction with, or are triggered, for a particular base table, with an insert, update, or delete statement. Triggers are dandy ways to validate input data, read from other tables for cross-referencing purposes, and other similar purposes. The Trigger Wizard lets you create a trigger without requiring you to know any of the underlying commands.

To create a new trigger using a wizard:

1 Open a creation wizard for a trigger. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Triggers (DB2 LUW) - Properties .

• Column Selection panel - for details, see

Triggers (DB2 LUW) - Column Selection .

• Definition panel - for details, see

Triggers (DB2 LUW) - Definition

.

3 Finally, use the Execute button to create the object.

T RIGGERS (DB2 LUW) - P ROPERTIES

When creating or editing a trigger, this tab/panel lets you work with the following settings:

Setting

Table Schema and

Table Name

Schema and Name

Trigger Timing

Description

Choose the owner and name of the table for which the trigger is being created.

Trigger Events

Choose the owner and name of the trigger being created.

BEFORE: These triggers serve as extensions to the constraint subsystem and are most often used to validate input data, generate values for newly inserted rows, and read from other tables for cross-reference purposes. Note: Before triggers must be created as a For

Each Row.

AFTER: Such a trigger is run after the integrity constraint validations; they can be used to modify operations in the database or be used for activities beyond the database, like supporting an alert notification.

An INSERT trigger must be associated with an INSERT statement. For example, if a data load operation doesn’t include an INSERT statement, the trigger will not be invoked.

An UPDATE trigger can be associated with specific columns of the base table and will only be activated if those columns are updated.

281 RAPID SQL 8.6/XE5 USER GUIDE

Setting

Trigger Type

Old Table Alias

New Table Alias

Old Row Alias

New Row Alias

CREATING OBJECTS

Description

STATEMENT : (only fires once).

ROW (fires for each affected row): The trigger runs as many times as there are rows in the affected section. If the set of affected rows is empty, the trigger doesn’t run.

Type the name of a temporary table of rows as they exist before they’re updated or deleted.

Type a name for a temporary table of rows as they exist after they’re inserted or updated.

Type a name for the rows as they are before they’ve been deleted or updated.

Type a name for the rows as they are after they’ve been inserted or updated.

T RIGGERS (DB2 LUW) - C OLUMN S ELECTION

If you chose UPDATE as the Trigger Event , select the columns, select the check box beside each column that is to fire the trigger.

T RIGGERS (DB2 LUW) - D EFINITION

Complete the CREATE TRIGGER outline provided by typing or pasting the body of the trigger.

U NIQUE K EYS W IZARD (DB2 LUW)

A unique key constraint is a key for which no two of its values can be equal and no values can be null. A table can have a number of unique constraints, but it cannot have more than one unique constraint on the same set of columns. If you are creating a unique key constraint on a table that already exists (as opposed to creating a unique key at the time the table is first generated), a unique index must already exist on the columns of the unique key you want to constrain. If no unique index exists, the Index Wizard will open as you complete the Create Unique Key

Constraint dialog.

To create a new unique key using a wizard:

1 Open a creation wizard for a unique key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Unique Keys (DB2 LUW) - Properties .

• Columns panel - for details, see

Unique Keys (DB2 LUW) - Columns

.

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

RAPID SQL 8.6/XE5 USER GUIDE 282

CREATING OBJECTS

U NIQUE K EYS (DB2 LUW) - P ROPERTIES

When creating or editing a unique key, this tab/panel lets you work with the following settings:

Setting

Table Schema and

Table Name

Name

Time period policy

Description

Choose the owner and name of the table in which the unique key is being created.

Provide a name for the unique key being created.

This setting is for use with tables set up as business-time tables. For more information,

see " Tables (DB2 LUW v10) - Temporal Properties " on page 279.

When selected, a BUSINESS_TIME WITHOUT OVERLAPS option is specified against the column or columns defining the constraint, in the generated DDL. This ensures that values for the constraint columns are unique with respect to the time for the

BUSINESS_TIME period.

When you select this option, columns specified as business-time begin period and end period are not available as candidates on the Columns tab/panel.

U NIQUE K EYS (DB2 LUW) - C OLUMNS

From the Column dropdown, select a column for the primary key and specify a Sort option. To add more columns, click the New button and then follow the steps in the last instruction. Use the Delete button to drop columns.

U SER D ATATYPES (DB2 LUW)

User defined datatypes allow column definitions to be consistent across a database. They let you associate frequently used datatype information to be associated with a specified function and take advantage of performance features available to built-in datatypes including indexing and parallel database queries.

To create a new user datatype using a wizard:

1 Open a creation wizard for a user datatype. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

User Datatypes (DB2 LUW) - Properties

.

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

283 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

U SER D ATATYPES (DB2 LUW) - P ROPERTIES

When creating or editing a user datatype, this tab/panel lets you work with the following settings:

Setting

Owner

Datatype

Type

Size

Allow Bit Data

Description

Select the owner of the user datatype.

Provide a name for the datatype.

Select the base datatype.

Provide the size of the datatype.

The option is only available for certain datatypes. A check means you want to store the data in a bit format.

U SERS W IZARD (DB2 LUW)

Users have authorization to use a database and its objects, and the User Wizard gives you an easy way to add new ones.

To create a new user using a wizard:

1 Open a creation wizard for a user. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Users (DB2 LUW) - Properties .

• Object Permissions and System Permissions

panels - " Setting Permissions or Privileges for an Object " on page 257

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

U SERS (DB2 LUW) - P ROPERTIES

When creating or editing a user datatype, this tab/panel lets you provide the user Name .

V IEWS W IZARD (DB2 LUW)

A view gives you an alternative way to look at data in one or more tables. You can customize how you see a table’s contents.

RAPID SQL 8.6/XE5 USER GUIDE 284

CREATING OBJECTS

To create a new view using a wizard:

1 Open a creation wizard for a view. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Views (DB2 LUW) - Properties

.

• Definition panel - for details, see

Views (DB2 LUW) - Definition .

3 Finally, use the Execute button to create the object.

V IEWS (DB2 LUW) - P ROPERTIES

When creating or editing a view, this tab/panel lets you work with the following settings:

Setting

Schema

Name

Check Type

Description

Select the owner of the view. The owner of the view must have SELECT privileges for the tables in the CREATE view statement or DBADM authority on the database that contains the table.

Provide a name for the view.

CHECK_NONE - No search conditions must be satisfied for insert or update operations.

CHECK_LOCAL - Update and insert operations on view must satisfy the search conditions of the view and underlying views that are defined with a check option. Furthermore, every updatable view that is directly or indirectly defined on view inherits those search conditions

(the search conditions of view and all underlying views of that are defined with a check option) as a constraint on insert or update operations.

CHECK_CASCADED - Update and insert operations on the view must satisfy the search conditions of view and all underlying views, regardless of whether the underlying views were defined with a check option. Furthermore, every updatable view that is directly or indirectly defined on view inherits those search conditions (the search conditions of view and all underlying views) as a constraint on insert or update operations.

V IEWS (DB2 LUW) - D EFINITION

Complete the CREATE VIEW statement by typing or pasting in the relevant query.

IBM DB2 FOR Z /OS O BJECT W IZARDS

Rapid SQL lets you create DB2 OS390 objects using the following wizards:

• Aliases Wizard (DB2 Z/OS)

• Databases Wizard (DB2 Z/OS)

• Foreign Keys Wizard (DB2 Z/OS))

• Functions Wizard (DB2 Z/OS)

285 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

• Indexes Wizard (DB2 Z/OS)

• Plans Wizard (DB2 Z/OS)

Primary Keys Wizard (DB2 Z/OS)

• Procedures Wizard (DB2 Z/OS)

• Stogroups Wizard (DB2 Z/OS)

• Synonyms Wizard (DB2 Z/OS)

• Tables Wizard (DB2 Z/OS)

• Tablespaces Wizard (DB2 Z/OS)

• Triggers Wizard (DB2 Z/OS)

• Unique Keys Wizard (DB2 Z/OS)

• User Datatypes Wizard (DB2 Z/OS)

• Users Wizard (DB2 Z/OS)

• Views Wizard (DB2 Z/OS)

In addition, see Create Synonym

.

A LIASES W IZARD (DB2 Z/OS)

An alias offers you security and convenience so that you can refer to an object without revealing who owns it or what database it belongs to. You can create aliases for tables or views. The Alias

Wizard lets you create an alias without knowing the underlying commands. As you complete the

Alias Wizard process, Rapid SQL constructs the necessary CREATE ALIAS statement based on the information that you supply. To create an alias, you must have CREATE ALIAS privileges or sysadmin or sysctrl authority.

To create a new alias using a wizard:

1 Open a creation wizard for an alias. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Aliases (DB2 z/OS) - Properties .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

RAPID SQL 8.6/XE5 USER GUIDE 286

CREATING OBJECTS

A

LIA SES (DB2 Z /OS) - P ROPERTIES

When creating or editing a view, this tab/panel lets you work with the following settings:

Setting

Schema

Name

Target Owner

Target Type

Target Name

Description

Select the schema that is to own the alias.

Provide a name for the alias.

Select the owner of the object to which you are creating an alias.

Select the type of object (TABLE, VIEW) to which you are creating an alias.

Select the specific object to which you are creating an alias.

D ATABASES W IZARD (DB2 Z/OS)

The Database Wizard lets you create a database (a structured collection of data that can be updated or queried) without knowing the underlying commands. Databases can be simple, that is one file with many records and the same fields, or much more complicated with multiple files with different fields.

To create a new database using a wizard:

1 Open a creation wizard for a database. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Databases (DB2 z/OS) - Properties

.

• Permissions

panel - for details, see " Setting Permissions or Privileges for an Object " on page 257

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

D ATABASES (DB2 Z /OS) - P ROPERTIES

When creating or editing a database, this tab/panel lets you work with the following settings:

Setting

Name

Type

Group Member

Description

Provide a unique name for the database.

Workfile: This option in only available if the server is configured in IBM DB2 for OS/390 and z/

OS to allow sharing. For more information, contact your System administrator.

Temp: This option indicates the database is only for declared temporary tables. A temp database cannot be shared.

Specifies the member for which this database is being created. Use this only in a shared environment.

287 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Setting

Tablespace Buffer

Pool

Description

Select the default buffer pool to be used for tablespaces created within the database.

Index Buffer Pool

Storage Group

Select the default buffer pool name to be used for indexes created within the database.

Select the default storage group to support the DASD space requirements for tablespaces and indexes within the database.

Encoding Scheme Select an encoding schema of DEFAULT, ASCII, EBCDIC, or UNICODE.

NOTE: To change the encoding scheme for a database after it has been created to use a different coded character set identifier (CCSID) that supports the Euro symbol, all data must be unloaded and reloaded. For more information regarding the encoding scheme, contact your System administrator.

F OREIGN K EYS W IZARD (DB2 Z/OS))

Foreign keys are unique values that refer to specific columns of other tables. Thus, a foreign key links two tables together. Embarcadero Rapid SQL’s Foreign Key Wizard makes it easy for you to create a relational link between two tables, thereby speeding queries and giving you faster access to data.The Foreign Key Wizard lets you create a foreign key without knowing the underlying commands.

To create a new foreign key using a wizard:

1 Open a creation wizard for a foreign key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Foreign Keys (DB2 z/OS) - Properties .

• Column Mapping panel - for details, see

Foreign Keys (DB2 z/OS) - Column Mapping

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

F OREIGN K EYS (DB2 Z /OS) - P ROPERTIES

When creating or editing a foreign key, this tab/panel lets you work with the following settings:

Setting

Table Schema

Table Name

Name

Delete Rule

Description

Select the owner of the referencing, or child, table.

Select the name of the referencing, or child, table.

If you do not want to use the system-generated name, provide a new one.

Select the action to be taken (NO ACTION, RESTRICT, CASCADE, or SET NULL) when a row of the referenced, or parent, table is deleted.

RAPID SQL 8.6/XE5 USER GUIDE 288

CREATING OBJECTS

F OREIGN K EYS (DB2 Z /OS) - C OLUMN M APPING

Under Referenced Table , choose the Owner and then the Name of the referenced, or parent, table.

Under the Main Table , select check boxes corresponding to the columns that are to reference columns in the referenced table. Then, under Referenced Table , select the corresponding column check boxes.

F UNCTIONS W IZARD (DB2 Z/OS)

To create a relationship between one set of values and another, Rapid SQL offers the Function

Wizard. You can develop reusable subroutines so you can control, access, and manipulate the data that underlies an object. As you complete the Function Wizard process, Rapid SQL constructs the necessary CREATE FUNCTION statement based on the information that you supply.

NOTE: To create a user-defined function, you need CREATE ANY privileges or

IMPLICIT_SCHEMA authority on the database if the schema does not already exist.

To create a new function using a wizard:

1 Open a creation wizard for a function. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Functions (DB2 z/OS) - Properties

.

• Source panel - (Only available for a Function Type of SOURCED .

) for details, see Functions

(DB2 z/OS) - Source .

• Parameters

panel - for details, see Functions (DB2 z/OS) - Parameters

.

• Return Scalar

panel - for details, see Functions (DB2 z/OS) - Return Scalar .

• Return Columns panel - (Only available when you choose a Function Type of EXTERNAL

TABLE .

) for details, see Functions (DB2 z/OS) - Return Columns .

• Body

panel - for details, see Functions (DB2 z/OS) - Body .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

289 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

F UNCTIONS (DB2 Z /OS) - P ROPERTIES

When creating or editing a function, this tab/panel lets you work with the following settings:

Setting

Schema , Name , and

Specific Name

Function Type

Description

Select the owner of the function, provide a name for the function, and provide the Specific name to be used by some SQL statements and DB2 commands for this function.

Language

External Scalar: This allows you to extend the function by adding your own or another party’s definition for the function.

External Table: Use this to create a function that is written in ASSEMBLE, C, COBOL, or PLI to return a table after it is deployed.

Sourced: Here you are creating a function that is based on an existing scalar or table function with an application server.

SQL: This type of function returns a single value when the function is invoked if the SQL statement that defines it is valid.

If you chose a Function Type of EXTERNAL SCALAR or EXTERNAL TABLE, specify a language of ASSEMBLE, C, COBOL, or PLI.

Return Type

External Name

SQL Access Level

Identifies the return type of the function.

Provide the External Name of the function.

Indicates whether the function can execute SQL statements.

CONTAINS SQL: Statements that don’t read or modify SQL can be executed.

NO SQL: No SQL statements can be executed.

READS SQL: Statements that cannot modify SQL can be executed.

WLM Environment Specify a Workload Management Environment (Required if Language is JAVA/COMPJAVA/

REXX, the Procedure contains a LOB parameter, Security is set to ‘USER’ or ‘DEFINER’, or program type is ‘SUB’).

WLM For Nested Self-explanatory

F UNCTIONS (DB2 Z /OS) - S OURCE

NOTE: Only available for a Function Type of SOURCED.

Select the Schema , Name , and Specific Name of the source function.

F UNCTIONS (DB2 Z /OS) - P ARAMETERS

For each parameter for this function, use the New button to add a new parameter, provide a name for the parameter, and in the Attributes area, select a Type , and if appropriate, the

Precision , Scale , Size , and As Locator options.

F UNCTIONS (DB2 Z /OS) - R ETURN S CALAR

Under Return Datatype , select a Type and depending on your choice, provide or select

Precision , Scale , Size , and As Locator options.

To make use of a CAST FROM clause, under Cast Datatype set Enabled to True, select a Type , and if appropriate, the Scale , Size , and As Locator options

RAPID SQL 8.6/XE5 USER GUIDE 290

CREATING OBJECTS

F UNCTIONS (DB2 Z /OS) - R ETURN C OLUMNS

NOTE: Only available when you choose a Function Type of EXTERNAL TABLE.

For each column returned by this function, use the New button to add a new parameter, provide a name for the parameter, and in the Attributes area, select a Type , and if appropriate, the Precision , Scale , Size , and As Locator options.

F UNCTIONS (DB2 Z /OS) - B ODY

Enter the return statement for the function.

I NDEXES W IZARD (DB2 Z/OS)

Like the index in a book, a database index makes it easier for you to access information quickly.

An index lists the location of rows, sorted by the contents of one or more columns.

To create a new index using a wizard:

1 Open a creation wizard for an index. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Indexes (DB2 z/OS) - Properties

• Columns panel - for details, see

Indexes (DB2 z/OS) - Columns

• Indexes panel

- for details, see Indexes (DB2 z/OS) - Storage

• Partitions panel

- for details, see Indexes (DB2 z/OS) - Partitions

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

I NDEXES (DB2 Z /OS) - P ROPERTIES

When creating or editing an index, this tab/panel lets you work with the following settings:

Setting

Table Schema and

Table Name

Schema and Name

Description

Choose the owner and name of the table in which the index is being created.

Choose the owner and name of the index being created.

291 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Setting

Index Type

Clustered

Description

Unique: Prevents the selected table from having two or more rows with the same value of the index key. The uniqueness is enforced at the end of the SQL statement update. Also, null values are treated like any other values, so a column cannot contain more than one null. If you later elect to partition the index, the columns specified for the unique key must include all columns for the partitioning key.

Non-Unique (default)

Enable or disable clustering. Unless you specifically select the CLUSTER option when you create an index, the first index you create on a table will be bestowed with that distinction. Each table can only have one clustering index at a time.

The clustering index tells DB2 to insert rows in the table in the order of the clustering key values. Inserted rows will be stored contiguously in sequence when possible. Columns frequently searched with a range of values BETWEEN, less than, greater than, and LIKE, or GROUP BY, etc., are good candidates for a clustering index.

If you enabled Clustering, specify the number of partitions.

Provide the buffer pool in which this index should reside

Enable or disable these DB2 options as required.

Number of Partitions

Buffer Pool

Defer , Close , Copy , and

Define

Piece Size

Compress

Index on expression

Padded

The maximum addressability of the dataset for a non-partitioned index.

Enabling this setting specifies a COMPRESS=YES parameter when creating the table, resulting in a compressed index. This feature is available if the size of the specified

Buffer Pool is 8k, 16k, or 32k.

Setting the check box enables the Index on Expression feature. The key expression is then provided on the Columns

tab/panel. For details, see " Indexes (DB2 z/OS) -

Columns " on page 292.

Setting this check box specifies that the table is to be created with the PADDED keyword.

This feature must be enabled if you are using index key randomization. The RANDOM setting is applied on a column by column basis on the Columns tab/panel.

I NDEXES (DB2 Z /OS) - C OLUMNS

The actions you take on this tab/panel depend on whether you set the Index on Expression

check box on the Properties panel. For more information, see " Indexes (DB2 z/OS) - Properties " on page 291.

• If Index on Expression is disabled:

From the Column dropdown, select a column for the index and specify a Sort option.

NOTE: If you want to use the RANDOM sort option, you must first set the Padded check box on the Properties tab/panel.

• If Index on Expression is enabled:

Enter a valid key-expression in the Expression field and choose a Sort order.

To add more columns/key-expressions, click the New button and then follow the steps in the last instruction. Use the Delete button to drop columns.

RAPID SQL 8.6/XE5 USER GUIDE 292

CREATING OBJECTS

I NDEXES (DB2 Z /OS) - S TORAGE

This tab/panel lets you perform the following tasks:

• Select a dataset management scheme

• Provide associated attribute values

To select a data set management scheme:

1 Click the Edit button. The Data Set Management dialog opens.

2 Set one of the following data set management options:

• DB2 will define and manage the data sets on a volume of the default storage group of the database

• DB2 will define and manage the data sets on a volume of the specified storage group - Select a storage group (a storage group is made up of disk device volumes): Each data set will be defined on a volume listed in the storage group you select.

Minimum primary space allocation: 12 kilobytes is the default.

Minimum secondary space allocation: 12 kilobytes is the default.

NOTE: NOTE: If the primary and (118 x) secondary space allocations combine to be greater than 2 gigabytes, more than one data set may eventually be used.

Erase data sets when index dropped? If choose this option, DB2 will overwrite all data with zeros before they are deleted as a security measure.

• User will manage the data sets on a specified VCAT catalog-name - Enter or select the

VCAT. Do not select this option for an index on a declared temporary table.

3 Click OK .

In addition to the attributes specific to your data set management choice, this tab/panel also offers the following settings:

Free Page

Percent Free

GBP Cache

One free page exists for every x pages. The x specifies how often to leave a page of free space when index entries are created from executing a DB2 utility or creating an index for a table with pre-existing rows. (0-255)

The percentage of free space you want to leave in every page when entries are added to an existing index. The default is 10%.

This option is available only in a data-sharing environment.

ALL: As pages are read, all of them will be cached in the group buffer pool.

CHANGED: Updated pages are cached to the group buffer pool.

NONE: No pages will be cached.

I NDEXES (DB2 Z /OS) - P ARTITIONS

Displays the default settings for the number of partitions you specified on the Properties pane.

Select a partition and click the Edit button to modify details for that partition.

293 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

P LANS W IZARD (DB2 Z/OS)

A plan, also known as the application plan, is a control structure that is used to process the SQL statements DB2 encounters when it is executing those SQL statements. The Plan Wizard, really, the Bind Plan Wizard, creates the structure that is used in the bind process--the process by which the output from the SQL precompiler is converted into usable form. Some authorization checking is necessary.

To Open the Bind Plan Wizard

1 On the Navigator, find the database where you want to add the new bind plan.

2 On the Plan branch, right-click and select Create .

The Bind Plan Wizard lets you set plan parameters, add packages, and set bind properties. The table below describes the options and functionality on the Bind Plan wizard:

Panel Settings and tasks

1 Plan Name

Qualifier

Lets you select the plan name.

OPTIONAL: Lets you select a qualifier, the plan creator.

Action

Sql Rules

Cache Size

Plan Owner

Current

Server

OPTIONAL: Lets you select an action.

OPTIONAL: Determines whether you can execute a type 2 CONNECT statement to an existing SQL connection, according to DB2 rules. Lets you select DB2 or STD.

OPTIONAL: Lets you select or type the cachesize in bytes, the authorization cache acquired in the EDM pool for the plan. At run time, the authorization cache stores user IDs authorized to run. Consulting the cache can avoid a catalog lookup for checking authorization to run the plan.

OPTIONAL: Determines the authorization ID of the owner of the plan.

OPTIONAL: Determines the location to connect to before running the plan.

2

3

Resource

Acquire

OPTIONAL:

Use - Acquires table space locks only when first used by a bound application program.

Allocate - Acquires all table space locks when the plan is allocated. The value has no effect on dynamic SQL statements, which always use ACQUIRE(USE).

Disconnect OPTIONAL: Determines which remote connections to destroy during commit operations.

The option applies to any application process that uses the plan and has remote connections of any type. Regardless of the value of this option, a commit operation destroys all connections in the release pending state.

Explicit - Destroy only connections in the release pending state. This value allows you maximum flexibility for controlling remote connections.

Automatic - Destroy all remote connections.

Conditional - Destroy all remote connections unless an open cursor defined as WITH

HOLD is associated with the connection.

Lets you select the Member Name , PDS Name (partitioned data set) and click Add to enter each member and PDS name.

Lets you select the Location to connect to, the Collection (location of the DBMS where the plan binds and where the description of the plan resides.) and a Package .

RAPID SQL 8.6/XE5 USER GUIDE 294

CREATING OBJECTS

Panel Settings and tasks

4 Isolation

Keep

Dynamic

Determines how far to isolate an application from the effects of other running applications.

Specifies that DB2 keeps dynamic SQL statements after commit points. The application does not need to prepare an SQL statement after every commit point. DB2 keeps the dynamic SQL statement until the application process ends, a rollback operation occurs or the application executes an explicit PREPARE statement with the same statement identifier.

If the prepared statement cache is active, DB2 keeps a copy of the prepared statement in the cache. If the prepared statement cache is not active, DB2 keeps only the SQL statement string past a commit point. DB2 then implicitly prepares the SQL statement if the application executes an OPEN, EXECUTE, or DESCRIBE operation for that statement.

5

Current Data Determines whether to require data currency for read-only and ambiguous cursors when the isolation level of cursor stability is in effect. It also determines whether block fetching can be used for distributed, ambiguous cursors.

Degree Determines whether to attempt to run a query using parallel processing to maximize performance. Lets you select an option.

Dynamic

Rules

Determines what values apply at run time for the following dynamic SQL attributes:

The authorization ID that is used to check authorization

The qualifier that is used for unqualified objects

The source for application programming options that DB2 uses to parse and semantically verify dynamic SQL statements

Whether dynamic SQL statements can include GRANT, REVOKE, ALTER, CREATE, DROP, and RENAME statements

Release

Validate

Explain

Determines when to release resources that a program uses. Options are at each Commit point or Deallocate when the program terminates.

Determines whether to recheck, at run time, errors found during bind. The option has no effect if all objects and needed privileges exist.

Bind - If not all objects or needed privileges exist at bind time, the wizard displays an error messages, and does not bind the package.

Run - If not all objects or privileges exist at bind time, the process issues warning messages, but the bind succeeds. DB2 checks existence and authorization again at run time for SQL statements that failed those checks during bind. The checks use the authorization ID of the plan owner.

Obtains information about how SQL statements in the member list of the plan, are to execute, and then inserts that information into the table owner.PLAN_TABLE, where owner is the authorization ID of the owner of the plan or package. This option does not obtain information for statements that access remote objects.

Reopt(VARS) Re-determines the access path at run time.

Prepare Prepares dynamic SQL statements that refer to remote objects.

ImmedWrite Immediate writes will be done for updates made to group buffer pool dependent pagesets or partitions.

Opthint

Encoding

Path

Flag

Query optimization hints are used for static SQL.

Lets you select type of language for the package.

Lets you select a path that DB2 uses to resolve unqualified user-defined distinct types, functions, and stored procedure names (in CALL statements).

Lets you select all message types or a specified subset to display: informational, warning, error, and completion messages.

295 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Panel Settings and tasks

6 Enable option.

or Disable system connection types that can use the plan or package, select a System or Cname

P RIMARY K EYS W IZARD (DB2 Z/OS)

A primary key is a unique key that is part of a table’s definition. There can be only one primary key for each table, and the columns contained in a primary key cannot have null values. A primary key constraint forbids duplicate values in one or more columns. A table with a primary key will be considered the parent table to a table with a foreign key, which becomes the dependent table.

NOTE: A nullable column cannot be a part of a primary key.

To create a new primary key using a wizard:

1 Open a creation wizard for a primary key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Primary Keys (DB2 z/OS) - Properties .

• Columns panel - for details, see

Primary Keys (DB2 z/OS) - Columns .

• Storage panel - for details, see

Primary Keys - Storage - Edit button (manage datasets)

and

Primary Keys (DB2 z/OS) - Storage - Attributes .

• Partitions panel

- for details, see Primary Keys (DB2 z/OS) - Partitions .

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

P RIMARY K EYS (DB2 Z /OS) - P ROPERTIES

When creating or editing a primary key, this tab/panel lets you work with the following settings:

Setting

Table Schema and

Table Name

Description

Choose the owner and name of the table in which the index is being created.

Schema and Name Choose the owner and name of the index being created.

Clustered Enable or disable clustering.

If you enabled Clustering, specify the number of partitions.

Number of

Partitions

Buffer Pool Provide the buffer pool in which this index should reside

RAPID SQL 8.6/XE5 USER GUIDE 296

CREATING OBJECTS

Setting

Defer , Close , Copy , and Define

Description

Enable or disable these DB2 options as required.

Piece Size The maximum addressability of the dataset for a non-partitioned index.

Time period policy This setting is for use with tables set up as business-time tables. For more information, see

" Tables (DB2 z/OS v10) - Temporal Properties " on page 303.

When selected, a BUSINESS_TIME WITHOUT OVERLAPS option is specified against the column or columns defining the constraint, in the generated DDL. This ensures that values for the constraint columns are unique with respect to the time for the BUSINESS_TIME period.

When you select this option, columns specified as business-time begin period and end period are not available as candidates on the Columns tab/panel.

P RIMARY K EYS (DB2 Z /OS) - C OLUMNS

From the Column dropdown, select a column for the primary key and specify a Sort option. To add more columns, click the New button and then follow the steps in the last instruction. Use the Delete button to drop columns.

P RIMARY K EYS - S TORAGE - E DIT BUTTON ( MANAGE DATASETS )

NOTE: Availability differs according to the dataset management options you chose

Choose a data set management option:

DB2 will define and manage the data sets on a volume of the default storage group of the database

DB2 will define and manage the data sets on a volume of the specified storage group

Select a storage group (a storage group is made up of disk device volumes): Each data set will be defined on a volume listed in the storage group you select.

Minimum primary space allocation : 12 kilobytes is the default.

Minimum secondary space allocation : 12 kilobytes is the default.

NOTE: If the primary and (118 x) secondary space allocations combine to be greater than 2 gigabytes, more than one data set may eventually be used.

Erase data sets when index dropped?

If you choose this option, DB2 will overwrite all data with zeros before they are deleted as a security measure.

User will manage the data sets on a specified VCAT catalog-name Enter or select the VCAT.

Do not select this option for an index on a declared temporary table.

297 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

P RIMARY K EYS (DB2 Z /OS) - S TORAGE - A TTRIBUTES

When creating or editing a primary key, this tab/panel lets you work with the following settings:

Setting

Storage Group ,

Primary Space

Allocation ,

Secondary Space

Allocation , Erase , and VCAT catalog

Free Page

Percent Free

GBP Cache

Description

The ability to set these options depends on the dataset management options you chose.

One free page exists for every x pages. The x specifies how often to leave a page of free space when index entries are created from executing a DB2 utility or creating an index for a table with pre-existing rows. (0-255)

The percentage of free space you want to leave in every page when entries are added to an existing index. The default is 10%.

This option is available only in a data-sharing environment.

ALL: As pages are read, all of them will be cached in the group buffer pool.

CHANGED: Updated pages are cached to the group buffer pool.

NONE: No pages will be cached.

P RIMARY K EYS (DB2 Z /OS) - P ARTITIONS

Displays the default settings for the number of partitions you specified on the Properties pane.

Select a partition and click the Edit button to modify details for that partition.

P ROCEDURES W IZARD (DB2 Z/OS)

Procedures are a reusable block of PL/SQL, stored in the database, that applications can call.

Procedures streamline code development, debugging, and maintenance by being reusable.

Procedures enhance database security by letting you write procedures granting users execution privileges to tables rather than letting them access tables directly.

To create a new procedure using a wizard:

1 Open a creation wizard for a procedure. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Procedures (DB2 z/OS) - Properties .

• Parameters panel - for details, see

Procedures (DB2 z/OS) - Parameters .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

RAPID SQL 8.6/XE5 USER GUIDE 298

CREATING OBJECTS

Important Notes

• If you are creating a SQL routine procedure, you must have the latest DB2 fixpack installed on your OS/390 Client. If you do not have the latest fixpack installed, the SQL routine procedure creation will fail.

P ROCEDURES (DB2 Z /OS) - P ROPERTIES

When creating or editing a procedure, this tab/panel lets you work with the following settings:

Setting

Schema , Name , and

Specific Name

Language

SQL Access Level

Description

Select the schema that is to own the procedure, provide a name for the procedure, and provide the Specific Name for the procedure.

The database manager will call the procedure accordingly assuming the program is designed to run in the server’s environment.

Assemble: a stored procedure written in Assembler

C: a stored procedure written in C or C++

COBOL: a stored procedure written in COBOL

CompJAVA: CompJAVA is no longer supported. Stored procedures should alternatively be written in JAVA.

JAVA

PLI: A stored procedure written in PL/I.

REXX (Restructured Extended Executor Language) - Don’t use this language when SQL parameter style is in effect. To specify REXX, the general parameter style or general with nulls.

SQL

MODIFIES SQL DATA (Default): The procedure can support any SQL statement except those that cannot be supported in procedures.

CONTAINS SQL DATA: Only SQL statements that neither modify nor read SQL data can be executed in the procedure.

READS SQL DATA Some SQL statements that don’t modify SQL data can be included in the procedure

NO SQL: Only SQL statements with a data access classification of NO SQL can be executed.

Don’t select this option for a JAVA procedure that uses a .jar.

WLM Environment Specify a Workload Management Environment (Required if Language is JAVA/COMPJAVA/

REXX, the Procedure contains a LOB parameter, or Security is set to ‘USER’ or ‘DEFINER’).

WLM For Nested Self-explanatory

P ROCEDURES (DB2 Z /OS) - P ARAMETERS

For each parameter for this function, use the New button to add a new parameter, provide a name for the parameter, and in the Attributes area, select a Type , specify a Parameter Mode of

INPUT, OUTPUT, or INPUT_OUTPUT, and if appropriate, the Precision , Scale , and Size options.

299 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

S TOGROUPS W IZARD (DB2 Z/OS)

Stogroups are storage groups. You create them on the current server. Storage from the named sets of volumes you create can be allocated at a later date for tablespaces or index spaces.

To Open the Stogroup Wizard

1 On the Navigator, find the datasource where you want to add the new Storage Group.

2 Expand the Storage branch, right-click Stogroup , and select New .

The table below describes the fields you will encounter as you complete the Stogroup Wizard.

Required Information

What is the name of the

Stogroup?

VCAT

Description

Enter a name for the storage group.

Select the volumes in the

Stogroup

Select All

This is the integrated catalog facility catalog, or volume catalog. Name the catalog or choose one from the drop-down list if it is available.

Specify a set of volumes that may exist on the system but may not be in use by other storage groups.

Selects all listed volumes.

Unselect All

Add

Remove

Unselects all listed volumes.

Opens the

Add Volume Dialog Box .

Deletes all selected volumes from the list.

A DD V OLUME D IALOG B OX

The table below describes the options and functionality on the Add Volume dialog:

Required Information

Enter one or more volumes to add to the stogroup

Check

Description

Type the names of the volumes (separated by spaces) to add to the stogroup.

Or select volumes for the list

Click to see if any additional information is available about the volumes you typed.

Opens the

Volumes Info Dialog Box .

Lets you select volumes.

V OLUMES I NFO D IALOG B OX

The table below describes the options and functionality on the Volume Info dialog:

Required Information

Volumes

OK

Description

Lets you select volumes.

Click to add volumes to Stogroup Wizard.

RAPID SQL 8.6/XE5 USER GUIDE 300

CREATING OBJECTS

S YNONYMS W IZARD (DB2 Z/OS)

A synonym is an alternative name you can create for a table or view. Using a synonym can make it easier for you to remember that table or view instead of having to think about the possibly cumbersome formal name (for example, a show dog may have a formal name that incorporates all his ancestors, but will answer to the name Spot around the house).

To create a new synonym using a wizard:

1 Open a creation wizard for a synonym. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel

- for details, see Synonyms

(

DB2 z/OS

)

- Properties .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

S YNONYMS ( DB2 Z /OS ) - P ROPERTIES

When creating or editing a synonym, this tab/panel lets you work with the following settings:

Setting

Schema

Name

Description

Select the schema that is to own the synonym.

Provide a name for the synonym.

Referenced Object

Owner

Select the owner of the object to which you are creating a synonym.

Referenced Object

Type

Select the type of object (TABLE, VIEW) to which you are creating a synonym.

Referenced Object

Name

Select the specific object to which you are creating a synonym.

T ABLES W IZARD (DB2 Z/OS)

All data in a database is stored in a tabular format, that is a collection of rows and columns.

Tables, therefore are fundamental to whatever database you are administering.

301 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new table using a wizard:

1 Open a creation wizard for a table. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel

- for details, see Tables (DB2 z/OS) - Properties

.

• Columns panel - for details, see

Tables (DB2 z/OS) - Column

s

.

• Indexes panel

- for details, see Tables (DB2 z/OS) - Indexes

.

• Temporal Properties panel

- for details, see Tables (DB2 z/OS v10) - Temporal

Properties .

• Constraints panel - for details, see

Tables (DB2 z/OS) - Constraints

.

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• Permissions

panel - " Setting Permissions or Privileges for an Object " on page 257

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

The table that follows describes the fields you may encounter as you complete the Table Wizard.

T ABLES (DB2 Z /OS) - P ROPERTIES

Select the Schema , provide a Name , and provide or select other table properties.

T ABLES (DB2 Z /OS) - C OLUMN s

For each column in the table, click the Add Column button to create a column, provide a Name for the column and provide or select the remaining column attributes.

Use the Delete button to drop a selected column.

Use the arrow buttons to reposition the columns.

Row Properties (V10) settings are available when you select a Type of TIMESTAMP. These settings are used in conjunction with settings on the Temporal Properties tab in setting up

system and application temporal tables. For more information, see " Tables (DB2 z/OS v10) -

Temporal Properties " on page 303.

Specific settings are:

• As Row Begin - adds a GENERATED ALWAYS AS ROW BEGIN option to the column specification, used to track when a row is current.

• As Row End - adds a GENERATED ALWAYS AS ROW END option to the column specification.

• Transaction Start ID - adds a GENERATED ALWAYS AS TRANSACTION START ID option to the column specification indicating that this column captures the start times for transactions that affect rows.

RAPID SQL 8.6/XE5 USER GUIDE 302

CREATING OBJECTS

A column can have only one of the three settings selected.

When you select a Row Properties setting, the Scale value and if appropriate, the Allow Nulls ,

Default Value , and Expression settings are automatically adjusted for compatibility with row generation. Similarly, if one of the three Row Properties settings is selected for a column, and any of the Scale , Allow Nulls , Default Value , or Expression settings are modified, then the selected Row Properties setting is cleared.

T ABLES (DB2 Z /OS) - I NDEXES

Click Add to open the

Indexes Wizard (DB2 Z/OS) .

T ABLES (DB2 Z /OS V 10) - T EMPORAL P ROPERTIES

This tab/panel lets you specify temporal properties to a table, designating it as a table that records the period of time when a row is valid.

NOTE: Before using this object action, consult DB2 LUW documentation for details on setup

and use of the temporal tables feature. For more information, see " Accessing Third

Party Documentation " on page 21.

This tab/panel has the following controls:

• System-time table - selecting this option creates a table with the PERIOD SYSTEM_TIME clause, designating it as a system-period temporal table. This option is available if the table has three columns of type TIMESTAMP, and the following prerequisites have been met:

• At least one TIMESTAMP-typed column has the As Row Begin property selected

• At least one TIMESTAMP-typed column has the As Row End property selected

• At least one TIMESTAMP-typed column has the Transaction Start ID property selected

For details on column definitions, see " Tables (DB2 z/OS) - Column

s

" on page 302.

The Row-begin column , Row-end column , and Transaction Start ID column controls are automatically populated with the columns having the corresponding property.

When you select this option, in the generated DDL, the Row-begin column and Row-end column values are used as the PERIOD SYSTEM_TIME column parameters, defining the system period.

• Business-time table - selecting this option creates a table with the PERIOD

BUSINESS_TIME clause, designating it as an application-period temporal table. This option is available if the table has two columns of type DATE or TIMESTAMP, for which no Row

Properties have been assigned.

The Begin column and End Column controls are automatically populated with the valid candidate columns from the table's column list and the first distinct column pair is automatically chosen for convenience.

303 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

• Use history table - this set of controls is only active when Business-time table is selected. It lets you associate a history table. When you select Use history table , the Owner and Name controls are activated, letting you identify the history table to associate with this table.

Note that a constraint created on a business-time table can enforce the uniqueness of the data for any point in business time via the Time period policy property that has been added in the constraint wizards. For details, see the following topics:

• " Primary Keys (DB2 z/OS) - Properties " on page 296

• " Unique Keys (DB2 z/OS) - Properties " on page 308

T ABLES (DB2 Z /OS) - C ONSTRAINTS

Selecting a constraint type and clicking Add opens the object wizard for that object type. For details see:

Foreign Keys Wizard (DB2 Z/OS))

Primary Keys Wizard (DB2 Z/OS)

Unique Keys Wizard (DB2 Z/OS)

Create Synonym

T ABLESPACES W IZARD (DB2 Z/OS)

Tablespaces establish connections between the physical storage devices of your database system and the logical containers or tables being used to store data. In essence, a tablespace is a storage structure that can hold tables, indexes, large objects, and long data.

NOTE: To change the encoding scheme for a database after it is created to utilize a different coded character set identifier (CCSID) that supports the Euro symbol, all data must be unloaded and reloaded. For more information regarding the encoding scheme, contact your System administrator.

To Open the Tablespace Wizard

1 On the Navigator, find the datasource where you want to add the new Tablespace.

2 Expand the Storage branch, right-click Tablespaces , and select New .

3 Use the following table as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Tablespaces (DB2 z/OS) - Properties

.

• Permissions

panel - " Setting Permissions or Privileges for an Object " on page 257

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

4 Finally, use the Execute button to create the object.

RAPID SQL 8.6/XE5 USER GUIDE 304

CREATING OBJECTS

T ABLESPACES (DB2 Z /OS) - P ROPERTIES

When creating or editing a tablespace, this tab/panel lets you work with the following settings:

Group

Creation

Settings

Name and

Database

Description

Provide a name and select an assocaited database.

Tablespace management

Database type

Creation type

Lets you select a REGULAR or WORKFILE database type.

Lets you select among PARTITIONED, SEGMENTED, RANGE-

PARTITIONED UNIVERSAL, PARTITION-BY-GROWTH UNIVERSAL, and LOB options.

Refer to DB2 z/OS product documentation for detailed information on these types and other required settings. For more information, see

" Accessing Third Party Documentation " on page 21.

Management type Lets you select how you want the tablespace managed: DEFAULT

STORAGE GROUP, STORAGE GROUP, or VCAT CATALOG-NAME.

Storage group ,

Minimum primary space allocation,

Minimum secondary space allocation, and Erase rule

If you selected a Management type of STORAGE GROUP, select a storage group, specify minimum space allocations, and specify whether data sets are to be erased when the tablespace is dropped.

VCatName

Buffer Pool

If you selected a Management type of VCAT catalog-name, select a catalog name.

Select the buffer pool where the tablespace is to reside.

Bufferpool

Partitions and size Number of partitions

If you selected a Creation Type of PARTITIONED or RANGE-

PARTITIONED UNIVERSAL, specify the number of partitions.

Space

Management

Partition size

(DSSIZE)

If you did not select a Creation Type of SEGMENTED, select a partition size.

Segment size If you selected a Creation Type of SEGMENTED, PARTITION-BY

GROWTH, or RANGE-PARTITIONED UNIVERSAL, select the number of pages that are to be assigned to each segment of the tablespace.

Max rows per page Specify the number of rows (1-255) that can be placed on each data page.

Free space portion of each page (%)

If you did not select a Creation Type of LOB, specify the percentage of each page to be left as free space when a tablespace is reloaded or reorganized.

Free page frequency

If you did not select a Creation Type of LOB, specify how often to leave a free page when a tablespace is reloaded or reorganized.

305 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Group Settings

Other parameters GBPCACHE

Compress

Track modified pages

Encoding scheme

Log

Description

Select a group buffer pool cache scheme of CHANGED, ALL, SYSTEM, or NONE.

Enable this setting to allow compression.

Enable this setting to track modified pages in the space map pages.

Define

Member Cluster

Close rule

Lock Size

Maximum locks

Select an encoding scheme of EBCDIC, UNICODE, ASCII, or NONE.

Enabling this check box specifies that changes to a LOB column are to be written to the log.

Enabling this check box specifies that tablespace data sets are defined when the tablespace is created. Otherwise, data sets are not created until data is inserted.

Enable this setting to manage space for inserts on a member-bymember basis.

Enable this setting to specify CLOSE YES, dictating the data set close priority.

Specify a lock size of ANY, TABLESPACE, PAGE, or ROW.

Specify the number of locks that are allowed before escalating.

T RIGGERS W IZARD (DB2 Z/OS)

All data in a database is stored in a tabular format, that is a collection of rows and columns.

Tables, therefore are fundamental to whatever database you are administering.

To create a new trigger using a wizard:

1 Open a creation wizard for a trigger. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Triggers (DB2 z/OS) - Properties .

• Column Selection panel - for details, see

Triggers (DB2 z/OS) - Column Selection .

• Definition panel - for details, see

Triggers (DB2 z/OS) - Definition .

3 Finally, use the Execute button to create the object.

T RIGGERS (DB2 Z /OS) - P ROPERTIES

When creating or editing a trigger, this tab/panel lets you work with the following settings:

Setting

Table Schema and

Table Name

Description

Choose the owner and name of the table for which the trigger is being created.

RAPID SQL 8.6/XE5 USER GUIDE 306

CREATING OBJECTS

Setting

Schema and Name

Trigger Timing

Trigger Events

Trigger Type

Old Table Alias

New Table Alias

Old Row Alias

New Row Alias

Description

Choose the owner and name of the trigger being created.

BEFORE: These triggers serve as extensions to the constraint subsystem and are most often used to validate input data, generate values for newly inserted rows, and read from other tables for cross-reference purposes. Note: Before triggers must be created as a For

Each Row.

AFTER: Such a trigger is run after the integrity constraint validations; they can be used to modify operations in the database or be used for activities beyond the database, like supporting an alert notification.

An INSERT trigger must be associated with an INSERT statement. For example, if a data load operation doesn’t include an INSERT statement, the trigger will not be invoked.

An UPDATE trigger can be associated with specific columns of the base table and will only be activated if those columns are updated.

STATEMENT : (only fires once).

ROW (fires for each affected row): The trigger runs as many times as there are rows in the affected section. If the set of affected rows is empty, the trigger doesn’t run.

Type the name of a temporary table of rows as they exist before they’re updated or deleted.

Type a name for a temporary table of rows as they exist after they’re inserted or updated.

Type a name for the rows as they are before they’ve been deleted or updated.

Type a name for the rows as they are after they’ve been inserted or updated.

T RIGGERS (DB2 Z /OS) - C OLUMN S ELECTION

If you chose UPDATE as the Trigger Event , select the columns, select the check box beside each column that is to fire the trigger.

T RIGGERS (DB2 Z /OS) - D EFINITION

Complete the CREATE TRIGGER outline provided by typing or pasting the body of the trigger.

U NIQUE K EYS W IZARD (DB2 Z/OS)

A unique key constraint is a key for which no two of its values can be equal and no values can be null. A table can have a number of unique constraints, but it cannot have more than one unique constraint on the same set of columns. If you are creating a unique key constraint on a table that already exists (as opposed to creating a unique key at the time the table is first generated), a unique index must already exist on the columns of the unique key you want to constrain. If no unique index exists, the Index Wizard will open as you complete the Create Unique Key

Constraint dialog.

307 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new unique key using a wizard:

1 Open a creation wizard for a unique key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Unique Keys (DB2 z/OS) - Properties

.

• Columns panel - for details, see

Unique Keys (DB2 z/OS) - Columns

.

• Storage panel - for details, see

Unique Keys (DB2 z/OS) - Storage -

Edit

button (manage datasets) and Unique Keys (DB2 z/OS) - Storage - Attributes .

• Partitions panel

- for details, see Unique Keys (DB2 z/OS) - Partitions

.

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

U NIQUE K EYS (DB2 Z /OS) - P ROPERTIES

When creating or editing a primary key, this tab/panel lets you work with the following settings:

Setting

Table Schema and

Table Name

Description

Choose the owner and name of the table in which the unique key is being created.

Schema and Name Choose the owner and name of the index being created.

Clustered

Number of

Partitions

Buffer Pool

Defer , Close and Define

, Copy ,

Enable or disable clustering.

If you enabled Clustering, specify the number of partitions.

Provide the buffer pool in which this unique key should reside

Enable or disable these DB2 options as required.

Piece Size The maximum addressability of the dataset for a non-partitioned index.

Time period policy This setting is for use with tables set up as business-time tables. For more information, see

" Tables (DB2 z/OS v10) - Temporal Properties " on page 303.

When selected, a BUSINESS_TIME WITHOUT OVERLAPS option is specified against the column or columns defining the constraint, in the generated DDL. This ensures that values for the constraint columns are unique with respect to the time for the BUSINESS_TIME period.

When you select this option, columns specified as business-time begin period and end period are not available as candidates on the Columns tab/panel.

RAPID SQL 8.6/XE5 USER GUIDE 308

CREATING OBJECTS

U NIQUE K EYS (DB2 Z /OS) - C OLUMNS

From the Column dropdown, select a column for the unique key and specify a Sort option. To add more columns, click the New button and then follow the steps in the last instruction. Use the Delete button to drop columns.

U NIQUE K EYS (DB2 Z /OS) - S TORAGE - Edit BUTTON ( MANAGE DATASETS )

NOTE: Availability differs according to the dataset management options you chose

Choose a data set management option:

DB2 will define and manage the data sets on a volume of the default storage group of the database

DB2 will define and manage the data sets on a volume of the specified storage group

Select a storage group (a storage group is made up of disk device volumes): Each data set will be defined on a volume listed in the storage group you select.

Minimum primary space allocation : 12 kilobytes is the default.

Minimum secondary space allocation : 12 kilobytes is the default.

NOTE: If the primary and (118 x) secondary space allocations combine to be greater than 2 gigabytes, more than one data set may eventually be used.

Erase data sets when index dropped?

If you choose this option, DB2 will overwrite all data with zeros before they are deleted as a security measure.

User will manage the data sets on a specified VCAT catalog-name Enter or select the VCAT.

Do not select this option for an index on a declared temporary table.

U NIQUE K EYS (DB2 Z /OS) - S TORAGE - A TTRIBUTES

NOTE: Availability differs according to the dataset management options you chose

When creating or editing a unique key, this tab/panel lets you work with the following settings:

Setting

Storage Group ,

Primary Space

Allocation ,

Secondary Space

Allocation , Erase , and VCAT catalog

Free Page

Description

The ability to set these options depends on the dataset management options you chose.

Percent Free

One free page exists for every x pages. The x specifies how often to leave a page of free space when index entries are created from executing a DB2 utility or creating an index for a table with pre-existing rows. (0-255)

The percentage of free space you want to leave in every page when entries are added to an existing index. The default is 10%.

309 RAPID SQL 8.6/XE5 USER GUIDE

Setting

GBP Cache

CREATING OBJECTS

Description

This option is available only in a data-sharing environment.

ALL: As pages are read, all of them will be cached in the group buffer pool.

CHANGED: Updated pages are cached to the group buffer pool.

NONE: No pages will be cached.

U NIQUE K EYS (DB2 Z /OS) - P ARTITIONS

Displays the default settings for the number of partitions you specified on the Properties pane.

Select a partition and click the Edit button to modify details for that partition.

U SER D ATATYPES W IZARD (DB2 Z/OS)

A datatype is a named set of valid values that can be manipulated by a set of operations. There are intrinsic datatypes, which are predefined and always available, and derived datatypes. A derived datatype is a user-defined datatype, which can include both intrinsic and previously derived datatypes. The User Datatype Wizard lets you create a derived datatype without knowing the underlying commands.

To create a new user datatype using a wizard:

1 Open a creation wizard for a user datatype. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

User Datatypes (DB2 z/OS) - Properties

.

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

U SER D ATATYPES (DB2 Z /OS) - P ROPERTIES

When creating or editing a user datatype, this tab/panel lets you work with the following settings:

Setting

Owner

Datatype

Type

Size

For Data

Description

Select the owner of the user datatype.

Provide a name for the datatype.

Select the base datatype.

Provide the size of the datatype.

Select the MIXED, SBCS, or BIT option for the datatype.

RAPID SQL 8.6/XE5 USER GUIDE 310

CREATING OBJECTS

Setting

CCSID

Description

Select the NONE, ASCII, EBCDIC, or UNICODE option for the datatype.

U SERS W

I

ZARD (DB2 Z/OS)

Users have authorization to use a database and its objects, and the User Wizard gives you an easy way to add new ones.

To create a new user using a wizard:

1 Open a creation wizard for a user. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Users (DB2 z/OS) - Properties .

• Object Permissions and System Permissions

panels - " Setting Permissions or Privileges for an Object " on page 257

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

U SERS (DB2 Z /OS) - P ROPERTIES

When creating or editing a user datatype, this tab/panel lets you provide the user Name .

V IEWS W IZARD (DB2 Z/OS)

A view gives you a new way of looking at data in a results table. Views behave like tables because you can query views and perform data manipulation operations on them. However, views do not actually store any data. Instead, they depend on data contained in their base tables. Columns added to the base table(s) after the view is created are not included in the result set. Views are thus handy tools for controlling access to a table. You can allow someone to see portions of data without allowing that user to see the table in its entirety. For example, you can create a view that will permit a user to see employee names in a table without allowing access to the Social Security numbers of that same table.

The wizard itself is a single panel. After you complete the wizard, the View Editor opens so you can complete the definition of the view, choose the columns to show in the view, the dependencies, and access privileges to the view.

311 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new view using a wizard:

1 Open a creation wizard for a view. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Views (DB2 z/OS) - Properties

.

• Definition panel - for details, see

Views (DB2 z/OS) - Definition .

3 Finally, use the Execute button to create the object.

V IEWS (DB2 Z /OS) - P ROPERTIES

When creating or editing a view, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Check Type

Description

Select the owner of the view. The owner of the view must have SELECT privileges for the tables in the CREATE view statement or DBADM authority on the database that contains the table.

Provide a name for the view.

CHECK_NONE - No search conditions must be satisfied for insert or update operations.

CHECK_LOCAL - Update and insert operations on view must satisfy the search conditions of the view and underlying views that are defined with a check option. Furthermore, every updatable view that is directly or indirectly defined on view inherits those search conditions

(the search conditions of view and all underlying views of that are defined with a check option) as a constraint on insert or update operations.

CHECK CASCADED - Update and insert operations on the view must satisfy the search conditions of view and all underlying views, regardless of whether the underlying views were defined with a check option. Furthermore, every updatable view that is directly or indirectly defined on view inherits those search conditions (the search conditions of view and all underlying views) as a constraint on insert or update operations.

Views (DB2 z/OS) - Definition

Complete the CREATE VIEW statement by typing or pasting in the relevant query.

I NTER B ASE /F IREBIRD O BJECT W IZARDS

Rapid SQL provides wizards that let you create all supported InterBase/Firebird objects. For details, see the following topics:

• Blob Filters Wizard (ITB/FBD)

• Domains Wizard (ITB/FBD)

• Encryption Keys wizard (ITB/FBD)

• Exceptions Wizard (ITB/FBD)

RAPID SQL 8.6/XE5 USER GUIDE 312

CREATING OBJECTS

• External Functions Wizard (ITB/FBD)

Foreign Keys Wizard (DB2 LUW)

• Generators Wizard (ITB/FBD)

• Indexes Wizard (ITB/FBD)

• Primary Keys Wizard (ITB/FBD)

• Procedures Wizard (ITB/FBD)

• Roles Wizard (ITB/FBD)

• Shadows wizard (ITB/FBD)

• Tables Wizard (ITB/FBD)

• Triggers Wizard (ITB/FBD)

• Unique Keys Wizard (ITB/FBD)

• Users wizard (InterBase/Firebird)

• Views Wizard (ITB/FBD)

B LOB F ILTERS W IZARD (ITB/FBD)

The Blob Filter wizard lets you create and submit a DECLARE FILTER statement. Properties let you provide input and output subtypes, an entry point, and the module name.

To create a new blob filter using a wizard:

1 Open an object creation wizard for a blob filter. For details. see

Opening an Object Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see Blob Filters (ITB/FBD) - Properties .

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

313 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

B LOB F ILTERS (ITB/FBD) - P ROPERTIES

When creating or editing a Blob Filter, this tab/panel lets you work with the following settings:

Setting

Name

Input subtype

Output subtype

Entrypoint

Module name

Description

A name that must be unique among filters on the database.

Lets you provide an INPUT_TYPE argument that specifies the Blob subtype from which data is to be converted.

Lets you provide an OUTPUT_TYPE argument that specifies the Blob subtype into which data is to be converted

Lets you provide an ENTRY_POINT argument. Provide a quoted string specifying the name of the Blob filter as stored in a linked library.

Lets you provide a MODULE_NAME argument. Provide a quoted file specification identifying the object module in which the filter is stored.

D OMAINS W IZARD (ITB/FBD)

The Domain wizard lets you provide datatype details and other basic clause/option values, in creating a domain.

To create a new domain using a wizard:

1 Open an object creation wizard for a domain. For details. see Opening an Object Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see Domains (ITB/FBD) - Properties .

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

D OMAINS (ITB/FBD) - P ROPERTIES

When creating or editing a domain, this tab/panel lets you work with the following settings:

Group

Creation

Settings and descriptions

Lets you provide a Datatype name.

RAPID SQL 8.6/XE5 USER GUIDE 314

CREATING OBJECTS

Group Settings and descriptions

Base Datatype Lets you select an InterBase/Firebird-supported Type . The following additional settings are available, depending on the type you choose:

Character

Options

Lob Options

Domain

Options

Allow Nulls

Size , Precision , and

Scale

Array

Disabled, the domain is created with a NOT NULL clause.

Provide InterBase/Firebird-standard datatype options.

Clicking the associated search button lets you select the upper and lower bounds for an array dimension.

If you choose a character-based Type , the Character Set and Collation settings lets you select

CHARACTER SET and COLLATION clause values used when creating the domain.

If you choose a BLOB Type , you can specify the expected LOB SEgment Length , in bytes.

Default

Check

Specify a valid InterBase/Firebird DEFAULT argument value, to indicate the default column value that is entered when no other entry is made.

Specify a condition or requirement to be tested on data values at the time data is entered by applying a check constraint to a column.

E NCRYPTION K EYS WIZARD (ITB/FBD)

The Encryption Key wizard lets you create keys used to encrypt and decrypt databases or table columns. It lets you specify the credentials, basic algorithm details, and other encryption options.

NOTE: Before working with encryption keys, you should be familiar with InterBase/Firebird requirements regarding passwords and user permissions. See the InterBase documentation at http://docs.embarcadero.com/products/interbase/ .

To create a new encryption key using a wizard:

1 Open an object creation wizard for an encryption key. For details. see

Opening an Object

Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see Encryption Keys (ITB/FBD) - Properties .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

E NCRYPTION K EYS (ITB/FBD) - P ROPERTIES

When creating or editing an encryption key, this tab/panel lets you work with the following settings:

Property

Name

Descriptions

When creating an encryption key, provide a unique name. After creating the encryption key, the name cannot be edited.

315 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Property

Algorithm

Pad random

Init Vector random

Password

Is Default

Descriptions

Options represent choices of the Advanced Encryption Standard or Data Encryption

Standard algorithm and a key length.

Enabled, the encryption key is created with a PAD RANDOM option, causing equal values to have different ciphertext. Disabled, the encryption key is created with a PAD

NULL option, specifying that random padding should not be performed.

Enabled, the encryption key is created with an INIT_VECTOR RANDOM option, enabling

Cipher Block Chaining (CBC) encryption, forcing equal values to take different ciphertext.

Disabled, the encryption key is created with a INIT_VECTOR NULL option, enabling

Electronic Cookbook (ECB).

Optionally, provide a user password.

When enabled, the encryption key is created with an AS DEFAULT option, making this key the database default when no explicit key is specified for database or column encryption.

E XCEPTIONS W IZARD (ITB/FBD)

The Exception wizard lets you provide the text of an exception and the name by which it is raised from a stored procedure.

To create a new exception using a wizard:

1 Open an object creation wizard for an exception. For details. see

Opening an Object Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see Exceptions (ITB/FBD) - Properties .

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

E XCEPTIONS (ITB/FBD) - P ROPERTIES

When creating or editing an exception, this tab/panel lets you work with the following settings:

Group

Creation

General

Settings and descriptions

Lets you provide the Name by which the exception is referenced.

Lets you provide the Text of the exception.

RAPID SQL 8.6/XE5 USER GUIDE 316

CREATING OBJECTS

E XTERNAL F UNCTIONS W IZARD (ITB/FBD)

The External Functions wizard lets you DECLARE an existing, user-defined function.

To create a new external function using a wizard:

1 Open an object creation wizard for an external function. For details. see

Opening an Object

Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see External Functions (ITB/FBD) - Properties .

• Parameters panel - for details, see External Functions (ITB/FBD) - Parameters .

• Return Type panel - for details, see External Functions (ITB/FBD) - Return Type .

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

E XTERNAL F UNCTIONS (ITB/FBD) - P ROPERTIES

When creating or editing a generator, this tab/panel lets you work with the following settings:

Group

Creation

General

Settings and descriptions

Lets you specify the Name of the function.

EntryPoint

ModuleName

Type a quoted identifier as the ENTRY_POINT clause value for the declaration.

Type a quoted identifier as the MODULE_NAME clause value for the declaration.

E XTERNAL F UNCTIONS (ITB/FBD) - P ARAMETERS

For each parameter to be added to this function:

1 Use the New button to add a new parameter and type a name for the parameter in the space provided.

2 With the parameter selected, in the Attributes area select a Type , and if appropriate, provide or select Precision , Scale , and Size options.

Use the Delete button to drop a selected parameter and use the arrow keys to reorder the parameter list.

317 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

E XTERNAL F UNCTIONS (ITB/FBD) - R ETURN T YPE

When creating an external function, this tab/panel lets you specify the datatype of the value returned by the external function. Select a Type , and if appropriate, provide or select Precision ,

Scale , and Size options.

You cannot modify the return type when editing an external function.

For each parameter to be added to this function:

1 Use the New button to add a new parameter and type a name for the parameter in the space provided.

2 With the parameter selected, in the Attributes area select a Type , and if appropriate, provide or select Precision , Scale , and Size options.

Use the Delete button to drop a selected parameter and use the arrow keys to reorder the parameter list.

F OREIGN K EYS W IZARD (ITB/FBD)

The Foreign Key Wizard lets you create a foreign key constraint, mapping the relevant columns and specifying delete and update integrity checks.

To create a new foreign key using a wizard:

1 Open an object creation wizard for a foreign key. For details. see

Opening an Object Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see Foreign keys (ITB/FBD) - Properties

• Column Mapping panel - for details, see Foreign Keys (ITB/FBD) - Column Mapping

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

F OREIGN KEYS (ITB/FBD) - P ROPERTIES

When creating or editing a foreign key, this tab/panel lets you work with the following settings:

Setting

Table Owner

Table Name

Name

Description

The owner of the table where the foreign key is being created.

The table where the foreign key link originates--the child table.

Lets you provide a constraint name.

RAPID SQL 8.6/XE5 USER GUIDE 318

CREATING OBJECTS

Setting

Delete Rule and Update

Rule

Description

Let you select ON UPDATE and ON DELETE argument values of NONE, CASCADE, SET

DEFAULT, SET NULL, NO ACTION, or RESTRICT.

F OREIGN K EYS (ITB/FBD) - C OLUMN M APPING

1 Under Referenced Table , choose the Owner and then the Name of the referenced, or parent, table.

2 Under the Main Table , select check boxes corresponding to the columns that are to reference columns in the referenced table. Then, under Referenced Table , select the corresponding column check boxes.

G ENERATORS W IZARD (ITB/FBD)

The Generator wizard lets you create a simple, named generator and set its initial value.

To create a new generator using a wizard:

1 Open an object creation wizard for a generator. For details. see Opening an Object Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see Generators (ITB/FBD) - Properties .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

G ENERATORS (ITB/FBD) - P ROPERTIES

When creating or editing a generator, this tab/panel lets you work with the following settings:

Group

Creation

Settings and descriptions

Lets you provide the Name for the generator.

Current Value Lets you provide a SET GENERATOR value, setting the value of the generator.

I NDEXES W IZARD (ITB/FBD)

The Index Wizard lets you create a basic InterBase/Firebird index, specifying the sort order and

ACTIVE/INACTIVE status for the index, and indicating whether duplicate values are allowed

319 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new index using a wizard:

1 Open an object creation wizard for an index. For details. see

Opening an Object Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see Indexes (ITB/FBD) - Properties .

• Columns panel - for details, see Indexes (ITB/FBD) - Columns .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

I NDEXES (ITB/FBD) - P ROPERTIES

When creating or editing an index, this tab/panel lets you work with the following settings:

Setting

Name

Table Name

Unique

Enabled

Descending

Description

The name of the index.

The owning table.

When enabled, the index is created with the UNIQUE keyword, disallowing duplicate values.

When enabled, the index is created or altered with an ACTIVE status. When disabled, the index is created or altered with an INACTIVE status.

Specifies the sort order. When enabled, the index is created with the DESCENDING keyword.

When disabled, the index is created with the ASCENDING keyword.

I NDEXES (ITB/FBD) - C OLUMNS

When adding or editing an index, this tab/panel lets you manage the columns that make up the index.

To add a column to the index:

Click the New button and select a column from the Column dropdown.

To delete a column from the index:

Select the column and click the Remove button.

To change the position of a column in the list:

Select the column and use the arrow keys to reorder the column list.

RAPID SQL 8.6/XE5 USER GUIDE 320

CREATING OBJECTS

P RIMARY K EYS W IZARD (ITB/FBD)

The Primary Key Wizard lets you add a basic InterBase/Firebird primary key to a table.

To create a new primary key using a wizard:

1 Open an object creation wizard for a primary key. For details. see

Opening an Object Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - Primary Keys (ITB/FBD) - Properties .

• Columns panel - Primary Keys (ITB/FBD) - Columns .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

P RIMARY K EYS (ITB/FBD) - P ROPERTIES

When creating or editing an index, this tab/panel lets you work with the following settings:

Setting

Name

Table Name

Description

The name of the primary key.

The owning table.

P RIMARY K EYS (ITB/FBD) - C OLUMNS

When adding or editing a primary key, this tab/panel lets you manage the columns that make up the primary key.

NOTE: Only columns defined with the Allow Nulls property disabled can be added to a primary key.

To add a column to the primary key:

Click the New button and select a column from the Column dropdown.

To delete a column from the primary key:

Select the column and click the Remove button.

To change the position of a column in the list:

Select the column and use the arrow keys to reorder the column list.

321 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

P ROCEDURES W IZARD (ITB/FBD)

The Procedures Wizard lets you create a procedure definition that includes parameter specifications, the body of the procedure, and execution permissions.

To create a new procedure using a wizard:

1 Open an object creation wizard for a procedure. For details. see Opening an Object Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - Procedures (ITB/FBD) - Properties .

• Parameters panel - Procedures (ITB/FBD) - Parameters .

• Body panel - Procedures (ITB/FBD) - Body .

• Permissions

panel - Setting Permissions or Privileges for an Object

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

P ROCEDURES (ITB/FBD) - P ROPERTIES

When creating a procedure, this panel/tab lets you provide a Name for the procedure. After creation, you cannot change its name.

P ROCEDURES (ITB/FBD) - P ARAMETERS

This tab lets you add and modify the parameters for a procedure.

To add a parameter:

1 Click the New button and type a name for the parameter in the space provided.

2 In the Attributes area, select a Type and if appropriate, provide Precision , Scale , and Size values.

3 Select a Parameter Mode of INPUT or OUTPUT.

To edit a parameter:

• Select the parameter and modify the values in the Attributes area.

To delete a parameter:

• Select the parameter and click the Delete button.

RAPID SQL 8.6/XE5 USER GUIDE 322

CREATING OBJECTS

To change the ordering position of a parameter:

• Select the parameter and use the arrow buttons to move the parameter up or down in the list.

P ROCEDURES (ITB/FBD) - B ODY

This tab provides a simple editor that lets you add or modify the body of the procedure.

R OLES W IZARD (ITB/FBD)

The Roles Wizard lets you create a basic InterBase/Firebird role.

To create a new role using a wizard:

1 Open an object creation wizard for a role. For details. see Opening an Object Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - Roles (ITB/FBD) - Properties .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object. For more information, see

Previewing the DDL Generated to Create the New Object .

The Roles editor opens, letting you immediately assign users to the new roles and set up a set of

permissions for the role. For more information, see " Roles editor (InterBase/Firebird) " on page 504.

R OLES (ITB/FBD) - P ROPERTIES

When creating a role, this tab/panel lets you provide a Name for the role. When editing a role, this tab/panel displays the Name and Authorization Owner for the role.

S HADOWS WIZARD (ITB/FBD)

The Shadows Wizard lets you create a shadow, consisting of one or more in-sync copies of the database stored on secondary storage devices.

323 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new shadow using a wizard:

1 Open an object creation wizard for a shadow. For details. see

Opening an Object Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - Shadows (ITB/FBD) - Properties .

• Storage panel - Shadows (ITB/FBD) - Storage .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

S HADOWS (ITB/FBD) - P ROPERTIES

When creating or editing a shadow, this tab/panel lets you work with the following settings:

Setting

Shadow Set

Conditional

Behavior

Description

Lets you specify a set number, designating a shadow set to which files specified on the

Storage panel belong. Once the shadow set is created, this value cannot be edited.

Lets you include the CONDITIONAL argument with the CREATE SHADOW statement, when creating a new shadow. This allows shadowing to continue if the primary shadow becomes unavailable or if the shadow replaces the database due to disk failure

Lets you include AUTO or MANUAL arguments with the CREATE SHADOW statement, specifying default access behavior when no shadow is available. AUTO specifies that all attachments and accesses succeed, all references to the shadow are deleted, and the shadow file is detached. MANUAL specifies that database attachments and accesses fail until a shadow becomes available or until all shadow references are removed from the database.

S HADOWS (ITB/FBD) - S TORAGE

When creating or editing a shadow, this tab/panel lets you manage a primary and one or more secondary files making up the shadow set. Note the following when managing shadow files:

• When creating a shadow, a primary file entry is automatically created when you select this tab. You must provide primary file property values before proceeding.

• A secondary file cannot be created if there is no primary file entry.

To add a primary or secondary file to the shadow:

1 Click the New button.

2 Use the following table as a guide to providing values in the Property/Value list for the file entry.

Setting Description

Physical File Name Provide the path and file name for the shadow file, which must reside on the local file system.

RAPID SQL 8.6/XE5 USER GUIDE 324

CREATING OBJECTS

Setting

Starting Page

Size

Description

Starting page number of a secondary shadow file.

The size, in pages.

To delete a primary or secondary file entry:

Select the file entry in the primary and secondary file list and click the Delete button.

T ABLES W IZARD (ITB/FBD)

The Tables wizard lets you create a table definition, providing column descriptions, indexes, permissions, and constraints for the table.

To create a new table using a wizard:

1 Open an object creation wizard for a table. For details. see

Opening an Object Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see Tables (ITB/FBD) - Properties .

• Columns panel - for details, see Tables (ITB/FBD) - Columns .

• Indexes panel - for details, see Tables (ITB/FBD) - Indexes .

• Constraints panel - for details, see Tables (ITB/FBD) - Constraints .

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• Permissions

panel - " Setting Permissions or Privileges for an Object " on page 257

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

T ABLES (ITB/FBD) - P ROPERTIES

When creating a table, this tab/panel lets you provide a Name for the table. When editing a table, the Name is for display only.

T ABLES (ITB/FBD) - C OLUMNS

When creating or editing a table, this tab/panel lets you manage the columns for the table:

325 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To add a column to the table:

1 Use the Add Column dropdown to add a new column to the bottom of the column list or to insert a new column above the currently selected column in the column list.

2 Provide a Name for the column.

3 Either select a Type for the column or select Computed and provide a valid InterBase/

Firebird Computed Expression .

4 Use the following table as a guide to providing additional property values, noting that availability of a property differs by data type and other property selections.

Property

Array Dimensions

Size

Allow Nulls

Default Character Set

Default Collation

Default Value

Description

Lets you type a valid InterBase/Firebird array_dim specifier or use the ... button to open a dialog that lets you build the specifier.

Lets you provide a size for character datatypes.

Disabled, submits a NOT NULL argument.

Submits a CHARACTER SET argument value.

Submits a COLLATE argument value.

Submits a literal COLLATE argument value.

To edit a column:

• Select the column from the list and edit property values as per the descriptions above.

To drop a column:

• Select the column from the list and click the Delete button.

To change the position of a column in the list:

• Select the column from the list and use the arrow buttons to change its position.

T ABLES (ITB/FBD) - I NDEXES

When creating or editing tables, this tab/panel lets you manage indexes for the table:

• Click Add to open a wizard that lets you add a new index to the table. For information on using the wizard, see " Indexes Wizard (ITB/FBD) " on page 319.

• Select an index and click Edit to open an editor on the index. For information on using the

editor, see " Indexes editor (InterBase/Firebird) " on page 502.

• Select an index and click Drop to drop an index from the table.

T ABLES (ITB/FBD) - C ONSTRAINTS

When creating or editing tables, this tab/panel lets you manage foreign key, primary key, unique key and check constraints for the table:

RAPID SQL 8.6/XE5 USER GUIDE 326

CREATING OBJECTS

• Select a constraint type and click Add to open a wizard that lets you add a new constraint of that type to the table.

• Select an existing constraint and click Edit to open a wizard that lets you add modify that constraint.

The wizards used to add and modify constraints offer functionality identical to the editors and wizards used when creating those object types. For details, see the following topics:

• " Foreign Keys Wizard (DB2 LUW) " on page 261 and "

Foreign Keys editor (InterBase/

Firebird) " on page 500

• " Primary Keys Wizard (ITB/FBD) " on page 321 and "

Primary Keys editor (InterBase/

Firebird) " on page 502

• " Unique Keys Wizard (ITB/FBD) " on page 328 and "

Unique Keys editor (InterBase/

Firebird) " on page 507

• " Add or Modify Check Constraint " on page 591

• Select a constraint and click Drop to drop a constraint from the table.

T RIGGERS W IZARD (ITB/FBD)

The Triggers wizard lets you create a basic InterBase trigger, providing a trigger body and specifying key properties such as the associated event type and the trigger timing.

To create a new trigger using a wizard:

1 Open an object creation wizard for a trigger. For details. see

Opening an Object Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see Triggers (ITB/FBD) - Properties .

• Body panel - for details, see Triggers (ITB/FBD) - Body .

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

T RIGGERS (ITB/FBD) - P ROPERTIES

When creating a trigger, this tab/panel lets you provide values for the following trigger properties:

Property

Parent Type

Description

Select TABLE or VIEW as the Parent type.

327 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Property

Parent Name

Name

Trigger Timing

Trigger Events

Enabled

Position

Description

Select the table or view that causes the trigger to fire when the specified operation occurs.

Provide a name for the trigger.

Select whether the trigger fires BEFOR or AFTER the associated operation.

Specifies the table operation (DELETE, INSERT, or UPDATE) that causes the trigger to fire.

Enabled, this options submits an ACTIVE argument. Otherwise, an INACTIVE argument is submitted.

Specify a POSITION number (0 - 32,767) to control firing order for triggers before or after the same action.

When editing a trigger, the values cannot be modified.

T RIGGERS (ITB/FBD) - B ODY

When creating or editing a trigger, this tab/panel previews the DDL reflecting your property values and lets you provide or modify the trigger body.

U NIQUE K EYS W IZARD (ITB/FBD)

The Unique Key Wizard lets you add a basic InterBase/Firebird unique key to a table.

To create a new unique key using a wizard:

1 Open an object creation wizard for a unique key. For details. see

Opening an Object Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - Unique Keys (ITB/FBD) - Properties .

• Columns panel - Unique Keys (ITB/FBD) - Columns .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

U NIQUE K EYS (ITB/FBD) - P ROPERTIES

When creating a unique key, this tab/panel lets you provide a Name for the unique key and select the owning Table Name . These values cannot be changed when editing the unique key.

RAPID SQL 8.6/XE5 USER GUIDE 328

CREATING OBJECTS

U NIQUE K EYS (ITB/FBD) - C OLUMNS

When adding or editing a unique key, this tab/panel lets you manage the columns that make up the unique key.

NOTE: Only columns defined with the Allow Nulls property disabled can be added to a unique key.

To add a column to the unique key:

Click the New button and select a column from the Column dropdown.

To delete a column from the unique key:

Select the column and click the Remove button.

To change the position of a column in the list:

Select the column and use the arrow keys to reorder the column list.

U SERS WIZARD (I NTER B ASE /F IREBIRD )

The Users wizard lets you create a basic InterBase/Firebird user, providing basic properties, assigning roles, and granting relevant permissions.

NOTE: The Users node is only available for databases with the Embedded User Authentication option enabled. Before using Rapid SQL against InterBase/Firebird users, you should be familiar with this feature and with InterBase/Firebird permissions with regard to this object type. For access to InterBase documentation, see http:// docs.embarcadero.com/products/interbase/ .

To create a new user:

1 Open an object creation wizard for a user. For details. see Opening an Object Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see Users (ITB/FBD) - Properties .

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• Roles panel - for details, see Users (ITB/FBD) - Roles .

• Object Permissions

panel - Setting Permissions or Privileges for an Object

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

The User editor opens. For more information, see " Users editor (InterBase/Firebird) " on page 507.

329 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

U SERS (ITB/FBD) - P ROPERTIES

When creating or editing a user, this tab/panel lets you provide values for the following properties:

Property

Name

Password

Group

Default Role

Description

The login name for this user.

The password for this user.

Lets you specify a group name for the user. If unspecified, the user is created with the NO

GROUP NAME option.

Lets you select a default role for the user. If unspecified, the user is created with the NO

DEFAULT ROLE option.

Additional roles can be assigned for this user on the Roles tab/panel. For details, see

Users (ITB/FBD) - Roles .

Let you provide the user’s name, as opposed to the login name.

First Name , Middle

Name , and Last Name

Active

System User Name

Description

GID

UID

This control is not enabled when creating a user and by default the user is created with the ACTIVE option. When editing a user, selecting this check box allows the user to log into the database. When unselected, the user is prevented from logging in to the database.

Lets you specify a systemuser name for the user. If unspecified, the user is created with the NO SYSTEM USER NAME option.

Lets you provide a short description for this user

Lets you specify a numeric group ID for this user.

Lets you specify a numeric user ID for this user.

U SERS (ITB/FBD) - R OLES

When creating or editing a user, this tab/panel lets you assign the valid, non-default roles that a user can specify when logging in to the database.

NOTE: A default login role can be assigned for this user on the Properties tab/panel. For details, see " Users (ITB/FBD) - Roles " on page 330.

To assign roles to the user:

• Select the associated check box.

V IEWS W IZARD (ITB/FBD)

The Views wizard lets you create a basic InterBase/Firebird view

RAPID SQL 8.6/XE5 USER GUIDE 330

CREATING OBJECTS

To create a new view using a wizard:

1 Open an object creation wizard for a view. For details. see

Opening an Object Wizard on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see Views (ITB/FBD) - Properties .

• Comment panel

- for details, see " Adding a Comment to an Object " on page 256.

• Definition panel - for details, see Views (ITB/FBD) - Definition .

3 Finally, use the Execute button to create the object.

V IEWS (ITB/FBD) - P ROPERTIES

When creating or editing a view, this tab/panel lets you provide values for the following properties:

Property

Name

Check Option

Description

Provide a name for the view.

When enabled, a WITH CHECK OPTION argument is included with the DDL generated to create the view. This prevents INSERT or UPDATE operations on an updatable view if that operation violates the search condition specified in the associated WHERE clause.

When editing a view, these values cannot be modified.

V IEWS (ITB/FBD) - D EFINITION

When creating or editing a view, this tab/panel previews the DDL reflecting your property values and lets you provide or edit the relevant query.

M ICROSOFT SQL S ERVER O BJECT W IZARDS

Rapid SQL lets you create SQL Server objects using the following wizards:

Asymmetric Keys Wizard (SQL Server)

Certificate Wizard (SQL Server)

Databases Wizard (SQL Server)

Database Triggers Wizard (SQL Server)

• Defaults Wizard (SQL Server)

• Extended Procedures Wizard (SQL Server)

Foreign Keys Wizard (SQL Server)

331 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Full-text Catalogs Wizard (SQL Server)

Full-text Indexes Wizard (SQL Server)

• Functions Wizard (SQL Server)

• Indexes Wizard (SQL Server)

• Logins Wizard (SQL Server)

Partition Functions Wizard (SQL Server)

Partition Schemes Wizard (SQL Server)

• Primary Keys Wizard (SQL Server)

• Procedures Wizard (SQL Server)

• Roles Wizard (SQL Server)

• Rules Wizard (SQL Server)

Schema Wizard (SQL Server)

Full-text Catalogs Wizard (SQL Server)

Symmetric Keys Wizard (SQL Server)

Synonyms Wizard (SQL Server)

• Tables Wizard (SQL Server)

• Triggers Wizard (SQL Server)

• Unique Keys Wizard (SQL Server)

• User Messages Wizard (SQL Server)

• Users Wizard (SQL Server)

• User Datatypes Wizard (SQL Server)

• Views Wizard (SQL Server)

A SYMMETRIC K EYS W IZARD (SQL S ERVER )

This wizard lets you build and submit a CREATE ASYMMETRIC KEY statement with options corresponding to the contained private and public keys.

RAPID SQL 8.6/XE5 USER GUIDE 332

CREATING OBJECTS

To create a new asymmetric key using a wizard:

1 Open a creation wizard for an asymmetric key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Asymmetric Keys (SQL Server) - Properties .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

A SYMMETRIC K EYS (SQL S ERVER ) - P ROPERTIES

When creating or editing an asymmetric key, this tab/panel lets you work with the following settings:

Setting

Authorization

Owner

Name

Provider Name

Encryption

Password

Availability and description

The name of the user that will own the certificate.

The name for the certificate.

Use Existing Keys Selected, a WITH ALGORITHM option variation of the CREATE ASYMMETRIC KEY statement is generated. Deselected, a FROM FILE, FROM EXECUTABLE FILE, FROM ASSEMBLY, or

FROM PROVIDER option variation of the CREATE ASYMMETRIC KEY statement is generated.

Provider Name

Key Algorithm

Available if Use Existing

Keys is not selected.

Available if Use Existing

Keys is not selected.

Lets you provide a FROM PROVIDER argument value, specifying an Extensible Key Management provider and name.

Lets you select a WITH ALGORITHM value of RSA_512, RSA_1024, or RSA_2048, specifying the key length.

Key Name In

Provider

Creation

Disposition

File

Available if Use Existing

Keys is not selected, after Provider Name is entered.

Available if

Keys

Use Existing

is selected.

Lets you provide a PROVIDER_KEY_NAME value, specifying the key name from the external provider.

Lets you select a CREATION_DISPOSITION value of

OPEN_EXISTING or CREATE_NEW, specifying whether the asymmetric key is mapped to an existing EKM key or a new key is created on the EKM device.

Let you provide FROM FILE, FROM EXECUTABLE FILE, FROM

ASSEMBLY, or FROM PROVIDER option values, respectively.

Executable File

Assembly

Available if

Keys is not selected and after Subject is provided.

Use Existing Lets you provide an ENCRYPTION BY PASSWORD = clause value, specifying the password used to encrypt the private key.

333 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

C ERTIFICATE W IZARD (SQL S ERVER )

This wizard lets you build and submit a CREATE CERTIFICATE statement, adding a certificate to a database.

To create a new certificate using a wizard:

1 Open a creation wizard for a certificate. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Certificates (SQL Server) - Properties .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

C ERTIFICATES (SQL S ERVER ) - P ROPERTIES

When creating or editing a certificate, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Use Existing Keys Lets you choose between EXISTING KEYS and GENERATE NEW KEYS options.

Active For Begin Dialog Lets you select ON/OFF values for a ACTIVE FOR BEGIN_DIALOG = option.

Subject

StartDate

ExpiryDate

Assembly

ExecutableFile

File

and

Available if Use Existing

Keys is not selected.

Available if

Keys

Use Existing

is not selected and after

Subject is provided.

Available if Use Existing

Keys is selected.

Lets you provide a WITH SUBJECT = clause value, referring to a field in the certificate metadata.

Lets you provide START_DATE = and EXPIRY_DATE = values, defining the period that the certificate is valid

These controls let you select among FROM ASSEMBLY

=, FROM FILE =, FROM EXECUTABLE FILE = clauses and provide the relevant signed assembly, path to a

DER-encoded certificate file, or path to a private key file.

PrivateKeyFile

Availability and description

The name of the user that will own the certificate.

The name for the certificate.

Encryption Password

Available if

Keys

Use Existing

is selected.

Available if Use Existing

Keys is not selected and after

Subject is provided.

Lets you provide a WITH PRIVATE KEY (FILE =... clause value, specifying that the certificate’s private key is loaded.

Lets you provide an ENCRYPTION BY PASSWORD = clause value, specifying the password used to encrypt the private key.

DecryptionPassword Available if Use Existing

Keys is not selected. Also available if Use Existing Keys is selected and after an

Assembly or PrivateKeyFile value is provided.

Lets you provide a DECRYPTION BY PASSWORD = clause value, specifying the password used to decrypt a private key retrieved from file.

RAPID SQL 8.6/XE5 USER GUIDE 334

CREATING OBJECTS

D ATABASES W IZARD (SQL S ERVER )

The Database Wizard presents you with a different set of options based on your server version to create the database accurately on each platform.

TIP: Microsoft SQL Server recommends that you do not create any user objects, such as tables, views, stored procedures, or triggers, in the master database. The master database includes the system tables that store the system information used by SQL

Server, such as configuration option settings.

To create a new database using a wizard:

1 Open a creation wizard for a database. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Options panel - for details, see

Databases (SQL Server) - Options

.

• Placement panel - for details, see

Databases (SQL Server) - Placement

.

• Transaction Log panel - for details, see

Databases (SQL Server) - Transaction Log .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

D ATABASES (SQL S ERVER ) - O PTIONS

When creating or editing a database, this tab/panel lets you work with the following settings:

Setting

Name

Attach existing OS files

Description

Provide a name for the database.

To create a database from an existing set of operating system files, there must be a

<filespec> entry for the first PRIMARY file. The PRIMARY filegroup contains all the database system tables. Primary files have a .mdf extension.

Compatible Level Select a version compatibility level.

Properties group Select the following settings: ANSI null default , ANSI nulls , ANSI padding , ANSI warnings, auto create statistics , auto update statistics , autoclose , autoshrink , concat null yields null , cursor close on commit , arithabort , db chaining , dbo use only , default to local cursor , merge publish , numeric roundabout , offline , published , quoted identifier , read only , recursive triggers , select into/bulkcopy/pllsort , single user , subscribed , torn page detection , and trunc log on chkpt .

D ATABASES (SQL S ERVER ) - P LACEMENT

Indicate the file where you want the database to live. For example, a new Books database could include author and title filegroups.

335 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

By default, when you open the Wizard and click the Placement tab, a filegroup definition, using the name you provided for the database and default settings, is displayed. For each filegroup to be added, click the New button, provide a Device File Name for the filegroup, and use the File

Group Properties and Device File Properties groups to provide the attributes of the filegroup.

Use the Delete button to delete a selected filegroup.

D ATABASES (SQL S ERVER ) - T RANSACTION L OG

The transaction log file is a required file for each database. This file holds the log information to recover the database. There can be multiple log files for a database, but there has to be at least one. Traditionally the logfile extension has been .ldf.

By default, when you open the Wizard and click the Transaction Log tab, a transaction log file definition, using the name derived from the name you provided for the database and with default settings, is displayed. For each file to be added, click the New button, provide a Device

File Name , and use the Log Device Properties group to provide the attributes of the file.

Use the Delete button to delete a selected file.

NOTE: As you complete the wizard, be aware that the Primary file contains startup information for the database and is also used to store data. The transaction log files hold the information used to recover the database.

D ATABASE T RIGGERS W IZARD (SQL S ERVER )

This wizard builds and submits a CREATE TRIGGER... ON DATABASE statement, letting you create a DDL trigger with database scope, that fires in response to selected DDL events. The wizard builds basic syntax only, letting you provide the actions and conditions SQL making up the main body of the trigger.

NOTE: Before working with database triggers, consult Microsoft SQL Server documentation for general information on DDL triggers as well as specifics such as FOR/AFTER argument details, valid actions and conditions, and supported events. For more

information, see " Accessing Third Party Documentation " on page 21.

To create a new database trigger using a wizard:

1 Open a creation wizard for a database trigger. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Database Triggers (SQL Server) - Properties .

• Trigger Events panel - for details, see

Database Triggers (SQL Server) - Trigger Events

.

• Definition

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

RAPID SQL 8.6/XE5 USER GUIDE 336

CREATING OBJECTS

3 Finally, use the Execute button to create the object.

NOTE: In order to fire in response to specified events, a database trigger must be enabled.

For information on enabling and disabling a database trigger, see " Database Triggers

Editor (SQL Server) " on page 513 and "

Change Status (SQL Server DDL triggers) " on page 604.

D ATABASE T RIGGERS (SQL S ERVER ) - P ROPERTIES

When creating or editing a database trigger, this tab/panel lets you work with the following settings:

Setting

Name

Trigger Timing

Encrypted

Description

Provide a name for the DDL trigger.

Use this control to specify a FOR/AFTER argument option. The specific events for the argument are provided on the Trigger Events tab/panel.

Select this check box to add a WITH ENCRYPTION argument to the generated DDL. This prevents the trigger from being published as part of a SQL Server replication.

D ATABASE T RIGGERS (SQL S ERVER ) - T RIGGER E VENTS

When creating or editing a database trigger, this tab/panel lets you specify the FOR/AFTER argument appearing in the generated CREATE TRIGGER... ON DATABASE syntax. For each event that is to fire this trigger, select the associated check box.

D EFAULTS W IZARD (SQL S ERVER )

When bound to a column or user-defined object, a default ensures that a specific value will be inserted into the column where the object will be bound if no explicit value is given.

The Default Wizard lets you name the default and specify its value.

To create a new default using a wizard:

1 Open a creation wizard for a default. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Defaults (SQL Server) - Properties

.

• Dependencies panel -

Defaults (SQL Server) - Dependencies .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

337 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

D EFAULTS (SQL S ERVER ) - P ROPERTIES

When creating or editing a default, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Value

Description

Select the schema that is to own the default.

Provide a name for the default.

Provide the value of the default.

D EFAULTS (SQL S ERVER ) - D EPENDENCIES

From the Type dropdown, choose Column or Datatype, and if you chose Column , choose a

Table from the Table dropdown. The list on the left is populated with candidate columns or datatypes. To move a candidate from the list on the left to the dependencies column on the right, select the candidate and click Add . Remove columns or datatypes from the dependencies list on the right by selecting the column or datatype and clicking Remove .

E XTENDED P ROCEDURES W IZARD (SQL S ERVER )

Extended Procedures are dynamic link libraries that can be used to load and execute application routines written in other programming languages, such as C or Visual Basic. Extended

Procedures function and appear in the same manner as SQL Server stored procedures in that you can pass parameters to them and obtain results.

Extended stored procedures provide a method for calling procedural language functions from within the Adaptive Server.

NOTE: Extended procedures can only be created in the Master database.

To create a new Extended procedure using a wizard:

1 Open a creation wizard for an extended procedure. For details, see " Opening an Object

Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Extended Procedures (SQL Server) - Properties

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

RAPID SQL 8.6/XE5 USER GUIDE 338

CREATING OBJECTS

E XTENDED P ROCEDURES (SQL S ERVER ) - P ROPERTIES

When creating or editing an extended procedure, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Library

Description

Select the owner of the extended procedure.

Provide a name for the extended procedure.

Provide the name of the DLL containing the extended procedure.

F OREIGN K EYS W IZARD (SQL S ERVER )

Foreign keys are unique values that refer to specific columns of other tables. Thus, a foreign key links two tables together. Embarcadero Rapid SQL’s Foreign Key Wizard makes it easy for you to create a relational link between two tables, thereby speeding queries and giving you faster access to data. The column in the initial table, the parent table, is called the primary key. The corresponding column in the (child) table that references the primary key, is the foreign key.

Foreign keys can also refer to columns within the same table.

To create a new Foreign Key using a wizard:

1 Open a creation wizard for a foreign key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Foreign Keys (SQL Server) - Properties

.

• Column Mapping panel -

Foreign Keys (SQL Server) - Column Mapping

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

F OREIGN K EYS (SQL S ERVER ) - P ROPERTIES

When creating or editing a foreign key, this tab/panel lets you work with the following settings:

Setting

Table Owner and

Table Name

Name

Description

Select the owner and name of the table for which the foreign key is being created.

Provide a name for the foreign key.

Enabled

Delete Rule

Enables or disables the foreign key.

Not For Replication Replication copies and distributes data and database objects from one database to another and then synchronizes information between databases for consistency.

If you choose the CASCADE option, all rows containing data involved with the foreign key will be deleted after a delete operation.

339 RAPID SQL 8.6/XE5 USER GUIDE

Setting

Update Rule

CREATING OBJECTS

Description

If you choose the CASCADE option, all rows containing data involved with the foreign key will be deleted after an update operation.

F OREIGN K EYS (SQL S ERVER ) - C OLUMN M APPING

Under Referenced Table , choose the Owner and then the Name of the referenced, or parent, table.

Under the Main Table , select check boxes corresponding to the columns that are to reference columns in the referenced table. Then, under Referenced Table , select the corresponding column check boxes.

F ULL TEXT C ATALOGS W IZARD (SQL S ERVER )

This wizard builds and submits a CREATE FULLTEXT CATALOG statement. This lets you add a full-text catalog to a database, specifying accent sensitivity and an owner, and letting you define the catalog as the default full-text catalog. You can also provide filegroup and root directory details.

Along with full-text indexes, full-text catalogs facilitate full-text searching. For related

information, see " Full-text Indexes Wizard (SQL Server) " on page 341.

NOTE: Full-text catalogs cannot be created in the master catalog.

NOTE: Before working with full-text catalogs, consult Microsoft SQL Server documentation for general information on full-text searching and detailed information on topics such as restrictions on where these objects can be created, required permissions, virtual object and filegroup considerations, and the relationship with full-text indexes and the default

collation. For more information, see " Accessing Third Party Documentation " on page 21.

To create a new full-text catalog using a wizard:

1 Open a creation wizard for afull-text catalog. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Full-text Catalogs (SQL Server) - Properties

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

RAPID SQL 8.6/XE5 USER GUIDE 340

CREATING OBJECTS

F ULL TEXT C ATALOGS (SQL S ERVER ) - P ROPERTIES

When creating or editing a full-text catalog, this tab/panel lets you work with the following settings:

Setting

Name

Filegroup

Path

Accent Sensitive

Default

Authorization Owner

Description

Provide a name for the catalog.

Selecting a filegroup adds an explicit ON FILEGROUP clause, specifying the selected filegroup to which the catalog will belong. If not specified, the new catalog will be part of the default filegroup used for all full-text catalogs.

Specifying a path adds an explicit IN PATH clause, specifying the root directory for the catalog. If no path is specified, the new catalog will be located in the default directory specified during setup.

Lets you specify a WITH ACCENT_SENSITIVITY = ON/OFF clause, reflecting the selected/deselected status of the check box.

Select this check box to add an AS DEFAULT argument, specifying that this catalog is the default full-text catalog. If an existing full-text catalog is currently specified as the default, this catalog becomes the new default.

Select a user or role to add an AUTHORIZATION argument that sets the owner of the full-text catalog.

F ULL TEXT I NDEXES W IZARD (SQL S ERVER )

This wizard lets you build and submit a CREATE FULLTEXT INDEX statement, adding a full-text index for a table or indexed view. Along with full-text catalogs, full-text indexes facilitate full-text searching.

NOTE: Full-text indexes cannot be created in the master catalog.

NOTE: Before working with full-text indexes, consult Microsoft SQL Server documentation for general information on full-text searching and detailed information on topics such as required permissions, column specification details, recommended datatype, and XML

considerations. For more information, see " Accessing Third Party Documentation " on page 21.

To create a new full-text index using a wizard:

1 Open a creation wizard for a full-text index. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Full-text Indexes (SQL Server) - Properties .

• Columns

panel - for details, see Full-text Indexes (SQL Server) - Columns

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

341 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

For related information, see " Full-text Catalogs Wizard (SQL Server) " on page 340.

F ULL TEXT I NDEXES (SQL S ERVER ) - P ROPERTIES

When creating or editing a full-text index, this tab/panel lets you work with the following settings:

Setting

Parent Type

Parent Schema

Parent Name

Description

Select table or indexed view.

The parent’s owning schema.

Select the name of the table or indexed view on which the index is to be created.

Key Index Select the unique key index on the table or view that will be used as the value for the KEY

INDEX argument.

Full-text Catalog Name Select an existing full-text catalog. For information on creating full-text catalogs, see

" Full-text Catalogs Wizard (SQL Server) " on page 340. If you do not select a catalog, SQL

Server will assign the index to the default full-text catalog, generating an error if no default exists.

Filegroup Name (SQL

Server 2008 ^)

Change Tracking

Select the filegroup that the index is to be created on. Specifying no filegroup results in

SQL Server default behavior, placing the index in the same filegroup as the base table or view for a non-partitioned table or in the PRIMARY filegroup for a partitioned table.

Select a CHANGE_TRACKING argument value of MANUAL, AUTO, OFF, or OFF, NO

POPULATION to specify whether changes to columns covered by the full-text index will be propagated to the full-text index.

Stoplist (SQL Server

2008 ^)

Select a STOPLIST argument value of OFF to specify that no stoplist be associated with the index or SYSTEM to specify that the default full-text system STOPLIST be used for this index.

F ULL TEXT I NDEXES (SQL S ERVER ) - C OLUMNS

When creating or editing a full-text index, this tab/panel lets you specify the columns that make up the index:

• For each column to include in the full-text index, select the associated Indexed check box.

• Optionally, select a language from the associated Language column.

• For varbinary(max) and image columns, provide a TYPE COLUMN argument filename extension.

F UNCTIONS W IZARD (SQL S ERVER )

Functions are subroutines that you define so you can reuse code without having to reinvent the wheel each time. You can use functions to determine the best methods for controlling access and manipulation of the underlying data contained in an object. A function returns a value, unlike a stored procedure, which does not.

• To create a user-defined function, you need CREATE ANY privileges or IMPLICIT_SCHEMA authority on the database if the schema does not already exist.

RAPID SQL 8.6/XE5 USER GUIDE 342

CREATING OBJECTS

To create a new function using a wizard:

1 Open a creation wizard for a function. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Functions (SQL Server) - Properties .

• Definition panel - for details, see

Functions (SQL Server) - Definition

.

3 Finally, use the Execute button to create the object.

F UNCTIONS (SQL S ERVER ) - P ROPERTIES

When creating or editing a function, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Schema Binding

Encryption

Description

Select the owner of the function.

Provide a name for the function.

Choose whether the function is bound to database objects that it references.

Choose whether SQL Server encrypts table columns that contain the text of the CREATE

FUNCTION statement.

F UNCTIONS (SQL S ERVER ) - D EFINITION

Complete the CREATE FUNCTION outline provided by typing or pasting the body of the function.

I NDEXES W IZARD (SQL S ERVER )

Like an index in a book, a table index helps you get at the data you want without having to read through the whole table. Indexes can exist on single column or on multiple columns. Indexes appear in the form of B-trees. And, as for books, you can have multiple indexes for a single table. You can also create indexes for a view.

343 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new index using a wizard:

1 Open a creation wizard for an index. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Indexes (SQL Server) - Properties .

• Columns panel -

Indexes (SQL Server) - Columns

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

I NDEXES (SQL S ERVER ) - P ROPERTIES

When creating or editing an index, this tab/panel lets you work with the following settings:

Setting

Parent Type

Parent Owner

Parent Name

Name

Build Online

Max degree of parallelism

Index Type

Clustered

Ignore Duplicate

Key

Statistics

Recompute

Description

Select TABLE or VIEW.

Select the owner of the table or view.

Select the specific table or view containing the columns you want to index.

Provide a name for the index.

Enabling this feature specifies that the ONLINE=ON clause is used when creating this object and can subsequently be used when rebuilding or dropping this object.

Lets you specify a MAXDOP index operation value, limiting the number of processors used in parallel plan execution.

Select UNIQUE or NONUNIQUE. An index is unique when no two rows are permitted to have the same index value. (Note: A clustered index on a view must be unique.) If an INSERT or

UPDATE statement creates a duplicate value, the operation may fail.

A clustered index is one in which the physical order of rows matches the order of indexed rows. A table or view can only have one clustered index at a time.

In a nonclustered index, the physical order of rows is independent of the indexed order of rows.

For an indexed view, you can only create a nonclustered index if there is already a clustered index extant.

With this check box enabled, subsequent rebuild and drop operations offer an online option.

This option controls what happens when an attempt is made to insert a duplicate key value into a column that is part of a unique clustered index.

If the option is selected and an INSERT statement that creates a duplicate key is executed,

SQL Server issues a warning and ignores the duplicate row.

If not selected, SQL Server issues an error message and rolls back the entire INSERT statement.

Enabling this feature means queries involving the table run at the optimal level as distribution statistics are updated automatically when the index is created. If you disable this option, you can compromise query performance.

RAPID SQL 8.6/XE5 USER GUIDE 344

CREATING OBJECTS

Setting

Partitioned

Partition Scheme

Partition Column

Filegroup

Pad Index

Sort in TempDB

Allow Row Locks and Allow Page

Locks

Description

When selected, an ON clause is added to the CREATE TABLE statement, letting you specify a

Partition Scheme , partitioning this table.

This property is only available if the Partitioned check box is selected.

Select the partition scheme that specifies the filegroup mapping for this table. For

information on creating partition schemes, see " Partition Schemes Wizard (SQL Server) " on page 348.

This property is only available if the Partitioned check box is selected.

Select the column that the index will be partitioned against.

This property is only available if the Partitioned check box is not selected.

Select an existing, named filegroup to have the index stored on the specified filegroup.

Select PRIMARY to have the index stored on the default database filegroup.

Enable or disable padding of index pages.

Select to store the intermediate index sort results in tempdb. This option may reduce the time needed to create an index if tempdb is on a different set of disks than the user database, but it increases the amount of disk space used to create an index. In addition to the space required in the user database to create the index, tempdb must have about the same amount of additional space to hold the intermediate sort results.

Lets you enable locking granularity at the page and row level (Default=TRUE)

NOTE: You cannot reorganize an index (primary key, or unique key) that has an Allow Page

Locks

property set to FALSE. For information on reorganizing indexes, see " Reorganize (SQL

Server indexes, primary keys, and unique keys) " on page 677.

I NDEXES (SQL S ERVER ) - C OLUMNS

From the Column dropdown, select a column for the index and specify a Sort option. To add more columns, click the New button and then follow the steps in the last instruction. Use the

Delete button to drop columns.

L OGINS W IZARD (SQL S ERVER )

The Login wizard lets you build and submit a CREATE LOGIN statement, adding a new SQL

Server, Windows, certificate-based, or asymmetric key-based login. The Login wizard also lets you:

• Add the login to fixed server roles

• Create user accounts for the login on selected databases

345 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new login using a wizard:

1 Open a creation wizard for alogin. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Logins (SQL Server) - Properties

.

• Server Roles

panel - for details, see Logins (SQL Server) - Server Roles .

• Users

panel - for details, see Logins (SQL Server) - Users

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

L OGINS (SQL S ERVER ) - P ROPERTIES

When creating or editing a login, this tab/panel lets you work with the following properties:

Setting

Name

Default Database

Default Language

Account Type

Password

Check Policy

Check Expiration

Must Change

Domain

Description

Specifies a name for this login.

Lets you specify a DEFAULT_DATABASE argument, specifying a default database for this login.

Lets you specify a DEFAULT_LANGUAGE argument, specifying a default language for this login.

Lets you select one of the following login types:

STANDARD - (SQL Server logins) if you select this type, you must also provide Password and Check Policy values.

NTGROUP or NTUSER - (Windows logins) if you select one of these types, you must also provide a Domain value.

CERTIFICATE - (certificate-mapped logins) if you select this type, you must also provide a

Certificate value.

ASYMMETRIC KEY - (asymmetric key-mapped logins) if you select this type, you must also provide an Asymmetric Key value.

This is only available for an Account Type of STANDARD. It lets you provide a password for the login.

This is only available for an Account Type of STANDARD. If selected, login policies defined on the server apply to this login.

This is only available if Check Policy is selected. If selected, password expiration policies are applied to this login.

This is only available if Check Expiration is selected. If selected, the user will be prompted to change the password on the first login.

This is only available for an Account Type of NTUSER or NTGROUP. Lets you specify the domain name value that will be specified with the loginName argument

([<domainName>\<loginName>]).

RAPID SQL 8.6/XE5 USER GUIDE 346

CREATING OBJECTS

Setting

Certificate

Asymmetric Key

Description

This is only available for an Account Type of CERTIFICATE. It lets you specify the name of a certificate that is to be associated with this login. It lets you specify the name of a certificate that is to be associated with this login.

This is only available for an Account Type of ASYMMETRIC KEY. It lets you specify the name of an asymmetric key that is to be associated with this login.

L OGINS (SQL S ERVER ) - S ERVER R OLES

When creating or editing a login, this tab/panel builds sp_addsrvrolemember procedure calls that will be submitted along with the CREATE LOGIN statement issued by this wizard/editor.

This lets you add the login as a member of one or more fixed server roles (or common userdefined roles when selecting multiple databases) by selecting the check boxes associated with those roles.

For information on editing fixed server roles, see " Roles Editor (SQL Server) " on page 521.

L OGINS (SQL S ERVER ) - U SERS

When creating or editing a role, this tab/panel lets you build CREATE USER... FOR LOGIN statements that will be submitted with the CREATE LOGIN statement issued with this wizard/ editor. Maintain database user accounts for a login as follows:

• Add a user account for this login to a database by selecting a database from the Databases where the Login does NOT have a User Account and clicking the Add button. This opens the SQL Server User wizard, letting you define a new user on that database. For more

information, see " Users Wizard (SQL Server) " on page 366.

• Remove a user account for this login from a database by selecting a database from the

Databases where the Login HAS a User Account and clicking the Remove button.

P ARTITION F UNCTIONS W IZARD (SQL S ERVER )

The Partition Functions Wizard lets you build and submit a CREATE PARTITION FUNCTION statement, specifying a range, input parameter type, and boundary values. Once created, the partition function can be referenced by the partition scheme used to create a partitioned table or index.

NOTE: Before creating a partition function, consult Microsoft SQL Server documentation for detailed information on topics such as type restrictions and boundary value usage. For

more information, see " Accessing Third Party Documentation " on page 21.

347 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new partition function using a wizard:

1 Open a creation wizard for a partition function. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Partition Functions (SQL Server) - Properties

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

For related information, see the following topics:

• " Partition Schemes Wizard (SQL Server) " on page 348

• " Indexes Wizard (SQL Server) " on page 343

• " Tables Wizard (SQL Server) " on page 359

P ARTITION F UNCTIONS (SQL S ERVER ) - P ROPERTIES

When creating or editing a partition function, this tab/panel lets you work with the following settings:

Setting Description

Name Provide a name for the partition function.

Input Parameter Type Select the data type of the column used for partitioning.

Range

Function Values

Select to which side of each functional value interval (LEFT, RIGHT) the functional value belongs, when interval values are sorted in ascending order from left to right.

Lets you specify the boundary values to include as FOR VALUES arguments to the

CREATE PARTITION FUNCTION statement. Each boundary value is a constant expression that can reference variables. The set of values provided define the partition points for an index or table partitioned using this function.

Use the New, Delete, Up, and Down buttons to create and maintain the value list.

P ARTITION S CHEMES W IZARD (SQL S ERVER )

The Partition Scheme Wizard builds and submits a CREATE PARTITION SCHEME statement, letting you specify a partition function and a file group mapping. Once created, the partition scheme can be referenced when creating a partitioned table or index.

NOTE: Before creating a partition scheme, consult Microsoft SQL Server documentation for detailed information on topics such as the relationship between the partition function

and filegroups specified. For more information, see " Accessing Third Party

Documentation " on page 21.

RAPID SQL 8.6/XE5 USER GUIDE 348

CREATING OBJECTS

To create a new partition wizard using a wizard:

1 Open a creation wizard for a partition scheme. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Partition Schemes (SQL Server) - Properties .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

For related information, see the following topics:

• " Partition Functions Wizard (SQL Server) " on page 347

• " Indexes Wizard (SQL Server) " on page 343

• " Tables Wizard (SQL Server) " on page 359

P ARTITION S CHEMES (SQL S ERVER ) - P ROPERTIES

When creating or editing a partition scheme, this tab/panel lets you work with the following settings:

Setting

Name

Partition Function

Filegroup Name

Description

Provide a name for the partition scheme.

Select the partition function that specifies the range, input parameter type, and boundary values for this partition scheme.

Lets you specify the names of the filegroups to store the partitions specified by the selected Partition Function .

Consult Microsoft SQL Server documentation for details on the relation ship between

filegroups and partitions. For more information, see " Accessing Third Party

Documentation " on page 21.

Use the New, Delete, Up, and Down buttons to create and maintain the value list.

P RIMARY K EYS W IZARD (SQL S ERVER )

Primary key constraints make sure that no duplicate values or NULLS are entered in the columns you specify. You can use primary key constraints to enforce uniqueness and referential integrity.

A table can only have a single primary key constraint.

The dialog box lets you specify the owner and table on which you want to place the primary key constraint.

349 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new primary key using a wizard:

1 Open a creation wizard for a primary key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Primary Keys (SQL Server) - Properties .

• Columns panel -

Primary Keys (SQL Server) - Properties .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

P RIMARY K EYS (SQL S ERVER ) - P ROPERTIES

When creating or editing a primary key, this tab/panel lets you work with the following settings:

Setting

Table Owner and

Table Name

Name

Build Online

Description

Choose the owner and name of the table in which the primary key is being created.

Max degree of parallelism

Clustered

File Group

Fill Factor

Provide a name of the primary key being created.

Enabling this feature specifies that the ONLINE=ON clause is used when creating this object and can subsequently be used when rebuilding or dropping this object.

Lets you specify a MAXDOP index operation value, limiting the number of processors used in parallel plan execution.

Enable or disable clustering.

With this check box enabled, subsequent rebuild and drop operations offer an online option.

If you do not specify a filegroup, Microsoft SQL Server creates the index in the default filegroup.

This specifies how full each index page that’s storing data should be. The fill factor is a percentage value between 0 and 100.

P RIMARY K EYS (SQL S ERVER ) - C OLUMNS

From the Column dropdown, select a column for the primary key and specify a Sort option. To add more columns, click the New button and then follow the steps in the last instruction. Use the Delete button to drop columns.

P ROCEDURES W IZARD (SQL S ERVER )

Procedures are a reusable block of PL/SQL, stored in the database, that applications can call.

Procedures streamline code development, debugging, and maintenance by being reusable.

Procedures enhance database security by letting you write procedures granting users execution privileges to tables rather than letting them access tables directly.

RAPID SQL 8.6/XE5 USER GUIDE 350

CREATING OBJECTS

The Procedure Wizard lets you:

• Name the procedure and specify its body.

• Specify any execution options and you can encrypt the stored procedure text in syscomments.

To create a new procedure using a wizard:

1 Open a creation wizard for a procedure. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Procedures (SQL Server) - Properties .

• Definition panel - for details, see

Procedures (SQL Server) - Definition

.

3 Finally, use the Execute button to create the object.

P ROCEDURES (SQL S ERVER ) - P ROPERTIES

When creating or editing a procedures, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Procedure Number

Replication

Recompile

Encryption

Description

Select the owner of the procedure.

Provide a name for the procedure

Optionally, provide a procedure number. By using a number, you can group procedures of the same name together. This also enables you to drop them using only one DROP

PROCEDURE statement. So, the procedures bill;1, bill;2, bill;3, etc. will be dropped simultaneously when the time comes.

This option creates a procedure that is used as a stored procedure filter and is executed only during replication.

The plan for this procedure will not be cached and the procedure is recompiled when it is run. This option is appropriate when you’re using atypical or temporary values and you don’t want to override the execution plan cached in memory.

If you select this option, SQL Server will encrypt the syscomments table entry containing the text of the CREATE PROCEDURE statement. It keeps the procedure from being published as part of replication.

P ROCEDURES (SQL S ERVER ) - D EFINITION

Complete the CREATE PROCEDURE outline provided by typing or pasting the body of the procedure.

351 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

R OLES W IZARD (SQL S ERVER )

Roles are sets of user privileges you associate with access to objects within a database. Roles streamline the process of granting permissions. You can use roles to grant sets of permissions and privileges to users and groups. Roles can help you comply with Sarbanes Oxley regulations by limiting which users can have access to what privileges, for example a Human Resources Role versus an Accounting Role.

To create a new role using a wizard:

1 Open a creation wizard for a role. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Roles (SQL Server) - Properties .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

After you click Finish and the role has been created, the Roles Editor open. You can then assign object and system privileges to the role and determine which users can take part in the role. For

more information, see " Roles Editor (SQL Server) " on page 521.

R OLES (SQL S ERVER ) - P ROPERTIES

When creating or editing a role, this tab/panel lets you work with the following settings:

Setting

Name

RoleType

Authorization Owner

Password

Description

The name used to reference the role.

The value can be NONE, APPLICATION, or STANDARD.

Only required with a Role Type of STANDARD.

Only required with a Role Type of APPLICATION.

R ULES W IZARD (SQL S ERVER )

Rules promote data integrity by allowing you to validate the values supplied to a table column.

They are reusable objects that you can bind to table columns or user datatypes. Check constraints are similar to rules, and are in fact the preferred way of restricting data. A column or user-defined data type can have only one rule bound to it, but a column can have both a rule and one or more check constraints associated with it. Not that a rule cannot apply to data already existing in the database at the time you’re creating the rule and can’t be bound to a system-created data type. If you create a new rule when one already exists, the new rule will override the previous one.

RAPID SQL 8.6/XE5 USER GUIDE 352

CREATING OBJECTS

To create a new rule using a wizard:

1 Open a creation wizard for a rule. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Rules (SQL Server) - Properties

.

• Dependencies

panel - Rules (SQL Server) - Dependencies .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

R ULES (SQL S ERVER ) - P ROPERTIES

When creating or editing a rule, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Restriction

Description

Select the Owner of the rule.

Provide a name for the rule.

Type the condition. The rule restriction is the condition that defines the rule and can be any expression valid in a WHERE clause and can include such elements as arithmetic operators, relational operators, and predicates (for example, IN, LIKE, BETWEEN).

R ULES (SQL S ERVER ) - D EPENDENCIES

From the Type dropdown, choose Column or Datatype, and if you chose Column , choose a

Table from the Table dropdown. The list on the left is populated with candidate columns or datatypes. To move a candidate from the list on the left to the dependencies column on the right, select the candidate and click Add . Remove columns or datatypes from the dependencies list on the right by selecting the column or datatype and clicking Remove .

S CHEMA W IZARD (SQL S ERVER )

Rapid SQL lets you create a schema on Microsoft SQL Server.

353 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new schema using a wizard:

1 Open a creation wizard for a schema. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Schema (SQL Server) - Properties .

• Permissions

panel - " Setting Permissions or Privileges for an Object " on page 257.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

S CHEMA (SQL S ERVER ) - P ROPERTIES

When creating or editing a schema, this tab/panel lets you provide a Name and select the

Owner of the schema.

S CHEMA (SQL S ERVER ) - P ERMISSIONS

For each specific permission to be granted, select the cell corresponding to the name and specific permission, and click the Grant button. To revoke a privilege, select a cell showing a

Granted permission and click Revoke .

S EQUENCES W IZARD (SQL S ERVER )

This wizard builds and submits a CREATE SEQUENCE statement.

To create a new full-text catalog using a wizard:

1 Open a creation wizard for a sequence. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Full-text Catalogs (SQL Server) - Properties

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

RAPID SQL 8.6/XE5 USER GUIDE 354

CREATING OBJECTS

S EQUENCES (SQL S ERVER ) - P ROPERTIES

When creating or editing a sequence, this tab/panel lets you work with the following settings:

Setting

Schema and Name

Start With

Increment By

Minimum Value

Maximum Value

Cycle

Cache and

and

Cache Size

Data Type Schema ,

Data Type Name , and

Data Type Precision

Description

Lets you provide identification for the sequence.

Lets you provide a START WITH argument value, specifying the first value to be returned by the sequence.

Lets you provide an INCREMENT BY argument value, specifying the value by which to increment (or decrement if negative) the sequence object for each call to the NEXT

VALUE FOR function.

Lets you provide MINVALUE and MAXVALUE argument values, specifying the bounds for this sequence.

If selected, a CYCLE argument is generated, specifying that sequence values should restart from the minimum value (or maximum for descending sequences) or throw an exception when the minimum/maximum value is exceeded. If unselected, the default

NO CYCLE is assumed.

If Cache is unselected, a NO CACHE argument is generated. If Cache is selected, a

CACHE argument is generated. A CACHE argument value can be provided using the

Cache Size control, and if no Cache Size value is provided, SQL Server will generate a value.

These controls let you build an AS argument, specifying datatype details for the new sequence. If no values are selected/provided, SQL Server will, by default, generate a sequence object of type BIGINT. After selecting a Data Type Schema , the Data Type

Name dropdown is populated with user datatypes created from a base datatype of

BIGINT, TINYINT, SMALLINT, INT, BIGINT, DECIMAL, or NUMERIC. Data Type Precision is a read-only field displaying the precision of the selected user datatype.

NOTE: You can use system types if you select a Data Type Schema of SYS.

After creation, the Sequences Editor lets you view the current value of the sequence and

whether the maximum value has been exceeded. For details. see " Sequences Editor (SQL

Server) " on page 523.

S YMMETRIC K EYS W IZARD (SQL S ERVER )

This wizard lets you build and submit a CREATE SYMMETRIC KEY statement.

To create a new symmetric key using a wizard

1 Open a creation wizard for a symmetric key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Symmetric Keys (SQL Server) - Properties .

• Encryption Mechanisms panel -

Symmetric Keys (SQL Server) - Encryption Mechanisms

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

355 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

3 Finally, use the Execute button to create the object.

S YMMETRIC K EYS (SQL S ERVER ) - P ROPERTIES

When creating or editing an asymmetric key, this tab/panel lets you work with the following settings:

Setting

Authorization Owner

Description

The name of the user that will own the symmetric key.

Name

Provider Name

Key Algorithm

Pass Phrase

The name for the symmetric key

Lets you provide a FROM PROVIDER argument value, specifying an Extensible Key

Management provider and name.

Lets you select a WITH ALGORITHM value of DES, AES_192, RC2, RC4_128, DESX,

AES_128, TRIPLE_DES, or TRIPLE_DES_3KEY, specifying the encryption algorithm.

Lets you provide a KEY_SOURCE argument value, specifying a pass phrase from which to derive the key.

Identity Phrase

Key Name In Provider Lets you provide a PROVIDER_KEY_NAME value, specifying the key name from the external provider.

Creation Disposition

Lets you provide an IDENTITY_VALUE argument value, specifying an identity phrase from which to generate a GUID that tags data encrypted with a temporary key.

Lets you select a CREATION_DISPOSITION value of OPEN_EXISTING or CREATE_NEW, specifying whether the symmetric key is mapped to an existing EKM key or a new key is created on the EKM device.

For context information such as opening the wizard or editor for this object type, see

" Symmetric Keys Wizard (SQL Server) " on page 355 and "

Synonyms Wizard (SQL Server) " on page 358.

S YMMETRIC K EYS (SQL S ERVER ) - E NCRYPTION M ECHANISMS

When creating or editing a symmetric key, this tab/panels lets you provide an ENCRYPTION BY... argument, and indicate the specific asymmetric key, symmetric keys, or certificate used to encrypt the key being created or the password from which to derive a TRIPLE_DES key.

The Used Encryption Mechanisms lists the symmetric key, asymmetric key, certificate, or password options currently included in the ENCRYPTION BY argument. Selecting ASYMMETRIC

KEYS, CERTIFICATES, PASSWORD, or SYMMETRIC KEYS from the Encryption Type dropdown displays the list of available elements of that type in the Existing Encryption Mechanisms list.

RAPID SQL 8.6/XE5 USER GUIDE 356

CREATING OBJECTS

To specify encrypting mechanisms for a symmetric key

1 From the Encryption Type dropdown, select an option among ASYMMETRIC KEYS,

CERTIFICATES, PASSWORD, or SYMMETRIC KEYS.

2 Take one of the following actions:

• Select CERTIFICATE or ASYMMETRIC KEY from the Encryption Type dropdown to display elements of that type in the Existing Encryption Mechanisms list. Select a specific certificate or asymmetric key and click Add to move that element to the Used Encryption

Mechanisms list.

• Select SYMMETRIC KEY from the Encryption Type dropdown to display elements of that type in the Existing Encryption Mechanisms list. Select a specific symmetric key and click

Add to open the Open Key dialog. For more information on opening and decrypting the key, see " Opening a Symmetric Key " on page 357.

• Select PASSWORD from the Encryption Type dropdown and click Add to open the Add

Password dialog. That dialog lets you add an ENCRYPTION BY PASSWORD argument.

Use the Password control to provide the ENCRYPTION BY PASSWORD value. Click OK to add the password to the Used Encryption Mechanisms list.

3 Repeat step 1 and step 2 to add more encrypting mechanisms for this symmetric key.

To remove an encryption mechanism from an asymmetric key

1 Select an item from the Used Encryption Mechanisms list.

2 Click Remove .

For context information such as opening the wizard or editor for this object type, see

" Symmetric Keys Wizard (SQL Server) " on page 355 and "

Synonyms Wizard (SQL Server) " on page 358.

For information on creating asymmetric keys or certificates to be used with the encryption

method for this key, see " Asymmetric Keys Wizard (SQL Server) " on page 332 and "

Certificate

Wizard (SQL Server) " on page 334.

O PENING A S YMMETRIC K EY

When specifying a symmetric keys as the encryption mechanism, you must decrypt the symmetric key and make it available for use. The Open Key dialog lets you build an OPEN

SYMMETRIC KEY that will precede the CREATE SYMMETRIC KEY statement submitted to create or edit a symmetric key.

Use the Certificate control to provide a DECRYPTION BY CERTIFICATE value and the Password control to provide a WITH PASSWORD value. Click Open Key to add the symmetric key to the

Used Encryption Mechanisms list.

NOTE: This functionality is available for Microsoft SQL Server only.

357 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To open a symmetric key

1 Open a creation wizard or editor for a symmetric key. For details, see " Opening an Object

Wizard " on page 255 and "

Opening an Object Editor " on page 453.

2 Select the Encryption Mechanisms tab.

3 Select Symmetric Keys from the Encryption Type dropdown, select a symmetric key from the Existing Encryptions Mechanisms list, and then click Add .

Rapid SQL opens the Open Key dialog.

4 Use the following table as a guide to understanding and modifying settings in the dialog:

Step

Action options

Preview

Settings and tasks

Lets you work with the following settings:

Decryption Mechanism and

Certificate/ Symmetric Key/

Asymmetric Key/Password

These controls let you build the DECRYPTION BY option, specifying the decryption mechanism and the specific certificate, asymmetric key, symmetric key or password to be used.

Password Lets you provide the BY PASSWORD or WITH

PASSWORD values for a Decryption Mechanism of

CERTIFICATE, ASYMMETRIC KEY, or PASSWORD.

Displays the DDL that will execute the object action. For details, see " Preview " on page 587.

5 Click Open Key to dismiss the dialog and return to the Symmetric Key wizard or editor.

S YNONYMS W IZARD (SQL S ERVER )

This wizard builds and submits a CREATE SYNONYM statement, letting you build a one-part name that can be used in SQL statements instead of a fully-qualified, multi-part name.

To create a new synonym using a wizard:

1 Open a creation wizard for a synonym. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Synonyms (SQL Server) - Properties .

• Permissions

panel - " Setting Permissions or Privileges for an Object " on page 257

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

RAPID SQL 8.6/XE5 USER GUIDE 358

CREATING OBJECTS

S YNONYMS (SQL S ERVER ) - P ROPERTIES

When creating a synonym, this tab/panel lets you provide a synonym name and fully qualify the object name that it references. When editing a synonym, this tab/panel lets you view the synonym definition.

NOTE: Before creating or editing a synonym, consult Microsoft SQL Server documentation for information on topics such as support for specific function and procedure types, and three-part and four-part name restrictions.

For assistance, see " Accessing Third Party

Documentation " on page 21

.

The following table describes the available settings:

Setting

Schema and Name

Server , Database , Referenced

Object Type , Referenced Object

Owner , and Referenced Object

Nam e

Description

Use these setting to select an owner and type the one-part name that will be used to reference

Use these setting to select the specific object to which the synonym is to refer.

Optionally, you can use the server, database, and owner settings to construct a partially-qualified to fully-qualified name for the object.

The user interface will allow you to construct all valid, multi-part name variations

(for example: server .

database .

owner .

object, database .

owner .

object , owner .

object , server ...

object ).

T ABLES W IZARD (SQL S ERVER )

A table is a column-based arrangement of data in which the content of one column has a bearing on the other column(s). So, for example, a table might have a column for authors, another column for the books each author has written, and a third for the number of copies each title by a given author has sold. The data moves across the columns in rows.

You must have CREATE TABLE permissions to generate a new table.

NOTE: Before working with tables, consult Microsoft SQL Server documentation for general information on filegroups as well as specifics on CREATE TABLE... FILESTREAM and

FILETABLE arguments. For more information, see " Accessing Third Party

Documentation " on page 21.

359 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new table using a wizard:

1 Open a creation wizard for a table. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Dependencies panel -

Tables (SQL Server) - Properties .

• Columns

panel - Tables (SQL Server) - Columns .

• Indexes panel -

Tables (SQL Server) - Indexes

.

• Constraints

panel - Tables (SQL Server) - Constraints .

• Permissions

panel - " Setting Permissions or Privileges for an Object " on page 257.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

T ABLES (SQL S ERVER ) - P ROPERTIES

When creating or editing a table, this tab/panel lets you work with the following settings:

Setting

Schema

Name

ANSI_NULLS option

Partitioned

Partition Scheme

Filegroup

Text Image

Filegroup

Filestream On

(Version 2008^)

Description

Select the owner of the table.

Provide a name for the table

By setting this option, you are setting ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, and

QUOTED_IDENTIFIER to on so the table can be used in an Indexed View.

When selected, an ON clause is added to the CREATE TABLE statement, letting you specify a

Partition Scheme , partitioning this index.

This property is only available if the Partitioned check box is selected.

Select the partition scheme that specifies the filegroup mapping for this index. For

information on creating partition schemes, see " Partition Schemes Wizard (SQL Server) " on page 348.

This property is only available if the Partitioned check box is not selected.

Select an existing, named filegroup to have the table stored on the specified filegroup. Select

PRIMARY to have the table stored on the default database filegroup.

Select an existing, named filegroup to have text, ntext, image, xml, varchar(max), nvarchar(max), varbinary(max), and CLR user-defined type columns stored on the specified filegroup. Select PRIMARY to have columns of those types stored on the default database filegroup.

This lets you specify the filegroup for FileStream data, specifying a FILESTREAM_ON argument to the generated DDL. This control is only available if a filegroup that can contain filestreams is available in the database.

For more on filegroups, see " Databases Wizard (SQL Server) " on page 335.

RAPID SQL 8.6/XE5 USER GUIDE 360

CREATING OBJECTS

Setting

As Filetable and other Filetable... properties

(Version 2012^)

Description

As Filetable lets you add an AS FILETABLE argument to the generated DDL, specifying that the table is created as a FileTable. The Columns , Indexes , and Constraints tabs/panels are disabled when this control is selected.

Filetable Collate Filename lets you provide a FILETABLE_COLLATE_FILENAME argument value, specifying the name of the collation used. If no value is provided, the default collation for the database is used.

Filetable Directory Name lets you provide a FILETABLE_DIRECTORY argument value, specifying a FileTable directory name. If no value is provided, the name of the filetable is used.

Filetable PK Constraint Name lets you provide a

FILETABLE_PRIMARY_KEY_CONSTRAINT_NAME argument value, specifying the name used for the primary key constraint automatically created on the FileTable. If this value is not provided, a system-generated name is used.

Filetable StreamID Unique Constraint Name lets you provide a

FILETABLE_STREAMID_UNIQUE_CONSTRAINT_NAME argument value, specifying the name used for the unique key constraint automatically created on the FileTable. If this value is not provided, a system-generated name is used.

Filetable Fullpath Unique Coonstraint Name lets you provide a

FILETABLE_FULLPATH_UNIQUE_CONSTRAINT_NAME argument value, specifying the name used for the unique constraint automatically created on the parent_path_locator and name columns in the FileTable. If this value is not provided, a system-generated name is used.

T ABLES (SQL S ERVER ) - C OLUMNS

Use the Add Column button to add the columns for the table. After providing a Name for a new column, you can modify column properties in the Property / Value list. Available properties depend on the datatype you choose as well as on the property values you select:

Computed and Computed Expression - Let you define a column as a computed column and provide the computed column expression.

Type - Lets you select a datatype (depending on the type, additional properties such as Size ,

Width , and Scale may be available).

Identity Column - Select this check box to define the column as an identity column.

Allow Nulls - Select this check box to allow nulls in this column.

Default Collation - available for text/character datatypes, lets you specify a default collation.

Default Value - Lets you type a constant value or select a function returning a constant value to serve as the default for the column

Default Binding and Rule Binding - Let you bind a rule or default to a column.

Is Sparse - Available to columns that allow NULL values, optimizes storage of the column for null values. This property does apply to the following data types: text, ntext, image, timestamp, userdefined data type, geometry, or geography. Columns with default values, default or rule bindings, cannot be defined as sparse. Computed columns cannot be defined as Sparse, but the columns in the computed expression can be Sparse columns.

361 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Optionally, you can select a column and modify its values or select a column and Delete it.

NOTE: If you create a table with a Column datatype = text., you can set the storage and image values on the Storage tab of the Tables Editor Storage tab. When you have a text datatype, the Storage tab displays a Text In Row box where you can specify the maximum size to be stored.

NOTE: Because the smalldatetime datatype stores dates and time with less precision than the datetime datatype, before outputting you use the CAST or CONVERT functions to convert any boxes with the smalldatetime datatype to either VARCHAR or datetime datatypes. For more information, see SQL Server Books Online, Transact-SQL

Reference.

NOTE: This tab/panel is not available if As Filetable

is selected. For details, see " Tables (SQL

Server) - Properties " on page 360.

T ABLES (SQL S ERVER ) - I NDEXES

Click Add

to open the Index Wizard. For details, see " Indexes Wizard (SQL Server) " on page 343.

NOTE: This tab/panel is not available if As Filetable

is selected. For details, see " Tables (SQL

Server) - Properties " on page 360.

T ABLES (SQL S ERVER ) - C ONSTRAINTS

Selecting a constraint type and clicking Add opens the object wizard for that object type. For details see:

• " Primary Keys Wizard (SQL Server) " on page 349

• " Unique Keys Wizard (SQL Server) " on page 364

• " Foreign Keys Wizard (SQL Server) " on page 339

• " Create Synonym " on page 620

NOTE: This tab/panel is not available if As Filetable

is selected. For details, see " Tables (SQL

Server) - Properties " on page 360.

T RIGGERS W IZARD (SQL S ERVER )

Triggers are a special type of procedure that automatically fire when defined data modification operations (insert, update, or delete) occur on a target table or view. Triggers fire after an insert, update or delete, but belong to the same transaction as the data modification operation.

Triggers can be implemented to enforce business rules or referential data integrity.

Important Notes

• For more information on the syntax for Trigger bodies, consult the Microsoft SQL Server

Transact-SQL Documentation.

RAPID SQL 8.6/XE5 USER GUIDE 362

CREATING OBJECTS

To create a new trigger using a wizard:

1 Open a creation wizard for a trigger. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Triggers (SQL Server) - Properties .

• Definition panel - for details, see

Triggers (SQL Server) - Definition

.

3 Finally, use the Execute button to create the object.

NOTE: You can use the Trigger Editor opens to create dependencies or alter the trigger statement.

T RIGGERS (SQL S ERVER ) - P ROPERTIES

When creating or editing a trigger, this tab/panel lets you work with the following settings:

Setting

Parent Type

Parent Schema

Parent Name

Name

Trigger Timing

Fire On Insert

Fire On Update

Fire On Delete

Encrypted

Description

Select the TABLE or VIEW on which the trigger is to be created.

Select the owner of the table or view on which the trigger is to be created.

Select the specific table or view in which the trigger is to be created.

Provide a name for the trigger.

INSTEAD OF: This is the only option for a View trigger. An INSTEAD OF trigger fires in place of the triggering statement and will not make changes to the data unless the conditions of the INSTEAD OF statement are met first. So, your UPDATE execution statement is replaced by an INSTEAD OF UPDATE statement as a way to enforce particular business rules you establish.

AFTER: An AFTER trigger fires following the successful completion of the triggering action. So, for example, the trigger would fire after an UPDATE statement has executed and after constraints have been checked and verified.

An INSERT trigger must be associated with an INSERT statement. For example, if a data load operation doesn’t include an INSERT statement, the trigger won’t be invoked.

An UPDATE trigger can be associated with specific columns of the base table and will only be activated if those columns are updated.

A DELETE trigger is associated with a DELETE operation.

If you choose to encrypt the trigger, the trigger can’t be published as part of SQL Server replication.

4 Finally, use the Execute button to create the object.

T RIGGERS (SQL S ERVER ) - D EFINITION

Complete the CREATE TRIGGER outline provided by typing or pasting the body of the trigger.

363 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

U NIQUE K EYS W IZARD (SQL S ERVER )

Unique keys can enforce logical keys that are not chosen as the primary key. In other words, you can use a unique key to ensure no duplicate values are entered in specific columns that are not a part of the primary key. Although you can only attach one primary key to a table, you can attach multiple unique keys. Also, you can use unique keys on columns that allow null values.

To create a new unique key using a wizard:

1 Open a creation wizard for a unique key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Unique Keys (SQL Server) - Properties .

• Columns panel -

Unique Keys (SQL Server) - Columns .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

U NIQUE K EYS (SQL S ERVER ) - P ROPERTIES

When creating or editing a unique key, this tab/panel lets you work with the following settings:

Setting

Table Owner and

Table Name

Name

Build Online

Description

Choose the owner and name of the table in which the unique key is being created.

Max degree of parallelism

Clustered

File Group

Fill Factor

Provide a name of the unique key being created.

Enabling this feature specifies that the ONLINE=ON clause is used when creating this object and can subsequently be used when rebuilding or dropping this object.

Lets you specify a MAXDOP index operation value, limiting the number of processors used in parallel plan execution.

Enable or disable clustering.

With this check box enabled, subsequent rebuild and drop operations offer an online option.

If you do not specify a filegroup, Microsoft SQL Server creates the unique key in the default filegroup.

This specifies how full each index page that’s storing data should be. The fill factor is a percentage value between 0 and 100.

U NIQUE K EYS (SQL S ERVER ) - C OLUMNS

From the Column dropdown, select a column for the primary key and specify a Sort option. To add more columns, click the New button and then follow the steps in the last instruction. Use the Delete button to drop columns.

RAPID SQL 8.6/XE5 USER GUIDE 364

CREATING OBJECTS

U SER M ESSAGES W IZARD (SQL S ERVER )

The User Message wizard lets you create multiple-language versions of user messages, such as errors and warnings, associated with a single message number. Key properties include the severity level and whether the message is automatically written to the NT Event Log.

NOTE: The user messages node only displays under the master database.

To create a new user message using a wizard:

1 Open a creation wizard for a user message. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

User Messages (SQL Server) - Properties .

• Information panel

- for details, see User Messages (SQL Server) - Information

.

• Object Permissions and System Permissions

panels - " Setting Permissions or Privileges for an Object " on page 257

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

U SER M ESSAGES (SQL S ERVER ) - P ROPERTIES

When creating or editing a user message, this tab/panel lets you work with the following settings:

Setting

Message Number

Description

Lets you specify a message number. The number must be greater than 50,000. The wizard automatically loads a value one higher than the currently highest used message number, but you can override the value.

Severity Lets you select a predefined severity level between 001 and 025. The levels and their meanings are indicated in the User Message editor.

Write to NT Event Log Lets you specify that the message is always written to the Windows NT Event Log.

U SER M ESSAGES (SQL S ERVER ) - I NFORMATION

Lets you create the different language versions of the text for the message. The first version must be created in us_english. Click the Add new text for the user message button, and in the dialog box that opens, select a Language of us_english and provide the Message Text .

You can subsequently use the same process to create each different language version of the us_english message.

NOTE: You cannot create two versions of a message for the same language.

365 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

This tab/panel also lets you edit and delete messages.

U SERS W IZARD (SQL S ERVER )

The User Wizard lets you create a user who will then have access to the database where you are registering him or her. You can also identify the appropriate user group and the system privileges you want to assign to the new user.

To create a new user using a wizard:

1 Open a creation wizard for a user. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Users (SQL Server) - Properties .

• Roles panel -

Users (SQL Server) - Roles .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

U SERS (SQL S ERVER ) - P ROPERTIES

When creating or editing a user, this tab/panel lets you work with the following settings:

Setting

Login Name

Name

Description

Select the server login associated with this user.

Provide the user name.

U SERS (SQL S ERVER ) - R OLES

For each role to be assigned to the user, select the check box beside that role.

U SER D ATATYPES W IZARD (SQL S ERVER )

User datatypes promote domain consistency by streamlining the definition of commonly used table columns in a database. You can build a customized datatype from system datatypes and bind defaults and rules to it to enhance integrity. When you reference the user datatype in a column, the column assumes all of the properties of the user datatype.

RAPID SQL 8.6/XE5 USER GUIDE 366

CREATING OBJECTS

To create a new user datatype using a wizard:

1 Open a creation wizard for a user datatype. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

User Datatypes (SQL Server) - Properties

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

U SER D ATATYPES (SQL S ERVER ) - P ROPERTIES

When creating or editing a user datatype, this tab/panel lets you work with the following settings:

Setting

Owner

Datatype

Type

Size

Allow Nulls

Default Binding

Rule Binding

Description

Select the owner of the user datatype.

Provide a name for the datatype.

Select the base datatype.

Provide the size of the datatype.

Null has no explicitly assigned value. Null is not equivalent to zero or blank. A value of null is not considered to be greater than, less than, or equivalent to any other value, including another value of null.

Defaults promote data integrity by supplying a default value to a column if the user does not explicitly provide one. They are reusable objects that you can bind to user datatypes.

Rules promote data integrity by allowing you to validate the values supplied to a column.

They are reusable objects that you can bind to user datatypes.

V IEWS W IZARD (SQL S ERVER )

Views are SQL queries stored in the system catalog that customize the display of data contained in one or more tables. Views behave like tables because you can query views and perform data manipulation operations on them. However, views do not actually store any data. Instead, they depend on data contained in their base tables.

To create a new view using a wizard:

1 Open a creation wizard for a view. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Views (SQL Server) - Properties .

• Definition panel - for details, see

Views (SQL Server) - Definition .

367 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

3 Finally, use the Execute button to create the object.

V IEWS (SQL S ERVER ) - P ROPERTIES

When creating or editing a view, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Encryption

Schema Binding

Check Condition

Owner

Description

Select the owner of the view. The owner of the view must have SELECT privileges for the tables in the CREATE view statement or DBADM authority on the database that contains the table.

Provide a name for the view.

If you select this option, the view will not be published with SQL Server replication.

When you specify this option, the base table or tables cannot be modified in a way that would affect the view definition. The view definition itself must first be modified or dropped to remove dependencies on the table that is to be modified

When a row is modified through a view, this option makes sure the data remains visible through the view after the modification is committed.

Select the owner of the view. The owner of the view must have SELECT privileges for the tables in the CREATE view statement or DBADM authority on the database that contains the table.

V IEWS (SQL S ERVER ) - D EFINITION

Complete the CREATE VIEW statement by typing or pasting in the relevant query.

M Y SQL OBJECT WIZARDS

Rapid SQL lets you create MySQL objects using the following wizards:

Databases wizard (MySQL)

Foreign Keys wizard (MySQL)

Functions wizard (MySQL)

Indexes, Primary Keys, or Unique Keys wizard (MySQL)

Tables wizard (MySQL)

Users wizard (MySQL)

D ATABASES WIZARD (M Y SQL)

The MySQL Database Wizard lets you build and execute a basic CREATE DATABASE statement and grant privileges on the database.

RAPID SQL 8.6/XE5 USER GUIDE 368

CREATING OBJECTS

To create a new database using a wizard:

1 Open a creation wizard for a database. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Databases - Properties

• Privileges

panel - " Setting Permissions or Privileges for an Object " on page 257

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

D ATABASES - P ROPERTIES

When creating or editing database, this tab/panel lets you work with the following settings:

Setting

Database Name

Default Character Set

Collation

Description

The database name you choose can be up to 64 characters long. Feel free to use all alphabetic characters or mix in some special or numeric characters. But a name cannot be exclusively special or numeric characters.

This is the character set for a language or alphabet. If you do not make a selection from the drop-down list (click the arrow to see the choices), the database will use the server’s default character set.

The collation encodes the rules governing character used for a language (like Greek) or an alphabet. The database will use the server’s default collation unless you specify otherwise.

NOTE: It’s possible to create databases with different character sets and collations on the same MySQL server.

F OREIGN K EYS WIZARD (M Y SQL)

The MySQL Foreign Keys Wizard lets you build and execute an ALTER TABLE statement with an

ADD CONSTRAINT option implementing a foreign key.

The wizard makes it easy for you to create a relational link between two tables, thereby speeding queries and giving you faster access to data. By using the Create Foreign Key Wizard you obviate the need for remembering the code underlying the creation process.

369 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new foreign key using a wizard:

1 Open a creation wizard for a foreign key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Foreign Keys - Properties

• Column Mapping panel - for details, see

Foreign Keys - Column Mapping

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

F OREIGN K EYS - P ROPERTIES

When creating or editing a foreign key, this tab/panel lets you work with the following settings:

Group

Constraint Name

Constraint State

Setting

System Generated and

User Specified

On Update and On

Delete

Description

The constraint name must be unique. You can either rely on

MySQL to assign a unique name or you can specify one.

Lets you specify ON UPDATE and ON DELETE values of NO

ACTION, CASCADE, RESTRICT, or SET NULL.

F OREIGN K EYS - C OLUMN M APPING

1 Under Referenced Table , choose the Database and then the referenced, or parent, Table .

2 Under the Main Table , select the referencing Table .

3 Under the Main Table , select the check box corresponding to the referring column and then under Referenced Table , select the check box corresponding to the referenced column.

F UNCTIONS WIZARD (M Y SQL)

The MySQL Functions Wizard lets you build and submit a CREATE FUNCTION declaration, specifying a return type and the owning library.

NOTE: Functions must be written in C or C++, your operating system must support dynamic loading, and you must have compiled mysqld dynamically (not statically).

RAPID SQL 8.6/XE5 USER GUIDE 370

CREATING OBJECTS

To create a new function using a wizard:

1 Open a creation wizard for a function. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Functions - Properties .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

F UNCTIONS - P ROPERTIES

When creating or editing a function, this tab/panel lets you work with the following settings:

Required Information

Function Name

Return Value

Description

In 64 characters or less, you can name your function.

STRING, REAL (also known as Double), INTEGER

Shared Object Library Identify the file that holds the library where your functions are stored.

Aggregate Check the box if the function you are creating will collapse a large amount of data into a single output, or aggregate the data.

I NDEXES , P RIMARY K EYS , OR U NIQUE K EYS WIZARD (M Y SQL)

The Indexes Wizard, Primary Keys Wizard, and Unique Keys wizard offer the same steps in creating these MySQL objects.

To create a new index, primary key, or unique key using a wizard:

1 Open a creation wizard for an index, primary key, or unique key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Indexes, Primary Keys, or Unique Keys - Properties

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute

button to create the object. For more information, see " Previewing the DDL Generated to Create the New Object " on page 257.

371 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

I NDEXES , P RIMARY K EYS , OR U NIQUE K EYS - P ROPERTIES

When creating or editing an index, primary key, or unique key, this tab/panel lets you work with the following settings:

Setting

Table Name

Index Name

Constraint Type

Index Storage Type

Specify Columns in

Index

Description

Select the table on which you want to create the object.

Provide a name of up to 64 alphanumeric characters.

Primary: Each record of a table is identified as uniquely and relates to a foreign key in another table.

Unique: Ensures that there is no duplication between values in columns where you place this constraint.

Full Text: Enables the search for several words in arbitrary order in a table.

Spatial: Allows you to find records that are defined by location, or geometry types.

Hash: Used for equality comparisons. Only whole keys can be used to search for a row.

BTree: Tree data structure that keeps data sorted. BTrees grow from the bottom up as elements are inserted.

RTree: Tree data structure used for spatial indexes and access to multidimensional information.

Columns are listed by name and datatype and whether or not they are nullable. As you check selections, the sort order is identified.

T ABLES WIZARD (M Y SQL)

The MySQL Table Wizard lets you create a basic table definition.

To create a new table using a wizard:

1 Open a creation wizard for a table. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Tables - Properties

• Columns panel - for details, see

Tables - Columns

• Indexes panel

- for details, see Tables - Indexes

• Foreign Keys panel

- for details, see Tables - Foreign Keys

• MERGE tables panel

- for details, see Tables - MERGE Tables

• Privileges

panel - for details, see " Setting Permissions or Privileges for an Object " on page 257

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257

3 Finally, use the Execute button to create the object.

RAPID SQL 8.6/XE5 USER GUIDE 372

CREATING OBJECTS

T ABLES - P ROPERTIES

When creating or editing a table, this tab/panel lets you work with the following properties:

NOTE: Prior to working with MySQL table properties, you should have a detailed understanding of MySQL table creation options. For access to MySQL documentation,

see " Accessing Third Party Documentation " on page 21.

Setting

Table Name

Storage Type

Row Format

Description

Provide a unique name of up to 64 characters.

Lets you select a storage engine value of MyISAM, InnoDB, BerkeleyDB, ISAM,

MRG_MyISAM, HEAP, or MEMORY.

Lets you select a row format of DEFAULT (returns the default value if there is one), FIXED

(each row is stored with a fixed number of bytes), DYNAMIC (data records have variable length), or COMPRESSED (each record is compressed separately).

Create via SELECT When you create a table using a SELECT command, the individual columns take their data types from the SELECT command, and don’t have to be declared explicitly.

Attributes, however, are not carried over.

Unique Key Violations When you try to insert or update a row that causes a violation, you can choose to

IGNORE the violation and continue processing the next row.

Or, you can choose REPLACE, which is equivalent to an insert statement if a violation occurs. The row will be replaced with the new data.

Default Character Set This is the character set for a language or alphabet.

Default Collation

Auto-increment

Comment

Min Rows and Max

Rows

The collation encodes the rules governing character used for a language (like Greek) or an alphabet.

You can specify the initial value used for the auto-increment sequence. This is possible only for MyISAM tables and for InnoDB tables built in MySQL versions 5.0.3 or greater.

For InnoDB tables built in versions prior to 5.0.3, you can manually insert a dummy row with a value one less than the desired value after creating the dummy table; you then delete the dummy row.

Enter a descriptive comment.

Note that if you set the value for either parameter at 0, MySQL removes the setting.

MySQL will take care of the row settings in this case.

Average Row Length

Pack Keys

Check Sum

Delay Key Write

The average length (compressed or uncompressed) of table rows in the table space.

This setting is only enabled for a Storage Type of MyISAM . It lets you specify a PACK

KEYS option value of 0 (keys packing disabled), 1 (smaller indexes), or DEFAULT (pacl long columns only).

This setting is only enabled for a Storage Type of MyISAM . When selected the CREATE

TABLE statement is issued with a CHECKSUM = 1 option. When deselected, the CREATE

TABLE statement is issued with a CHECKSUM = 0 option.

This setting is only enabled for a Storage Type of MyISAM . When selected, the CREATE

TABLE statement is issued with a DELAY_KEY_WRITE = 1 option. When deselected, the

CREATE TABLE statement is issued with a DELAY_KEY_WRITE = 0 option.

T ABLES - C OLUMNS

When creating or editing a table, this tab/panel lets you modify the table’s column setup, as follows:

373 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

• Use the Add Column button to add the columns to the table. After providing a Name for a new column, you can select a Type and modify other Datatype properties corresponding to the type you selected. When selected, the Allow Nulls property corresponds to a CREATE

TABLE with a NULL attribute, while unselected it corresponds to a NOT NULL attribute.

When available the Default Value property corresponds to a DEFAULT attribute.

• Modify a column definition by selecting the column from the column list and modifying values under Column Attributes .

• Delete a column definition by selecting the column from the column list and clicking Delete .

• Use the arrow buttons to change the position of a selected column.

T ABLES - I NDEXES

When creating or editing a table, this tab/panel lets you build an associated PRIMARY KEY,

UNIQUE KEY, FULL TEXT, or SPATIAL clause that will be included with the CREATE TABLE statement.

• Use the Insert a New Index button to add an index. In the Index field, type a name for the index, select a Constraint Type of PRIMARY KEY, UNIQUE KEY, FULL TEXT, or SPATIAL, and select an Index Type of BTREE, HASH, or RTREE as appropriate to the constraint type.

Under Specify Columns in Index , select the column or columns that are to make up the index.

• Modify an index definition by selecting the index from the list and modifying the Index name, Constraint Type , Index Type or the columns making up the index.

• Delete an index by selecting the index from the list and clicking the Remove button.

T ABLES - F OREIGN K EYS

When creating or editing a table, this tab/panel lets you work with foreign keys for a table:

NOTE: This tab/panel is only available for a table with a Storage Type property value of

INNODB.

• Use the Insert a New Foreign Key button to add a foreign key. Provide a Foreign Key Name , select the referenced database and table from the Ref. Database and Ref. Table dropdowns, and select On Delete and On Update actions of NONE, CASCADE, DEFAULT,

SET NULL, NO ACTION, or RESTRICT. Under Main Table , select the foreign key column and then under Referenced Table , select the column that the foreign key is to reference.

• Modify a foreign key definition by selecting the foreign key from the list and changing the name, referenced database or table, delete or update actions, or the column specifications.

• Delete a foreign key by selecting the key from the list and clicking the Remove the selected foreign key button.

RAPID SQL 8.6/XE5 USER GUIDE 374

CREATING OBJECTS

T ABLES - MERGE T ABLES

When creating or editing a table, this tab/panel lets you work with a c ollection of identical

MyISAM tables that are to be used as a single table.

NOTE: This tab/panel is only available for a table with a Storage Type property value of

MRG_MyISAM.

• Use the New button to add a MyISAM table to the collection, selecting a table from the associated dropdown.

• Use the Delete button to remove a selected MyISAM table from the collection.

• Use the arrow buttons to change the ordering position of a selected table.

U SERS WIZARD (M Y SQL)

The MySQL Users Wizard lets you provide basic identification, grant privileges, and specify valid host information for a user definition.

To create a new user using a wizard:

1 Open a creation wizard for a user. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• User Information panel - for details, see

Users - User Information

• User Hosts panel

- for details, see Users - User Hosts

• System Privileges and Object Privileges

panels - for details, see " Setting Permissions or

Privileges for an Object " on page 257

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257

3 Finally, use the Execute button to create the object.

U SERS - U SER I NFORMATION

When creating or editing a user definition, this tab/panel lets you work with the following settings:

Setting

User Name

Description

The name of the new user. At this time, the name cannot exceed 16 characters, although the field accepts 34. Rapid SQL can’t enforce the discrepancy, so we urge you to show a little restraint. This is the name that is displayed in the User branch of the Navigator tree.

If you leave this field blank and complete the process, you create an <anonymous> user. Only one anonymous user per datasource is allowed.

375 RAPID SQL 8.6/XE5 USER GUIDE

Setting

Full Name

Description

Email

Contact

Information

User Icon

CREATING OBJECTS

Description

OPTIONAL. At this time, the name cannot exceed 16 characters, although the field accepts

34. If you entered a nickname or an alias in the user name field, you can display the user’s true identity here.

OPTIONAL. Write a brief description of the user if you want.

OPTIONAL. The new user’s email address.

OPTIONAL. The new user’s title, address, phone number or whatever contact information you want to include.

OPTIONAL. If you want to identify your new user by color or pattern, you can use the icon editor to make a distinguishing mark. You can assign groups of users the same icon or assign each user his or her own icon. This tool helps you distinguish users at a glance. Note: If you don’t want to use the head that’s preloaded, simply click the red X and start designing your own with the other tools.

U SERS - U SER H OSTS

When creating or editing a user definition, this tab/panel lets you specify the valid hosts from which the user can connect to the server.

• Add a new host to the list by clicking the New button. Use the associated dropdown to select a valid host-name value (such as localhost or %), overwriting the text as necessary to provide a specific quoted identifier. Provide a password in the Password and Confirm fields and click Apply .

NOTE: Click Apply To All to assign the current password for each host currently in the list.

• Remove a selected host from the list by clicking the Delete button.

O RACLE O BJECT W IZARDS

Rapid SQL lets you create Oracle objects using the following wizards:

• Clusters Wizard (Oracle)

• Database Links Wizard (Oracle)

• Directories Wizard (Oracle)

• Foreign Keys Wizard (Oracle)

• Functions Wizard (Oracle)

• Indexes Wizard (Oracle)

• Oracle Job Queue Wizard (Oracle)

Jobs wizard (Oracle)

• Libraries Wizard (Oracle)

RAPID SQL 8.6/XE5 USER GUIDE 376

CREATING OBJECTS

• Materialized Views Wizard (Oracle)

• Materialized View Logs Wizard (Oracle)

• Outlines Wizard (Oracle)

• Packages Wizard (Oracle)

• Primary Keys Wizard (Oracle)

Procedures Wizard (Oracle)

Programs wizard (Oracle)

• Profiles Wizard (Oracle)

• Roles Wizard (Oracle)

• Rollback Segments Wizard (Oracle)

Schedules Wizard (Oracle)

• Sequences Wizard (Oracle)

• Synonyms Wizard (Oracle)

• Tables Wizard (Oracle)

• Tablespaces Wizard (Oracle)

• Triggers Wizard (Oracle)

• Object Types Wizard (Oracle)

• Unique Keys Wizard (Oracle)

• Users Wizard (Oracle)

• Views Wizard (Oracle)

C LUSTERS W IZARD (O RACLE )

The Cluster Wizard lets you create a cluster. A cluster is a schema object that has one or more tables that all have one or more common columns. Rows of one or more tables that share the same value in these common columns are stored together in the database. The related columns of tables stored in a cluster are known as the cluster key.

Important Notes

• To create a cluster, you need the CREATE CLUSTER or CREATE ANY CLUSTER system privilege.

377 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

T

O

O

PEN THE

C

LUSTER

W

IZARD

1 On the Navigator, find the schema where you want to add the new cluster.

2 On the Cluster branch, right-click and select New .

OR

1 On the main toolbar, click Datasource and scroll to Objects

2 Click Clusters and then click New from the toolbar.

The tables below describe the fields you may encounter as you complete the wizard.

Required Information

Who owns the cluster?

Description

Pick an owner

What is the name of the cluster?

Type a unique name

On which tablespace do you want to create the cluster?

Self-explanatory

Add columns that are in this cluster

These are the columns that are common between the tables you are “clustering”

Add or Edit Button - For more information, see

Adding or modifying a cluster column .

Drop Button - Drops the column.

What is the size of this cluster?

This is the estimated number of bytes/KB/MB required by an average cluster key and its associated rows. Do not exceed the size of a data block.

What is the cluster type?

If this is a hash cluster, what is the number of hash keys?

If this is a hash cluster, what is the hash function?

Index: Rows having the same cluster key value are stored together. Each separate cluster key is stored only once in each data block. An indexed cluster is helpful if your clustered tables might grow unpredictably.

Hash: Rows with the same hash key value are stored together. This is helpful if the tables are static.

Type the number of hash keys. Oracle will round the value up to the nearest prime number.

Oracle uses a hash function to generate a distribution of numeric values, called hash values, which are based on specific cluster key values. The key of a hash cluster, like the key of an index cluster, can be a single column or composite key

(multiple column key). To find or store a row in a hash cluster, Oracle applies the hash function to the row's cluster key value. The resulting hash value corresponds to a data block in the cluster, which Oracle then reads or writes on behalf of the issued statement.

Default is the Oracle internal hash function, otherwise specify the hash expression you want to use.

How many transaction entries are allowed for each data block in the cluster?

What is the percent of space reserved for future updates?

Each transaction that updates a data block requires a transaction entry.

Initial (1-255): The initial parameter ensures that a minimum number of concurrent transactions can update a data block, avoiding the overhead of allocating a transaction entry dynamically.

Maximum (1-255): The maximum parameter limits concurrency on a data block.

Percent Free (0-99): This sets the percentage of a data block to be reserved for possible row updates that are included in the block. The value you set is the percent kept free.

RAPID SQL 8.6/XE5 USER GUIDE 378

CREATING OBJECTS

Required Information

What is the minimum percentage of used space that Oracle maintains for each data block?

How large are the cluster’s extents?

Specify the number of free lists

Description

The storage parameter lets you tune performance by minimizing the occurrence of row migration and chaining caused by update operations that extend the length of rows stored on the data block.

Percent Used (1-99)

The unit of space allocated to an object whenever the object needs more space.

Initial Extent - The initial space extent (in bytes) allocated to the object.

Next Extent - The next extent (in bytes) that the object will attempt to allocate when more space for the object is required.

Free lists are lists of data blocks that have space available for inserting rows.

Identifying multiple free lists can reduce contention for free lists when concurrent inserts take place and potentially improve the performance of the cluster.

Free Lists: The default and minimum value is 1; this option should be set higher if multiple processes access the same data block.

This is the number of groups of free lists for the database objects being created. Specify the number of free list groups (specify only if you are using the parallel server option)

Define a default buffer pool for this cluster

Oracle’s parallel query option

Choosing Cache

Default - Select to retain the default.

Keep - Select to retain the object in memory to avoid I/O conflicts.

The parallel server query option lets you process queries using many query server processes running against multiple CPUs, which provides substantial performance gains such as reducing the query completion time.

Cache: This keeps the data block in memory by placing it at the most recently used end. This option is useful for small lookup tables.

No Cache

A DDING OR MODIFYING A CLUSTER COLUMN

The Add or Modify Cluster Column dialog lets you manage cluster columns. You can open the

dialog in the Oracle Cluster Wizard. For details, see " Clusters Wizard (Oracle) " on page 377.

The table below describes the options and functionality on the Add or Modify Cluster Column dialog

Option

Column Name

Datatype

Description

Lets you type the column name.

Lets you select the datatype for the cluster.

If you select CHAR, RAW or VARCHAR2, in the Width box, type the width value.

If you select NUMBER, in the Width box, type the width value and in the Scale box, type the scale value.

379 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Completing the Add or Modify Cluster Column Dialog Box

To complete this dialog, do the following:

1 In the Add Cluster Column dialog, in the Column Name box, type the column name.

2 Click the Datatype list, click the datatype for the cluster.

• If you clicked CHAR, RAW or VARCHAR2, in the Width box, type the width value.

• If you clicked NUMBER, in the Width box, type the width value and in the Scale box, type the scale value.

3 Click the Add button.

4 To continue adding columns to the cluster, repeat steps 1-3.

5 When you finish adding columns, click Close .

Rapid SQL closes the Add Cluster Column dialog.

For more information, see

Adding or modifying a cluster column .

D ATABASE L INKS W IZARD (O RACLE )

A database link specifies a communication path from one database to another. If you’re creating a link to a remote database, a database session is established in the remote database on behalf of the local application request. By creating either a public or private database link, you can determine which schema on the remote database the link will establish connections to by creating fixed, current, and connected database links. By creating a link you can reuse connectivity instructions each time you connect to the remote database.

To Open the Database Link Wizard

1 On the Navigator, find the schema where you want to add the new database link.

2 On the Database Links branch, right-click and select New .

OR

1 On the main toolbar, click Datasource and scroll to Objects

2 Click Database Links and then click New from the toolbar.

The table that follows describes the fields you will encounter as you complete the wizard.

NOTE: To create a public database link, you need CREATE PUBLIC DATABASE LINK privileges.

Required Information

What is the name of the database link?

Description

Create a unique name

RAPID SQL 8.6/XE5 USER GUIDE 380

CREATING OBJECTS

Required Information

Should the database link be made public?

Description

A public link is a link on a local database that’s accessible to all users on that database.

If you keep the database link private by selecting No, a link is created in a specific schema of the local database and only the owner of the link can use it to access database objects in the corresponding remote database.

Self-explanatory What is the name of the remote user?

What is the remote user’s password?

What is the connection string?

Create a password for the remote user.

Self-explanatory.

D IRECTORIES W IZARD (O RACLE )

A directory object specifies an alias for a directory on the server file system where external binary file LOBs and external table data are located. The wizard completes a CREATE DIRECTORY statement from the information you supply. The Directory Wizard prompts you to name the directory and provide the full-qualified directory path.

To Open the Directories Wizard

1 On the Navigator, find the Datasource where you want to create a directory and expand the

Storage node.

2 Right-click Directories and select New .

The table that follows describes the fields you will encounter as you complete the wizard.

Required Information

What is the name of the directory?

Description

Type a meaningful name for the directory.

What is the directory path?

Type the full path name of the outside operating system directory that you want to alias in the directory (for example, /Video/Library/G_Rated). NOTE: Oracle trusts that directory you’re specifying exists. The onus is on you to make sure it’s valid and in the correct format (as required by your operating system).

After you have created the Directory, you can give other users Read or Write privileges by opening the new Directory on the Directories node, and making changes at the Privileges tab.

381 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

F OREIGN K EYS W IZARD (O RACLE )

A foreign key value in one table (child table) refers to a primary key value in another table (parent table). For example, the Author Name column in a publisher’s database may be the primary key for a table of addresses that includes the Author Name column. If an author isn’t included in the parent table, you can’t add the address to the dependent address table. So foreign keys enforce referential integrity between tables by verifying the existence of foreign key values in the parent table before letting you insert or update foreign key values in the child table. In other words, a foreign key is an integrity constraint that requires each value in one table’s column to match a value in a related table’s data.

To create a new foreign key using a wizard:

1 Open a creation wizard for a foreign key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Foreign Keys (Oracle) - Properties .

• Column Mapping panel -

Foreign Keys (Oracle) - Column Mapping .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

F OREIGN K EYS (O RACLE ) - P ROPERTIES

When creating or editing a foreign key, this tab/panel lets you work with the following settings:

Setting

Table Owner

Table Name

Name

Enabled

Delete Rule

Description

The owner of the table where the foreign key is being created.

This is the table where the foreign key link originates--the child table.

Lets you select a constraint name.

System Generated Name - DB2 automatically generates a name.

User Specified Constraint Name - You type the name.

Enable or disable the foreign key. Enabled ensures that all data modifications to a given table

(or tables) satisfy the conditions of the constraints. When disabled, the constraint is temporarily not operational.

Select an action:

NO ACTION - ensures that referenced values cannot be updated or deleted if to do so would violate referential integrity.

CASCADE permits a referenced row in a child table to be deleted/updated if it is deleted/ updated in the parent table. A row in the child table is SET NULL when rows in the parent table are deleted/updated.

RAPID SQL 8.6/XE5 USER GUIDE 382

CREATING OBJECTS

F OREIGN K EYS (O RACLE ) - C OLUMN M APPING

Under Referenced Table , choose the Owner and then the Name of the referenced, or parent, table.

Under the Main Table , select check boxes corresponding to the columns that are to reference columns in the referenced table. Then, under Referenced Table , select the corresponding column check boxes.

F UNCTIONS W IZARD (O RACLE )

Functions are subroutines that you define and are useful for reusing application logic. You can use functions to determine the best methods for controlling access and manipulation of the underlying data contained in an object. A function returns a value, unlike a procedure, which does not.

To create a new function using a wizard:

1 Open a creation wizard for a function. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Functions (Oracle) - Properties

.

• Definition panel - for details, see

Previewing the DDL Generated to Create the New

Object

.

3 Finally, use the Execute button to create the object.

F UNCTIONS (O RACLE ) - P ROPERTIES

When creating or editing a function, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Description

Select the owner of the function.

Provide a name for the function.

F UNCTIONS (O RACLE ) - D EFINITION

Complete the CREATE FUNCTION outline provided by typing or pasting the body of the function.

383 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

I NDEXES W IZARD (O RACLE )

Indexes are optional structures associated with tables. You can create indexes specifically to speed SQL statement execution on a table. When properly used, indexes are the primary means of reducing disk I/O. Indexes are logically and physically independent of the data in the associated table. Unique Indexes guarantee that no two rows of a table have duplicate values in the columns that define the index.

NOTE: The Index Wizard varies slightly in content based on the version of Oracle to which you are connected.

NOTE: To create indexes in your own schema, you need INDEX privileges on the target table.

To create indexes in other schema, you need CREATE ANY INDEX privileges.

NOTE: You can place a unique key constraint on an Index-Organized table.

TIP: Index-organized tables take up less storage space and quickly access table rows. Indexorganized tables stores rows in primary key order reducing the amount of storage space needed.

TIP: An advantage of using index-organized tables is that the tables use less memory because key columns are not duplicated in the table and index. Rapid SQL stores the remaining non-key columns in the index structure.

To create a new index using a wizard:

1 Open a creation wizard for an index. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Indexes (Oracle) - Properties

.

• Columns

panel - Indexes (Oracle) - Columns .

• Storage panel -

Indexes (Oracle) - Storage .

• Partition

panel - Indexes (Oracle) - Partition .

• Definition

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

I NDEXES (O RACLE ) - P ROPERTIES

When creating or editing an index, this tab/panel lets you work with the following settings:

Setting

Table Owner and

Table Name

Description

Choose the owner and name of the table in which the index is being created.

RAPID SQL 8.6/XE5 USER GUIDE 384

CREATING OBJECTS

Setting

Owner and Name

Index Type

No Sort

Logging

Reverse

Function-Based

Invisible

11g)

(Oracle

No Parallel

Execution

Parallel Degree

Parallel Instances

Description

Choose the owner and provide the name of the index being created.

NONUNIQUE - In a non-unique index, the ROWID is treated as part of the key. Oracle treats a constraint as deferrable.

UNIQUE - Select if the index is a unique constraint.The values in the indexed columns must be distinct.

BITMAP - Widely used in data warehousing environments. The environments typically have large amounts of data and ad hoc queries, but a low level of concurrent DML transactions.

Enable this feature if the rows in the table already stored in ascending order. This increases the speed of the index creation process. Oracle does not sort the rows.

Enabling logs this operation to the redo file.

Enabling this feature stores the bytes of the index block in reverse order and excludes the

ROWID. The ROWID is a globally unique identifier for a row in a database. It is created at the time the row is inserted into a table, and destroyed when it is removed from a table.

Permits the results of known queries to be returned much more quickly. When you select this option, you are asked for the expression that governs the function-based index you are creating.

Adds an INVISIBLE keyword to the DDL generated to create or edit this index. The optimizer ignores an invisible index unless the OPTIMIZER_USE_INVISIBLE_INDEXES is set to TRUE at the session or system level.

The parallel server query option lets you process queries, using many query server processes, running against multiple CPUs. This option provides substantial performance gains such as reduction of the query completion time.

After creation, ALTER INDEX for NOPARALLEL execution - when you use multiple query servers and you select this option, the parallel query option remains in place, but parallel processing will be removed. If, for example, multiple users on numerous nodes are modifying the same small set of data, the cost of synchronization from the parallel processing may have an unnecessarily large drag on throughput.

The value you select indicates the number of query server processes that should be used in the operation.

The value you select indicates how you want the parallel query partitioned between the

Parallel Servers.

I NDEXES (O RACLE ) - C OLUMNS

From the Column dropdown, select a column for the index and specify a Sort option. To add more columns, click the New button and then follow the steps in the last instruction. Use the

Delete button to drop columns.

385 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

I NDEXES (O RACLE ) - S TORAGE

When creating or editing an index, this tab/panel lets you work with the following settings:

Setting Description

Data Block Storage group

Select the DEFAULT Tablespace only if you are creating a local partitioned index and want the partitions in the same tablespace as the partitions in the underlying table. (Each partition of a local index is associated with one partition of the table. Oracle can then keep the index partitions in synch with table partitions.)

A transaction entry is needed for each INSERT, UPDATE, DELETE, etc. statement that accesses one or more rows in the block. Transaction entries in many operating systems require approximately 23 bytes.

Percent Free identifies how much space you want to allocate for new rows or updates to existing rows.

Initial Transactions ensures that a minimum number of concurrent transactions can update an index block, avoiding the overhead of allocating a transaction entry dynamically.

Maximum Transactions limits concurrency on an index block.

Extents group

Freelists group

Buffer Pool

An extent is the unit of space allocated to an object whenever the object needs more space.

Initial Extent - The initial space extent (in bytes) allocated to the object.

Next Extent - The next extent (in bytes) that the object will attempt to allocate when more space for the object is required.

Percentage Increase - Lets you type the percentage.

NOTE: You should be careful when setting Percent Increase because it magnifies how an object grows and, therefore, can materially affect available free space in a tablespace.

Minimum Extents - For a dictionary managed tablespace, this is the total number of extents to be allocated when the index is first created. For a locally managed tablespace, this is simply the initial amount of space allocated.

Maximum Extents - For a dictionary managed tablespace, this is the total number of extents that can ever be allocated to the index. In a locally managed tablespace, the database will automatically manage the extents.

Free lists let you manage the allocation of data blocks when concurrent processes are issued against the index. You can potentially improve the performance of the index by identifying multiple free lists, which can reduce contention for free lists when concurrent inserts take place.

The default and minimum value is 1. You should increase this number if multiple processes access the same data block.

Free List Groups is the number of groups of free lists.

NOTE: This option is only applicable for the parallel server option.

DEFAULT - Choose this if you want to use the default bufferpool.

KEEP - Use this to retain the object in memory to avoid I/O conflicts. This type of bufferpool stores frequently referenced data blocks in a separate cache.

RECYCLE - Select this option to save cache space by ridding data blocks from memory as soon as they are no longer in use.

I NDEXES (O RACLE ) - P ARTITION

Clicking Create Partition opens a wizard that lets you create a partition.

RAPID SQL 8.6/XE5 USER GUIDE 386

CREATING OBJECTS

O RACLE J OB Q UEUE W IZARD (O RACLE )

This wizard lets you build and submit a DBMS_JOB.SUBMIT call, creating a once-only or scheduled job, optionally submitted as broken.

To create a new job queue using a wizard:

1 Open a creation wizard for a job queue. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Job Queues (Oracle) - Properties .

• Definition panel - for details, see

Job Queues (Oracle) - Definition .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object. For more information, see

Previewing the DDL Generated to Create the New Object .

J OB Q UEUES (O RACLE ) - P ROPERTIES

When creating or editing a job, this tab/panels lets you work with the following settings:

Option

No Parse

Submit as disabled

Next Date

Availability and Description

Specifies the value of the NO_PARSE flag. If deselected, the associated procedure is parsed on submission. If selected, the associated procedure is parsed the first time the job is executed.

If selected, the DBMS_JOB.SUBMIT call generated to create the job, is followed by a

DBMS_JOB.BROKEN call. Marking the job as broken, this disables the job and in order to execute the job, you must use the Run Job

object action. For details, see " Run Job

(job queues) " on page 695.

Use this control to open a calendar that lets you select a date for the job to run with a default time of midnight. You can then modify the time value.

Run Again

Every

Time Unit

Use Custom Expression and Custom Expression

Only available if Run Again is selected and

Use Custom Expression is not selected..

Only available if Run Again is selected.

Custom Expression becomes available when Use Custom Expression is selected.

J OB Q UEUES (O RACLE ) - D EFINITION

When creating or editing a job, the tab/panel lets you provide the DBMS_JOB.SUBMIT call’s

WHAT parameter, specifying the name of the PL/SQL procedure to run.

387 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

J OBS WIZARD (O RACLE )

This wizard builds and submits a call to DBMS_SCHEDULER.CREATE_JOB with optional

DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE, DBMS_SCHEDULER.SET_ATTRIBUTE, and DBMS_SCHEDULER.ENABLE calls. This lets you create a fully-specified job.

NOTE: This functionality is available as of Oracle 10g.

NOTE: Before working with jobs, consult Oracle documentation for general information on

DBMS_SCHEDULER. For more information, see " Accessing Third Party

Documentation " on page 21.

To create a job using a wizard

1 On a connected Oracle datasource, expand the Scheduler node.

2 Right-click the Jobs node and select Create from the context menu.

3 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Jobs (Oracle) - Properties

.

• Action

panel - for details, see Jobs (Oracle) - Action .

• Arguments panel - for details, see

Jobs (Oracle) - Arguments .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

4 Finally, use the Finish button to create the object.

J OBS (O RACLE ) - P ROPERTIES

When creating or editing a job, this tab/panel lets you work with the following settings:

Group

Creation

Attributes

Schedule

Settings and Description

Lets you provide an Owner and Name for the job.

Lets you provide Enabled , Description (COMMENTS), and Job Class (JOB_CLASS) attributes.

Lets you select a Schedule Type of IMMEDIATE, ONCE, REPEATING, or specified

SCHEDULE. Depending on your selection, the following settings may be available:

Repeat Interval - corresponds to a REPEAT_INTERVAL attribute. Calendaring syntax, as described in Oracle DBMS_SCHEDULER documentation, can be typed free-form, and will be passed directly to the server. For information on third-party documentation

access, see " Accessing Third Party Documentation " on page 21.

Start Date and End Date - correspond to START_DATE and END_DATE, attributes.

Schedule Owner and Schedule Name - correspond to SCHEDULE_NAME attribute components.

RAPID SQL 8.6/XE5 USER GUIDE 388

CREATING OBJECTS

Group

Properties

Settings and Description

The Auto Drop setting corresponds to a CREATE_JOB AUTO_DROP attribute. Other settings result in one or more DBMS_SCHEDULER.SET_ATTRIBUTE calls being generated with RESTARTABLE, JOB_PRIORITY, MAX_RUNS, MAX_FAILURES, FAILED

RUNS, STOP_ON_WINDOW_CLOSE, INSTANCE_STICKINESS, or JOB_WEIGHT attributes specified, as appropriate.

J OBS (O RACLE ) - A CTION

When creating or editing a job, this tab/panel lets you specify a JOB_ACTION attribute for the

DBMS_SCHEDULER.CREATE_JOB call, specifying the job action for the job.

To specify a job action

1 From Job Type , select one of PLSQL BLOCK, STORED PROCEDURE, EXECUTEABLE, or

CHAIN.

2 Based on your Job Type selection, provide additional details as follows:

• PLSQL BLOCK - Type or paste the SQL to be executed.

• STORED PROCEDURE - Provide the Procedure Owner and Procedure Name .

• EXECUTEABLE - Use the browse button to locate the executable.

• PROGRAM - Provide the Program Owner and Program Name .

• CHAIN - Provide the Chain Owner and Chain Name .

J OBS (O RACLE ) - A RGUMENTS

When creating or editing a job, if you selected an Action tab choice of PROGRAM,

EXECUTABLE, or STORED PROCEDURE, this tab/panel lets you manage parameters to be passed.

NOTE: If you provide arguments with an Action tab choice of PROGRAM, the provided arguments override those specified in the program definition. For details, see

" Programs wizard (Oracle) " on page 403.

L IBRARIES W IZARD (O RACLE )

Libraries are an object type that represent a call to an operating system shared library cache.

After the call is made, libraries can be used by SQL or PL/SQL to link to external procedures or functions. Libraries are only to be used on operating systems that support shared libraries and dynamic linking. Libraries serve as pointers or aliases to physical operating system shared library files and do not exist as a physical object; rather they rely on the physical existence of the files in the external operating system library to which they refer. To access the function or procedures stored in the library, you need execute privileges at the operating system level where the shared library resides.

389 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

• To create a library in your own schema, you need CREATE ANY LIBRARY privileges. To use the functions or procedures stored in the library, you need object EXECUTE privileges on the library.

To Open the Library Wizard

1 On the Navigator, find the datasource where you want to create a Library and expand the

Schema node.

2 Right-click the Libraries node, and select New .

The table that follows describes the fields you may encounter using this wizard:

Required Information

Who owns the library?

What is the name of the library?

What is the file specification?

Description

Self-explanatory.

Self-explanatory.

Lets you type the file name and location. You must type the complete location (for example,

D:\Embarcadero\ETLIB21D.DLL).

M ATERIALIZED V IEWS W IZARD (O RACLE )

A materialized view gives you indirect access to table data by storing a query’s results in a separate schema object. Essentially, a materialized view is a database object that contains the results of a query.

The Materialized View Wizard lets you:

• Specify the materialized view owner and to name the materialized view.

• Specify the materialized view's refresh configuration.

• Place the materialized view on a tablespace and specify the query that should be used to populate the materialized view.

• Specify how Oracle should allocate data blocks to store the materialized view.

• Specify how Oracle should manage the growth of the materialized view.

• Specify if Oracle updates the materialized view, register an existing table, and specify how to populate a materialized view.

• Specify if the data for the materialized view is cached, if you want the updates logged, and to specify a number of threads for a parallel operation.

• Specify rollback segments, and enable query rewrites.

RAPID SQL 8.6/XE5 USER GUIDE 390

CREATING OBJECTS

To Open the Materialized View Wizard

1 On the Navigator, find the datasource where you want to create a Materialized View and expand the Schema node.

2 Right-click the Materialized Views node, and select New .

The table that follows describes the fields you may encounter as you complete the wizard:

Required Information

Who owns the materialized view?

What is the name of the materialized view?

How should the materialized view be refreshed?

Choose a refresh mechanism

Description

Self-explanatory

Self-explanatory.

Fast - Using the information logged on the materialized view logs or a partition

maintenance operation, the refresh applies incremental changes. See Fast Refresh

Requirements for more information.

Complete - This refresh recalculates the materialized view’s defining query.

Force - Applies fast refresh when feasible, otherwise uses a complete refresh.

Never - Materialized view will not be refreshed with the optional refresh mechanisms.

On Demand - This option requires that all refreshes be manually executed.

On Commit - Select to refresh the materialized view whenever Oracle processes a transaction. Only select this option for materialized views on single table aggregates and materialized views containing joins.

Automatically - Select to refresh the materialized view automatically. In the On this date: boxes select a time and date, and then select a refresh amount and a unit of time.

Where do you want to place the materialized view?

Select the tablespace where you want the materialized view placed.

What is the materialized view query?

Select a refresh method

Type the SQL query to be used to populate and to refresh the materialized view.

How many transaction entries are allowed for each datablock in the materialized view?

What is the percent of space reserved for future updates?

Primary Key - A primary key's values uniquely identify the rows in a table. Changes are propagated according to row changes as identified by the primary key value of the row. Only one primary key can be defined for each table.The primary key of the master table is the basis for this refresh option, which is the default option.

ROWID - A globally unique identifier for a row in a database based on the physical row identifiers. A RowID is created at the time the row is inserted into a table, and destroyed when it is removed from a table. ROWID materialized views cannot contain distinct or aggregate functions or GROUP BY subqueries, joins and set operations.

A transaction is a logical unit of work that contains one or more SQL statements. Each transaction that updates a data block requires a transaction entry.

Initial (1-255) - Ensures that a minimum number of concurrent transactions can update a data block, avoiding the overhead of allocating a transaction entry dynamically.

Maximum (1-255) - Limits concurrency on a data block.

Percent Free (0 99) - This sets the percentage of a data block to be reserved for possible row updates that are included in the block. The value you set is the percent kept free.

391 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Required Information

What is the minimum percentage of used space that Oracle maintains for each datablock?

How large are the materialized views extents?

Description

Percent Used (0-99) - Set the amount of space to be used for each datablock.

NOTE: The sum of percent free and the percent used cannot exceed 100.

The unit of space allocated to an object whenever the object needs more space. An extent is a specific number of contiguous data blocks set aside for storing a specific type of information.

Initial Extent (KB) - The initial space extent (in bytes) allocated to the object.

Next Extent - The next extent (in bytes) that the object will attempt to allocate when more space for the object is required.

Minimum Extents - The appropriate minimum extents value for the object.

Maximum Extents - The appropriate maximum extents value for the object.

How many extents should be allocated to the materialized view?

What is the growth rate for sizing additional materialized views?

Percent Increase - Magnifies how an object grows and can materially affect available free space in a tablespace. Select a value in the corresponding box.

Can the materialized view be updated?

Do you want to register a prebuilt table to the view?

Should the materialized view be immediately filled?

Should data for the materialized view be cached?

Do you want updates to be logged?

Do you want to specify the number of threads used in a parallel operation?

Would you like to specify rollback segments to be used for the materialized view refresh?

Is the materialized view eligible for query rewrite?

Yes/No

Yes/No. This option is particularly useful for registering large materialized views in a data warehousing environment.

Yes/No: Select Yes if you want the materialized view populated immediately or during the next refresh operation.

Yes/No: Select if you want Oracle to put data you access frequently at the most recently used end of the list in the buffer cache when a full table scan is performed.

This option is useful for small lookup tables.

Yes/No.

Parallel processes means that multiple processes work simultaneously to run a single statement. This can cut the amount of time it takes to get a response.

Specify the degree of parallelism if you so desire. If you leave the default at 1, the operation will not be “parallelized.”

A rollback segment temporarily stores old data that has changed in a SQL statement transaction until it is committed. The “before” image of the database, as it were.

Local Rollback Segment - Default indicates that Oracle will select the rollback segment to use on the local machine.

Master Rollback Segment - Specify the remote rollback segment used at the remote master site for the individual materialized view.

Select to enable the materialized view for query rewrite. Only enable query rewrite if expressions in the statement are repeatable.

RAPID SQL 8.6/XE5 USER GUIDE 392

CREATING OBJECTS

Required Information

Do you want to partition this materialized view?

Description

Yes/No

Partitioning methods available are:

Range: Data is mapped to partitions based on ranges of column values. This is the default.

Composite: Based on the range method of partitioning, you can create subpartitions within each partition.

Hash: Data is distributed evenly over a specified number of partitions. Data need not fit into a logical range.

List: You control explicitly how rows map to partitions. List partitions allow you to group and organize unrelated sets of data.

Do you want to enable Row

Movement?

Yes/No

Enabling row movement allows you to specify whether Oracle can move a table row when you are compressing a table or performing an update on partitioned data.

Self-explanatory Select the partitioning columns

Select the subpartitioning method

Self-explanatory

Select the subpartitioning columns

Self-explanatory

Hash Partitioning methods None

Partition Definition:

Specify number of partitions and (optionally) tablespaces

Specify individual partitions by name and (optionally) tablespaces

Create list/ordered list of partitions

Self-explanatory

The Add Partition dialog may open.

Specify number of subpartions

Self-explanatory

Click Add , Insert , or Edit to open a dialog that lets you work with subpartition properties.

Self-explanatory Select the default tablespaces to contain the subpartitions (optional)

Fast Refresh Requirements

Detail tables only

Single table only

Table Appears only once in the

FROM list

X

X

When the

Materialized View has:

Only Joins Joins and Aggregates Aggregate on a Single

Table

X X

X

X

X

393 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

No non-repeating expressions like

SYSDATE and ROWNUM

X

When the

Materialized View has:

X

X X No references to RAW or LONG

RAW

No GROUP BY

Rowids of all the detail tables must appear in the SELECT list of the query

X

X

Expressions are allowed in the

GROUP BY and SELECT clauses provided they are the same

Aggregates allowed but cannot be nested

AVG with COUNT

SUM with COUNT

X

X

VARIANCE with COUNT and SUM

STDDEV with COUNT and SUM

WHERE clause includes join predicates which can be ANDed bit not ORed.

Only Joins

X

X

X

X

X

X

X

X

X

X

Joins and Aggregates Aggregate on a Single

Table

X X

X

No WHERE clause

No HAVING or CONNECT BY

No subqueries, inline views, or set functions like UNION or MINUS

X X

X X

X

X

X

COUNT(*) must be present

No MIN and MAX allowed

If outer joins, then unique constraints must exist on the join columns of the inner join table

Materialized View logs must exist and contain all columns referenced in the materialized view and have been created with the LOG NEW VALUES clause

X

Materialized View Logs must exist with rowids of all the detail tables

X

Non-aggregate expression in

SELECT and GROUP BY must be straight columns

DML to detail table X

X

X

X

X

X

RAPID SQL 8.6/XE5 USER GUIDE 394

CREATING OBJECTS

Direct path data load

ON COMMIT

ON DEMAND

X

X

When the

Materialized View has:

X

X

X

X

X

X

M ATERIALIZED V IEW L OGS W IZARD (O RACLE )

Materialized view logs are tables that maintain a history of modifications to the master table, and they are used to refresh simple materialized views. When you create a materialized view log,

Oracle automatically creates a log table to track data changes in the master table and a log trigger to maintain the data in the log table. A log can refresh the materialized view incrementally and is therefore often less time-consuming than a complete refresh.

The Materialized View Log Wizard lets you:

• Specify the materialized view log owner and master table.

• Select refresh types and select column filters.

• Specify how Oracle should allocate data blocks to store the materialized view log.

• Specify how Oracle should manage the growth of the materialized view.

• Specify if you want the data for the materialized view log cached, if you want updates logged, and to enable parallel query.

• Specify if you want the log to hold new values.

To Open the Materialized View Logs Wizard

1 On the Navigator, find the datasource where you want to create a Materialized View Log and expand the Schema node.

2 Right-click the Materialized View Log node, and select New .

The table that follows describes the fields you may encounter as you complete the wizard:

Required Information

Who owns the materialized view log’s master table?

Which table will serve as the materialized view log’s master table?

On which tablespace do you want to place the log?

Description

Self-explanatory

Self-explanatory

Self-explanatory

395 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Required Information

Which refresh types would you like to use?

Optional: Select any filter column(s) to be recorded in the materialized view log.

Description

Primary Key - The log records changes to the master table based on the primary key of affected rows. A primary key's values uniquely identify the rows in a table. Changes are propagated according to row changes as identified by the primary key value of the row. Only one primary key can be defined for each table.The primary key of the master table is the basis for this refresh option, which is the default option.

ROWID - The log records changes to the master table based on the RowID of the affected rows. A ROWID is a globally unique identifier for a row in a database based on the physical row identifiers. A ROWID is created at the time the row is inserted into a table, and destroyed when it is removed from a table. ROWID materialized views cannot contain distinct or aggregate functions or GROUP BY subqueries, joins and set operations.

A filter column is a column whose values you want to be recorded in the materialized view log for any rows that are changed. You can specify only one primary key, one ROWID, and one filter column list per materialized view log.

How many transaction entries are allowed for each data block in the materialized view log?

What is the percent of space reserved for future updates?

What is the minimum percentage of used space that Oracle maintains for each data block?

How large are the materialized view log’s extents?

Should the data for a materialized view log be cached?

A transaction is a logical unit of work that contains one or more SQL statements. Each transaction that updates a data block requires a transaction entry.

Initial (1-255) - Ensures that a minimum number of concurrent transactions can update a data block, avoiding the overhead of allocating a transaction entry dynamically.

Maximum (1-255) - Limits concurrency on a data block.

Percent Free (0 99) - This sets the percentage of a data block to be reserved for possible row updates that are included in the block. The value you set is the percent kept free.

Percent Used (0-99) - Set the amount of space to be used for each datablock.

NOTE: The sum of percent free and the percent used cannot exceed 100.

Initial Extent (KB) -The default is the value specified for the tablespace where the materialized view log resides.

Yes/No - Select Yes if you want Oracle to put data you access frequently at the most recently used end of the least recently used list in the buffer cache when a full table scan is performed. This option is useful for small lookup tables.

No indicates that your most frequently accessed data blocks are put at the least recently used end of the least recently used list of the buffer cache.

Yes/No Do you want updates to be logged?

Do you want to enable parallel query for the log?

Should the log hold new values?

Degree. The integer is number of parallel threads used in the parallel operation.

The Parallel server query option lets you process queries using many query server processes running against multiple CPUs. This option provides substantial performance gains such as reduction of the query completion time.

Yes/No - Yes indicates both old and new values should be saved in the materialized view log.

No disables recording of new values in the log. This is the default.

RAPID SQL 8.6/XE5 USER GUIDE 396

CREATING OBJECTS

O UTLINES W IZARD (O RACLE )

Outlines are a set of results for the execution plan generation of a particular SQL statement.

When you create an outline, plan stability examines the optimization results using the same data used to generate the execution plan. That is, Oracle uses the input to the execution plan to generate an outline, and not the execution plan itself.

NOTE: To create an outline, you must have CREATE ANY OUTLINE system privileges.

To create a new outline using a wizard:

1 Open a creation wizard for an outline. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Outlines (Oracle) - Properties

.

• Definition panel -

Outlines (Oracle) - Definition .

• DDL

panel - for details, see " Previewing the DDL Generated to Create the New Object " on page 257.

3 Finally, use the Execute button to create the object.

O UTLINES (O RACLE ) - P ROPERTIES

When creating or editing an outline, this tab/panel lets you work with the following settings:

Setting

Stored Outline

Name

Category

Description

Provide a unique name for the outline.

The category is a name you want to use to group stored outlines. (You can type over the word

Default that appears automatically.)

O UTLINES (O RACLE ) - D EFINITION

Type the SQL statement you want to store as an outline.

NOTE: The only SQL statements possible with stored outlines are SELECT, DELETE, UPDATE,

INSERT…SELECT, and CREATE TABLE…AS SELECT.

P ACKAGES W IZARD (O RACLE )

A package is a collection of related program objects stored together in the database. A package specification or package header, declares variables, constants, etc., that are visible outside the package’s immediate scope. The package body defines objects declared by the specification but are not visible to applications outside the package. Packages contain all the information needed to process SQL statements from a single source file. You can use packages to process and call batches of SQL.

397 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To Open the Package Wizard

1 On the Navigator, find the datasource where you want to create a package and expand the

Schema node.

2 Right-click the Packages node, and select New .

You’re asked to name an owner for the package and give it a name. When you click Finish , the

Packages editor opens to the header tab where you indicate any package specifications and

create the package body. For more information, see " Package Bodies Editor (Oracle) " on page 546.

P RIMARY K EYS W IZARD (O RACLE )

Primary key (constraint)s are a set of table columns that can uniquely identify every row of a table. No fields that are a part of the primary key can have null values, and each table can have only one primary key.

To create a new primary key using a wizard:

1 Open a creation wizard for a primary key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Primary Keys (Oracle) - Properties

.

• Columns

panel - Primary Keys (Oracle) - Columns .

• Storage panel -

Primary Keys (Oracle) - Storage .

• Partition

panel - Primary Keys (Oracle) - Partition .

• DDL

panel - for details, see " Previewing the DDL Generated to Create the New Object " on page 257.

3 Finally, use the Execute button to create the object.

P RIMARY K EYS (O RACLE ) - P ROPERTIES

When creating or editing a primary key, this tab/panel lets you work with the following settings:

Setting

Table Owner and

Table Name

Name

No Sort

Logging

Description

Choose the owner and name of the table in which the primary key is being created.

Provide a name for the primary key being created.

Enable this feature if the rows in the table already stored in ascending order. This increases the speed of the index creation process. Oracle does not sort the rows.

Enabling logs this operation to the redo file.

RAPID SQL 8.6/XE5 USER GUIDE 398

CREATING OBJECTS

Setting

Reverse

Validate

Deferrable

Deferred

Enabled

Description

Enabling this feature stores the bytes of the index block in reverse order and excludes the

ROWID. The ROWID is a globally unique identifier for a row in a database. It is created at the time the row is inserted into a table, and destroyed when it is removed from a table.

Enabling this option indicates that existing data is checked against the constraint when the primary key is enabled. Leaving it disabled indicates that only new data is to be cheeked against the constraint.

Dictates whether constraint checking can be deferred until the end of a transaction.

This option is enabled only if you enabled the Deferrable option. Select IMMEDIATE to have the constraint checked at the end of every DDL statement. Select DEFERRED to have the constraint checked only at the end of a transaction.

Enables or disables the primary key.

P RIMARY K EYS (O RACLE ) - C OLUMNS

From the Column dropdown, select a column for the index and specify a Sort option. To add more columns, click the New button and then follow the steps in the last instruction. Use the

Delete button to drop columns.

P RIMARY K EYS (O RACLE ) - S TORAGE

When creating or editing a primary key, this tab/panel lets you work with the following settings:

Setting Description

Data Block Storage group

Select the DEFAULT Tablespace only if you are creating a local partitioned index and want the partitions in the same tablespace as the partitions in the underlying table. (Each partition of a local index is associated with one partition of the table. Oracle can then keep the index partitions in synch with table partitions.)

A transaction entry is needed for each INSERT, UPDATE, DELETE, etc. statement that accesses one or more rows in the block. Transaction entries in many operating systems require approximately 23 bytes.

Percent Free identifies how much space you want to allocate for new rows or updates to existing rows.

Initial Transactions ensures that a minimum number of concurrent transactions can update an index block, avoiding the overhead of allocating a transaction entry dynamically.

Maximum Transactions limits concurrency on an index block.

399 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Setting

Extents group

Freelists group

Buffer Pool

Description

An extent is the unit of space allocated to an object whenever the object needs more space.

Initial Extent - The initial space extent (in bytes) allocated to the object.

Next Extent - The next extent (in bytes) that the object will attempt to allocate when more space for the object is required.

Percentage Increase - Lets you type the percentage.

NOTE: You should be careful when setting Percent Increase because it magnifies how an object grows and, therefore, can materially affect available free space in a tablespace.

Minimum Extents - For a dictionary managed tablespace, this is the total number of extents to be allocated when the index is first created. For a locally managed tablespace, this is simply the initial amount of space allocated.

Maximum Extents - For a dictionary managed tablespace, this is the total number of extents that can ever be allocated to the index. In a locally managed tablespace, the database will automatically manage the extents.

Free lists let you manage the allocation of data blocks when concurrent processes are issued against the index. You can potentially improve the performance of the index by identifying multiple free lists, which can reduce contention for free lists when concurrent inserts take place.

The default and minimum value is 1. You should increase this number if multiple processes access the same data block.

Free List Groups is the number of groups of free lists.

NOTE: This option is only applicable for the parallel server option.

DEFAULT - Choose this if you want to use the default bufferpool.

KEEP - Use this to retain the object in memory to avoid I/O conflicts. This type of bufferpool stores frequently referenced data blocks in a separate cache.

RECYCLE - Select this option to save cache space by ridding data blocks from memory as soon as they are no longer in use.

P RIMARY K EYS (O RACLE ) - P ARTITION

Clicking Create Partitio n opens a wizard that lets you create a partition.

P ROCEDURES W IZARD (O RACLE )

Procedures are a reusable block of PL/SQL, stored in the database, that applications can call.

Procedures streamline code development, debugging, and maintenance by being reusable.

Procedures enhance database security by letting you write procedures granting users execution privileges to tables rather than letting them access tables directly. Procedures do not return values, unlike functions.

NOTE: To create a procedure in your own schema, you need CREATE PROCEDURE privileges.

To create a procedure in someone else's schema, you need CREATE ANY

PROCEDURE privileges.

RAPID SQL 8.6/XE5 USER GUIDE 400

CREATING OBJECTS

To create a new procedure using a wizard:

1 Open a creation wizard for a procedure. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Procedures (Oracle) - Properties

.

• Definition panel - for details, see

Procedures (Oracle) - Definition

.

3 Finally, use the Execute button to create the object.

P ROCEDURES (O RACLE ) - P ROPERTIES

When creating or editing a procedure, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Description

Select the owner of the procedure.

Provide a name for the procedure

P ROCEDURES (O RACLE ) - D EFINITION

Complete the CREATE PROCEDURE outline provided by typing or pasting the body of the procedure.

P ROFILES W IZARD (O RACLE )

Profiles are a mechanism for allocating system and database resources to users. In essence, a profile is a set of limits with a name attached to them. If the profile is active, Oracle will limit use and resources to the limits defined by the profile.

The Profile Wizard lets you:

• Name the profile.

• Set composite limit.

• Set session limits for SGA shared pool.

• Set limits on total connection time per session and Idle time per session.

• Set limits on concurrent sessions per user, CPU time per session, and data blocks read per session.

• Set limits on CPU time per call, and number of data blocks read for a call to process an SQL statement.

• Set the number of failed login attempts, and the days an account locks.

NOTE: To create a profile, you need the CREATE PROFILE system privilege.

401 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

The Default option is subject to the limit specified for that particular resource. The default profile initially permits unlimited resources. Limits to the default profile can be made using an Alter statement.

The Unlimited option allows the user with that profile to take use unlimited amounts of that resource.

The Other options take on the resource limits that you indicate.

To Open the Profile Wizard

1 On the Navigator, find the datasource where you want to create a procedure and expand the Security node.

2 Right-click the Profile node, and select New .

The table that follows describes the fields you may encounter as you complete the wizard.

Required Information

What is the name of the profile?

What is the composite limit on resources per session?

What is the limit on concurrent sessions per user?

What is the limit on CPU time per session?

Description

Write a name that’s 30 characters or less

You can set a single composite limit for all resource limits in a profile in addition to setting specific resource limits for a profile. Explicit and composite limits can peaceably coexist. The limit that is reached first stops the session’s activity.

Service units are a weighted sum of CPU per session, connect time, logical reads per session, and private SGA.

Default/Unlimited/Other (service units)

This limit only applies if you are using Shared Server architecture.

Default/Unlimited/Other (KB)

What is the limit on the amount of private space a session can allocate in the shared pool of the

SGA?

What is the limit on the total connection time per session?

What is the limit on idle time per session?

The total elapsed time limit for a session

Default/Unlimited/Other (Minutes)

Permitted periods of continuous inactive time during a session, expressed in minutes. Long-running queries and other operations are not subject to this limit.

Default/Unlimited/Other (Minutes)

Default/Unlimited/Other

Default/Unlimited/Other (Hundredths of a Second)

What is the limit on data blocks read per session?

What is the limit on CPU time per call?

What is the limit on the number of data blocks read for a call to process a SQL statement?

Default/Unlimited/Other

The limit on a parse, execute, or fetch.

Default/Unlimited/Other (Hundredths of a Second)

This is the number of logical reads per call.

Default/Unlimited/Other

RAPID SQL 8.6/XE5 USER GUIDE 402

CREATING OBJECTS

Required Information

How many failed login attempts will be allowed before an account is locked?

How long will an account be locked after the specified number of failed login attempts?

Description

Default/Unlimited/Other

Default/Unlimited/Other (Days)

Default/Unlimited/Other (Days) What is the lifetime of the password?

How many days must pass before a password can be reused?

How many password changes are required before the current password can be reused?

What is the grace period allowed for a password to be changed without expiring?

Default/Unlimited/Other (Days)

Default/Unlimited/Other

Default/Unlimited/Other (Days)

What is the name of the password complexity verification routine?

Default

Null - Specifies no password verification is performed.

Function Name

P ROGRAMS WIZARD (O RACLE )

This wizard builds and submits a call to DBMS_SCHEDULER.CREATE_PROGRAM with optional

DBMS_SCHEDULER.DEFINE_PROGRAM_ARGUMENT calls, letting you create a program.

NOTE: This functionality is available as of Oracle 10g.

NOTE: Before working with jobs, consult Oracle documentation for general information on

DBMS_SCHEDULER. For more information, see " Accessing Third Party

Documentation " on page 21.

To create a program using a wizard

1 On a connected Oracle datasource, expand the Scheduler node.

2 Right-click the Programs node and select Create from the context menu.

3 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Action

panel - for details, see Programs (Oracle) - Action

.

• Arguments panel - for details, see

Programs (Oracle) - Arguments .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

4 Finally, use the Finish button to create the object.

403 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

P ROGRAMS (O RACLE ) - A CTION

When creating or editing a job, this tab/panel lets you work with the following settings:

Group

Creation

Type of Program

Settings and Description

Lets you provide an Owner and Name for the job as well as ENABLED and COMMENTS

( Description ) attribute values

The Type of Program setting lets you choose among EXECUTABLE, STORED

PROCEDURE, or PLSQL Block. Depending on your choice, take one of the following actions:

PLSQL BLOCK - Type or paste the SQL to be executed.

STORED PROCEDURE - Provide the Procedure Owner and Procedure Name .

EXECUTEABLE - Use the browse button to locate the executable.

P ROGRAMS (O RACLE ) - A RGUMENTS

When creating or editing a program, if you selected an Action tab choice of EXECUTABLE or

STORED PROCEDURE, this tab/panel lets you manage parameters to be passed.

R OLES W IZARD (O RACLE )

As you complete the Role Wizard, Rapid SQL constructs the necessary CREATE ROLE statement from the information that you have supplied. The Role Wizard lets you specify a name for the role and whether or not the role should be identified.

NOTE: To create a role, you need the CREATE ROLE system privilege.

To Open the Role Wizard

1 On the Navigator, find the datasource where you want to create a role and expand the

Security node.

2 Right-click the Roles node, and select New .

The table that follows describes the fields you may encounter as you complete the wizard.

Required Information

What is the name of the role?

Description

Self-explanatory.

RAPID SQL 8.6/XE5 USER GUIDE 404

CREATING OBJECTS

Required Information

How should the role be identified?

Description

Not identified - Selecting this means the role you are creating will be enabled immediately.

Identified: If this is your choice, you’re indicating one of the following authorization methods will be followed:

Globally - Select to indicate that Oracle permits access to the user by obtaining user name and password information from the security domain central authority.

Externally - Select to indicate that Oracle should verify the database user name against an existing operating system user name.

Password - Select to indicate that Oracle should identify the role with the password you provide. In the Password box, type the password for the user.

For information on activating and deactivating roles for the current login in the current session,

see " Role Activation " on page 694.

R OLLBACK S EGMENTS W IZARD (O RACLE )

Rollback segments manage all transactions in your Oracle databases. A transaction is a read, modify, and write cycle for an Oracle database. A rollback entry is made for all transactions unless a particular clause is specified. So, a rollback segment is a transaction log that consists of a pre-update image value and transaction status, among other things. The rollback segments maintain read consistency among concurrent users in a database and if the transaction fails for any reason, the old image is taken from the rollback segment. By maintaining a history of data changes, rollback segments can rollback uncommitted transactions so that data is rolled back to the prior state. SYS owns all rollback segments no matter who created them and are not accessible to users, just Oracle.

Oracle, it should be mentioned, strongly recommends that you use automatic undo management to simplify managing databases. Tuning rollback segments is a manual process that has largely been deprecated by Oracle, but it is supported for backward compatibility reasons.

The Rollback Segment Wizard lets you:

• Name the rollback segment and to place it online or off-line.

• Place the rollback segment on a tablespace.

• Specify the initial next and optimal extent size as well a the minimum and maximum number of extents that should be allocated to the rollback segment.

NOTE: This wizard is not available if auto-UNDO management is enabled.

TIP: Make sure enough rollback segments exist on a database to handle the imposed workload. One rule of thumb is to create one rollback segment for every four concurrent users.

405 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To Open the Rollback Segment Wizard

1 On the Navigator, find the datasource where you want to create a rollback segment and expand the Storage node.

2 Right-click the Rollback Segments node, and select New .

The table that follows describes the fields you may encounter as you complete the wizard.

Required Information

What is the name of the rollback segment?

Description

Self-explanatory.

Should this rollback segment be made public?

Do you want to place the rollback segment to be online following its creation?

On which tablespace do you want to place this rollback segment?

What extent sizes do you want to assign to this rollback segment?

What are the minimum and maximum number of extents to allocate to the rollback segment?

Yes - A public rollback segment can be brought online by any instance in a parallel server. Public rollback segments form a pool of rollback segments that can be used by any instance that needs one.

No - This is the default. A private rollback segment can only be acquired by the instance specifying the segment in its initialization file.

Online - To be useful, a rollback segment must be online.

Offline - You may want to take rollback segments offline if you want to take a tablespace offline and it contains rollback segments that you want to keep from being used.

Self-explanatory.

Oracle suggests that you create one or more tablespaces specifically to hold all rollback segments. This way, the data contained in the rollback segments is held apart from other data types.

Initial size (KB)

Next size (KB)

Optimal size (KB) Null/Default

Minimum

Maximum

S CHEDULES W IZARD (O RACLE )

This wizard builds and submits a call to DBMS_SCHEDULER.CREATE_SCHEDULE call, letting you create a schedule.

NOTE: This functionality is available as of Oracle 10g.

NOTE: Before working with jobs, consult Oracle documentation for general information on

DBMS_SCHEDULER. For more information, see " Accessing Third Party

Documentation " on page 21.

RAPID SQL 8.6/XE5 USER GUIDE 406

CREATING OBJECTS

To create a schedule using a wizard

1 On a connected Oracle datasource, expand the Scheduler node.

2 Right-click the Schedules node and select Create from the context menu.

3 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Schedules (Oracle) - Properties

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

4 Finally, use the Finish button to create the object.

S CHEDULES (O RACLE ) - P ROPERTIES

When creating or editing a job, this tab/panel lets you work with the following settings:

Group

Creation

Attributes

Settings and Description

Lets you provide an Owner and Name for the schedule.

Description - corresponds to a COMMENT attribute.

Repeat Interval - corresponds to a REPEAT_INTERVAL attribute. Calendaring syntax, as described in Oracle DBMS_SCHEDULER documentation, can be typed free-form, and will be passed directly to the server. For information on third-party documentation

access, see " Accessing Third Party Documentation " on page 21.

Start Date and End Date - correspond to START_DATE and END_DATE, attributes.

S EQUENCES W IZARD (O RACLE )

Sequences are programmable database objects that provide numbers in sequence for input to a table. A sequence can be used to automatically generate primary key values for tables.Once defined, a sequence can be made available to many users. When you create a sequence, you can define its initial value, increment interval, and maximum value.

The Sequence Wizard lets you:

• Specify the name and owner of the sequence.

• Set both the value of the sequence, and an interval and ranges for incrementing it.

• Cache the sequence, cycle the sequence when it reaches its minimum or maximum values, and guarantee that Oracle generates sequence numbers in the order of request.

NOTE: To create a sequence, it must belong to your schema or you need CREATE SEQUENCE privilege.

407 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To Open the Sequence Wizard

1 On the Navigator, find the datasource where you want to create a rollback segment and expand the Schema node.

2 Right-click the Sequences node, and select New .

The table that follows describes the fields you may encounter as you complete the wizard.

Required Information

Who owns the sequence?

What is the sequence name?

Description

Self-explanatory.

Self-explanatory.

What is the first sequence number to be generated?

Start with: Pick an integer.

What is the interval between sequence numbers?

What is the sequence’s minimum value?

What is the sequence’s maximum value?

Increment by: Positive numbers will generate ascending values, and a negative number will generate descending numbers

The default is 1 for ascending sequences; This integer value can have 28 or fewer digits.

None

Minimum value - Identify how low the sequence can go.

For descending values, the default is 1. Lets you specify the maximum value the sequence can generate. This integer value can have 28 or fewer digits.

Should Oracle preallocate sequence numbers and cache them for faster access?

Should the sequence continue to generate values after reaching either its maximum or minimum value?

None

Maximum value - Indicate the highest sequence value that will be allowed.

This is the number of sequence values you want to specify in the SGA buffers.

This speeds access, but cached numbers are erased when the database is shut down. The default value is 20.

Yes

Number of values

No

If you say no, the sequences will automatically recycle to the minimum value when you’ve hit the maximum for ascending sequences and vice versa for descending sequence values.

Yes

No

Should the sequence numbers be generated in the order of request?

This may be required when sequences are required for timestamping. But generally, because sequences are naturally ordered, this is only necessary for if you use Oracle RAC clusters for parallel mode.

Yes

No

RAPID SQL 8.6/XE5 USER GUIDE 408

CREATING OBJECTS

S NAPSHOTS AND S NAPSHOT L OGS W IZARDS (O RACLE )

Oracle has replaced the snapshot functionality with materialized views. Refer to the

" Materialized Views Wizard (Oracle) " on page 390 and "

Materialized View Logs Wizard (Oracle) " on page 395.

S YNONYMS W IZARD (O RACLE )

Synonyms are alternate names for database objects to be used as a reference by users or applications. A synonym offers you security and convenience so that you can refer to an object without revealing who owns it or what database it belongs to. Synonyms Depending on the platform, you can define synonyms on tables, views, sequences, procedures, functions, packages, and materialized views. If an underlying object needs to be renamed or moved, it’s easy enough to redefine the synonym without having to modify any applications based on the synonym.

NOTE: To create a private synonym, you need CREATE SYNONYM privileges. To create a public synonym, you need CREATE PUBLIC SYNONYM privileges.

To create a new synonym using a wizard:

1 Open a creation wizard for a synonym. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel -

Synonyms (Oracle) - Properties .

• Definition

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

S YNONYMS (O RACLE ) - P ROPERTIES

When creating or editing a synonym, this tab/panel lets you work with the following settings:

Setting

Owner and Name

Description

Choose the owner and provide a name for the synonym being created.

Referenced Object

Owner

Select the owner of the object to which the synonym is to refer.

Referenced Object

Type

Select the type of the object to which the synonym is to refer.

Referenced Object

Name

Database Link

Select the specific object to which the synonym is to refer.

If the object resides on a remote database, select a database link.

409 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

T ABLES W IZARD (O RACLE )

Tables are the most basic data storage units for Oracle. As you might expect, data is stored in rows and columns. By completing the Table Wizard, Rapid SQL constructs the necessary

CREATE TABLE statement from the information that you supply. The Table Wizard varies slightly in content based on the version of Oracle on the target datasource. But in all cases, you name columns and determine column width or precision and scale depending on the column’s data type. A row collects the column information that corresponds to a single record.

You can set rules for the columns to live by, and these are called integrity constraints. For example, if you select NOT NULL, that column will have to have a value in each row.

Also, before beginning, consider what kind of table you want to create as the wizard will ask you to choose:

Heap organized table

Index-organized table

Partitioned table

Clustered table

This is a basic table where data is stored as an unordered collection, i.e., heap.

A B-tree index structure stores data, sorted by primary key. Nonkey column values are stored too.

Data is broken down into smaller, more manageable pieces called partitions or subpartitions. Each partition can be managed individually and operate independent of the other partitions.

This is a table that, once created, is part of a cluster. A cluster is a group of tables that share some data blocks and columns and are often used together. To create a cluster, use

the " Clusters Wizard (Oracle) " on page 377.

NOTE: The table wizard panels differ depending on what options you select.

NOTE: To simplify the process of creating a table, the Table Wizard focuses on creating the basic table definition with a primary key constraint. After you create the basic table definition you can add unique and foreign keys to the table on the Constraints tab of the Tables Editor.

RAPID SQL 8.6/XE5 USER GUIDE 410

CREATING OBJECTS

To create a new table using a wizard:

1 Open a creation wizard for a table. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Tables (Oracle) - Properties

.

• Columns

panel - for details, see Tables (Oracle) - Columns

.

• Indexes panel (not available with a Row Organization of EXTERNAL ) - for details, see

Tables

(Oracle) - Columns .

• Constraints panel (not available with a Row Organization of EXTERNAL) - for details, see

Tables (Oracle) - Constraints

.

• Storage panel (not available with a Row Organization of EXTERNAL) - for details, see

Tables (Oracle) - Storage .

• IOT Properties panel (not available with a Row Organization of EXTERNAL) - for details,

see Tables (Oracle) - IOT Properties

.

• Partition (not available with a Row Organization of EXTERNAL ) - for details, see

Tables

(Oracle) - Partition .

• Comment

panel - for details, see " Adding a Comment to an Object " on page 256.

• Permissions

panel - for details, see " Setting Permissions or Privileges for an Object " on page 257.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

T ABLES (O RACLE ) - P ROPERTIES

When creating or editing a table, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Cache

Row Movement

Parallel Degree

Parallel Instances

Description

Select the owner of the table.

Provide a name for the table

Enabling this feature keeps a block in memory by placing it at the most recently used end.

This option is useful for small lookup tables.

Enabling this option permits the migration of a row to a new partition if its key is updated.

A value indicating the number of query server processes that should be used in the operation.

A value indicating how you want the parallel query partitioned between the Parallel Servers.

411 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Setting

Physical group

Logging

Description

Choose a Row Organization of INDEX, HEAP, or EXTERNAL .

If you chose INDEX or HEAP, enable or disable Logging .

If you chose EXTERNAL, provide an External Type , Default Directory , Access Parameters ,

Reject Limit , and Location .

Redo logs minimize the loss of data in the event that an uncontrolled shutdown happens.

T ABLES (O RACLE ) - C OLUMNS

When creating or editing a table, this tab/panel lets you manage the columns for the table.

To add a column to the table

1 Click Add Column , provide a Name he column in the Property / Value list, and press TAB or

ENTER.

The column is added to the columns list on the left, with default attribute values.

2 Proceed to edit the column attributes.

To edit column attributes

3 Select the column in the columns list on the left. The controls in the Property/Values list are updated with values of the selected column.

4 Use the following table as a guide to providing additional property values, noting that availability of a property differs by data type and other property selections.

Property or group

Virtual

Datatype

Allow Nulls

Description

Selecting this check box defines the column as an Oracle virtual column, with a value calculated from a column expression. Virtual columns do not use any disk space as there is o data to store, and INSERT/UPDATE operations are not supported. Consult Oracle documentation before working with virtual columns to familiarize yourself with topics such as column expressions and virtual column-specific details such as automatic type conversion.

For more information, see " Accessing Third Party Documentation " on page 21 .

After specifying a column as virtual, use the Default Value box to provide the calculation.

This group lets you select a valid Type for the column. Depending on your selection, additional properties such as Scale , Size , Width , and Unused may be available.

Select this check box to allow nulls in this column.

RAPID SQL 8.6/XE5 USER GUIDE 412

CREATING OBJECTS

Property or group

Encryption

Default Value

Comment

LOB Storage

Description

Use controls in this group to have the column encrypted using transparent data encryption.

Select the Encrypted check box to enable transparent data encryption for the column.

Type a Password value used to build an IDENTIFIED BY clause. The column key will be derived from the value you provide.

Select the Salted check box to add a SALT option, appending a random ‘salt’ string, to the clear text of the column before encrypting. Leaving the check box unselected adds a

NO SALT option.

From the Encryption Algorithm dropdown, select an algorithm (AES256, NONE,

DES168, AES192, AES128, or DES156) that will be used to build a USING clause.

If you selected the Virtual check box, type a valid Oracle column expression that will calculate the value of the column.

Otherwise, either select a pseudocolumn (CURRENT_TIMESTAMP, USER, SYSDATE, or

UID) from the dropdown or type an expression resulting in a value that matches the selected Datatype .

Lets you add a comment to the column.

This group is available for bfile, blob, clob, and nclob types. Settings include Segment

Name , Configuration properties ( Tablespace , Chunk , Percent Version , Enable

Storage In Row , Cache , and Logging ), and Storage properties ( Initial Extent , Next

Extent , Percent Increase , Minimum Extents , Maximum Extents , Free Lists , and Free

List Groups ).

To delete a column

1 Select a column from the column list on the left.

2 Click Delete to remove the column from the table.

To change a column’s ordering position

1 Select a column from the column list on the left.

2 Use the arrow buttons to move the column up or down.

T ABLES (O RACLE ) - I NDEXES

NOTE: This tab/panel is not available with a Row Organization of EXTERNAL .

Click Add

to open the Index Wizard. For details, see " Indexes Wizard (Oracle) " on page 384.

T ABLES (O RACLE ) - C ONSTRAINTS

NOTE: This tab/panel is not available with a Row Organization of EXTERNAL .

Selecting a constraint type and clicking Add opens the object wizard for that object type. For details see:

• " Primary Keys Wizard (DB2 LUW) " on page 270

413 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

• " Unique Keys Wizard (DB2 LUW) " on page 282

• " Foreign Keys Wizard (DB2 LUW) " on page 261

T ABLES (O RACLE ) - S TORAGE

NOTE: This tab/panel is not available with a Row Organization of EXTERNAL .

When creating or editing a table, this tab/panel has the following settings:

Settings Description

Data Block Storage group

Select the DEFAULT Tablespace only if you want the partitions in the same tablespace as the partitions in the underlying table.

Percent Free identifies how much space you want to allocate for new rows or updates to existing rows.

Initial Transactions ensures that a minimum number of concurrent transactions can update a primary key block, avoiding the overhead of allocating a transaction entry dynamically.

Maximum Transactions limits concurrency on a primary key block.

Extents group An extent is the unit of space allocated to an object whenever the object needs more space.

Initial Extent - The initial space extent (in bytes) allocated to the object.

Next Extent - The next extent (in bytes) that the object will attempt to allocate when more space for the object is required.

Percentage Increase - Lets you type the percentage.

NOTE: You should be careful when setting Percent Increase because it magnifies how an object grows and, therefore, can materially affect available free space in a tablespace.

Minimum Extents - For a dictionary managed tablespace, this is the total number of extents to be allocated when the index is first created. For a locally managed tablespace, this is simply the initial amount of space allocated.

Maximum Extents - For a dictionary managed tablespace, this is the total number of extents that can ever be allocated to the index. In a locally managed tablespace, the database will automatically manage the extents.

Freelists group

Buffer Pool

Free lists let you manage the allocation of data blocks when concurrent processes are issued against the primary key. You can potentially improve the performance of the primary key by identifying multiple free lists, which can reduce contention for free lists when concurrent inserts take place.

The default and minimum value is 1. You should increase this number if multiple processes access the same data block.

Free List Groups is the number of groups of free lists.

NOTE: This option is only applicable for the parallel server option.

DEFAULT - Choose this if you want to use the default bufferpool.

KEEP - Use this to retain the object in memory to avoid I/O conflicts. This type of bufferpool stores frequently referenced data blocks in a separate cache.

RECYCLE - Select this option to save cache space by ridding data blocks from memory as soon as they are no longer in use.

RAPID SQL 8.6/XE5 USER GUIDE 414

CREATING OBJECTS

T ABLES (O RACLE ) - IOT P ROPERTIES

NOTE: This tab/panel is not available with a Row Organization of EXTERNAL .

Provide compression and space details for an index-organized table.

T ABLES (O RACLE ) - P ARTITION

NOTE: This tab/panel is not available with a Row Organization of EXTERNAL .

Prior to working with partitions, you should be familiar with the material in Rapid SQL and Oracle

Partitioning

.

Click Create Partition

to Partition a table .

R APID SQL AND O RACLE P ARTITIONING

Partitioning your tables lets you get around the problem of supporting large tables. Partitioning lets you break large tables into smaller pieces, which are called partitions. Partitions make the data in your table easier to manage and analyze. Your SQL statements can access the partitions rather than the entire table. Partitions are most useful in data warehouse applications, which store large amounts of data.

The table below describes the types of partitions in Oracle:

Partition Type

Range

Hash

Composite

List

Description

Use range partitioning to map rows to partitions based on ranges of column values. This type of partitioning is useful when dealing with data that has logical ranges into which it can be distributed; for example, months of the year. Performance is best when the data evenly distributes across the range. If partitioning by range causes partitions to vary dramatically in size because of unequal distribution, you may want to consider one of the other methods of partitioning.

Use hash partitioning if your data does not easily lend itself to range partitioning, but you would like to partition for performance and manageability reasons. Hash partitioning provides a method of evenly distributing data across a specified number of partitions. Rows are mapped into partitions based on a hash value of the partitioning key. Creating and using hash partitions gives you a highly tunable method of data placement, because you can influence availability and performance by spreading these evenly sized partitions across I/O devices (striping).

Hash partitions partition the table according to a hash function. Composite partitions use both range and hash types, first partitioning the data by a range of values, and then further dividing the partitions into subpartitions by way of a hash function. This option is not available for index-organized tables.

Use list partitioning when you require explicit control over how rows map to partitions. You can specify a list of discrete values for the partitioning column in the description for each partition. This is different from range partitioning, where a range of values is associated with a partition, and from hash partitioning, where the user has no control of the row to partition mapping.

415 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

P ARTITION A TABLE

The Add partition wizard lets you set up partitions for a table. Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

Step

Properties

Columns

Settings and tasks

Select a Partition Type and optionally, a Subpartition Type.

Subpartition

Columns (only available with a

Partition Type of

RANGE and

Subpartition Type of HASH or LIST )

Subpartitions (only available with a

Subpartition Type of HASH )

Range Definitions

(only available with a

Partition Type of

RANGE )

Partition Definition

(only available with a

Partition Type of

HASH )

For each column, click the New button and select a name from the Column dropdown. Use the Delete button to drop a selected column.

For each column, click the the Delete

New button and select a name from the

button to drop a selected column.

Column dropdown. Use

Specify a Default number of partitions . For each partition, click the New button and then select a tablespace from the dropdown.

Click the New button to

Add a partition definition .

To specify a partition method other than None , take one of the following actions: (1) Select the Number Of Partitions radio box, specify the Number Of Partitions , and for each partition, click the New button and choose a tablespace from the dropdown, or (2) select the

By Partition Name radio box and for each partition, click the New button provide a name and then choose a tablespace from the dropdown.

List Definitions (only available with a

Partition Type of

List )

Click New

to Add a partition definition .

A DD A PARTITION DEFINITION

Use the following topics as a guide in completing the settings in this wizard:

Step

Partition Definition

Subpartitions

Storage

Settings and tasks

Name

Tablespace

Provide a name.

Select a tablespace from the dropdown

Logging Enable or disable logging.

To specify a partition method other than None , select the By Subpartition Name radio box and for each partition, click the New button to open a dialog that lets you provide subpartition values.

NOTE: When you split a range-list partition, you cannot specify the new partitions’ subpartition information.

Provide or select Data Block Storage, Extents, Freelists, and Buffer Pool values.

RAPID SQL 8.6/XE5 USER GUIDE 416

CREATING OBJECTS

T ABLESPACES W IZARD (O RACLE )

Tablespaces are logical storage structures that act as partitions for the database. Each tablespace consists of one or more datafiles which are the physical structures holding the data.

You can create a tablespace to store table data and other objects related to table performance such as indexes or large object data. Tablespaces are used to manage large complex databases.

Once you have created a tablespace, you can place objects on it.

The Tablespace Wizard lets you:

• Name the tablespace, and specify space management.

• Specify what types of objects are stored on the tablespace, and place the tablespace online or offline.

• Add the datafiles that comprise the tablespace and specify the parameters for the datafiles.

• Specify how Oracle should manage the growth of the tablespace.

Important Notes

• For auto-UNDO management to be in effect, set init.ora parameter to undo_management.

When set to MANUAL (the default), it disables auto-UNDO management. When to set

AUTO, auto-UNDO management is enabled.

• To determine if the undo_management parameter is set to AUTO, use the following query:

SELECT VALUE

FROM SYS.V_$PARAMETER

WHERE NAME = 'undo_management'

NOTE: This parameter cannot be set dynamically via the ALTER SYSTEM or ALTER SESSION.

One of the best ways to avoid fragmentation in a tablespace is to pre-allocate the space that your objects will use. If possible, plan for one to two years' growth for each object and allocate your space accordingly. Having initial empty objects will not affect table scan times as Oracle only scans up to the high-water mark (the last used block) in a table.

Of all your tablespaces, you want to avoid fragmentation problems in your SYSTEM tablespace the most as this is the major hotbed tablespace for Oracle activities. The easiest way to avoid this is to not allow any user (even the default DBA ID's SYS and SYSTEM) to have access to it.

There are three ways to do this:

• Ensure no user has a DEFAULT or TEMPORARY tablespace assignment of SYSTEM.

• Ensure no user has a quota set for SYSTEM.

• Ensure no user has been granted the UNLIMITED TABLESPACE privilege.

417 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new tablespace using a wizard:

1 Open a creation wizard for a tablespace. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - see

Tablespaces (Oracle) - Properties .

• Datafiles panel - see

Tablespaces (Oracle) - Datafiles .

• DDL

panel - for details, see " Previewing the DDL Generated to Create the New Object " on page 257.

3 Finally, use the Execute button to create the object.

T ABLESPACES (O RACLE ) - P ROPERTIES

When creating or editing a tablespace, this tab/panel lets you work with the following settings:

Setting

Name

Big File

Type

Tablespace Group

Retention Guarantee

Description

Provide a name for the tablespace.

Selecting this check box results in a CREATE BIGFILE TABLESPACE statement being generated. This results in a large, single file tablespace.

Leaving this check box unselected results in a tablespace containing multiple smaller datafiles.

Leaving the default PERMANENT selection creates a permanent tablespace, intended to contain schema objects you want to keep on an ongoing basis. The objects are stored in datafiles.

The other two options let you generate a CREATE TABLESPACE statement that specifies

TEMPORARY or UNDO keywords.

An Undo tablespace is a kind of permanent tablespace that holds undo data if your database is operating in automatic undo mode. Oracle recommends the automatic undo mode as the wiser choice than using rollback segments to undo.

In a Temporary tablespace, shema objects will last only as long as your session continues.

This option is only available with a Type value of TEMPORARY.

If there are currently entries in the SYS.DBA_TABLESPACE_GROUPS table, you can either select an existing group or type the name for a new tablespace group. If there are currently no entries in the SYS.DBA_TABLESPACE_GROUPS table, you can type the name of a new tablespace group to be created.

When editing a tablespace, clearing the entry from the Tablespace Group box deletes the <tablespace_name, group_name> entry from the SYS.DBA_TABLESPACE_GROUPS table.

This option is only available with a Type value of UNDO.

Selecting this check box specifies that unexpired data should be preserved for all Undo segments of the tablespace, regardless of whether this may force failure of ongoing operations that require space in those segments.

Leaving this check box unselected specifies default RETENTION NOGUARANTE behavior. Space currently being used by unexpired undo data in undo segments can be consumed as necessary by ongoing transactions.

RAPID SQL 8.6/XE5 USER GUIDE 418

CREATING OBJECTS

Setting

Status

Logging

Force Logging

Compression Type

Flashback

Encrypted

Algorithm

and

Locally Managed ,

Uniform Allocation ,

Size , Automatic

Segment Space

Management , and

Minimum Extent Size

Use Default Block Size and Block Size

Description

This option is only available with a Type value of PERMANENT.

Use this control to specify an ONLINE/OFFLINE clause in the generated DDL. The

ONLINE selection makes the tablespace available immediately after creation. The

OFFLINE selection results in a table is unavailable immediately after creation.

This option is only available with a Type value of PERMANENT.

Use this control to specify a LOGGING/NOLOGGING clause in the generated DDL. This sets the default logging attributes of all tables, indexes, materialized views, materialized view logs, and partitions within this tablespace.

This option is only available with a Type value of PERMANENT.

Selecting this check box specifies that a FORCE LOGGING clause be included in the generated DDL.

Changes to all objects in the tablespace (temporary segments excepted) are logged, overriding any NOLOGGING setting for individual objects.

This option is only available with a Type value of PERMANENT.

This lets you select default compression type of ALL OPERATIONS (corresponds to

COMPRESS FOR ALL OPERATIONS in the DDL), COMPRESS_DIRECT_LOAD

(corresponds to COMPRESS FOR DIRECT_LOAD OPERATIONS in the DDL) or no compression.

This option is only available with a Type value of PERMANENT.

Use this control to specify a FLASHBACK ON/FLASHBACK OFF clause in the generated

DDL. Select this check box to put the tablespace in FLASHBACK mode. In FLASHBACK mode, Oracle saves Flashback log data for the tablespace and the tablespace can participate in a FLASHBACK DATABASE operation.

If you leave this check box unselected, Oracle does not save Flashback log data for the tablespace. Prior to FLASHBACK DATABASE operations, you must either take datafiles in the tablespace off line or drop them OR take the entire tablespace offline. The database does not drop existing Flashback logs.

This option is only available with a Type value of PERMANENT.

Selecting the Encryption check box enables the Algorithm control. Together, they let you add an ENCRYPTION USING clause to the generated DDL. The Algorithm lets you select from AES 128, AES192, AES256, DES56, DES168, or NONE encryption algorithms.

These option are only available with a Type value of PERMANENT or UNDO.

These controls let you work with the extent-related clauses that will be included in the generated DDL.

Selecting the Locally Managed check box lets you generate an EXTENT

MANAGEMENT LOCAL clause. Subsequently leaving the Uniform Allocation check box deselected adds an AUTOALLOCATE option. Alternatively, selecting the Uniform

Allocation check box enables the Size check box, letting you add a UNIFORM SIZE option. Select the Automatic Segment Space Management check box to generate a

SEGMENT SPACE MANAGEMENT AUTO or leave it deselected to generate a

SEGMENT SPACE MANAGEMENT MANUAL clause.

Leaving the Locally Managed check box deselected generates an EXTENT

MANAGEMENT DICTIONARY clause. This also enables the Minimum Extent Size control, letting you select a MINIMUM EXTENT clause value.

Disabling the Use Default Block Size check box enables the Block Size control, generating a BLOCKSIZE clause to specify a nonstandard block size for the tablespace.

419 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

T ABLESPACES (O RACLE ) - D ATAFILES

When creating or editing a tablespace, this tab/panel lets you build DATAFILE or TEMPFILE clauses that will be submitted with the CREATE TABLESPACE statement creating or editing this tablespace. This lets you manage the files that make up the tablespace.

To add a datafile

1 Click Add , either select an existing file name from File Name dropdown or type the name of a new file, and then press TAB or ENTER.

The file is added to the datafiles list on the left, with default attribute values.

2 Proceed to edit the datafile attributes.

To edit datafile attributes

3 Select the file from the list on the left. The controls in the Property/Values list are updated with values of the selected file.

4 Use the following table as a guide to modifying property values.

Properties

Size

Reuse Existing File

Auto Extend and

Growth Amount

Unlimited and Value

Description

Lets you specify the SIZE option for the DATAFILE/TEMPFILE clause, to specify the size of the file

Lets you specify the REUSE option for the DATAFILE/TEMPFILE clause, to specify that an existing file can be reused.

Use these options to select an AUTOEXTEND option for the DATAFILE/TEMPFILE clause.

Leaving the Auto Extend check box unselected disables the Growth Amount disabled and specifies an AUTOEXTEND OFF option in the generated DDL.

Selecting the Auto Extend check box lets you specify an AUTOEXTEND ON NEXT clause. Selecting Auto Extend enables the Growth Amount control, letting you specify the size of the next increment of disk space automatically allocated when more extents are required.

These options are only available with Auto Extend selected. They let you specify a

MAXSIZE clause.

Selecting the Unlimited check box lets you specify a MAXSIZE UNLIMITED clause, placing no limit on the size of the file.

Leaving the Unlimited check box unselected enables the Value disabled. This specifies a

MAXSIZE clause with a size provide by the Value control.

To delete a datafile

1 Select a datafile from the column list on the left.

2 Click Delete to remove the datafile from the tablespace.

RAPID SQL 8.6/XE5 USER GUIDE 420

CREATING OBJECTS

T RIGGERS W IZARD (O RACLE )

This wizard lets you build and submit a CREATE OR REPLACE TRIGGER statement, creating a trigger to be associated with a table, view, schema, or database. BEFORE, AFTER, and

COMPOUND triggers are supported for a variety of DDL, DML, and Database manipulation events.

Important Notes

• To create triggers in your own schema, you need CREATE TRIGGER privileges. To create triggers in other schemas, you need CREATE ANY TRIGGER privileges.

To create a new trigger using a wizard:

1 Open a creation wizard for a trigger. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see Triggers (Oracle) - Properties .

• Events panel - for details, see Triggers (Oracle) - Events .

• Column Selection panel - for details, see Triggers (Oracle) - Column Selection .

• Action panel - for details, see Triggers (Oracle) - Action .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

T RIGGERS (O RACLE ) - P ROPERTIES

When creating or editing a trigger, this tab/panel lets you work with the following settings:

Setting

Parent Type

Availability and description

Select the type (TABLE, DATABASE, SCHEMA, or VIEW) of element that this trigger is to be associated with.

If available and appropriate, select the specific object for which the trigger is being created.

Parent Schema , and Parent Name

Schema and Name Select a schema and provide a name for the trigger being created.

Enabled

Trigger Timing

Deselecting this check box adds a DISABLE clause to the CREATE OR REPLACE TRIGGER statement, disabling the trigger.

BEFORE : These triggers serve as extensions to the constraint subsystem and are most often used to validate input data, generate values for newly inserted rows, and read from other tables for cross-reference purposes. Note: Before triggers must be created as a For Each Row.

AFTER : Such a trigger is run after the integrity constraint validations; they can be used to modify operations in the database or be used for activities beyond the database, like supporting an alert notification.

COMPOUND (11.1.0.7 ^): These triggers fire at more than one timing point.

421 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Setting

Trigger Type

Old Table Alias

New Table Alias

When Clause

Availability and description

Not available with a Parent

Type of Database or Schema and not available with a

Trigger Timing value of

COMPOUND

Selecting ROW adds a FOR EACH ROW clause to the

CREATE OR REPLACE TRIGGER statement, making this a row trigger that fires for each affected row.

Selecting STATEMENT designates this as a statement trigger that only fires once.

Not available with a Parent

Type of Database or Schema

Type the name of a temporary table of rows as they exist before they are updated or deleted.

Type a name for a temporary table of rows as they exist after they are inserted or updated.

Type a WHEN clause or open a WHEN CLAUSE wizard to further qualify the trigger behavior.

T RIGGERS (O RACLE ) - E VENTS

When creating or editing a trigger, this tab/panel lets you provide BEFORE, AFTER, or FOR clause options.

If you selected a Parent Type of Table or View , select one or more of the INSERT, UPDATE, or

DELETE check boxes to specify the events that are to fire the trigger.

If you selected a Parent Type of Database or Schema , select one or more of the ALTER,

CREATE, ANALYZE, ASSOCIATE_STATISTICS, AUDIT, COMMENT, DISASSOCIATE_STATISTICS,

DROP, GRANT, NOAUDIT, RENAME, REVOKE, TRUNCATE, LOGON, SERVERERROR, or

SUSPEND check boxes to specify the events that are to fire the trigger.

T RIGGERS (O RACLE ) - C OLUMN S ELECTION

If you chose UPDATE as the Trigger Event , this tab/panel lets you provide FOR UPDATE OF,

BEFORE UPDATE OF, or AFTER UPDATE OF clause options. Select the check box beside each column that is to fire the trigger.

T RIGGERS (O RACLE ) - A CTION

If you selected a Trigger Timing value of BEFORE or AFTER, provide the complete body of trigger. Keep the following in mind:

• If the SQL statement you have in mind for a trigger is longer than 60 lines of code, you would be better off creating a stored procedure.

• INSTEAD OF statements can only be used by view triggers.

• BEFORE and AFTER options cannot be used for view triggers.

If you selected a Trigger Timing value of COMPOUND, a compound trigger block template is generated. Customize the generated code provide a valid trigger body.

RAPID SQL 8.6/XE5 USER GUIDE 422

CREATING OBJECTS

O BJECT T YPES W IZARD (O RACLE )

Types define an abstract data type or object composed of a collection of similar types of data.

For example, you can create an object type that defines a full address rather than the pieces of an address, such as city, state and postal code. An object type stores the pieces of an address in a single type, storing them in the same location, and allowing the full address to be accessed and manipulated as single unit rather than multiple units.

To Open the Object Type Wizard

1 On the Navigator, find the datasource where you want to create a Type and expand the

Schema node.

2 Right-click the Type node, and select New .

The single page wizard asks that you pick an owner for the type and name the type. The fun begins after you make your choices and click Finish . The Object Editor, where you can finalize the object type’s creation, opens.

The Object Type Editor’s tabs are:

Header: Here you flesh out the specification for the type you’re creating including any methods

(a subprogram), attributes, and any parameters or return types for a function.

Body: For every specification, the object type body defines the code for the method. If the object type header declares only attributes, not a method, the body is unnecessary.

You need to create the object type before you can see the following tabs. After you’ve added what you need to the Header and Body pages of the Editor, click Create on the toolbar.

Information: Read-only page that indicates the vital statistics for the object type.

Dependencies: A tree structure displays the objects that depend on the type you have created.

Privileges: Displays individual, group, and role permissions associated with the object type.

U NIQUE K EYS W IZARD (O RACLE )

A unique key constraint requires that every value in a column or set of columns be unique. Thus, no two rows of a table have duplicate values in the column or set of columns you identified. So, for example, you can use a unique key constraint to make sure you haven’t duplicated a social security number in a list of employees.

423 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new unique key using a wizard:

1 Open a creation wizard for a unique key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Unique Keys (Oracle) - Properties .

• Columns

panel - for details, see Unique Keys (Oracle) - Columns .

• Storage panel - for details, see

Unique Keys (Oracle) - Storage

.

• Partition

panel - for details, see Unique Keys (Oracle) - Partition

.

• DDL

panel - for details, see " Previewing the DDL Generated to Create the New Object " on page 257.

3 Finally, use the Execute button to create the object.

U NIQUE K EYS (O RACLE ) - P ROPERTIES

When creating or editing a unique key, this tab/panel lets you work with the following settings:

Setting

Table Owner and

Table Name

Name

No Sort

Description

Choose the owner and name of the table in which the unique key is being created.

Logging

Reverse

Validate

Deferrable

Deferred

Enabled

Provide a name for the unique key being created.

Enable this feature if the rows in the table already stored in ascending order. This increases the speed of the index creation process. Oracle does not sort the rows.

Enabling logs this operation to the redo file.

Enabling this feature stores the bytes of the index block in reverse order and excludes the

ROWID. The ROWID is a globally unique identifier for a row in a database. It is created at the time the row is inserted into a table, and destroyed when it is removed from a table.

Enabling this option indicates that existing data is checked against the constraint when the primary key is enabled. Leaving it disabled indicates that only new data is to be checked against the constraint.

Dictates whether constraint checking can be deferred until the end of a transaction.

This option is enabled only if you enabled the Deferrable option. Select IMMEDIATE to have the constraint checked at the end of every DDL statement. Select DEFERRED to have the constraint checked only at the end of a transaction.

Enables or disables the primary key.

U NIQUE K EYS (O RACLE ) - C OLUMNS

From the Column dropdown, select a column for the index and specify a Sort option. To add more columns, click the New button and then follow the steps in the last instruction. Use the

Delete button to drop columns.

RAPID SQL 8.6/XE5 USER GUIDE 424

CREATING OBJECTS

U NIQUE K EYS (O RACLE ) - S TORAGE

When creating or editing a primary key, this tab/panel lets you work with the following settings:

Setting Description

Data Block Storage group

Select the DEFAULT Tablespace only if you are creating a local partitioned index and want the partitions in the same tablespace as the partitions in the underlying table. (Each partition of a local index is associated with one partition of the table. Oracle can then keep the index partitions in synch with table partitions.)

A transaction entry is needed for each INSERT, UPDATE, DELETE, etc. statement that accesses one or more rows in the block. Transaction entries in many operating systems require approximately 23 bytes.

Percent Free identifies how much space you want to allocate for new rows or updates to existing rows.

Initial Transactions ensures that a minimum number of concurrent transactions can update an index block, avoiding the overhead of allocating a transaction entry dynamically.

Maximum Transactions limits concurrency on an index block.

Extents group

Freelists group

Buffer Pool

An extent is the unit of space allocated to an object whenever the object needs more space.

Initial Extent - The initial space extent (in bytes) allocated to the object.

Next Extent - The next extent (in bytes) that the object will attempt to allocate when more space for the object is required.

Percentage Increase - Lets you type the percentage.

NOTE: You should be careful when setting Percent Increase because it magnifies how an object grows and, therefore, can materially affect available free space in a tablespace.

Minimum Extents - For a dictionary managed tablespace, this is the total number of extents to be allocated when the index is first created. For a locally managed tablespace, this is simply the initial amount of space allocated.

Maximum Extents - For a dictionary managed tablespace, this is the total number of extents that can ever be allocated to the index. In a locally managed tablespace, the database will automatically manage the extents.

Free lists let you manage the allocation of data blocks when concurrent processes are issued against the index. You can potentially improve the performance of the index by identifying multiple free lists, which can reduce contention for free lists when concurrent inserts take place.

The default and minimum value is 1. You should increase this number if multiple processes access the same data block.

Free List Groups is the number of groups of free lists.

NOTE: This option is only applicable for the parallel server option.

DEFAULT - Choose this if you want to use the default bufferpool.

KEEP - Use this to retain the object in memory to avoid I/O conflicts. This type of bufferpool stores frequently referenced data blocks in a separate cache.

RECYCLE - Select this option to save cache space by ridding data blocks from memory as soon as they are no longer in use.

U NIQUE K EYS (O RACLE ) - P ARTITION

Clicking Create Partition opens a wizard that lets you create a partition.

425 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

U SERS W IZARD (O RACLE )

Whoever you add as a user will have access to the Oracle database. You also can set up the means by which the database recognizes the user.

Important Notes

• To create a user, you need the CREATE USER system privilege.

To create a new user using a wizard:

1 Open a creation wizard for a user. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Users (Oracle) - Properties .

• Roles panel - for details, see

Users (Oracle) - Roles

.

• Quotas

panel - for details, see Users (Oracle) - Quotas .

• DDL

panel - for details, see " Previewing the DDL Generated to Create the New Object " on page 257.

3 Finally, use the Execute button to create the object.

U SERS (O RACLE ) - P ROPERTIES

When creating or editing a user, this tab/panel lets you work with the following settings:

Setting

Name

Default Tablespace and Temporary

Tablespace

Profile

Identified By

Password

External Name

Account Locked

Description

Provide a name for the user.

Select the default tablespace for objects the user creates and the tablespace to be used for the user’s temporary segments.

If you do not specify a default tablespace when creating a user, the assigned tablespace will be that set using the Set Default function. For details, see

Set Default .

The profile you choose affects the amount of database resources available to the user.

REQUIRED_YES - A user identified by password is a local user.

REQUIRED_EXTERNAL - This is a user who is validated by an external service like an operating system or third-party service. The login authentication is handled by that external entity.

REQUIRED_GLOBAL - The user you’re creating is a global user who is authenticated by the enterprise directory service.

If you specified an Identified By value of REQUIRED_YES, provide a password for the user.

If you specified an Identified By value of REQUIRED_EXTERNAL, provide an external name for the user.

When enabled, the account cannot be altered by anyone but the creator. It also means that after a specified number of failed attempts to access the database, the database will remain closed to the user for a period of time.

RAPID SQL 8.6/XE5 USER GUIDE 426

CREATING OBJECTS

Setting Description

Password Expired Marks the password as expired, forcing the user to change the password before being allowed to connect to the database.

U SERS (O RACLE ) - R OLES

For each role to be assigned to the user, select the check box beside that role.

U SERS (O RACLE ) - Q UOTAS

To assign a tablespace quota for a user, select a tablespace, select the Other radio button, and provide the value in the Quota box.

V IEWS W IZARD (O RACLE )

Views are SQL queries stored in the system catalog that customize the display of data contained in one or more tables. Views behave like tables because you can query views and perform data manipulation operations on them. However, views do not actually store any data. Instead, they depend on data contained in their base tables. You can use views to help enforce corporate security policies by creating a view that limits information a user can see.

Important Notes

• To create a view in your own schema, you need CREATE VIEW privileges. To create a view in someone else's schema, you need CREATE ANY VIEW privileges.

To create a new view using a wizard:

1 Open a creation wizard for a view. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Views (Oracle) - Properties .

• Definition

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

427 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

V IEWS (O RACLE ) - P ROPERTIES

When creating or editing a view, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Description

Select the owner of the view. The owner of the view must have SELECT privileges for the tables in the CREATE view statement or DBADM authority on the database that contains the table.

Provide a name for the view.

V IEWS (O RACLE ) - D EFINITION

This is where you build the query that will display the data you’re interested in seeing. The template is CREATE VIEW <name> AS

SELECT: Identify the columns you want to show in the view

FROM: Identify the table(s) you want to draw the data from

WHERE: Write the equivalence you want to view.

You can use the Query Builder to help you write the appropriate SQL statement. For details, see

" Query Builder " on page 861.

S YBASE ASE O BJECT W IZARDS

Rapid SQL lets you create Sybase ASE objects using the following wizards:

• Aliases Wizard (Sybase ASE)

• Databases Wizard (Sybase ASE)

• Defaults Wizard (Sybase ASE)

• Extended Procedures Wizard (Sybase ASE)

• Foreign Keys Wizard (Sybase ASE)

Functions Wizard (Sybase ASE)

• Groups Wizard (Sybase ASE)

• Indexes Wizard (Sybase ASE)

Logins Wizard (Sybase ASE)

• Primary Keys Wizard (Sybase ASE)

• Procedures Wizard (Sybase ASE)

• Rules Wizard (Sybase ASE)

• Segment Wizard (Sybase ASE)

• Tables Wizard (Sybase ASE)

RAPID SQL 8.6/XE5 USER GUIDE 428

CREATING OBJECTS

• Triggers Wizard (Sybase ASE)

• Unique Keys Wizard (Sybase ASE)

• User Datatypes Wizard (Sybase ASE)

• Users Wizard (Sybase ASE)

• Views Wizard (Sybase ASE)

A LIASES W IZARD (S YBASE ASE)

The Alias Wizard lets you map a login to an existing user in the database. You can set up aliases so that multiple users log in to the same account and therefore have the same privileges. You can also set up an alias based on individual log ins and give those users access to the same alias with the advantage that you can track their activity within the database.

To create a new alias using a wizard:

1 Open a creation wizard for an alias. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Aliases (Sybase ASE) - Properties .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

A LIASES (S YBASE ASE) - P ROPERTIES

When creating or editing an alias, this tab/panel lets you work with the following settings:

Setting

Name

User

Description

Provide a name for the alias being created.

Select the user to which the alias refers. The user has to have a valid account on SQL Server but cannot be a user in the current database.

D ATABASES W IZARD (S YBASE ASE)

The Database Wizard lets you create a database (a structured collection of data that can be updated or queried) without knowing the underlying commands. Databases can be simple, that is one file with many records and the same fields, or much more complicated with multiple files with different fields.

429 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new database using a wizard:

1 Open a creation wizard for a database. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Databases (Sybase ASE) - Properties

.

• Placement panel - for details, see

Databases (Sybase ASE) - Placement

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

D ATABASES (S YBASE ASE) - P ROPERTIES

When creating or editing a database, this tab/panel lets you work with the following settings:

Category Setting (and availability)

Creation

Properties

Database Name

Description

Provide a name for the database.

Type

In-memory (available with a Type of TEMP or DEFAULT)

This feature is available as of

Sybase ASE 15.5.

Scratch Database (available with a Type of ARCHIVE)

Generate variations on the CREATE DATABASE DDL generated to create the database, as follows:

DEFAULT - generates a generic CREATE DATABASE statement.

TEMP - generates a CREATE TEMPORARY DATABASE variation.

ARCHIVE - generates a CREATE ARCHIVE DATABASE variation.

Generates CREATE INMEMORY DATABASE DDL, indicating that this is an in-memory database.

An in-memory database must be created against a device initialized (DISK INITI) using the inmemory parameter.

Lets you provide a WITH SCRATCH_DATABASE parameter value, specifying the name of an existing database that stores information about the archive database.

For Proxy Update (available with a Type of DEFAULT and not available if For Load is selected)

This feature is available as of

Sybase ASE 12.5.

For Load (available with a Type of

DEFAULT and not available if For

Proxy Update is selected)

With Override

Type with a Type

(available with a

of TEMP or DEFAULT)

With Default Location (available

of DEFAULT)

Adds a FOR PROXY_UPDATE parameter to the generated DDL, forcing resynchronization of proxy tables with the proxy database.

For information on how to resynchronize an existing database, see

" Resynchronize " on page 694.

This option speeds loading by eliminating the step for preinitializing panels. The for load option is appropriate when creating a database for recovering from media failure or moving a database from one machine to another.

Enable this option to specify whether logs and data are to be kept on the same logical device

Lets you add a WITH DEFAULT_LOCATION clause value, specifying a storage location for new tables. If you also select For

Proxy Update , one proxy table will be automatically created for each remote table or view.

RAPID SQL 8.6/XE5 USER GUIDE 430

CREATING OBJECTS

Category Setting (and availability)

Options

Description

Durability (available with a of TEMP or DEFAULT)

Type

Relaxed Durability databases are available as of Sybase ASE 15.5.

Lets you select a WITH DURABILITY= parameter value of NO

RECOVERY, FULL, or AT SHUTDOWN, specifying the durability level of the database.

With In-memory selected, the only valid selection is NO

RECOVERY.

The GENERATE... DDL is followed by an sp_dboption call for each option selected in this group.

With a Type of ARCHIVE single user - generates a sp_dboption call specifying the SINGLE

USER option, restricting database access to one user at a time.

With a Type of TEMP or DEFAULT In addition to the single user option, the following sp_dboption database options are available: abort tran on log full , allow nulls by default , auto identity , dbo use only , ddl in tran , identity in nonunique index , no chkpt on recovery , no free space acctg , read only , select into/bulkcopy/pllsort , single user , trunc log on chkpt , and unique auto_identity index .

For Sybase ASE 15.0 databases, scratch database , async log service option , and delayed commit options are available.

D ATABASES (S YBASE ASE) - P LACEMENT

In the Fragment Properties area provide or select values for the default fragment: Device

Name , Size for the fragment, and a Device Type value of DATA ONLY, LOG ONLY, or DATA

AND LOG. For databases with a Properties tab/panel Type selection of ARCHIVE, no LOG

ONLY Device Type selection is available.

If necessary use the New button to add a new fragment and repeat the steps above to provide details for that fragment. Use the Delete button to drop a fragment.

D EFAULTS W IZARD (S YBASE ASE)

Here you create a default for table column or user-defined datatype in the event that no value is available when the data is inserted. The default value you specify will be inserted only in the current database. You can then bind the default to a specific column or user-datatype.

To create a new default using a wizard:

1 Open a creation wizard for a default. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Defaults (Sybase ASE) - Properties

.

• Dependencies panel - for details, see

Defaults (Sybase ASE) - Dependencies .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

431 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

D EFAULTS (S YBASE ASE) - P ROPERTIES

When creating or editing a default, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Value

Description

Select the schema that is to own the default.

Provide a name for the default.

Provide the value of the default.

D EFAULTS (S YBASE ASE) - D EPENDENCIES

From the Type dropdown, choose Column or Datatype, and if you chose Column , choose a

Table from the Table dropdown. The list on the left is populated with candidate columns or datatypes. To move a candidate from the list on the left to the dependencies column on the right, select the candidate and click Add . Remove columns or datatypes from the dependencies list on the right by selecting the column or datatype and clicking Remove .

E XTENDED P ROCEDURES W IZARD (S YBASE ASE)

Extended stored procedures provide a method for calling external procedural language functions from within the Adaptive Server. A procedural language is a language capable of calling a C language function or manipulating C language datatypes.

To create a new extended procedure using a wizard:

1 Open a creation wizard for an extended procedure. For details, see " Opening an Object

Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Extended Procedures (Sybase ASE) - Properties

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

E XTENDED P ROCEDURES (S YBASE ASE) - P ROPERTIES

When creating or editing an extended procedure, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Description

Select the owner of the extended procedure.

Provide the name of the procedure.

RAPID SQL 8.6/XE5 USER GUIDE 432

CREATING OBJECTS

Setting

Library Name

Description

Provide the name of the library containing the procedure.

F OREIGN K EYS W IZARD (S YBASE ASE)

Foreign keys are used to relate information from one table to another. Foreign keys are unique values that refer to specific columns of other tables. Thus, a foreign key links two tables together.

Embarcadero Rapid SQL’s Foreign Key Wizard makes it easy for you to create a relational link between two tables, thereby speeding queries and giving you faster access to data. The column in the initial table, the parent table, is called the primary key. The corresponding column in the

(child) table that references the primary key, is the foreign key. Foreign keys can also refer to columns within the same table.

To create a new foreign key using a wizard:

1 Open a creation wizard for a foreign key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Foreign Keys (Sybase ASE) - Properties

.

• Column Mapping panel - for details, see

Foreign Keys (Sybase ASE) - Column Mapping .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

F OREIGN K EYS (S YBASE ASE) - P ROPERTIES

When creating or editing a foreign key, this tab/panel lets you work with the following settings:

Setting

Table Owner

Table Name

Match Full

Description

Select the owner of the referring, or child, table

Select the name of the referring, or child, table.

Specify a referential integrity option.

F OREIGN K EYS (S YBASE ASE) - C OLUMN M APPING

Under Referenced Table , choose the Owner and then the Name of the referenced, or parent, table.

Under the Main Table , select check boxes corresponding to the columns that are to reference columns in the referenced table. Then, under Referenced Table , select the corresponding column check boxes.

433 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

F UNCTIONS W IZARD (S YBASE ASE)

The Functions Wizard creates and submits a CREATE FUNCTION command. This lets you create a user-defined function, a saved Transact-SQL routine that returns a specified value. The wizard collects basic identifying information and generates basic CREATE FUNCTION statement syntax, letting you provide the body of the function.

NOTE: This functionality is supported for Sybase ASE 12.5.

To create a new function using a wizard:

1 Open a creation wizard for a function. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Functions (SQL Server) - Properties .

• Definition panel

- for details, see Functions (SQL Server) - Definition .

3 Finally, use the Execute button to create the object.

Functions (Sybase ASE) - Properties

When creating or editing a function, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Description

Select the owner of the function.

Provide a name for the function.

Functions (Sybase ASE) - Definition

Complete the CREATE FUNCTION outline provided by typing or pasting the body of the function.

G ROUPS W IZARD (S YBASE ASE)

A group is a collection of privileges that the DBA assigns to designated users.

RAPID SQL 8.6/XE5 USER GUIDE 434

CREATING OBJECTS

To create a new group using a wizard:

1 Open a creation wizard for a group. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Groups (Sybase ASE) - Properties .

• Object Permissions and System Permissions

panels - see " Setting Permissions or

Privileges for an Object " on page 257.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

After you click Finish and Execute , use the Group Editor to assign users to the new group. For details, see

Groups Editor (Sybase ASE) .

G ROUPS (S YBASE ASE) - P ROPERTIES

When creating a group, this panel lets you provide a name for the group.

I NDEXES W IZARD (S YBASE ASE)

Like an index in a book, a table index helps you get at the data you want without having to read through the whole table. Indexes can exist on single column or on multiple columns. Indexes appear in the form of B-trees. And, as for books, you can have multiple indexes for a single table.

To create a new index using a wizard:

1 Open a creation wizard for an index. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Indexes (Sybase ASE) - Properties .

• Columns

panel - for details, see Indexes (Sybase ASE) - Columns .

• Partition

panel - for details, see Indexes (Sybase ASE) - Partition

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

435 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

I NDEXES (S YBASE ASE) - P ROPERTIES

When creating or editing an index, this tab/panel lets you work with the following settings:

Setting Description

Table Owner , Table

Nam e, and Name

Select or provide identifying information.

Attributes

Storage

Provide or select values for the following Sybase options: Index Type ,

Clustered , Ignore Duplicate Key , Ignore Duplicate Rows , and Maximum

Rows Per Page properties.

Provide or select values for the following Sybase options: Reserve Page

Gap , Segment Name , Fill Factor , Prefetch Strategy , and MRU

Replacement Strategy .

I NDEXES (S YBASE ASE) - C OLUMNS

Select a column from the Columns dropdown and specify a Sort option.

Use the New button to add more columns to the index. Use the Delete button to remove selected columns from the index.

I NDEXES (S YBASE ASE) - P ARTITION

Click Add to open the

Index Partition wizard (Sybase ASE)

.

I NDEX P ARTITION WIZARD (S YBASE ASE)

The Sybase ASE Index Partition wizard can be opened from the following editors and wizards:

Indexes Wizard (Sybase ASE)

Indexes Editor (Sybase ASE)

Use the following topics as a guide to understanding and setting the options on this wizard:

Step

Properties

Partition

Definitions

Settings and tasks

Select a Locality .

Click the Define a new partition button to open a dialog that lets you provide a name, select a segment, click the New button to add values, and then Add the partition definition.

When finished, click the Finish button.

L OGINS W IZARD (S YBASE ASE)

The Login wizard lets you build and submit an sp_addlogin or CREATE LOGIN call, adding a new login with a basic set of specified database, language, and password properties. An additional sp_locklogin call can be issued to lock the new login. The Login wizard also lets you:

RAPID SQL 8.6/XE5 USER GUIDE 436

CREATING OBJECTS

• Grant roles to the login

• Create user accounts on databases for the role, optionally with an alias or by changing ownership

To create a new login using a wizard:

1 Open a creation wizard for a login. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Logins (Sybase ASE) - Properties .

• Roles panel - for details, see

Logins (Sybase ASE) - Roles .

• Users

panel - for details, see Logins (Sybase ASE) - Users .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

NOTE: Rapid SQL also provides support for login triggers, configured for individual logins. For

details, " Logins Editor (Sybase ASE) " on page 572.

L OGINS (S YBASE ASE) - P ROPERTIES

When creating or editing a login, this tab/panel lets you work with the following settings:

Group

Creation

General

Setting

Name

Full Name

Suid (version 15.7 ^)

Description

The user login name.

The full name of the user, an optional but useful identifier.

Lets you optionally add a SUID parameter to the generated DDL, specifying a system user ID.

The database where the user starts each session.

Default Database

Default language The language in which prompts and messages are displayed.

Profile (version 15.7 ^) Lets you add a LOGIN PROFILE parameter: ignore eliminates profile binding while selecting a login profile (if available) binds the profile to this login.

Locked

Locked or Account If selected, the sp_addlogin or CREATE LOGIN call is immediately followed by an sp_locklogin call, locking the new login and effectively disabling it.

NOTE: After creating a login, this group also displays an assigned Login trigger. For details, see

" Logins Editor (Sybase ASE) " on page 572.

437 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Group Setting

Authentication Password

Password expiration

Minimum password length

Maximum login attempts

Authentication mechanism

Exempt Inactive Lock

(version 15.7 ^)

Description

The initial password for the new user.

The duration, in days, before the password expires.

The minimum number of characters a password can contain.

The maximum number of login attempt failures before the login is suspended.

Lets you select ASE, LDAP, PAM, or ANY authentication.

When selected, an EXEMPT INACTIVE LOCK TRUE parameter is added to the generated DDL, exempting the login from being locked due to inactivity.

L OGINS (S YBASE ASE) - R OLES

When creating or editing a login, this tab/panel lets you grant roles to the login by selecting the the check boxes assocaited with those roles.

For information on activating and deactivating roles for the current login in the current session,

see " Role Activation " on page 694.

L OGINS (S YBASE ASE) - U SERS

When creating or editing a login, this tab/panel lets you maintain database user accounts for a login as follows:

• Add a user account for this login to a database by selecting a database from the Databases where the Login does NOT have a User Account and clicking the Add button. This opens the Add User dialog letting you provide additional details. For more information, see

Adding a login account to a database .

• Remove a user account for this login from a database by selecting a database from the

Databases where the Login HAS a User Account and clicking the Remove button.

A DDING A LOGIN ACCOUNT TO A DATABASE

When adding a user account for a login to a database, the Add user dialog lets you provide details on the method used (sp_adduser, sp_addalias, or sp_changedbowner). Use the following table as a guide to setting options in this dialog:

Setting or Group

User Type

Description

Lets you select the method by which the user account will be added to the database: USER (sp_adduser), ALIAS (sp_addalias) or DBO

(sp_changedbowner).

RAPID SQL 8.6/XE5 USER GUIDE 438

CREATING OBJECTS

Setting or Group

Creation

Alias dbo

Description

Login Name - displays the user name from the Master database.

If you selected a User Type of USER, the following settings are available:

User Name - is a new name for the user in the target database.

Group Name - lets you select a group in the target database to which the user will be added.

LoginUserName - If you selected a User Type of ALIAS, this control lets you select the database user name to alias the login name to.

TransferAliasesAndPermissions - If you selected a User Type of DBO, this control lets you transfer aliases and their permissions to the new database owner.

For more information, see

Logins Wizard (Sybase ASE)

and Logins Editor (Sybase ASE) .

P RIMARY K EYS W IZARD (S YBASE ASE)

Primary key constraints make sure that no duplicate values or NULLS are entered in the columns you specify. You can use primary key constraints to enforce uniqueness and referential integrity.

A table can only have a single primary key constraint.

To create a new primary key using a wizard:

1 Open a creation wizard for a primary key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Primary Keys (Sybase ASE) - Properties .

• Columns

panel - for details, see Primary Keys (Sybase ASE) - Columns .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

P RIMARY K EYS (S YBASE ASE) - P ROPERTIES

Provide or select the following:

• The Table Owner and Table Name of the table for which to create the index.

• A Name for the Index.

• Whether the index is Clustered .

• The Maximum Rows Per Page .

• A Reserve Page Gap .

439 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

• A Segment Name .

• A Fill Factor value.

P RIMARY K EYS (S YBASE ASE) - C OLUMNS

Use the Column dropdown to choose a column name and choose a Sort option for that column.

Use the New button to add an additional column to the index or use the Drop button to delete selected columns.

P ROCEDURES W IZARD (S YBASE ASE)

Procedures are a reusable block of PL/SQL, stored in the database, that applications can call.

Procedures streamline code development, debugging, and maintenance by being reusable.

Procedures enhance database security by letting you write procedures granting users execution privileges to tables rather than letting them access tables directly.

To create a new procedure using a wizard:

1 Open a creation wizard for a procedure. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Procedures (Sybase ASE) - Properties

.

• Definition panel - for details, see

Procedures (Sybase ASE) - Definition .

3 Finally, use the Execute button to create the object.

P ROCEDURES (S YBASE ASE) - P ROPERTIES

When creating or editing a procedure, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Description

Select the owner of the procedure.

Provide the name of the procedure.

Procedure Number Provide a procedure number if you want to group identically-named procedures.

Recompile Optionally, enable this feature to prevent Sybase ASE from saving a plan for the procedure.

Procedures (Sybase ASE) - Definition

Complete the provided CREATE PROCEDURE statement by typing or pasting the body of the procedure.

RAPID SQL 8.6/XE5 USER GUIDE 440

CREATING OBJECTS

R ULES W IZARD (S YBASE ASE)

Rules promote data integrity by allowing you to validate the values supplied to a table column.

They are reusable objects that you can bind to table columns or user datatypes. Check constraints are similar to rules, and are in fact the preferred way of restricting data. A column or user-defined data type can have only one rule bound to it, but a column can have both a rule and one or more check constraints associated with it. Not that a rule cannot apply to data already existing in the database at the time you’re creating the rule and can’t be bound to a system-created data type. If you create a new rule when one already exists, the new rule will override the previous one.

To create a new rule using a wizard:

1 Open a creation wizard for a rule. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Rules (Sybase ASE) - Properties .

• Dependencies panel - for details, see

Rules (Sybase ASE) - Dependencies

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

R ULES (S YBASE ASE) - P ROPERTIES

When creating or editing a rule, this tab/panel lets you work with the following settings:

Setting

Owner and Name

Restriction

Type

Description

Select an Owner and provide a Name for the rule.

Type the condition. The rule restriction is the condition that defines the rule and can be any expression valid in a WHERE clause and can include such elements as arithmetic operators, relational operators, and predicates (for example, IN, LIKE, BETWEEN).

Choose STANDARD_RULE, AND_ACCESS_RULE, or OR_ACCESS_RULE.

R ULES (S YBASE ASE) - D EPENDENCIES

From the Type dropdown, choose Column or Datatype, and if you chose Column , choose a

Table from the Table dropdown. The list on the left is populated with candidate columns or datatypes. To move a candidate from the list on the left to the dependencies column on the right, select the candidate and click Add . Remove columns or datatypes from the dependencies list on the right by selecting the column or datatype and clicking Remove .

441 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

S EGMENT W IZARD (S YBASE ASE)

This wizard lets you build and submit an sp_addsegment procedure call, optionally followed by sp_dbextend 'set’, 'database' ... and sp_dbextend 'set', 'threshold' ... calls. This defines a segment on a database device, and specifies the size by which to grow the database, its maximum size, and a free space level.

To create a new segment using a wizard:

1

Opening an Object Wizard for a segment.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Segments (Sybase ASE) - Properties .

• Location

panel - for details, see Segments (Sybase ASE) - Location

.

• DDL View panel - for details, see

Previewing the DDL Generated to Create the New

Object

.

3 Finally, use the Execute button to create the object. For more information, see

Previewing the DDL Generated to Create the New Object .

Rapid SQL

opens the

Segments Editor

, where you can extend the segment and see the

objects stored in the segment. For more information, see " Segments Editor (Sybase ASE)

" on page 574

.

S EGMENTS (S YBASE ASE) - P ROPERTIES

When creating or editing a segment, this tab/panel lets you work with the following settings:

Setting

Name

Grow By

Threshold Free

Space

Max Size

Description

Provide a Name for the segment.

Provide an sp_dbextend 'set', 'database' ..

. growth rate parameter value, specifying the rate at which the segment grows each time threshold procedures are run.

Provide an sp_dbextend 'set', 'threshold' ..

. free space parameter value, specifying when the threshold procedure is installed on the segment.

Provide an sp_dbextend 'set', 'database' ..

. maximum segment size parameter value.

S EGMENTS (S YBASE ASE) - L OCATION

When creating a segment, this tab/panel lets you select the database device for the segment.

Select a device from the Available Devices list and click Place to include the device in the Used

Devices list.

Similarly, when editing a segment, this tab/panel lets you extend a segment by adding additional devices. Select a device from the Available Devices list and click Extend to include the device in the Used Devices list.

RAPID SQL 8.6/XE5 USER GUIDE 442

CREATING OBJECTS

T ABLES W IZARD (S YBASE ASE)

A table is a column-based arrangement of data in which the content of one column has a bearing on the other column(s). So, for example, a table might have a column for authors, another column for the books each author has written, and a third for the number of copies each title by a given author has sold. The data moves across the columns in rows.

NOTE: You must have CREATE TABLE permissions to generate a new table.

To create a new table using a wizard:

1 Open a creation wizard for a table. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Tables (Sybase ASE) - Properties .

• Columns

panel - for details, see Tables (Sybase ASE) - Columns .

• Indexes panel - for details, see

Tables (Sybase ASE) - Indexes .

• Constraints

panel - for details, see Tables (Sybase ASE) - Constraints .

• Partitions panel - for details, see

Tables (Sybase ASE) - Partition .

• Permissions

panel - for details, see Tables (Sybase ASE) - Permissions .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

T ABLES (S YBASE ASE) - P ROPERTIES

When creating or editing a table, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Description

Select the owner of the table.

Provide a name for the table

Segment Name

Maximum Rows

Per Page

Specify the segment on which you want to place the table.

Specifying a number allows you to override the default. The default, 0, creates indexes with full pages and nonclustered indexes with full leaf pages. This number can be changed at any time.

Reserve Page Gap

Identity Gap

MRU Replacement

Strategy

Specify the size of the identity gap for the table.

When enabled, new pages are read into the least recent end of the page chain. When pages reach the most recent end of the chain, the pages are flushed.

Prefetch Strategy Enabling this feature allows you to fetch as many as eight 2K data pages simultaneously instead of one at a time (the default).

Lock Scheme Select a locking scheme of ALLPAGES, DATAPAGES, or DATAROWS.

443 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

Setting Description

Expected Row Size If you specified a Lock Scheme of DATAROWS or DATAPAGES, provide an expected row size

T ABLES (S YBASE ASE) - C OLUMNS

For each column in the table, click the Add Column button to create a column, provide a Name for the column and provide or select the remaining column attributes.

Use the Delete button to drop a selected column.

Use the arrow buttons to reposition the columns.

NOTE: Because the smalldatetime datatype stores dates and time with less precision than the datetime datatype, before outputting you use the CAST or CONVERT functions to convert any boxes with the smalldatetime datatype to either VARCHAR or datetime datatypes.

T ABLES (S YBASE ASE) - I NDEXES

Click Add

to open the Index Wizard. For details, see " Indexes Wizard (Sybase ASE) " on page 435.

T ABLES (S YBASE ASE) - C ONSTRAINTS

Selecting a constraint type and clicking Add opens the object wizard for that object type. For details see:

• " Primary Keys Wizard (Sybase ASE) " on page 439

• " Unique Keys Wizard (Sybase ASE) " on page 446

• " Foreign Keys Wizard (Sybase ASE) " on page 433

• " Create Synonym " on page 620

T ABLES (S YBASE ASE) - P ARTITION

Click Add

to open the Table Partition Wizard. For details, see " Table Partition wizard for Sybase

ASE " on page 444.

T ABLES (S YBASE ASE) - P ERMISSIONS

Set up the user permissions for this table.

T ABLE P ARTITION WIZARD FOR S YBASE ASE

See the following topics for information on editors and wizards that let you open the Sybase ASE

Table Partition Wzard:

• " Tables Wizard (Sybase ASE) " on page 443

RAPID SQL 8.6/XE5 USER GUIDE 444

CREATING OBJECTS

• " Tables Editor (Sybase ASE) " on page 575

Use the following topics as a guide to understanding and setting the options on this wizard:

Step

Properties

Columns (not available with a

Partition Type of

ROUNDROBIN)

Partition Definition

(only available with a

Partition Type of

HASH or

ROUNDROBIN)

Range Definitions

(only available with a

Partition Type of

RANGE)

List Definitions

(only available with a

Partition Type of

LIST)

Settings and tasks

Select a Partition Type of ROUNDROBIN, RANGE, HASH, or LIST

For each column, click the Insert a new column button to create a column, provide a Name for the column and provide or select the remaining column attributes.

Use the Delete button to drop a selected column.

Use the arrow buttons to reposition the columns.

Take one of the following actions: (1) Select the

Number Of Partitions from the dropdown, or (2) select the the New

Number Of Partitions

, and for each partition, click the

By Partition Name

New

radio box, specify the button and choose a tablespace

radio box and for each partition, click

button provide a name and then choose a tablespace from the dropdown.

Click the Define a new partition button to open a dialog that lets you provide a name, select a segment and Add the partition definition.

Click the Define a new partition button to open a dialog that lets you provide a name, select a segment, click the New button to add values, and then Add the partition definition.

When finished, click the Finish button.

T RIGGERS W IZARD (S YBASE ASE)

The Triggers Wizard lets you build and submit a CREATE TRIGGER command, selecting a parent object type of table or view, and selecting the triggering events for the trigger. Depending on whether you are creating a trigger for a view or a table, the Wizard generates customizable

CREATE TRIGGER syntax as follows:

• Tables - The wizard generates a FOR INSERT, UPDATE, DELETE trigger code template (all supported Sybase ASE versions)

• Views - The wizard generates an INSTEAD OF trigger code template (Sybase ASE 15.0.2)

In both cases, you provide the SQL statements that are to make up the body of the FOR or

INSTEAD OF trigger.

445 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new trigger using a wizard:

1 Open a creation wizard for a trigger. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Triggers (Sybase ASE) - Properties .

• Definition panel

- for details, see Triggers

(Sybase ASE)

- Definition .

3 Finally, use the Execute button to create the object.

T RIGGERS (S YBASE ASE) - P ROPERTIES

When creating or editing a trigger, this tab/panel lets you work with the following settings:

Setting

Parent Type, Parent

Owner, and Parent

Name

Owner and Name

Fire On Insert, Fire

On Update, and Fire

On Delete

Description

Provide or select details on the target table or view.

Select the owner and provide a name for the trigger being created.

Enable the events that fire the trigger.

An INSERT trigger must be associated with an INSERT statement. For example, if a data load operation doesn’t include an INSERT statement, the trigger won’t be invoked.

An UPDATE trigger can be associated with specific columns of the base table and will only be activated if those columns are updated.

A DELETE trigger fires automatically after items in the table are deleted.

NOTE: For triggers with a table parent type, the editor lets you enable and disable the trigger,

after creation. For details, see " Triggers Editor (Sybase ASE) " on page 578.

T RIGGERS (Sybase ASE) - D EFINITION

Complete the CREATE TRIGGER statement by typing or pasting in content.

• See the Microsoft SQL Server Transact-SQL documentation for information on the syntax for

Trigger bodies. For more information, see " Accessing Third Party Documentation " on page 21.

U NIQUE K EYS W IZARD (S YBASE ASE)

Unique keys can enforce logical keys that are not chosen as the primary key. In other words, you can use a unique key to ensure no duplicate values are entered in specific columns that are not a part of the primary key. Although you can only attach one primary key to a table, you can attach multiple unique keys. Also, you can use unique keys on columns that allow null values.

RAPID SQL 8.6/XE5 USER GUIDE 446

CREATING OBJECTS

To create a new unique key using a wizard:

1 Open a creation wizard for a unique key. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Unique Keys (Sybase ASE) - Properties .

• Columns

panel - for details, see Unique Keys (Sybase ASE) - Columns

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

Important Notes

• If you are creating a non-clustered index constraint, you should place it on a separate segment from the target table.

U NIQUE K EYS (S YBASE ASE) - P ROPERTIES

Provide or select the following:

• The Table Owner and Table Name of the table for which to create the index.

• A Name for the Index.

• Whether the index is Clustered .

• The Maximum Rows Per Page .

• A Reserve Page Gap .

• A Segment Name .

• A Fill Factor value.

U NIQUE K EYS (S YBASE ASE) - C OLUMNS

Use the Column dropdown to choose a column name and choose a Sort option for that column.

Use the New button to add an additional column to the index or use the Drop button to delete selected columns.

U SER D ATATYPES W IZARD (S YBASE ASE)

User datatypes promote domain consistency by streamlining the definition of commonly used table columns in a database. You can build a customized datatype from system datatypes and bind defaults and rules to it to enhance integrity. When you reference the user datatype in a column, the column assumes all of the properties of the user datatype.

447 RAPID SQL 8.6/XE5 USER GUIDE

CREATING OBJECTS

To create a new user datatype using a wizard:

1 Open a creation wizard for a user datatype. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

User Datatypes (Sybase ASE) - Properties

.

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

U SER D ATATYPES (S YBASE ASE) - P ROPERTIES

When creating or editing a user datatype, this tab/panel lets you work with the following settings:

Setting

Datatype

Type

Size

Allow Nulls

Identity

Default Binding

Rule Binding

Description

Provide a name for the datatype.

Select the base datatype.

Provide the size of the datatype.

Null has no explicitly assigned value. Null is not equivalent to zero or blank. A value of null is not considered to be greater than, less than, or equivalent to any other value, including another value of null.

This allows you to specify whether or not you want to limit access to the new datatype based on the user’s privileges.

Defaults promote data integrity by supplying a default value to a column if the user does not explicitly provide one. They are reusable objects that you can bind to user datatypes.

Rules promote data integrity by allowing you to validate the values supplied to a column.

They are reusable objects that you can bind to user datatypes.

U SER M ESSAGES W IZARD (S YBASE ASE)

A user message let’s you write the error message users will see when a user-defined event transpires. The User Message Wizard lets you multiple language versions of a user message, specifying the message numbers, specifying the text for each language version, and binding the message to one or more integrity constraints.

RAPID SQL 8.6/XE5 USER GUIDE 448

CREATING OBJECTS

To create a new user message using a wizard:

1 Open a creation wizard for a user message. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

User Messages (Sybase ASE) - Properties

.

• Information panel - for details, see

User Messages (Sybase ASE) - Information .

• Bindings

panel - for details, see User Messages (Sybase ASE) - Bindings .

• DDL View

panel - for details, see " Previewing the DDL Generated to Create the New

Object " on page 257.

3 Finally, use the Execute button to create the object.

U SER M ESSAGES (S YBASE ASE) - P ROPERTIES

When creating or editing a user message, this tab/panel lets you provide the message number parameter for the sp_addmessage system procedure calls that will create each language-based version of this user message.

To specify the message number for this user message

In the Message Number box, type a unique message number (20000 or greater).

U SER M ESSAGES (S YBASE ASE) - I NFORMATION

For each language in which the user message is to be available, the User Message Wizard/Editor builds a sp_addmessage system procedure call. This tab/panel manages the language and message text parameters for each sp_addmessage call.

To add a language version of the user message

1 Click the Add new text for the user message button. The Create User Message Text dialog opens.

2 From the Language dropdown, select the language for the message.

3 In the Message Text box, type the text of the message.

4 Click OK .

To edit an existing language version of the message

1 Select the version from the Language / Message list.

2 Click the Modify user message text button. The Edit User Message Text dialog opens.

3 In the Message Text box, replace the text of the message.

449 RAPID SQL 8.6/XE5 USER GUIDE

4 Click OK .

To delete an existing language version of the message

1 Select the version from the Language / Message list.

2 Click the Remove user message text button and verify when prompted.

CREATING OBJECTS

U SER M ESSAGES (S YBASE ASE) - B INDINGS

When creating or editing a user message, this tab/panel manages one or more sp_bindmsg system procedure calls that will be issued with the sp_addmessage calls that create or edit a user message. This lets you bind the user message to, or unbind the user message from foreign keys or check constraints.

To bind a user message to an integrity constraint

1 From the Constraint Type dropdown, select the type of integrity constraint ( Check

Constraints or Foreign Keys ) to which you are binding the user message.

2 Select one or more check constraints or foreign keys from the list on the left and click Bind .

To unbind a user message from a currently bound integrity constraint

1 Select one or more check constraints or foreign keys from the list on the right and click

Unbind .

U SERS W IZARD (S YBASE ASE)

The User Wizard lets you create a user who will then have access to the database where you are registering him or her. You can also identify the appropriate user group and the system privileges you want to assign to the new user.

To create a new user using a wizard:

1 Open a creation wizard for a user. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Users (Sybase ASE) - Properties .

• DDL View panel - for details, see

Previewing the DDL Generated to Create the New

Object

.

3 Finally, use the Execute button to create the object.

You can use the User Editor to assign System and Object privileges as well as create an alias.

RAPID SQL 8.6/XE5 USER GUIDE 450

CREATING OBJECTS

U SERS (S YBASE ASE) - P ROPERTIES

When creating or editing a user, this tab/panel lets you work with the following settings:

Setting

Login Name

Name

Group Name

Description

Choose a login ID from the drop-down list.

Provide the user name.

Specify a group for the user.

V IEWS W IZARD (S YBASE ASE)

Views are SQL queries stored in the system catalog that customize the display of data contained in one or more tables. Views behave like tables because you can query views and perform data manipulation operations on them. However, views do not actually store any data. Instead, they depend on data contained in their base tables. Views can only be

To create a new view using a wizard:

1 Open a creation wizard for a view. For details, see " Opening an Object Wizard " on page 255.

2 Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:

• Properties panel - for details, see

Views (Sybase ASE) - Properties .

• Definition panel - for details, see

Views (Sybase ASE) - Definition .

3 Finally, use the Execute button to create the object.

You can use the User Editor to assign System and Object privileges as well as create an alias.

V IEWS (S YBASE ASE) - P ROPERTIES

When creating or editing a view, this tab/panel lets you work with the following settings:

Setting

Owner

Name

Check Type

Description

Select the owner of the view.

Provide a name for the view.

When enabled, when a row is modified through a view, this option makes sure the data remains visible through the view after the modification is committed.

V IEWS (S YBASE ASE) - D EFINITION

Complete the CREATE VIEW statement by typing or pasting in the relevant query.

451 RAPID SQL 8.6/XE5 USER GUIDE

M

ODIFYING OBJECTS USING EDITORS

An Object editor is a tabbed dialog box that stores information about existing server and database types and objects, and lets you modify those items. For an introduction to object

editors, see " Overview and common usage of object editors " on page 452.

NOTE: Availability of editors for specific object type varies from DBMS to DBMS. Similarly, functionality offered for an editor for an object type common to two or more DBMS, will differ from DBMS to DBMS.

See the following topics for information the object editors available for each supported platform:

IBM DB2 for Linux, Unix, and Windows Object Editors

IBM DB2 for z/OS Object Editors

InterBase/Firebird Object Editors

Microsoft SQL Server Object Editors

MySQL editors

Oracle Object Editors

Sybase ASE Object Editors

O VERVIEW AND COMMON USAGE OF OBJECT EDITORS

An Object editor lets you view and modify settings and properties of existing object types and servers on a datasource. It also lets you add new resources and provides access to related, datasource management facilities. For example, the Tables editor lets you add or insert, edit, or drop columns, work with permissions to work with that table, access information on physical storage and the distribution of data and indexes across table spaces, and so on.

Each tab on the Object editor lets you perform a logical task or collection of logical tasks for that object type. The Object editor toolbar has a set of commands common to all object types and also includes a Command menu with commands specific to the object type you are currently working with. For example:

RAPID SQL 8.6/XE5 USER GUIDE 452

MODIFYING OBJECTS USING EDITORS

In order to work with object editors, you must be familiar with the following tasks:

Opening an Object Editor on a server or database object.

Viewing and Modifying Object Properties using functionality common to all object editors as

well as object-specific functionality available to specific object editors.

Previewing and Submitting Object Editor Changes to effect your changes to the datasource.

O

PENING AN

O

BJECT

E

DITOR

Object editors are accessed from the Datasource Navigator pane of the Rapid SQL main window.

To open an Object editor on a specific database object

1 Connect to the datasource that contains the object you want to modify. For more information, see " Datasource Management " on page 131.

2 On the Datasource Navigator, expand the target datasource.

3 Continue to expand folders until objects of the target object type are displayed.

4 Right-click the object to be edited and select Open from the context menu.

453 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Rapid SQL opens an editor for that object type on the object you selected.

For information on editing objects, see Viewing and Modifying Object Properties

.

V

IEWING AND

M

ODIFYING

O

BJECT

P

ROPERTIES

There are two categories of tasks you can perform using an Object editor:

Work with Tasks and Settings of Specific Object Types

Work with Tasks and Settings Common to Object Editors

W ORK WITH T ASKS AND S ETTINGS OF S PECIFIC O BJECT T YPES

Many of the tasks you perform using an Object editor are specific to the object type you are working with. For example, the Triggers editor lets you work directly with SQL code for the trigger while the Tables editor lets you work with columns of the table. Object-specific tasks are documented in the topics for specific Object editors provided later in this chapter.

W ORK WITH T ASKS AND S ETTINGS C OMMON TO O BJECT E DITORS

The following tasks can be performed against many of the supported Object editors:

RAPID SQL 8.6/XE5 USER GUIDE 454

MODIFYING OBJECTS USING EDITORS

Using the object editor toolbar

Opening Another Object in the Same Object Editor Explorer

Viewing the SQL/DDL for an Object

Working with Privileges and Permissions

Working with Object Dependencies

Adding a Comment to an object

U SING THE OBJECT EDITOR TOOLBAR

The Object editor toolbar appears above the tabs of the Object editor.

It provides the following functions:

• Create

- Launches a Rapid SQL object creation wizard. For more information, see " Creating objects " on page 254.

• Alter - Enabled when a property of the current database has been modified. Opens a dialog that lets you preview the SQL code that will effect the modification and then submit the

change. For more information, see " Preview " on page 587.

• Drop -Lets you drop one or more database objects and remove their definition from the

system catalog. For more information, see " Drop " on page 631.

• Extract - Rapid SQL lets you extract data from one database to another database and extract the statements required to create objects into an Interactive SQL window. For more

information, see " Extract " on page 645.

• Report - Lets you generate detailed or summary reports on database objects. For details,

see " Report " on page 692.

• Command Menu - Provides menu commands specific to the object being viewed or modified. For a listing of commands available, see the topic for the specific Object editor, later in this chapter.

• Refresh - Refreshes or clears Object editor contents.

• Close - Closes the Object editor and if appropriate, prompts you to verify any changes.

Commands on the Object editor toolbar are disabled if they do not apply to the object type being viewed or modified.

O PENING A NOTHER O BJECT IN THE S AME O BJECT E DITOR E XPLORER

When an object editor is open, the area between the object editor toolbar and the tabs has one or more dropdown lists. For example:

455 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

These lists allow you to qualify any object of the same type as the object currently displayed in the Object editor, and display information for that object in the current Object editor. The number of, and specific dropdown lists, differ according to the type of Object editor but there are always sufficient controls to uniquely identify another object of the same type.

To display the information for another object of the same type

• Use the dropdown lists to specify a different object.

V IEWING THE SQL/DDL FOR AN O BJECT

The object editors for most object types feature a DDL tab that lets you view an object’s underlying SQL code.

To view the underlying DDL/SQL for a database object

1 Open an editor on an object type for which DDL code can be displayed. For details, see

" Opening an Object Editor " on page 453.

See the topics for specific Object editors later in this chapter for information on whether that object type supports display of underlying SQL code.

2 Click the DDL tab.

W ORKING WITH P RIVILEGES AND P ERMISSIONS

When you open an Object editor on an object with associated privileges, the Permissions (or

Object Permissions or System Permissions ) tab for that editor displays the relevant privileges and lets you make changes accordingly:

For database objects such as tables or procedures, to which permissions or privileges are granted, a Permissions tab lets you manage permissions or privileges to that object from all grantees, such as users or groups, on that datasource. The tab has a navigation area, a command area, and a display area.

RAPID SQL 8.6/XE5 USER GUIDE 456

MODIFYING OBJECTS USING EDITORS

The Navigation area lets you change the content of the Display area to view more specific privilege details. For example, when viewing privileges for a database object such as a table, the dropdown lists in the navigation area, if present, let you drill down to populate the display area with privileges for a lower level component, such as a particular column. Similarly, when viewing privileges for a grantee such as a user, the Object Permissions tab’s Navigation area lets you populate the display area with that user’s permissions on specific object types, such as tables or procedures.

The Display area shows privilege details for an object or grantee. When viewing privileges for a grantee such as a user or role, the display area shows privileges for that recipient on objects currently qualified by the current selection in the Navigation area. When viewing privileges for an object such as a table, the display area shows the privileges for all grantees. Each cell in the

Display area corresponds to a specific permissions and a cell representing a granted permission shows a distinctive icon.

The Command area lets you initiate granting or revocation of permissions.

457 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To view or modify privileges using an Object editor

1 Open an editor on a database object with associated privileges or permissions. For details,

see " Opening an Object Editor " on page 453.

2 Click the Permissions (or Privileges or Object Privileges or System Privileges ) tab.

3 Use the dropdown lists in the navigation area, if present, to populate the Display area with details for more specific or different permissions.

4 In the Display area, select a cell corresponding to a specific permission.

5 Use the Command area controls to grant or revoke permissions.

6 Submit your changes. For details, see " Previewing and Submitting Object Editor Changes " on page 459.

W ORKING WITH O BJECT D EPENDENCIES

For objects such as views and procedures, whose definition references other objects, such as tables, Rapid SQL lets you view all dependencies. The Object editors for referencing or referenced objects have a Dependencies tab that shows all dependencies for an object.

In addition to letting you view dependencies, Object editors let you drop a referencing or referenced object, or open an Object editor on that object.

To manage dependences for an object

1 Open an editor on a database object with referencing or referenced objects. For details, see

" Opening an Object Editor " on page 453.

See the object editor descriptions in subsequent topics to verify that an Object editor supports display of dependencies.

RAPID SQL 8.6/XE5 USER GUIDE 458

MODIFYING OBJECTS USING EDITORS

2 Click the Dependencies tab.

The Dependency Name area lists all referenced or referencing objects. Objects are grouped according to their object type.

3 Optionally, select a referenced or referencing object in the right pane and either:

• Use the Edit button to open an Object editor on that object

• Use the Drop button to initiate dropping that object.

A DDING A C OMMENT TO AN OBJECT

The object editors for certain object types feature a Comment tab that lets you add an explanatory note to specific object definitions. Comments are stored in the REMARKS column of the object’s system-catalog.

To add a comment to an object

1 Open an editor on an object type that permits comments. For details, see " Opening an

Object Editor " on page 453.

2 Click the Comment tab.

3 In the Comment area, type an explanatory note of up to 254 characters long.

NOTE: Right-clicking in the Comment area opens a context menu that lets you perform edit text operations such as search, selection, copying and pasting, as well as codingspecific operations such as enabling/disabling line numbers and indenting lines.

4 Submit your changes. For details, see " Previewing and Submitting Object Editor Changes " on page 459.

P REVIEWING AND S UBMITTING O BJECT E DITOR C HANGES

After you use an Object editor to modify the settings or properties of a database object, you can preview the SQL that will be executed to effect those changes on the datasource. You can then submit the SQL for execution on the server.

459 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To preview and submit object editor changes to a database object

1 Click the Alter

button on the Object editor toolbar. For details, see " Overview and common usage of object editors " on page 452.

A Preview: Alter dialog opens.

2 Use one of the following options to submit and execute your changes:

• Execute button - executes the changes immediately.

• Schedule button - opens a dialog that lets you schedule the change. For more

information, see " Scheduling " on page 856.

IBM DB2 FOR L INUX , U NIX , AND W INDOWS O BJECT E DITORS

Rapid SQL includes an Object Editor for all supported IBM DB2 or Linux, Unix, and Windows objects. To see an Editor for a specific object, click the corresponding link below:

Aliases Editor (IBM DB2 LUW)

Check Constraints Editor (IBM DB2 LUW)

Databases Editor (IBM DB2 LUW)

Foreign Keys Editor (IBM DB2 LUW)

Functions Editor (IBM DB2 LUW)

Indexes Editor (IBM DB2 LUW)

Materialized Query Tables Editor (IBM DB2 LUW)

Packages Editor (IBM DB2 LUW)

RAPID SQL 8.6/XE5 USER GUIDE 460

MODIFYING OBJECTS USING EDITORS

Primary Keys Editor (IBM DB2 LUW)

Procedures Editor (IBM DB2 LUW)

Sequences Editor (IBM DB2 LUW)

Structured Types Editor (IBM DB2 LUW)

Tables Editor (IBM DB2 LUW)

Tablespaces Editor (IBM DB2 LUW)

Triggers Editor (IBM DB2 LUW)

Unique Keys Editor (IBM DB2 LUW)

User Datatypes Editor (IBM DB2 LUW)

Users Editor (IBM DB2 LUW)

Views Editor (IBM DB2 LUW)

For access to object editors for different supported DBMS platforms and an introduction to

editor usage, see " Modifying objects using editors " on page 452.

A LIASES E DITOR (IBM DB2 LUW)

The Aliases Editor lets you view basic alias properties, change the comment associated with an alias, and view the DDL that will be issued to alter the alias definition.

To edit an alias

1 Open an editor on the alias. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Comment

DDL View

Settings and tasks

In addition to the owning Schema , this tab lets you view the Target Owner , Target

Type , and Target Name , of the referenced object.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

C HECK C ONSTRAINTS E DITOR (IBM DB2 LUW)

The Check Constraints Editor lets you modify and enable/disable check constraints.

461 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a check constraint:

1 Open an editor on the check constraint. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Definition

Comment

DDL View

Settings and tasks

Use the Enabled control to enable/disable the check constraint.

You can also edit the condition in the Check Condition box. The Table Column button opens a dialog that lets you select and paste column names into the check condition expression.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

D ATABASES E DITOR (IBM DB2 LUW)

The Databases Editor lets you manage database tablespace placement details and modify configuration parameters for the database.

To edit a database

1 Open an editor on the database. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Placement

Options

DDL

Settings and tasks

Select a tablespace and click the Edit button to open an object editor on that

tablespace. For more information, see " Tablespaces Editor (IBM DB2 LUW) " on page 475.

Lets you modify the DB2 Database Manager configuration file parameters for the database. Select a parameter and click the Edit button to open a dialog that lets you change the current value.

NOTE: To set database options for all future databases, set the database options on the model database.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 462

MODIFYING OBJECTS USING EDITORS

F OREIGN K EYS E DITOR (IBM DB2 LUW)

The Foreign Keys Editor lets you manage column mapping for a foreign key, modify update and delete rule actions, and specify a NOT ENFORCED value.

To edit a foreign key

1 Open an editor on the foreign key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Column Mapping

Properties

Comment

DDL View

Settings and tasks

The existing column mapping for the foreign key is represented by selected columns in the Main Table and Referenced Table lists. Additional candidates in the Referenced

Table list are indicated by enabled column check boxes.

If necessary, use the Table dropdown in the Referenced Table group to choose a new table for this foreign key. Select or deselect columns in the Main Table list and

Referenced Table list to form the referential constraint between the two tables.

Lets you modify the Delete Rule (NO ACTION, RESTRICT, CASCADE, SET NULL) and

Update Rule (NO ACTION, RESTRICT) actions. This tab also lets you deselect the

Enforced check box to specify a NOT ENFORCED option.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

F UNCTIONS E DITOR (IBM DB2 LUW)

The Functions Editor lets you manage the body, inputs and outputs, and properties for a function.

To edit a function

1 Open an editor on the function. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Settings and tasks

Displays the Language , Return Type , External Name , SQL Access Level ,

Origin , Threadsafe , Fenced , Scratchpad , Scratchpad Length , Allow Parallel ,

Final Call , Parameter Style , Inherit Special Registers , DBInfo , Deterministic ,

External Action , Called on Null Input , and Parameter CCSID properties.

463 RAPID SQL 8.6/XE5 USER GUIDE

Tab

Parameters

Settings and tasks

Lets you manage function parameters. On opening, this tab shows the existing parameters. Optionally you can:

Select a parameter from the list, modify the Type and if appropriate, the

Precision , Size , and Scale of the parameter.

Click the New button, provide a name for the new parameter and modify its attributes.

Return Scalar (only available for functions created with a Function

Type of EXTERNAL SCALAR,

SOURCED or TEMPLATE and for

SQL Function Type functions with an explicit Return Type of

SCALAR)

)

Return Columns (only available for functions created with a

Function Type of OLEDB and

EXTERNAL TABLE and for SQL

Function Type functions with an explicit Return Type of TABLE or

ROW

Select a parameter and click the Drop button to delete the parameter.

Select a parameter and use the arrow buttons to reorder the parameter list.

Lets you change the specified, modify the

Lets you manage return columns for a function. On opening, this tab shows the existing columns. Optionally you can:

Select a column from the list, modify the Type and if appropriate, the

Precision , Size , and Scale of the parameter. You can also specify that the return column is to be treated As Locator .

Click the New attributes.

Type of a return scalar and depending on the type

Precision , Scale , and Size of the return scalar.

button, provide a name for the new column and modify its

Select a parameter and click the Drop button to delete the parameter.

Select a parameter and use the arrow buttons to reorder the parameter list.

Body

Comment

Dependencies

Permissions

DDL View

Lets you edit the body of the function.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

I NDEXES E DITOR (IBM DB2 LUW)

The Index Editor lets you manage columns and properties, and view space details for an index.

NOTE: IBM DB2 for Windows, Unix, and Linux, lets you segregate Include columns ; columns that are to be part of the index but not part of the unique key.

RAPID SQL 8.6/XE5 USER GUIDE 464

MODIFYING OBJECTS USING EDITORS

To edit an index

1 Open an editor on the index. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Include Columns

Space

Comment

Permissions

DDL View

Settings and tasks

Lets you manage columns that make up the index. On opening, this tab shows the existing columns. Optionally you can:

Change the Sort order of a column.

Click the New button and select a column name from the dropdown, to add a column to the index.

Select a column and click the Drop button to delete the column from the index.

Select a column and use the arrow buttons to reorder the columns in the index.

Lets you work with properties in the following categories:

Attributes Lets you view the Defined By property. Lets you set the Index Type

(UNIQUE or NONUNIQUE), specify the index as Clustered , Allow Reverse

Scans , and Compression .

Storage Lets you set Percent Free and Minimum Percent Used settings.

Lets you Include columns that are to be part of the index but not part of the unique key.

On opening, the tab shows a listing of the Include columns currently defined as part of this index.

Optionally, take one of the following actions:

Click the New button to add a new column to the index.

Select an existing column and click the Delete button to delete that column.

Lets you view the following property groups:

Attributes Make Unique , System Required , Total Keys , Page Fetch Pairs , and

Distinct Keys

Statistics Index Level , Cluster Ratio

Pages , and Density

, Cluster Factor , Leaf Pages , Sequential

Cards First Key, First 2 Keys, First3 Keys, First 4 Keys, and Full Keys

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

465 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

M ATERIALIZED Q UERY T ABLES E DITOR (IBM DB2 LUW)

The Materialized Query Tables Editor lets you manage the columns, base query and options for a materialized query table, and work with storage and performance settings.

To edit a materialized query table

1 Open an editor on the materialized query table. For details, see " Opening an Object

Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Definition

Performance

Space

Comment

Permissions

Dependencies

DDL View

Settings and tasks

Displays the currently defined columns for the materialized Query Table. Optionally, you can Add , Insert , or Edit columns for the materialized query table.

Base Query Lets you view the query that this materialized query table is based on.

Materialized Query

Table Options

Tablespace Placement Displays Table Tablespace , Index Tablespace , and Long

Tablespace settings for the materialized query table.

Log Options Lets you select logging options:

Logged initially

Data Capture - Lets you select none or change to Include

Longvar Columns .

NOTE: If you select the Data Capture option, the table name

/ column name cannot be longer than 18 bytes.

Options

Lets you specify an immediate or deferred Refresh , and explicitly set a Materialized Query Table as Enabled or

Disabled or go with the Defaul t. This tab also displays whether the Materialized Query Table is maintained by the system or by a user.

Partition Columns

Let you set the Percent Free , Locksize , Append , and

Volatile settings for the materialized query table.

Use the Add and Delete buttons to manage the partition columns for the materialized query table.

Page Information

Row Information

Lets you view Row Count and Num. of Overflow Rows values.

Lets you view Num. of Pages with Rows , Num. of Pages ,

Percent Free values.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 466

MODIFYING OBJECTS USING EDITORS

P ACKAGES E DITOR (IBM DB2 LUW)

The Packages Editor lets you view contents and settings for a package.

To edit a package

1 Open an editor on the package. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Definition

Statements

Comment

Dependencies

DDL View

Settings and tasks

Lets you view the following settings: Binder , Definer , Default Schema , Degree ,

Function Path , Language Level , SQL Math Warn , SQL Warn , Buffered Inset , Status ,

Code Page , Total Sections , Multi-node Bound , Intra-partition , Query Optimization ,

Cursor Blocking , Isolation Level , Date Time Format , Last Bind Time , Explicit Bind

Time , Explain Level , Explain Snapshot , and Explain Mode .

Shows the contents of a package statement. Optionally, you can select a statement and click Explain to copy the statement to an ISQL Editor window. For more information, see

" Using the SQL Editor " on page 789.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P RIMARY K EYS E DITOR (IBM DB2 LUW)

The Primary Keys Editor lets you manage columns and properties for a primary key, and view space usage/allocation details.

To edit a primary key

1 Open an editor on the primary key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Settings and tasks

Displays the columns that make up the primary key. Optionally, you can:

Select a column and use the Delete key to remove the column from the primary key.

Select a column and use the arrow keys to reorder the columns in the primary key.

Displays the owning Table Schema and Table Name , the Name of the primary key, a

Defined By property, and Percent Free and Minimum Percent Used properties.

467 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Space

Comment

DDL View

Settings and tasks

Lets you view the following property groups:

Attributes Make Unique , System Required , Total Keys , Page Fetch Pairs , and

Distinct Keys

Statistics Index Level , Cluster Ratio

Pages , and Density

, Cluster Factor , Leaf Pages , Sequential

Cards First Key, First 2 Keys, First3 Keys, First 4 Keys, and Full Keys

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P ROCEDURES E DITOR (IBM DB2 LUW)

The Procedures Editor lets you manage the body and parameters for a procedure.

To edit a procedure

1 Open an editor on the procedure. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Parameters

Settings and tasks

Lets you modify the following settings: SQL Access Level (MODIFIES SQL DATA, CONTAINS

SQL, READS SQL DATA, NO SQL), number of Result Sets , External Action , New Save Point,

Inherit Special Registers, Deterministic , and Parameter CCSID .

Lets you view the following settings: Language (C, COBOL, JAVA, OLE, SQL CLR), External

Name , Threadsafe, Fenced , Parameter Type (GENERAL, DB2, GENERAL WITH NULLS, SQL),

Program Type (MAIN, SUB and not enabled for a Parameter Style of SQL), and DBInfo .

Lets you manage procedure parameters. On opening, this tab shows the existing parameters.

Optionally you can:

Select a parameter from the list, modify the Type , and if appropriate, the Precision , Size , and

Scale of the parameter. You can also set the Parameter Mode to INPUT, OUTPUT, or

INPUT_OUTPUT.

Click the New button, provide a name for the new parameter and modify its attributes.

Select a parameter and click the Drop button to delete the parameter.

Select a parameter and use the arrow buttons to reorder the parameter list.

NOTE: You cannot use host variables in the CALL statement for the name of the procedure.

For details on using this tab, see " Adding a Comment to an object " on page 459.

Comment

Body Lets you modify the body of the procedure.

Dependencies

For details on using this tab, see " Working with Object Dependencies " on page 458.

Permissions

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

RAPID SQL 8.6/XE5 USER GUIDE 468

MODIFYING OBJECTS USING EDITORS

Tab

DDL View

Settings and tasks

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

S EQUENCES E DITOR (IBM DB2 LUW)

The Sequences Editor lets you manage cycle numbers, increments, the datatype, and other options for a sequence.

To edit a sequence

1 Open an editor on the sequence. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Definition

Dependencies

DDL View

Settings and tasks

Lets you work with settings in the following categories:

Parameters Increment By - Lets you specify the interval between sequence numbers. This integer value can be any positive or negative integer, but it cannot be 0. This value can have 28 or fewer digits. The absolute of this value must be less than the difference of MAXVALUE and

MINVALUE. If this value is negative, then the sequence descends. If the increment is positive, then the sequence ascends. If you omit this clause, the interval defaults to 1.

Minimum Value - Lets you specify the minimum value of the sequence. This integer value can have 28 or fewer digits.

Maximum Value - Lets you specify the maximum value the sequence can generate. This integer value can have 28 or fewer digits.

Next Sequence

Numbers

Lets you work with sequence cycle numbers.

Sequence

Datatype

Lets you specify the datatype and width for the sequence.

Options Lets you specify Cache Size , Cycle When Reach Max/Min , and

Generate Numbers in Order (useful when you are using the sequence number as a timestamp) values.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

469 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

S TRUCTURED T YPES E DITOR (IBM DB2 LUW)

The Structured Types Editor lets you manage the attributes, methods and body for a structured type.

To edit a structured type

1 Open an editor on the structured type. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Attributes

Settings and tasks

Displays the initially-defined values for the following properties: Instantiable , Final Type ,

With Function Access , Without Comparisons , Inline Length , Supertype Schema ,

Supertype Name , Cast (Source as Ref) With , Cast (Ref as Source) With , Reference Using ,

Size , Precision , and Scale .

For details on these properties, see " Structured Types Wizard (DB2 LUW) " on page 274.

Displays the currently defined attributes for the structured type. Optionally, take one of the following actions:

Select an attribute and change the Datatype in the Property/Value list. Depending on the datatype you choose you can also provide additional datatype options. For details

on option availability, see " Structured Types Wizard (DB2 LUW) " on page 274.

Add an attribute by clicking the New button and typing a name for the attribute.

Select an attribute and click Drop to delete the attribute.

RAPID SQL 8.6/XE5 USER GUIDE 470

MODIFYING OBJECTS USING EDITORS

Tab

Methods

Body

Settings and tasks

This tab lets you initiate creation of method specifications and prepopulate associated method bodies. On opening, this tab lists all method specifications associated with the structured type and for each method, includes name and language details. Optionally, take one of the following actions:

Click Add to begin the process of adding a new method specification. Similarly, select a method and click Edit to modify the method specification. For more information, see

Adding or editing structured type methods .

Select a method specification and click Drop to delete that method specification from the structured type.

The Create Body and associated controls are available for selected methods for which no method body has yet been defined. They lets you prepopulate the method body definition:

External name - lets you provide a ‘string” or SQL identifier for a method specified with a

Language of C, JAVA, or OLE.

Transform group - lets you specify the transform group used when invoking the method. This setting is available for methods specified with a Language of C, JAVA, or OLE.

As identifier - This setting is available for methods specified with a Language of C. When this check box is checked, the method body is created with the external name as provided.

Otherwise, the external named provided will appear within quotes in the CREATE METHOD statement on the Body tab.

Inherit isolation level with lock request - specifies whether the INHERIT clause is specified as INHERIT ISOLATION LEVEL WITHOUT LOCK REQUEST or INHERIT ISOLATION LEVEL

WITH LOCK REQUEST. This setting is available for methods specified with a Language of

SQL.

After specifying options, click Create Body to work with the CREATE METHOD statement you generated on the editor’s Body tab.

Lets you view and modify the CREATE METHOD statement generated with your choices on the Methods tab.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

DDL View

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

A DDING OR EDITING STRUCTURED TYPE METHODS

The Add Method and Edit Method wizards let you work with the methods of a structured type.

They let you specify basic properties, parameter and return value details for methods.

To add or edit a structured type method:

1 Open an editor on a structured type. For details, see " Opening an Object Editor " on page 453.

2 Navigate to the Methods panel, and then open a wizard using one of the following techniques:

• Click Add to create a new method

• Select an existing method and click Edit .

471 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

3 Use the following table as a guide to understanding and modifying the settings on the tabs of this wizard:

Tab

Properties

Advanced (available after clicking the

Advanced button on the Properties pane)

Parameters

Settings and tasks

When adding a method this pane lets you specify a Name , Specific Name , Language (OLE,

SQL, JAVA, C), and SQL Access Level (CONTAINS SQL, READS SQL DATA, NO SQL). When editing a method, these properties are for display only.

Lets you select or enable the following ADD METHOD options: Deterministic , External

Action , Called on NULL Input , DBINFO , Fenced , Allow Parallel , Scratchpad , Scratchpad

Length , Parameter Style (SQL, DB2GENERAL), and Final Call .

Lets you work with input parameters:

Add a parameter by clicking the New button and typing a name for the parameter.

Select a parameter and change the Datatype in the Property/Value list. Depending on the datatype you choose you can also provide Precision , Size , and Scale options.

Return

Delete a selected parameter by clicking the Delete button.

Order the parameters using the arrow buttons.

Lets you provide details of the return value of the method:

Return

Datatype

Lets you specify the base Type of the return value. Depending on the datatype you choose you can also provide Precision , Size , and Scale options.

Cast

Datatype

This group lets you optionally use the CAST FROM form of the ADD METHOD

RETURN clause. It lets you have the method return a different datatype, cast from the datatype specified in the Return Datatype group. This feature must be Enabled and provide the same type options as the Return Datatype group.

An As Locator option specifies that the method return a LOB locator instead of the actual value. The option is only available for LOB and LOB-based datatypes. As Locator applies to a

LOB type in the Cast Datatype group, if specified. Otherwise it applies to a LOB type in the

Return Datatype group

4 When ready click Finish .

T ABLES E DITOR (IBM DB2 LUW)

The Tables Editor lets you manage basic properties, columns, dimension columns, distribution key columns, partitions, tablespaces, and constraints for a table.

TIP: Before modifying a table, familiarize yourself with the material in

Altering Tables for

IBM DB2 LUW for Linux, Unix, and Windows .

RAPID SQL 8.6/XE5 USER GUIDE 472

MODIFYING OBJECTS USING EDITORS

To edit a table

1 Open an editor on the table. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Status

Partition

Tablespaces

Dimensions

Distribution Key

Columns

Indexes

Settings and tasks

Displays the currently defined columns in the table. Optionally, you can:

Select a column, and in the Property / Value list modify property values for that column.

Click Add Column , provide a name for the new column, and set property values for the column.

Select a column and click Delete to remove the column from the table.

Displays the Name, Created , Last RunStats , Invalidate Time , and Defined By properties.

Lets you set Percent Free , Lock Size , Append Data , Volatile , Compress , Row

Compression , Security Policy , RestrictDrop , LogIndexBuild , CCSID , Do not initially log , and Data Capture properties.

Lets you view the following statistics: Total Number of Rows , Number of Overflow Rows ,

Number of Pages With Rows , Number of Page s, Table Status , Row Organization ,

RowTypeSchema , RowTypeName , AccessMode , ActiveBlocks , AvgCompressedRowSize ,

AvgRowCompressionRatio , CodePage , PercentOfPagesSaved , LastRegeneratedTime , and ProtectionGranularity .

This tab provides details on the partition columns and data partitions for the table. Optionally you can:

Use the New or Delete buttons to create or drop a partition column or data partition.

Use the Edit button to edit a data partition.

Use the Commands menu to attach or detach a data partition.

Data Tablespace ,

Long Tablespace , and Index

Tablespace

Lets you view the Database partition Group , Managed By , Page

Size , and Extent Size properties. Lets you choose the Name of a tablespace.

Lets you group columns to form a dimension:

Click the New button to add a new column to the dimension for the table.

Select a column and click the Edit button to modify the dimension column properties.

Select a column and click the Delete button to drop a column from the dimension.

Lets you group one or more columns to form a distribution key:

Click the New button to add a new column to the dimension for the table.

Select a column and click the Edit button to modify the dimension column properties.

Select a column and click the Delete button to drop a column from the dimension.

Lets you manage indexes for a table:

Click Add to open a dialog that lets you add a new index to the table.

Select an index and click Edit to open a dialog that lets you edit index properties.

Select an index and click Drop to open a dialog that lets you remove the index from the table.

473 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Constraints

Comment

Dependencies

Permissions

DDL View

Settings and tasks

Lets you manage primary key, unique key, foreign key, and check constraints for a table.

Constraints are grouped by type, under folders:

Select a constraint type folder and click Add to open a dialog that lets you add a constraint of that type.

Select a constraint and click Edit to open a dialog that lets you modify the constraint details.

Select a constraint and click Drop to remove the constraint.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

A LTERING T ABLES FOR IBM DB2 LUW FOR L INUX , U NIX , AND W INDOWS

The ALTER TABLE command of Transact-SQL is limited to adding NULL columns to the end of a table and to adding or dropping constraints. Unfortunately, this scenario does not address many requirements of administrators and developers who need to add, delete or modify columns more broadly:

• Add columns anywhere in a table, not just the end

• Add columns that do not permit a NULL value.

• Change the NULL/NOT NULL status of table columns

• Change column datatypes to other compatible types

• Change the length of datatypes

• Delete a column

Due to the limitations of the ALTER TABLE command, the only way to make broader modifications is to write SQL scripts that step through all desired changes. To perform an enhanced table alter, Rapid SQL constructs an SQL script that completes the following steps:

1 Renames the existing table so that the original and its data remain intact

2 Builds a CREATE TABLE statement with the new table definition, including declared defaults, primary key and check constraints

3 Builds an INSERT statement to copy data from the original, renamed table to the new one

4 Builds foreign keys on the new table

5 Reapplies any privileges granted on the table

RAPID SQL 8.6/XE5 USER GUIDE 474

MODIFYING OBJECTS USING EDITORS

6 Rebuilds all dependencies on the new table, including indexes, triggers, procedures, packages, functions and views. When rebuilding procedures, functions, packages and views,

Rapid SQL also rebuilds any permissions on them.

T ABLESPACES E DITOR (IBM DB2 LUW)

The Tablespaces Editor lets you manage containers, basic properties, performance, space usage, and associated objects for a tablespace.

To edit a tablespace

1 Open an editor on the tablespace. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Container

Performance

Comment

Settings and tasks

Lets you work with settings in the following categories:

Tablespace Lets you view the Type (REGULAR, LARGE, TEMPORARY, or USER

TEMPORARY), Use Automatic Storage , Managed By , and Database Partition

Group properties.

Lets you modify the Buffer Pool and Drop Recovery properties.

Performance Lets you view the Page SIze and Extent Size properties.

Lets you specify or select the Prefetch Automatic , Overhead , Transfer Rate , and File System Caching properties.

Automatic

Storage

Lets you work with the AutoResize (enables following size settings), Initial Size ,

Increase Size , Max Size Unlimited , and Max Size (enabled if Max Size

Unlimited is not set) attributes.

The Initial Size and Max Size values can be provided as kB, mB, or gB values.

This option is only available for database managed tablespaces. This tab lets you add or delete containers of a tablespace.

Select an existing container and in the Property/Value list, use the Size controls to RESIZE, EXTEND, or REDUCE the container.

Click Delete to remove a container.

Lets you manage settings in the following categories:

Page Setting

Add a container by clicking New , and then in the Property/Value list, provide

Name , number of Database Partitions , Type (DEVICE, FILE) and original Size .

Lets you view Page SIze and Extent Size settings and modify the Prefetch Size setting.

I/O Setting

Dropped Table

Settings

Defaults

Let you modify the

Lets you view the

Overhead and

Recovery Status .

Transfer Rate settings.

Lets you view the Nodegroup and specify a Bufferpool .

For details on using this tab, see " Adding a Comment to an object " on page 459.

475 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Space

Objects

Privileges

DDL View

Settings and tasks

Lets you view the table usage and the distribution of space for a tablespace. Specific statistics include Free Pages , Used Pages , Reserved Pages , and Total Pages .

Lets you manage database objects associated with the tablespace. Objects are organized in a tree structure with folders containing the objects. Optionally, take one of the following actions:

Select an object and click Edit to open an object editor on the selected object.

Select an object and click Drop to initiate dropping the selected object.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

T RIGGERS E DITOR (IBM DB2 LUW)

The Triggers Editor lets you view properties for a trigger.

To edit a trigger

1 Open an editor on the trigger. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Comment

Dependencies

Definition

Settings and tasks

Lets you view the Trigger Timing , Trigger Events , Trigger Type , Object Status ,

Define r, and Function Path properties.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Object Dependencies " on page 458.

Lets you view and modify the CREATE TRIGGER DDL that will implement your changes.

To modify a trigger, Rapid SQL must drop then create the trigger.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

U NIQUE K EYS E DITOR (IBM DB2 LUW)

The Unique Keys Editor lets you manage columns and basic properties for a unique key, as well as view space details.

RAPID SQL 8.6/XE5 USER GUIDE 476

MODIFYING OBJECTS USING EDITORS

To edit a unique key

1 Open an editor on the unique key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Space

Comment

DDL View

Settings and tasks

Lets you manage columns that make up the unique key. On opening, this tab shows the existing columns. For each column, the datatype (and if applicable the precision in brackets) and whether the table definition permits nulls in the target table column.

Optionally you can:

Click the New button and select a column name from the dropdown, to add a column to the index.

Select a column and click the Drop button to delete the column from the index.

Displays the owning Table Schema and Table Name , the Name of the primary key, a Defined By property, and Percent Free and Minimum Percent Used properties.

Lets you view settings in the following categories:

Attributes Lets you view Make Unique , System Required , Total Keys , Distinct Keys, and

Page Fetch Pairs settings.

Statistics Lets you view Index Level , Cluster Ration

Pages , and Density settings.

, Cluster Factor , Leaf Pages , Sequential

Cards Lets you view First Key , First 2 Keys , First 3 Keys , First 4 Keys and Full Keys settings.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

U SER D ATATYPES E DITOR (IBM DB2 LUW)

The User Datatypes Editor lets you manage the basic properties of a user datatype.

To edit a user datatype

1 Open an editor on the user datatype. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Settings and tasks

Displays the user Datatype name. Lets you select a new Owner or Type , and depending on the type specified, offers additional type-specific properties such as Size . Also lets you modify the Allow Bit Data property, if appropriate.

477 RAPID SQL 8.6/XE5 USER GUIDE

Tab

Comment

DDL View

Settings and tasks

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

U SERS E DITOR (IBM DB2 LUW)

The Users editor lets you manage object dependencies and permissions for a user.

To edit a user

1 Open an editor on the user. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Objects

Settings and tasks

Displays the user Name .

Lets you manage database objects associated with the user. Objects are organized in a tree structure with folders containing the objects. Optionally, take one of the following actions:

Select an object and click Edit to open an object editor on the selected object.

Select an object and click Drop to initiate dropping the selected object.

Object Permissions and

System Permissions

DDL View

For details on using these tabs, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

V IEWS E DITOR (IBM DB2 LUW)

The Views Editor lets you manage the columns as well as view and modify properties for a view.

RAPID SQL 8.6/XE5 USER GUIDE 478

MODIFYING OBJECTS USING EDITORS

To edit a view

1 Open an editor on the view. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Definition

Comment

Dependencies

Permissions

Settings and tasks

Displays all columns for the view. Details for each column include the Column Name , the

Datatype (and if applicable, with the precision in parentheses), and whether or not Nulls are allowed for that column.

You can also set the EnableQueryOptimization property for the view.

Lets you view and modify the CREATE VIEW DDL that will implement any changes you make in this editor. To modify a view, Rapid SQL must drop then create the view.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

IBM DB2 FOR Z /OS O BJECT E DITORS

Rapid SQL includes an Object Editor for all supported IBM DB2 for z/OS objects:

Aliases Editor (IBM DB2 Z/OS)

Check Constraints Editor (IBM DB2 Z/OS)

Databases Editor (IBM DB2 Z/OS)

Foreign Keys Editor (IBM DB2 Z/OS)

Functions Editor (IBM DB2 Z/OS)

Indexes Editor (IBM DB2 Z/OS)

Packages Editor (IBM DB2 Z/OS)

Plans Editor (IBM DB2 Z/OS)

Primary Keys Editor (IBM DB2 Z/OS)

Procedures Editor (IBM DB2 Z/OS)

Stogroups Editor (IBM DB2 Z/OS)

Synonyms Editor (IBM DB2 Z/OS)

Tables Editor (IBM DB2 Z/OS)

Tablespaces Editor (IBM DB2 Z/OS)

479 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Triggers Editor (IBM DB2 Z/OS)

Unique Keys Editor (IBM DB2 Z/OS)

User Datatypes Editor (IBM DB2 Z/OS)

Users Editor (IBM DB2 Z/OS)

Views Editor (IBM DB2 Z/OS)

For access to object editors for different supported DBMS platforms and an introduction to

editor usage, see " Modifying objects using editors " on page 452.

A LIASES E DITOR (IBM DB2 Z/OS)

The Aliases Editor lets you view details of an alias definition.

To edit an alias

1 Open an editor on the alias. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Comment

DDL View

Settings and tasks

In addition to the owning Schema and Name of the alias, this tab lets you view the

Target Owner , Target Type , and Target Name , of the referenced object.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

C HECK C ONSTRAINTS E DITOR (IBM DB2 Z/OS)

The Check Constraints Editor lets you view definition details and edit a check condition expression.

RAPID SQL 8.6/XE5 USER GUIDE 480

MODIFYING OBJECTS USING EDITORS

To edit a check constraint

1 Open an editor on the check constraint. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Definition

DDL View

Settings and tasks

Lets you view basic identification information on the check constraint: Table Schema and

Table Name , the Name of the constraint and the date it was Created .

You can also edit the condition in the Check Condition box. The Table Columns button acts a time saver in editing the condition. It opens a dialog that lets you select and paste column names into the check condition expression.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

D ATABASES E DITOR (IBM DB2 Z/OS)

The Databases Editor lets you manage basic properties, permissions, and object dependencies for a database.

To edit a database

1 Open an editor on the database. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Permissions

Dependencies

DDL View

Settings and tasks

The Database Creation group lets you view the Name and Group Member properties and set the Type property. The Database Attributes group lets you view the Encoding

Scheme , Create Date , and Last Altered properties and lets you set the Tablespace

Buffer Pool , Index Buffer Pool , Storage Group , and CCSID properties.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

F OREIGN K EYS E DITOR (IBM DB2 Z/OS)

The Foreign Keys Editor lets you manage column mapping and specify a delete rule for a foreign key.

481 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a foreign key

1 Open an editor on the foreign key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Column Mapping

Properties

DDL View

Settings and tasks

The existing column mapping for the foreign key is represented by selected columns in the Main Table and Referenced Table lists. Additional candidates in the Referenced

Table list are indicated by enabled column check boxes.

If necessary, use the Table dropdown in the Referenced Table group to choose a new table for this foreign key. Select or deselect columns in the Main Table list and

Referenced Table list to form the referential constraint between the two tables.

Lets you specify a Delete Rule (CASCADE, NO ACTION, RESTRICT, SET NULL).

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

F UNCTIONS E DITOR (IBM DB2 Z/OS)

The Functions Editor lets you view and modify properties for a function, manage its inputs and outputs, and modify the code in the body of the function.

RAPID SQL 8.6/XE5 USER GUIDE 482

MODIFYING OBJECTS USING EDITORS

To edit a function

1 Open an editor on the function. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Settings and tasks

Lets you work with properties in the following categories:

Identification Lets you view the Create Timestamp , Schema , Routine ID , and Origin properties. Lets you set the External Name and Collection ID properties.

Run Time Lets you view the Result Sets property. Lets you set the WLM Environment

WLM For Nested , ASU Time , and Run Options properties.

,

Structure Lets you view the Language , Parameter Style , Number of LOB Columns ,

Number of Parameters , and Allow Parallel properties. Lets you set the

Program Type , Security Type , SQL Access Level , Inherit Special

Registers , Fenced , DBINFO , Deterministic , Called On Null Input , External

Action , Stay Resident , Final Call , Scratchpad , and Scratchpad Length properties.

Run

Estimates

Java

Structure

Lets you view the

Lets you view the and

Initial I/Os

Instructions Per Invocation

Java Class

Java Signature

,

, I/Os Per Invocation

properties.

Jar ID

properties.

, Package ID ,

, Initial Instructions

Method ID ,

, and

Jar Schema ,

Parameters , Return

Columns , and

Return Scalar

On opening, these tabs displays the current function parameters, return columns or return scalar. Optionally, take one of the following actions:

Select a parameter, return column, or return scalar in the Attributes area, modify values, as permissible. Attributes differ by the tab you chose but typically include items such as Type , Precision , Scale , As Locator , and Size .

Body

Click the New button to provide datatype and size details for a new parameter, return column, or return scalar.

Select a parameter, return column, or return scalar and click Drop to delete that parameter.

Lets you modify the code in the text area of the tab.

Comment

Permissions

DDL View

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

I NDEXES E DITOR (IBM DB2 Z/OS)

The Indexes Editor lets you manage basic, storage, and space properties for an index, as well as work with its columns and partitions.

483 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit an index

1 Open an editor on the index. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Storage

Partitions

Space

Comment

DDL View

Settings and tasks

Lets you manage the columns or key-expressions that make up the index. On opening, this tab shows the existing columns/key-expressions.

NOTE: Key-expression functionality is only enabled if the Index on Expression setting is enabled on the Properties tab.

Optionally you can:

Change the Sort order of a column or key-expression.

If Index on Expression is disabled, click the New button and select a column name from the dropdown to add a column to the index.

If Index on Expression is enabled, click the New button and type a valid key-expression in the Expression field, to add an expression to the index.

Select a column or key-expression and click the Drop button to delete the column from the index.

Lets you work with the Buffer Pool , Piece Size , Close , Copy , Compress , Index on

Expression , and Padded properties. For more information on these properties, see

" Indexes (DB2 z/OS) - Properties " on page 291.

Lets you select a dataset management scheme and provide associated

attribute values. For details, see " Indexes (DB2 z/OS) - Storage " on page 293.

Lets you work with partitions for the index. For each data partition, the listing shows the storage group, VCAT Catalog, primary and secondary space allocations, and if appropriate, the free space percentage, GBP Cache, limit key value, and erase on delete settings. Optionally, you can select a partition and click the Edit button top open an editor that lets you edit that partition.

Lets you view the following property groups:

Attributes Make Unique , System Required , Total Keys , Page Fetch Pairs , and

Distinct Keys

Statistics Index Level , Cluster Ratio , Cluster Factor , Leaf Pages

Density , DASD Storage , and Data Blocks/Key .

, Sequential Pages ,

Cards First Key and Full Keys

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 484

MODIFYING OBJECTS USING EDITORS

P ACKAGES E DITOR (IBM DB2 Z/OS)

The Packages Editor lets you manage properties and bind parameters for a package, as well as view environment information, package contents and associated plans.

To edit a package

1 Open an editor on the package. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Bind Parameters

Plan/Packlists

Statements

Dependencies

Privileges

Environments

Command

Settings and tasks

Lets you work with the following properties: Average Size , Bind Time , Consistency

Token , Dec31 , Decimal Point , Group Member , Katakana Charset , Language , Mixed

Character Set , Operative , Package Size , Package Source , PDS Name , Precompile

Timestamp , Release Bound , String Delimiter , SysEntries , Timestamp , and Valid .

Lets you set the Schema Path , Creator , Qualifier , Explain , Validate , Degree , Dynamic

Rules , Lock Isolation , Encoding , Page Writes , Resource Release , CurrentData , DB

Protocol , Reoptvar , Keep Dynamic , Defer Prepare , SQL Error , and Optimization Hint properties.

Displays the plans contained in the package if the package was bound individually, or as part of a complete collection ID.

Optionally, you can:

Select a plan and click Edit to open the Plans editor on the plan. For more

information, see " Plans Editor (IBM DB2 Z/OS) " on page 486.

Select a plan and click Rebind to initiate rebinding the plan. For more information,

see " Rebind Plans " on page 668.

Select a plan and click Free to initiate deleting the plan. For more information, see

" Drop " on page 631.

Shows the contents of any package statement on the datasource. Optionally, select a statement and click Explain to copy the statement to an ISQL Editor window.

NOTE: For more information, see " Using the SQL Editor " on page 789.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

Displays run-time environments information for a package. Use the arrow buttons to move environments between the Enabled Environments and Disabled Environments lists.

To modify a connection, select the environment and click Edit Connections . For more information, see

Connection Editor

.

Displays the command that originally built the package.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

485 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

C ONNECTION E DITOR

The Connection Editor lets you modify plan and package connections. It is opened from the

Packages editor. For more information, see

Packages Editor (IBM DB2 Z/OS) .

The table below describes the options and functionality of the Connection Editor:

Option

Connections

Add

Description

Displays the connections for the plan or package.

Click to add the connection.

P LANS E DITOR (IBM DB2 Z/OS)

The Plans Editor lets you manage plan properties, view DBRM information, manage packages and contents, and manage run-time environments for a plan.

To edit a plan

1 Open an editor on the plan. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Definition

DBRMs

Packages

Settings and tasks

Lets you work with the following attribute groups:

P r operties

Bind

Parameters

Lets you view the Timestamp , Group Member , Plan Size , Average Size ,

Valid, Operative , Pkg. List Entries , SysEntries , and Release Bound properties. Lets you set the Owner , Qualifier , and Current Server properties.

Lets you set the Schema Path , Explain , Validate , Degree , Dynamic Rules ,

Lock Isolation , Resource Acquire , Resource Release , Disconnect , Current

Data , DB Protocol , Reoptvar , SQL Rules , Keep Dynamic , Defer Prepare ,

Encoding , Page Writes , Flag , Optimization Hint , and Cache Size properties.

Lists details for each DBRM associated with a plan. Optionally, select a DBRM from the list and click Edit to open the DBRM editor on that DBRM.

Displays details for each package associated with a plan. Optionally, you can:

Select a package and click Edit to open the Package editor on that package.

For details, see " Packages Editor (IBM DB2 Z/OS) " on page 485.

Select a package and click Rebind

to open the " Rebind Packages " on page 667 dialog.

Select a package and click Free

to open the " Free (Packages) " on page 650

dialog.

RAPID SQL 8.6/XE5 USER GUIDE 486

MODIFYING OBJECTS USING EDITORS

Tab

DBRM/Packages

Dependencies

Privileges

Environments

Settings and tasks

Displays the entire contents of the plan, DBRMs and packages, in a single display. The first column contains either a 'D' for DBRM or 'P' for packages.

Optionally, take one of the following actions:

Select a package list entry and click Edit to open the Package editor on that

package. For details, see " Packages Editor (Oracle) " on page 546.

Select a package and click Rebind

to open the " Rebind Packages " on page 667 dialog.

Select a package and click Free

to open the " Free (Packages) " on page 650

dialog.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

Displays run-time environments information for a plan. Optionally, you can:

Use the arrow buttons to move environments between the Enabled

Environments and Disabled Environments lists.

Select an environment and click Edit Connections to open the Connection editor.

Displays the command that originally built the plan.

Command

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P RIMARY K EYS E DITOR (IBM DB2 Z/OS)

The Primary Keys Editor lets you manage primary key columns as well as work with storage, space, and partitions for a primary key.

TIP: The r efresh button lets you refresh or clear the editor’s contents, and log SQL.

487 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a primary key

1 Open an editor on the primary key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Column

Properties

S torage

Partitions

Space

Comment

DDL View

Settings and tasks

Lets you manage columns that make up the primary key. On opening, this tab shows the existing columns. For each column, the listing shows the datatype (and if applicable the precision in brackets) and whether the table definition permits nulls in the target table column.

Optionally you can:

Change the Sort order of a column.

Click the New button and select a column name from the dropdown, to add a column to the primary key.

Select a column and click the Drop button to delete the column from the primary key.

Select a column and use the arrow buttons to reorder the columns in the primary key.

Lets you set Buffer Pool , Close , Copy and Piece Size properties.

Lets you view Storage Group and VCAT Catalog properties. Lets you set Primary Space

Allocation , Secondary Space Allocation , Erase , Free Page, Percent Free, and GBP

Cache properties.

Lets you work with partitions for the primary key.

Lets you view values in the following property groups:

Attributes Make Unique , System Required , Total Keys , Page Fetch Pairs , and

Distinct Keys .

Statistics Index Level , Cluster Ratio

Pages , and Density .

, Cluster Factor , Leaf Pages , Sequential

Cards First Key and Full Keys .

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P ROCEDURES E DITOR (IBM DB2 Z/OS)

The Procedures Editor lets you manage the properties and input/output parameters of a procedure.

RAPID SQL 8.6/XE5 USER GUIDE 488

MODIFYING OBJECTS USING EDITORS

To edit a procedure

1 Open an editor on the procedure. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Parameters

Comment

Body

Permissions

DDL View

Settings and tasks

Lets you work with properties in the following categories:

Identification

Run Time

Lets you view the Schema and Routine ID properties. Lets you set the

External Name and Collection ID properties.

Lets you set the Result Sets , WLM Environment , WLM For Nested ,

ASU Time , and Run Options properties.

Structure Lets you view the Language , Number of LOB Columns , Number of

Parameters , and DBINFO properties. Lets you set the Program Type ,

Security Type , SQL Access Level , Parameter Style , Inherit Special

Registers , Fenced , Commit on Return, Deterministic , and Stay

Resident properties.

Run Estimates Lets you view the Initial I/Os , I/Os Per Invocation , Initial Instructions , and Instructions Per Invocation properties.

Java Structure Lets you view the Java Class , Jar ID , Package ID , Method ID , Jar

Schema , and Java Signature properties.

Displays a listing of the existing input/output parameters for the procedure. For the selected parameter, the Datatype list shows details for that parameter, including the

Type and Parameter Mode (INPUT, OUTPUT, INPUT_OUTPUT). Depending on the type other parameters such as Size , Precision , or Scale may be available for viewing or modification.

Optionally you can:

Select a parameter and in the Datatype list, modify details for that parameter.

Click the Add button to add a new parameter, provide a name for the new parameter, and edit the parameter values in the Datatype list.

Click the Delete button to drop a selected parameter.

Use the arrow buttons to change the order location of a selected parameter.

For details on using this tab, see " Adding a Comment to an object " on page 459.

Lets you modify the SQL code for procedures on the current datasource

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

S TOGROUPS E DITOR (IBM DB2 Z/OS)

The Stogroups Editor lets you view and modify volumes, manage function privileges, and view

DDL for a stogroup.

489 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a stogroup

1 Open an editor on the stogroup. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Volume Devices

Privileges

DDL View

Settings and tasks

Shows details on volumes associated with the stogroup. Optionally you can:

Click Add to open a dialog that lets you add volumes.

Select a volume and click Remove to delete the volume.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

S YNONYMS E DITOR (IBM DB2 Z/OS)

The Synonyms Editor lets you view base object information and manage database object dependencies for a synonym.

To edit a synonym

1 Open an editor on the synonym. For details, see

Opening an Object Editor .

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Dependencies

DDL View

Settings and tasks

Lets you view the owning Schema , the Name of the synonym, and the synonym’s

Referenced Object Owner , Referenced Object Type , and the Referenced Object

Name .

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

T ABLES E DITOR (IBM DB2 Z/OS)

The Tables Editor lets you: manage columns, basic properties, partitions, indexes, and constraints for a table.

NOTE:

Before editing tables, refer to the material in Altering Tables for IBM DB2 z/OS .

RAPID SQL 8.6/XE5 USER GUIDE 490

MODIFYING OBJECTS USING EDITORS

To edit a table

1 Open an editor on the table. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Partitions

Indexes

Constraints

Comment

Settings and tasks

Displays the currently defined columns in the table. For each column, the Property/Value list displays the Name and Type for the column. In addition, depending on the Type selected, the list also displays Size , Scale , Identity Column , Allow Nulls , Default Value ,

Comment , and For Data property values, as appropriate.

The Statistics group displays a Number of Distinct Values in the Column value.

Optionally, you can:

Select a column, and in the Property / Value list modify property values for that column.

Click Add Column , provide a name for the new column, and set property values for the column.

Select a column and click Delete to remove the column from the table.

Lets you work with settings in the following categories:

Table Lets you view EditProcedure , Table Type , Table Status , Check Flag ,

DBID , and OBID properties. Lets you set Volatile , Audit , RestrictDrop ,

Label , and ValidProc properties.

Tablespace

Placement

Lets you select a Tablespace .

Log

Options

Lets you select a Data Capture option of DATA CAPTURE NONE or DATA

CAPTURE CHANGES.

Statistics Lets you view the following statistics: Last Runstats , Total number of rows , Average Row Length , Number of Pages , Percent Compressed

Rows , Max Record Length , and DASD storage .

Displays existing partition columns and data partitions. Optionally you can add, edit, or delete partition columns and data partitions.

Displays the list of indexes for the table. Optionally, take one of the following actions:

Click Add to open a dialog that lets you add a new index to the table.

Select an index and click Edit to open a dialog that lets you edit index properties.

Select an index and click Drop to open a dialog that lets you remove the index from the table.

Displays constraints in a tree structure. The tree contains folders which contain all constraints associated with the target table. The objects are organized in folders based on the type of constraint.

Optionally take one of the following actions:

Select a constraint type folder and click Add to open a dialog that lets you add a constraint of that type.

Select a constraint and click Edit to open a dialog that lets you modify the constraint details.

Select a constraint and click Drop to remove the constraint.

For details on using this tab, see " Adding a Comment to an object " on page 459.

491 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Dependencies

Permissions

DDL View

Settings and tasks

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

A LTERING T ABLES FOR IBM DB2 Z /OS

The ALTER TABLE command of Transact-SQL is limited to adding NULL columns to the end of a table and to adding or dropping constraints. Unfortunately, this scenario does not address many requirements of administrators and developers who need to add, delete or modify columns more broadly:

• Add columns anywhere in a table, not just the end

• Add columns that do not permit a NULL value.

• Change the NULL/NOT NULL status of table columns

• Change column datatypes to other compatible types

• Change the length of datatypes

• Delete a column

Due to the limitations of the ALTER TABLE command, the only way to make broader modifications is to write SQL scripts that step through all desired changes. To perform an enhanced table alter, Rapid SQL constructs an SQL script that completes the following steps:

1 Renames the existing table so that the original and its data remain intact

2 Builds a CREATE TABLE statement with the new table definition, including declared defaults, primary key and check constraints

3 Builds an INSERT statement to copy data from the original, renamed table to the new one

4 Builds foreign keys on the new table

5 Reapplies any privileges granted on the table

6 Rebuilds all dependencies on the new table, including indexes, triggers, procedures, packages, functions and views. When rebuilding procedures, functions, packages and views,

Rapid SQL also rebuilds any permissions on them

T ABLESPACES E DITOR (IBM DB2 Z/OS)

The Tablespaces Editor lets you work with the basic properties and partitions for a tablespace as well as view space details, status, and objects stored on the tablespace.

RAPID SQL 8.6/XE5 USER GUIDE 492

MODIFYING OBJECTS USING EDITORS

To edit a tablespace

1 Open an editor on the tablespace. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Partitions

Status

Space

Objects

Permissions

DDL

Settings and tasks

Lets you work with properties in the following categories:

Bufferpool Buffer Pool

Partitions and size

Number of partitions , Partition size (DSSIZE), Segment size, and Max rows per page

Other parameters

GBPCACHE , Compress , Track modified pages , Encoding scheme ,

Log , Define , Member Cluster , Close rule , Lock Size , and Maximum locks

For more information on these properties, see " Tablespaces (DB2 z/OS) - Properties " on page 305.

Displays a list of partitions for the tablespace. Details for each partition include the storage group, VCAT, primary and secondary space allocations, the free space portion of each page and free page frequency, the group buffer cache scheme, and whether modifications are tracked.

Optionally, you can:

Select a partition and click Edit to open a dialog that lets you modify properties for that partition.

Select a partition and click Clone to open a dialog that lets you apply the attributes of the selected partition to another partition.

Lets you display CLAIMERS, LOCKS, LPL, USE, or WEPR status details

Lets you view space usage and allocation details for the tablespace.

Displays the objects stored on the tablespace. Objects are organized in a tree structure with folders containing the objects.

Optionally, you can:

Select an object and click Edit to open an object editor on that object.

Select an object and click Drop to initiate dropping that object.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

T RIGGERS E DITOR (IBM DB2 Z/OS)

The Triggers Editor lets you modify the CREATE TRIGGER statement and manage properties for a trigger.

493 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a trigger

1 Open an editor on the trigger. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Comment

Dependencies

Definition

Settings and tasks

Lets you view the Trigger Timing , Trigger Events , Trigger Type , Object Status ,

Definer , and Function Path properties.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Object Dependencies " on page 458.

Lets you modify the CREATE TRIGGER body for a trigger. To modify a trigger, Rapid SQL must drop then create the trigger.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

U NIQUE K EYS E DITOR (IBM DB2 Z/OS)

The Unique Keys Editor lets you manage columns, basic properties, and partitions for a unique key, as well as view storage details.

To edit a unique key

1 Open an editor on the unique key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Column

Properties

Settings and tasks

Lets you manage columns that make up the primary key. On opening, this tab shows the existing columns. For each column, the listing shows the datatype (and if applicable the precision in brackets) and whether the table definition permits nulls in the target table column.

Optionally you can:

Change the Sort order of a column.

Click the New button and select a column name from the dropdown, to add a column to the primary key.

Select a column and click the Drop button to delete the column from the primary key.

Select a column and use the arrow buttons to reorder the columns in the primary key.

Lets you set the Buffer Pool , Piece Size , Close , and Copy properties.

RAPID SQL 8.6/XE5 USER GUIDE 494

MODIFYING OBJECTS USING EDITORS

Tab

Storage

Partition

Space

Comment

DDL View

Settings and tasks

Lets you view the Storage Group and VCAT Catalog properties. Lets you set the

Primary Space Allocation , Secondary Space Allocation , Erase , Free Page , Percent

Free , and GBP Cache properties.

Lets you work with partitions for the index.

Lets you view values in the following property groups:

Attributes Make Unique , System Required , Total Keys , Page Fetch Pairs , and

Distinct Keys

Statistics Index Level , Cluster Ratio

Pages , and Density

, Cluster Factor , Leaf Pages , Sequential

Cards First Key and Full Keys

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

U SER D ATATYPES E DITOR (IBM DB2 Z/OS)

The User Datatypes Editor lets you manage basic properties of a user datatype.

To edit a user datatype

1 Open an editor on the user datatype. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Comment

Permissions

DDL View

Settings and tasks

Lets you work with properties in the following categories:

Base Datatype

Character Options

Lets you set Type

Lets you set the

and Size

For Data settings.

and CCSID properties.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

U SERS E DITOR (IBM DB2 Z/OS)

The Users Editor lets you manage permissions for a user and the objects owned by that user.

495 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a user

1 Open an editor on the user. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Objects

Settings and tasks

Displays the user Name .

Lets you manage database objects associated with the user. Objects are organized in a tree structure with folders containing the objects. Optionally, take one of the following actions:

Select an object and click Edit to open an object editor on the selected object.

Object Permissions and

System Permissions

DDL View

Select an object and click Drop to initiate dropping the selected object.

For details on using these tabs, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

V IEWS E DITOR (IBM DB2 Z/OS)

The Views Editor lets you view columns for a view and work with the dependencies and permissions for the view.

To edit a view

1 Open an editor on the view. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Definition

Comment

Dependencies

Permissions

Settings and tasks

Displays all columns for the view. Details for each column include the Column Name , the

Datatype (and if applicable, with the precision in parentheses), and whether or not Nulls are allowed for that column.

Lets you view and modify the CREATE VIEW DDL that will implement any changes you make in this editor. To modify a view, Rapid SQL must drop then create the view.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 496

MODIFYING OBJECTS USING EDITORS

I NTER B ASE /F IREBIRD O BJECT E DITORS

Rapid SQL includes an Object Editor for all supported InterBase/Firebird objects. To see an

Editor for a specific object, click the corresponding link below:

• Blob Filters Editor (InterBase/Firebird)

• Domains Editor (InterBase/Firebird)

• Encryption Keys editor (InterBase/Firebird)

• Exceptions Editor (InterBase/Firebird)

• External Functions editor (InterBase/Firebird)

• Foreign Keys editor (InterBase/Firebird)

• Generators editor (InterBase/Firebird)

• Indexes editor (InterBase/Firebird)

• Primary Keys editor (InterBase/Firebird)

• Procedures editor (InterBase/Firebird)

• Roles editor (InterBase/Firebird)

• Shadows editor (InterBase/Firebird)

• Tables editor (InterBase/Firebird)

• Triggers editor (InterBase/Firebird)

• Unique Keys editor (InterBase/Firebird)

• Users editor (InterBase/Firebird)

• Views editor (InterBase/Firebird)

For access to object editors for different supported DBMS platforms and an introduction to

editor usage, see " Modifying objects using editors " on page 452.

B LOB F ILTERS E DITOR (I NTER B ASE /F IREBIRD )

The Blob Filters editor lets you modify the input and output types, entry point, and the module name of a blob filter declaration.

497 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a blob filter

1 Open an editor on the blob filter. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Comment

Dependencies

DDL View

Settings and tasks

In addition to displaying the Name property, this tab also lets you modify the Input subtype , Output subtype , Entrypoint , and Module name properties. For details on these properties, see " Blob Filters Editor (InterBase/Firebird) " on page 497.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

D OMAINS E DITOR (I NTER B ASE /F IREBIRD )

The Domains editor lets you modify datatype details and other basic clause/option values of a domain.

To edit a domain

1 Open an editor on the domain. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Comment

Dependencies

DDL View

Settings and tasks

In addition to displaying the Datatype name, this tab lets you work with the Type , Allow

Nulls , Size , Precision, Scale , Array , Character Set, Collation, LOB Segment Length ,

Default , and Check settings. For details on these settings and their availability, see

" Domains (ITB/FBD) - Properties " on page 314.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

E NCRYPTION K EYS EDITOR (I NTER B ASE /F IREBIRD )

The Encryption Keys editor lets you modify the encryption algorithm and key length options for a key, as well as the padding and Cipher Block Chaining versus Electronic Cookbook details.

RAPID SQL 8.6/XE5 USER GUIDE 498

MODIFYING OBJECTS USING EDITORS

To edit an encryption key

1 Open an editor on the encryption key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Comment

Dependencies

Permissions

DDL View

Settings and tasks

In addition to displaying the Name of the encryption key, this tab lets you work with the

Algorithm , Pad random , Init Vector random , and IsDefault settings. This tab also lets you modify the associated Password

. For details on these settings, see " Encryption Keys

(ITB/FBD) - Properties " on page 315.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

E XCEPTIONS E DITOR (I NTER B ASE /F IREBIRD )

The Exceptions Editor lets you modify the text of the message associated with an exception.

To edit an exception

1 Open an editor on the exception. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Comment

Dependencies

DDL View

Settings and tasks

In addition to displaying the Name of the exception, this tab lets you work with the Text

setting. For details on these settings, see " Exceptions (ITB/FBD) - Properties " on page 316.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

499 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

E XTERNAL F UNCTIONS EDITOR (I NTER B ASE /F IREBIRD )

The External Functions editor lets you modify basic properties, input parameters, and return datatype of an external function.

To edit an external function

1 Open an editor on the external function. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Parameters

Return Type

Dependencies

Comment

DDL View

Settings and tasks

In addition to displaying the Name of the external function, this tab lets you work with the EntryPoint and Module Name

settings. For details on these settings, see " External

Functions (ITB/FBD) - Properties " on page 317.

Displays the input parameters to the external function. Optionally, you can:

Use the New button to add a new parameter and type a name for the parameter in the space provided. With the parameter selected, in the Attributes area select a

Type , and if appropriate, provide or select Precision , Scale , and Size options.

Modify a parameter by selecting it, and in the Attributes area editing the Type ,

Precision , Scale , and Size options.

Use the Delete button to drop a selected parameter and use the arrow keys to reorder the parameter list.

Use the arrow keys to change the list ordering of a selected parameter.

Displays datatype details of the value returned by the external function.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

F OREIGN K EYS EDITOR (I NTER B ASE /F IREBIRD )

The Foreign Keys Editor lets you manage column mapping for a foreign key as well as modify the update and delete rule actions.

RAPID SQL 8.6/XE5 USER GUIDE 500

MODIFYING OBJECTS USING EDITORS

To edit a foreign key

1 Open an editor on the foreign key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Column Mapping

Properties

DDL View

Settings and tasks

The existing column mapping for the foreign key is represented by selected columns in the Main Table and Referenced Table lists. Additional candidates in the Referenced

Table list are indicated by enabled column check boxes.

If necessary, use the Table dropdown in the Referenced Table group to choose a new table for this foreign key. Select or deselect columns in the Main Table list and

Referenced Table list to form the referential constraint between the two tables.

Lets you modify the Delete rule and Update Rule actions. For details on these

properties, see " Foreign keys (ITB/FBD) - Properties " on page 318.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

G ENERATORS EDITOR (I NTER B ASE /F IREBIRD )

The Generators Editor lets you view the name and work with the object dependencies for a generator.

To edit a generator

1 Open an editor on the generator. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Dependencies

DDL View

Settings and tasks

Lets you view the Name of the generator and modify the Current Value . For

details on these properties, see " Generators (ITB/FBD) - Properties " on page 319.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

501 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

I NDEXES EDITOR (I NTER B ASE /F IREBIRD )

The Indexes Editor lets you modify the columns and basic properties for an index.

To edit an index

1 Open an editor on the index. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

DDL View

Settings and tasks

Lets you manage columns that make up the index. On opening, this tab shows the existing columns. For each column, the listing displays the datatype and whether the table definition permits nulls.

Optionally you can:

Click the New button and select a column name from the dropdown, to add a column to the index.

Select a column and click the Drop button to delete the column from the index.

Select a column and use the arrow buttons to reorder the columns in the index.

In addition to displaying the Name and associated Table Name for the index, this tab lets you modify the Unique , Enabled , and Descending properties. For details on these

properties, see " Indexes (ITB/FBD) - Properties " on page 320.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P RIMARY K EYS EDITOR (I NTER B ASE /F IREBIRD )

The Primary Keys Editor lets you modify the columns that make up a primary key.

RAPID SQL 8.6/XE5 USER GUIDE 502

MODIFYING OBJECTS USING EDITORS

To edit a primary key

1 Open an editor on the primary key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Settings and tasks

Lets you manage columns that make up the primary key. On opening, this tab shows the existing columns. For each column, the listing displays the datatype and whether the table definition permits nulls.

Note that only columns defined with the Allow Nulls property disabled can be added to a primary key.

Properties

DDL View

Optionally you can:

Click the New button and select a column name from the dropdown, to add a column to the index.

Select a column and click the Drop button to delete the column from the index.

Select a column and use the arrow buttons to reorder the columns in the index.

Displays the Name of the index and the associated Table Name .

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P ROCEDURES EDITOR (I NTER B ASE /F IREBIRD )

The Procedures Editor lets you modify the body and parameters for a procedure.

To edit a procedure

1 Open an editor on the procedure. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Settings and tasks

Displays the Name of the procedure.

503 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Parameters

Settings and tasks

Lets you manage procedure parameters. On opening, this tab shows the existing parameters.

Optionally you can:

Select a parameter from the list, modify the Type , and if appropriate, the Precision , Size , and

Scale of the parameter. You can also set the Parameter Mode to INPUT or OUTPUT.

Click the New button, provide a name for the new parameter and modify its attributes.

Select a parameter and click the Delete button to delete the parameter.

Comment

Select a parameter and use the arrow buttons to reorder the parameter list.

For details on using this tab, see " Adding a Comment to an object " on page 459.

Body Lets you modify the body of the procedure.

Dependencies

For details on using this tab, see " Working with Object Dependencies " on page 458.

Permissions

DDL View

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

R OLES EDITOR (I NTER B ASE /F IREBIRD )

The Roles Editor lets you manage the users assigned to a role and the permissions associated with the role.

To edit a role

1 Open an editor on the role. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Users

Object Permissions

DDL View

Settings and tasks

Displays the Name and Authorization Owner for the role.

Let you manage users for the role. Use the Join Role and Leave Role buttons to move users between the Users In Role and Users Not In Role lists.

For details on using these tabs, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 504

MODIFYING OBJECTS USING EDITORS

S HADOWS EDITOR (I NTER B ASE /F IREBIRD )

The Shadows Editor lets you modify CONDITIONAL, AUTO, and MANUAL argument usage and the file specification for a shadow.

To edit a shadow

1 Open an editor on the shadow. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Storage

DDL View

Settings and tasks

Displays the Shadow Set number and lets you modify the Conditional and Behavior

properties. For details on these properties, see " Shadows (ITB/FBD) - Properties " on page 324.

Use the Delete button to drop a selected file.

Modify an existing file by selecting the file in the primary and secondary files list, and modify the Physical File Name , Starting Page (for secondary files), and Size properties.

Add a new file by clicking New , and providing file specification values in the Property/

Value list.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

T ABLES EDITOR (I NTER B ASE /F IREBIRD )

The Tables Editor lets you manage basic properties, columns, indexes, and constraints for a table.

To edit a table

1 Open an editor on the table. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Settings and tasks

Displays the currently defined columns in the table. Optionally, you can:

Select a column, and in the Property / Value list modify property values for that column.

For details on the properties, see " Tables (ITB/FBD) - Columns " on page 325.

Use the Add Column dropdown to add a new column to the bottom of the column list or to insert a new column above the currently selected column in the column list.

Provide a Name for the column, and then set property values for the column.

Select a column and click Delete to remove the column from the table.

Displays the Name of the table and the date and time Created .

505 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Indexes

Constraints

Comment

Permissions

Dependencies

DDL View

Settings and tasks

Lets you manage indexes for a table:

Click Add to open a dialog that lets you add a new index to the table. For more

information, see " Indexes Wizard (ITB/FBD) " on page 319.

Select an index and click Edit to open a dialog that lets you edit index properties. For more information, see " Indexes editor (InterBase/Firebird) " on page 502.

Select an index and click Drop to open a dialog that lets you remove the index from the table.

Lets you manage primary key, unique key, foreign key, and check constraints for a table.

Constraints are grouped by type, under folders:

Select a constraint type folder and click Add to open a dialog that lets you add a constraint of that type.

Select a constraint and click Edit to open a dialog that lets you modify the constraint details.

Select a constraint and click Drop to remove the constraint.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

T RIGGERS EDITOR (I NTER B ASE /F IREBIRD )

The Triggers Editor lets you modify the basic properties, trigger body, and dependencies for a trigger.

To edit a trigger

1 Open an editor on the trigger. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Body

Comment

DDL View

Dependencies

Settings and tasks

Displays the Parent Type , Parent Name , and Name properties for the trigger, and lets you modify the Trigger Timing , Trigger Events , Position , and Enabled properties. For

details on these properties, see " Triggers (ITB/FBD) - Properties " on page 327.

Lets you work with the trigger body.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see

Viewing the SQL/DDL for an Object .

For details on using this tab, see " Working with Object Dependencies " on page 458.

RAPID SQL 8.6/XE5 USER GUIDE 506

MODIFYING OBJECTS USING EDITORS

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

U NIQUE K EYS EDITOR (I NTER B ASE /F IREBIRD )

The Unique Keys editor lets you modify the columns that make up a unique key.

To edit a unique key

1 Open an editor on the unique key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

DDL View

Settings and tasks

Lets you manage columns that make up the unique key. On opening, this tab shows the existing columns. For each column, the listing includes the datatype and whether the table definition permits nulls.

Note that only columns defined with the Allow Nulls property disabled can be added to a unique key.

Optionally you can:

Click the New button and select a column name from the dropdown, to add a column to the unique key.

Select a column and click the Drop button to delete the column from the unique key.

Select a column and use the arrow buttons to reorder the columns in the unique key.

Displays the Name of the unique key and the associated Table Name .

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

U SERS EDITOR (I NTER B ASE /F IREBIRD )

The Users Editor lets you modify basic properties, assigned roles, and object permissions for a user.

507 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a user

1 Open an editor on the user. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Comment

Roles

Object Permissions

DDL View

Settings and tasks

In addition to displaying the login Name for the user, this tab lets you work with the

Password , Group , Default Role , First Name , Middle Name , Last Name , Active ,

System User Name , Description , GID , and UID properties. For details on these

properties, see " Users (ITB/FBD) - Properties " on page 330.

For details on using this tab, see " Adding a Comment to an object " on page 459.

Lets you assign the valid, non-default roles that a user can specify when logging in to the database. A default login role can be assigned for this user on the Properties tab/panel.

For details, see " Users (ITB/FBD) - Roles " on page 330.

To assign roles to the user, select the associated check box.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

V IEWS EDITOR (I NTER B ASE /F IREBIRD )

The Views editor lets you work with the CREATE VIEW DDL for a view, grant and revoke associated permissions, and work with the view’s dependencies.

To edit a view

1 Open an editor on the view. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Comment

Definition

Dependencies

Permissions

Settings and tasks

Displays the Name of the view and a listing of the associated columns. Details for each column include the column Name , the Datatype , whether or not Nulls are allowed for that column, and an associated Comment .

For details on using this tab, see " Adding a Comment to an object " on page 459.

Lets you view and modify the CREATE VIEW DDL for the view.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 508

MODIFYING OBJECTS USING EDITORS

M ICROSOFT SQL S ERVER O BJECT E DITORS

Rapid SQL includes an Object Editor for all supported Microsoft SQL Server objects. To see an

Editor for a specific object, click the corresponding link below:

Asymmetric Keys Editor (SQL Server)

Certificates Editor (SQL Server)

Check Constraints Editor (SQL Server)

Databases Editor (SQL Server)

Database Triggers Editor (SQL Server)

Defaults Editor (SQL Server)

Extended Procedures Editor (SQL Server)

Foreign Keys Editor (SQL Server)

Full-text Catalogs Editor (SQL Server)

• Full-text Indexes Editor (SQL Server)

Functions Editor (SQL Server)

Indexes Editor (SQL Server)

Logins Editor (SQL Server)

Partition Functions Editor (SQL Server)

• Partition Schemes Editor (SQL Server)

Primary Keys Editor (SQL Server)

Procedures Editor (SQL Server)

Rules Editor (SQL Server)

Schemas Editor (SQL Server)

Sequences Editor (SQL Server)

Symmetric Key Editor (SQL Server)

Synonyms Editor (SQL Server)

Tables Editor (SQL Server)

Triggers Editor (SQL Server)

Unique Keys Editor (SQL Server)

Users Editor (SQL Server)

User Datatypes Editor (SQL Server)

509 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

User Messages Editor (SQL Server)

Views Editor (SQL Server)

For access to object editors for different supported DBMS platforms and an introduction to

editor usage, see " Modifying objects using editors " on page 452.

A SYMMETRIC K EYS E DITOR (SQL S ERVER )

The Asymmetric Keys Editor lets you view and modify asymmetric key properties.

To edit an asymmetric key

1 Open an editor on the asymmetric key. For details, see Opening an Object Editor .

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

DDL View

Settings and tasks

This tab lets you view all properties assigned when the asymmetric key was created. For

more information, see " Asymmetric Keys (SQL Server) - Properties " on page 333.

In addition, this tab lets you modify the following properties:

Authorization Owner - the AUTHORIZATION argument.

Change Encryption Mechanism - activates the Encryption Type control, letting you change the encryption method used for this certificate.

Encryption Type - lets you select among encryption using the MASTER KEY, a

USER_PASSWORD, or NONE.

Encryption Password and Decryption Password - available if you select an Encryption

Type of USER_PASSWORD, they lets you provide the specific encryption/decryption passwords.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

C ERTIFICATES E DITOR (SQL S ERVER )

The Certificates Editor lets you view and modify check certificate properties.

RAPID SQL 8.6/XE5 USER GUIDE 510

MODIFYING OBJECTS USING EDITORS

To edit a certificate

1 Open an editor on the certificate. For details, see Opening an Object Editor .

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

DDL View

Settings and tasks

This tab lets you view all properties assigned when the certificate was created. For more

information, see " Certificates (SQL Server) - Properties " on page 334.

In addition, this tab lets you modify the following properties:

Authorization Owner - the AUTHORIZATION argument.

Active for Begin Dialog - the ON/OFF values for a ACTIVE FOR BEGIN_DIALOG = option.

Change Encryption Mechanism - activates the Encryption Type control, letting you change the encryption method used for this certificate.

Encryption Type - lets you select among encryption using the MASTER KEY, a

USER_PASSWORD, or NONE.

Encryption Password - available if you select an Encryption Type of USER_PASSWORD, it lets you provide the specific encryption password.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

C HECK C ONSTRAINTS E DITOR (SQL S ERVER )

The Check Constraints Editor lets you view and modify check constraints properties and edit the check constraint expression.

To edit a check constraint

1 Open an editor on the check constraint. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Definition

DDL View

Settings and tasks

Use the Enabled check box to enable or disable the check constraint. Use the Not For

Replication check box to enable or disable the check constraint for replication.

You can also edit the condition in the Check Condition box. The Table Column button opens a dialog that lets you select and paste column names into the check condition expression.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

511 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

D ATABASES E DITOR (SQL S ERVER )

The Databases Editor lets you manage basic properties, log and data files for a database.

To edit a database

1 Open an editor on the database. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Options

Placement

Transaction Log

Space

DDL View

Settings and tasks

Lets you work with options in the following categories:

Creation

Properties

Lets you choose values for the Compatible Level and Owner settings.

NOTE: The Compatible level option sets certain database behaviors to be compatible with the specified earlier version of Microsoft® SQL Server. The compatibility level affects the behaviors in the specified database, not the entire server.To set database options for all future databases, set the database options on the model database.

NOTE: When changing the database owner (dbo) select the check box to transfer the existing aliases of users who could act as the old dbo (including their permissions) to the new dbo.

Properties Lets you set the following properties: ANSI null default , ANSI nulls , ANSI padding , ANSI warnings , arithabort , auto create statistics , auto update statistics , auto close , auto shrink , concat null yields nul , cursor close on commit , db chaining , dbo use only , default to local cursor , merge publish , numeric roundabout , offline , published , quoted identifier , read only , recursive triggers , select into/bulkcopy/pllsort , single user , subscribed , torn page detection , and trunc log on chkpt .

Displays the currently defined data files for the database. Optionally, you can:

Select a file from the list on the left and in the Device File Properties group, modify the Size , File Growth Rate , Max Size , and Unlimited Max

Size settings.

Click the New button, provide a Device File Name for the new file, and use the other settings in the Device File Properties group to provide additional details for the file.

Select a file from the list on the left and click Delete to remove the file.

Displays the currently defined transaction logs for the database. Optionally, you can:

Select a transaction log from the list on the left and in the Log Device

Properties group, modify the Size , File Growth Rate , Max Size , and

Unlimited Max Size settings.

Click the New button, provide a Device File Name for the new transaction log, and use the other settings in the Log Device Properties group to provide additional details for the transaction log.

Select a transaction log from the list on the left and click Delete to remove the transaction log.

Lets you view pie charts showing the data space usage and the transaction log (if available) space usage for the database.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

RAPID SQL 8.6/XE5 USER GUIDE 512

MODIFYING OBJECTS USING EDITORS

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

D ATABASE T RIGGERS E DITOR (SQL S ERVER )

The Database Triggers Editor lets you enable or disable a database trigger and modify the body of the generated CREATE TRIGGER statement.

To edit a database trigger:

1 Open an editor on the database trigger. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Settings and tasks

Select the Enabled check box to enable the database trigger or deselect it to disable the trigger.

In addition to the name and creation date details, this tab also lets you view the Trigger Timing and Encrypted property settings you chose when creating the trigger. For details on these

properties, see " Database Triggers (SQL Server) - Properties " on page 337.

Lets you modify the CREATE TRIGGER statement.

Definition

Dependencies Lists referring and referenced objects potentially impacted by the change. For details, see

" Working with Object Dependencies " on page 458.

Trigger Events Lets you view the DDL events you selected to fire this trigger.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

D EFAULTS E DITOR (SQL S ERVER )

The Defaults Editor lets you change the owner and value of a default.

To edit a default

1 Open an editor on the default. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Dependencies

DDL View

Settings and tasks

Lets you modify the Value of the Default and the owning Schema .

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

513 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

E XTENDED P ROCEDURES E DITOR (SQL S ERVER )

The Procedures Editor lets you modify the library name for an extended procedure. It also lets you work with dependencies and permissions.

NOTE: Extended Procedures are only available on the master database.

To edit an extended procedure

1 Open an editor on the extended procedure. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Dependencies

Permissions

DDL View

Settings and tasks

Lets you provide a dynamic-link library (DLL) Library Name for the extended procedure.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

F OREIGN K EYS E DITOR (SQL S ERVER )

The Foreign Keys Editor lets you manage the columns and basic properties of a foreign key.

To edit a foreign key

1 Open an editor on the foreign key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Column Mapping

Settings and tasks

The existing column mapping for the foreign key is represented by selected columns in the Main Table and Referenced Table lists. Additional candidates in the Referenced

Table list are indicated by enabled column check boxes.

If necessary, use the Table dropdown in the Referenced Table group to choose a new table for this foreign key. Select or deselect columns in the Main Table list and

Referenced Table list to form the referential constraint between the two tables.

RAPID SQL 8.6/XE5 USER GUIDE 514

MODIFYING OBJECTS USING EDITORS

Tab

Properties

Settings and tasks

Lets you specify Enabled and Not For Replication properties. This tab also lets you select a Delete rule and an Update rule (NONE, SET NULL, SET DEFAULT, CASCADE).

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

DDL View

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

F ULL TEXT C ATALOGS E DITOR (SQL S ERVER )

The Full-text Catalogs Editor lets you work with the basic definition and dependencies of a fulltext catalog.

To edit a full-text catalog:

1 Open an editor on the full-text catalog. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Dependencies

DDL View

Settings and tasks

Lets you view the Parent Type , Parent Schema , Parent Name , Key Index , and Full-text

Catalog Name properties for the partition scheme. It also lets you modify the Filegroup

Name (SQL Server 2008 ^), Change Tracking , and Stoplist (SQL Server 2008 ^) properties. For more information on these properties, see

Full-text Catalogs (SQL Server)

- Properties

.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

F ULL TEXT I NDEXES E DITOR (SQL S ERVER )

The Full-text Indexes Editor lets you work with the basic definition and dependencies of a fulltext index.

515 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a full-text index:

1 Open an editor on the full-text index. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Dependencies

DDL View

Settings and tasks

Lets you view the Name , property and modify the Accent Sensitive , Default , and

Authorization Owner

properties. For more information on these properties, see " Fulltext Indexes (SQL Server) - Properties " on page 342.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

F UNCTIONS E DITOR (SQL S ERVER )

The Functions Editor lets you view and modify function definitions and dependencies.

To edit a function

1 Open an editor on the function. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Definition

Dependencies

Permissions

Settings and tasks

Lets you modify the owning Schema of the function.

Lets you view and modify the dynamic-link library (DLL) or view the data definition language (DDL).

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

I NDEXES E DITOR (SQL S ERVER )

The Indexes Editor lets you manage columns and basic properties of an index and view index statistics.

RAPID SQL 8.6/XE5 USER GUIDE 516

MODIFYING OBJECTS USING EDITORS

To edit an index

1 Open an editor on the index. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Statistics

DDL View

Settings and tasks

Lets you manage columns that make up the index. On opening, this tab shows the existing columns. For each column, the datatype (and if applicable the precision in brackets) and whether the table definition permits nulls in the target table column.

Optionally you can:

Change the Sort order of a column.

Click the New button and select a column name from the dropdown, to add a column to the index.

Select a column and click the Drop button to delete the column from the index.

Select a column and use the arrow buttons to reorder the columns in the index.

Lets you work with settings in the following categories:

Creation In addition to displaying identifying information, you can modify the Build

Online and Max degree of parallelism properties. For details on these

properties, see " Indexes Wizard (SQL Server) " on page 343.

Attributes Lets you set Index Type , Clustered , Ignore Duplicate Key (for Index

Type of UNIQUE), Statistics Recompute , Allow Row Locks , and Allow

Page Locks

properties. For details on these properties, see " Indexes

Wizard (SQL Server) " on page 343.

NOTE: You cannot reorganize an index (primary key, or unique key) that has an Allow Page Locks property set to FALSE. For information on

reorganizing indexes, see " Reorganize (SQL Server indexes, primary keys, and unique keys) " on page 677.

Storage Lets you set Partitioned , Partition Scheme , Parttition Column, Fill

Factor , File Group , Pad Index , and Sort in Tempdb settings.

Lets you view statistics in the following categories:

Page

Statistics

Data Pages , Reserved Pages , Used Pages , and Total Pages Modified .

Row

Statistics

Maximum Row Size

Row , and

, Minimum Row Size

Total Rows Modified .

, Max Size of Non-Leaf Index

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

L OGINS E DITOR (SQL S ERVER )

The Logins Editor lets you manage basic properties for a login, associated users and roles, and accounting.

517 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a login:

1 Open an editor on the login. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Server Roles

Users

DDL

Settings and tasks

Lets you view or modify the following properties set when creating the login: Name , Default

Database , Default Language , Password , Check Policy , Check Expiration , Must Change ,

Certificate , and Asymmetric Key

. For detailed information on these settings, see " Logins Wizard

(SQL Server) " on page 345.

In addition, when editing an existing login, you have access to the following settings:

Currently

Logged In

Displays whether the user is currently logged in.

Enabled Enabled, an ALTER LOGIN... ENABLE is submitted following the CREATE

LOGIN statement issued by the editor. Disabled, an ALTER LOGIN... DISABLE is submitted

Lets you add the login as a member of one or more fixed server roles. For more information, see

" Logins (SQL Server) - Server Roles " on page 347.

Lets you add and remove user accounts for this login to specified databases. For more detailed

information, see " Logins (SQL Server) - Users " on page 347.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P ARTITION F UNCTIONS E DITOR (SQL S ERVER )

The Partition Functions Editor lets you view the basic definition and work with dependencies of a partition function.

To edit a partition function:

1 Open an editor on the partition function. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Dependencies

DDL View

Settings and tasks

Lets you view the Name , Input Parameter Type , Range , and Function Values properties for the partition function. For more information on these properties, see

" Partition Functions (SQL Server) - Properties " on page 348.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

RAPID SQL 8.6/XE5 USER GUIDE 518

MODIFYING OBJECTS USING EDITORS

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P ARTITION S CHEMES E DITOR (SQL S ERVER )

The Partition Schemes Editor lets you view the basic definition and work with dependencies of a partition scheme.

To edit a partition scheme:

1 Open an editor on the partition scheme. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Dependencies

DDL View

Settings and tasks

Lets you view the Name , Partition Function , and Filegroup Name properties for the

partition scheme. For more information on these properties, see " Partition Schemes

(SQL Server) - Properties " on page 349.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P RIMARY K EYS E DITOR (SQL S ERVER )

The Primary Keys Editor lets you manage the columns and basic properties for a primary key and lets you view page and row statistics.

519 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a primary key

1 Open an editor on the primary key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Statistics

DDL View

Settings and tasks

Lets you manage columns that make up the primary key. On opening, this tab shows the existing columns. For each column, the listing shows the datatype (and if applicable the precision in brackets) and whether the table definition permits nulls in the target table column.

Optionally you can:

Change the Sort order of a column.

Click the New button and select a column name from the dropdown, to add a column to the primary key.

Select a column and click the Drop button to delete the column from the primary key.

Select a column and use the arrow buttons to reorder the columns in the primary key.

Lets you work with settings in the following categories:

Creation

Attributes Clustered - Indicates whether the target primary key is clustered.

Ignore Duplicate Key - Indicates whether the target primary key ignores duplicate key values. If you select his option, the transaction that generated the duplicate key values can continue.

Statistics Recompute - Indicates that index statistics are automatically recomputed as the index is updated. Microsoft does not recommend this.

Storage

In addition to displaying identifying information, you can modify the Build Online and Max degree of parallelism properties. For details on these properties, see

" Primary Keys Wizard (SQL Server) " on page 349.

File Group - Lets you select a file group.

Fill Factor - Lets you specify the fill factor that specifies how full each index page can be. If no fill factor is specified, Microsoft SQL Server uses the database's default fill factor.

Pad Index - If you specified a Fill factor of more than 0 percent, and you selected the option to create a unique index, you can specify to use the same percentage you specified in Fill Factor as the space to leave open on each interior node. By default,

Microsoft SQL Server sets a 2 row index size.

Lets you view statistics in the following categories:

Page

Statistics

Row

Statistics

Data Pages , Reserved Pages

Maximum Row Size ,

, Used Pages

Minimum Row Size

Total Rows Modified .

,

, and Total Pages Modified .

Max Size of Non-Leaf Index Row

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

, and

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 520

MODIFYING OBJECTS USING EDITORS

P ROCEDURES E DITOR (SQL S ERVER )

The Procedures Editor lets you manage properties, the definition, dependencies, and permissions for a procedure.

To edit a procedure

1 Open an editor on the procedure. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Definition

Dependencies

Permissions

Settings and tasks

Lets you change the owning Schema .

Lets you view the SQL code for the procedure.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

R OLES E DITOR (SQL S ERVER )

The Roles Editor lets you manage the users for a role.

To edit a role

1 Open an editor on the role. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Users

Object Privileges and

System Privileges

DDL View

Settings and tasks

Displays the Name , and either a Role Type of STANDARD and an Authorization Owner or a Role Type of APPLICATION and a Password .

Let you manage users for the role. A user becomes associated with an application role after running the target application.

Use the Join Rule and Leave Role buttons to move users between the Users In Role and

Users Not In Role lists.

For details on using these tabs, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

521 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

R ULES E DITOR (SQL S ERVER )

The Rules Editor lets you view or modify basic properties of a rule.

To edit a rule

1 Open an editor on the rule. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Definition

Dependencies

Settings and tasks

Lets you specify whether the rule is Enabled and view the Fire On Inser t, Fire On

Update , Fire On Delete , and Encrypted settings.

Lets you view and modify the SQL code that will implement any changes you make using this editor.

For details on using this tab, see " Working with Object Dependencies " on page 458.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

S CHEMAS E DITOR (SQL S ERVER )

The Schemas Editor lets you change the owner of a group and manage the objects contained in the schema.

To edit a user

1 Open an editor on the user. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Permissions

Objects

DDL View

Settings and tasks

Lets you modify the Owner of the schema.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

Displays the specific objects owned by the schema, grouped under object type folders.

Optionally, you can:

Select an object and click Edit to open an object editor on that object.

Select an object and click Drop to initiate dropping the object.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 522

MODIFYING OBJECTS USING EDITORS

S EQUENCES E DITOR (SQL S ERVER )

This editor lets you view creation properties for a sequence as well as modify the scope, starting value and increment value.

To edit a sequence:

1 Open an editor on the sequence. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Dependencies

DDL View

Settings and tasks

Lets you view the Schema , Name , Create Date , Data Type Schema , Base Data Type ,

Data Type Name , and Data Type Precision properties for the synonym.

Lets you modify the Start With , Increment By , Minimum Value , Maximum Value , Cycle ,

Cache , and Cache Size properties.

For more information on these properties, see " Sequences (SQL Server) - Properties " on page 355.

This tab also includes the following, display-only properties:

Current Value - The value most recently returned by the NEXT VALUE FOR function or the last value resulting from an sp_sequence_get_range procedure execution.

Is Exhausted - Indicates that the sequence object has reached the Maximum Value and

Cycle is not set. The NEXT VALUE FOR function will return an error until the sequence is restarted using ALTER SEQUENCE.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

S YMMETRIC K EY E DITOR (SQL S ERVER )

The Symmetric Key Editor lets you view creation details for a key and modify its encryption mechanisms.

To edit a symmetric key:

1 Open an editor on the symmetric key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Settings and tasks

Lets you view the Authorization Owner , Name , Create Date , Update Date , Provider Name ,

Key Algorithm , and Key Length

properties. For more information, see " Symmetric Keys (SQL

Server) - Properties " on page 356.

523 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Encryption

Mechanisms

DDL View

Settings and tasks

Lets you manage the encryption mechanisms for this key. For detailed instructions, see

" Symmetric Keys (SQL Server) - Properties " on page 356.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

S YNONYMS E DITOR (SQL S ERVER )

The Synonyms Editor lets you view the basic definition and work with dependencies of a partition scheme.

To edit a synonym:

1 Open an editor on the synonym. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Dependencies

DDL View

Settings and tasks

Lets you view the Schema , Name , Server , Database , Referenced Object Type ,

Referenced Object Owner , and Referenced Object Name properties for the synonym.

For more information on these properties, see " Synonyms (SQL Server) - Properties " on page 359.

This tab also includes a CreateDate property showing the data and time the synonym was created.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

T ABLES E DITOR (SQL S ERVER )

The Tables Editor lets you manage columns, basic properties, indexes, and constraints for a table and view space usage details.

RAPID SQL 8.6/XE5 USER GUIDE 524

MODIFYING OBJECTS USING EDITORS

To edit a table

1 Open an editor on the table. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Indexes

Settings and tasks

Displays the currently defined columns in the table. Optionally, you can:

Select a column, and in the Property / Value list modify property values for that column.

Click Add Column , provide a name for the new column, and set property values for the column.

Select a column and click Delete to remove the column from the table.

Lets you work with settings in the following categories:

Physical Storage Lets you view the Partitioned , Text Image Filegroup , and FileStream On

(.version 2008^) properties and modify the Filegroup property. For details on

these properties, see " Tables (SQL Server) - Properties " on page 360.

Full-Text Index Lets you view whether Full-Text Indexing is installed and active.

The full-text index feature provides support for sophisticated word searches in character string data. A full-text index stores information about significant words and their location within a given column. This information is used to quickly complete full-text queries that search for rows with particular words or combinations of words.

This feature is available for Microsoft SQL Server 8.0 or later.

Text In Row

Filetable (Version

2012^)

Lets you enable Text In Row Data and specify a limit.

Lets you view the As Filetable , Filetable Collate Filename , FiletablePK

Constraint Name , F iletable StreamID Unique Constraint Name , and

Filetable Fullpath Unique Constraint Name properties and lets you modify the Filetable Directory Name property. For details on these properties, see

" Tables (SQL Server) - Properties " on page 360.

This group also lets you modify an Enabled property. That control specifies whether system-defined constraints are enabled.

Displays any indexes currently defined for the table. Optionally, you can:

Click Add to open an Index editor, letting you create a new index for this

table. For more information, see " Indexes Wizard (SQL Server) " on page 343.

Select an index and click Edit to open an wizard that lets you modify that

index. For more information, see " Indexes Editor (SQL Server) " on page 516.

Select an index and click Drop to open a dialog that lets you confirm that you want to drop the index. When dropping an index with the Clustered option enabled, the confirmation dialog includes an Online option that lets you specify an online drop (ONLINE-ON clause).

525 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Constraints

Settings and tasks

Lets you manage constraints for the table. Constraints are grouped by type, under folders.

Optionally take one of the following actions:

Select a constraint type folder and click Add to open a dialog that lets you add a constraint of that type.

Select a constraint and click Edit to open a dialog that lets you modify the constraint details.

Space

Select a constraint and click Drop to open a dialog that lets you confirm that you want to drop the index. When dropping a clustered unique key or clustered primary key, the confirmation dialog includes an Online option that lets you specify an online drop (ONLINE-ON clause).

Lets you view pie charts showing the space usage for the table. Optionally you can double-click a slice in the pie chart for detailed statistics.

Dependencies

For details on using this tab, see " Working with Object Dependencies " on page 458.

Permissions

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

DDL View

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

T RIGGERS E DITOR (SQL S ERVER )

The Triggers Editor lets you enable and disable a trigger, view and modify the CREATE TRIGGER statement that will implement changes, and manage dependencies.

To edit a trigger

1 Open an editor on the trigger. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Definition

Dependencies

Settings and tasks

Lets you set the Enabled property. It also lets you view the Trigger Timing (AFTER,

INSTEAD OF), Fire On Insert , Fire On Update , Fire On Delete , and Encrypted properties.

Lets you modify the CREATE TRIGGER body for a trigger. To modify a trigger, edit the text of the trigger body in the Trigger Text area. Rapid SQL must drop then create the trigger.

For details on using this tab, see " Working with Object Dependencies " on page 458.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 526

MODIFYING OBJECTS USING EDITORS

U NIQUE K EYS E DITOR (SQL S ERVER )

The Unique Keys Editor lets you manage columns and properties for a unique key and view associated statistics.

To edit a unique key

1 Open an editor on the unique key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Settings and tasks

Lets you manage columns that make up the unique key. On opening, this tab shows the existing columns. For each column, the listing displays the datatype (and if applicable the precision in brackets) and whether the table definition permits nulls in the target table column.

Optionally you can:

Change the Sort order of a column.

Click the New button and select a column name from the dropdown, to add a column to the index.

Select a column and click the Drop button to delete the column from the index.

Select a column and use the arrow buttons to reorder the columns in the index.

Lets you work with settings in the following categories:

Creation In addition to displaying identifying information, you can modify the Build

Online and Max degree of parallelism properties. For details on these

properties, see " Unique Keys Wizard (SQL Server) " on page 364.

Attributes Clustered - Indicates whether the target index is clustered.

Ignore Duplicate Key - Indicates whether the target primary key ignores duplicate key values. If you select his option, the transaction that generated the duplicate key values can continue.

Statistics Recompute - Indicates that index statistics are automatically recomputed as the index is updated. Microsoft does not recommend this.

Storage File Group - Lets you specify the filegroup on which to place the index.

This is for Microsoft SQL Server 7.0 or later.

Fill Factor - Lets you specify a percentage that indicates how full Microsoft

SQL Server should make the leaf level of each index page during index creation. When an index page fills up, Microsoft SQL Server must take time to split the index page to make room for new rows, which is quite expensive. For update-intensive tables, a properly chosen Fill factor value yields better update performance than an improper Fill factor value.

Pad Index - If you specified a Fill factor of more than 0 percent, and you selected the option to create a unique index, you can specify to use the same percentage you specified in Fill Factor as the space to leave open on each interior node. By default, Microsoft SQL Server sets a 2 row index size.

527 RAPID SQL 8.6/XE5 USER GUIDE

Tab

Statistics

Settings and tasks

Displays statistics in the following categories:

Page

Statistics

Data Pages , Pages Reserved , Used Pages , and Total Pages Modified .

Row

Statistics

Maximum Row Size

Row , and

, Minimum Row Size ,

Total Rows Modified Since Last

Max Size of Non-Leaf Index

.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

DDL View

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

U SERS E DITOR (SQL S ERVER )

The Users Editor lets you manage properties, assign roles, and manage object bindings for a user.

To edit a user

1 Open an editor on the user. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Roles

Objects

Settings and tasks

Lets you view the Without Login , Login Name , Name , User Type , Certificate ,

Asymmetric Key , and Default Schema properties.

Lets you assign roles to a user by selecting the check boxes associated with the roles to be assigned.

Lets you manage database objects (Defaults, Indexes, Procedures, Rules, Tables,

Triggers, User Datatypes, Views) associated with the user. Objects are organized in a tree structure with folders containing the objects. Optionally, take one of the following actions:

Select an object and click Edit to open an object editor on the selected object. For

information on each editor, use the links in " Microsoft SQL Server Object Editors " on page 509.

Object Permissions and

System Permissions

DDL View

Select an object and click Drop to initiate dropping the selected object.

For details on using these tabs, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 528

MODIFYING OBJECTS USING EDITORS

U SER D ATATYPES E DITOR (SQL S ERVER )

The User Datatypes Editor lets you modify the base datatype, rule and default bindings, and referencing or referenced objects for a user datatype.

To edit a user datatype

1 Open an editor on the user datatype. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Usage

DDL View

Settings and tasks

In addition to letting you change the Schema , this tab lets you work with settings in the following categories:

Base Datatype Lets you modify the Type and Allow Nulls properties. Depending on the Type selected, Precision , Scale , or Size properties are available as appropriate.

Bindings Default Binding - Lets you select a default. For information on

creating defaults, see " Defaults Wizard (SQL Server) " on page 337.

Rule Binding - Lets you select a rule. For information on creating rules,

see " Rules Wizard (SQL Server) " on page 352.

Lets you manage database objects referencing or referenced by a user datatype. Objects are grouped within object type folders. Optionally, you can:

Select an object and click Edit to open an object editor on the selected object.

Select an object and click Drop to initiate dropping the selected object.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

U SER M ESSAGES E DITOR (SQL S ERVER )

NOTE: User Messages are only on the master database.

The User Messages Editor lets you view or modify basic properties of a user message. It also lets you add, edit, or delete individual language versions of the message.

529 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a user message

1 Open an editor on the user message. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Information

DDL View

Settings and tasks

Lets you work with the following properties:

Message Number Displays the message number chosen when the user message was created.

Severity Lets you modify the SQL Server error severity level (001-025).

Write to NT Event Log Lets you specify that the message is always written to the

Windows NT Event Log.

Displays the currently-defined language versions for this message number. Optionally you can:

Create a new language version for this message number. Click the Add new text for the user message button, and in the dialog box that opens, select a Language and provide the Message Text .

Select a language version of the message and click the Modify user message text button. This opens a dialog that lets you modify the Language or Message Text .

Select a language version of the message and click the Remove user message text button.

NOTE: You cannot create two versions of a message for the same language.

NOTE: FOr a given message number there should always be a least one, us_english version of the message.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

V IEWS E DITOR (SQL S ERVER )

The Views Editor lets you view columns and change the schema of a view.

To edit a view

1 Open an editor on the view. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Settings and tasks

Displays a list of the columns that make up the view. Details include the column Name , its Datatype , and whether the definition allows Null s.

This tab also lets you change the Schema owning the view.

RAPID SQL 8.6/XE5 USER GUIDE 530

MODIFYING OBJECTS USING EDITORS

Tab

Definition

Dependencies

Permissions

Settings and tasks

Lets you view the SQL for the View.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

M Y SQL EDITORS

Rapid SQL includes an Object Editor for all supported MySQL objects. To see an Editor for a specific object, click the corresponding link below:

Database editor (MySQL)

Foreign Keys editor (MySQL)

Functions editor (MySQL)

• Indexes, Primary Keys, and Unique Keys editors (MySQL)

• Tables editor (MySQL)

• Users editor (MySQL)

For access to object editors for different supported DBMS platforms and an introduction to

editor usage, see " Modifying objects using editors " on page 452.

D ATABASE EDITOR (M Y SQL)

The Databases Editor lets you manage basic properties and privileges for a database.

To edit a database:

1 Open an editor on the database. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Privileges

DDL View

Settings and tasks

Lets you modify the Default Character Set and Collation properties. For details on

these properties, see Databases - Properties .

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

531 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

F OREIGN K EYS EDITOR (M Y SQL)

The Foreign Keys Editor lets you manage column mapping, delete, and update actions for a foreign key.

To edit a foreign key:

1 Open an editor on the foreign key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Column Mapping

Properties

DDL View

Settings and tasks

The existing column mapping for the foreign key is represented by selected columns in the Main Table and Referenced Table lists. Additional candidates in the Referenced

Table list are indicated by enabled column check boxes.

If necessary, use the Table dropdown in the Referenced Table group to choose a new table for this foreign key. Select or deselect columns in the Main Table list and

Referenced Table list to form the referential constraint between the two tables.

Lets you modify the On Delete and On Update (NO ACTION, RESTRICT, CASCADE,

SET NULL) reference options.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

F UNCTIONS EDITOR (M Y SQL)

The MySQL Functions editor lets you view properties of a basic function declaration.

To edit a function:

1 Open an editor on the function. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

DDL View

Settings and tasks

Lets you view the Function Name , Return Type , and Shared Object Library properties.

For details on these properties, see " Functions - Properties " on page 371.

Under Specify Columns in Index, you can change the selection of columns that make up the index, primary key, or unique key.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 532

MODIFYING OBJECTS USING EDITORS

I NDEXES , P RIMARY K EYS , AND U NIQUE K EYS EDITORS (M Y SQL)

These editors lets you manage columns and view properties of an index, primary key, or unique key.

To edit an index:

1 Open an editor on the index. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

DDL View

Settings and tasks

Lets you view the Table Name , Index Name , Constraint Type , and Index Type

properties. For details on these properties, see " Indexes, Primary Keys, or Unique Keys -

Properties " on page 372.

Under Specify Columns in Index, you can change the selection of columns that make up the index, primary key, or unique key.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

T ABLES EDITOR (M Y SQL)

The MySQL Tables editor lets you modify basic properties and view usage statistics for a MySQL table.

To edit a table:

1 Open an editor on the index. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Indexes

Settings and tasks

Displays the currently defined columns in the table. Optionally, you can:

Select a column, and in the Property / Value list modify property values for that column.

Click Add Column , provide a name for the new column, and set property values for the column.

Select a column and click Delete to remove the column from the table.

Lets you work with the following settings: Table Name , Storage Type , Row Forma t, Default

Character Set , Default Collation , Auto Increment , Comment , Min Rows , Max Rows , Average

Row Length , Pack Keys , Checksum , and Delay Key Write . For details on these properties, see

" Tables - Properties " on page 373.

Lets you add, delete, or modify table indexes. For details on available options, see " Tables -

Indexes " on page 374.

533 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Foreign Keys

Settings and tasks

For INNODB tables, this tab lets you add, delete, or modify table foreign keys. For details on

available options, see " Tables - Foreign Keys " on page 374.

MERGE tables For MRG_MyISAM tables, this tab lets you work with the collection of identical MyISAM tables that

are to be used as a single table. For more information, see " Tables - MERGE Tables " on page 375.

Privileges

Space

DDL View

For details on using this tab, see " Working with Privileges and Permissions

Length , Data Free , Max Data Length , Rows , and Average Row Length .

" on page 456.

Lets you view graphical and numerical table usage statistics. Values include Data Length , Index

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

U SERS EDITOR (M Y SQL)

The MySQL Functions editor lets you work with basic properties, host details, and privileges for a user.

To edit a user:

1 Open an editor on the user. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

User Information

User Hosts

Object Privileges and

System Privileges

DDL View

Settings and tasks

Lets you view the User Name property and lets you modify the Full Name , Description ,

Email , and Contact Information

properties. For details on these properties, see " Users wizard (MySQL) " on page 375.

Add a new host to the list by clicking the New button. Use the associated dropdown to select a valid host-name value (such as localhost or %), overwriting the text as necessary to provide a specific quoted identifier. Provide a password in the Password and Confirm fields and click Apply .

Remove a selected host from the list by clicking the Delete button.

For details on using these tabs, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see

Viewing the SQL/DDL for an Object .

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 534

MODIFYING OBJECTS USING EDITORS

O RACLE O BJECT E DITORS

Rapid SQL includes an Object Editor for all supported Oracle objects. To see an Editor for a specific object, click the corresponding link below.

NOTE: If an objects has dependent objects, such as tables, triggers, procedures and views, you can view and access their dependent objects in the editor.

Check Constraints Editor (Oracle)

Clusters Editor (Oracle)

Database Links Editor (Oracle)

Directories Editor (Oracle)

Foreign Keys Editor (Oracle)

Functions Editor (Oracle)

Indexes Editor (Oracle)

Job Queue Editor (Oracle)

Jobs Editor (Oracle)

Libraries Editor (Oracle)

Materialized Views Editor (Oracle)

Materialized View Logs Editor (Oracle)

Outlines Editor (Oracle)

Package Bodies Editor (Oracle)

Packages Editor (Oracle)

Primary Keys Editor (Oracle)

Procedures Editor (Oracle)

Programs Editor (Oracle)

Profiles Editor (Oracle)

Redo Log Groups Editor (Oracle)

Roles Editor (Oracle)

Rollback Segments Editor (Oracle)

Schedules Editor (Oracle)

Sequences Editor (Oracle)

Synonyms Editor (Oracle)

535 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tables Editor (Oracle)

Tablespaces Editor (Oracle)

Triggers Editor (Oracle)

Type Bodies Editor (Oracle)

Types Editor (Oracle)

Unique Keys Editor (Oracle)

Users Editor (Oracle)

Views Editor (Oracle)

For access to object editors for different supported DBMS platforms and an introduction to

editor usage, see " Modifying objects using editors " on page 452.

C HECK C ONSTRAINTS E DITOR (O RACLE )

The Check Constraints Editor lets you modify and enable/disable check constraints.

To edit a check constraint

1 Open an editor on the check constraint. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Definition

DDL View

Settings and tasks

Use the Enabled control to enable/disable the check constraint.

You can also edit the condition in the Check Condition box. The Table Columns button acts a time saver in editing the condition. It opens a dialog that lets you select and paste column names into the check condition expression.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

C LUSTERS E DITOR (O RACLE )

The Clusters Editor lets you manage cluster column and table details, view and modify storage and space parameters, and manage performance settings for a cluster.

RAPID SQL 8.6/XE5 USER GUIDE 536

MODIFYING OBJECTS USING EDITORS

To edit a cluster

1 Open an editor on the cluster. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Storage

Performance

Space

Settings and tasks

Use the controls in the General Properties group to specify a hash or index Cluster Type and to specify a Key Size for the cluster.

If you specify a hash cluster type, use the controls in the Hash Specifications group to specify the number of hash keys and to specify use of either the default hash function or a specified expression used as the hash function.

Lets you manage storage for a cluster:

Data Block

Storage

Each transaction that updates a data block requires a transaction entry.

Percent Free - minimum percentage of free space in a block

Percent Used - minimum percentage of used space in a block.

Initial transactions - The initial parameter ensures that a minimum number of concurrent transactions can update a data block, avoiding the overhead of allocating a transaction entry dynamically.

Maximum transactions - The maximum parameter limits concurrency on a data block.

Extents The unit of space allocated to an object whenever the object needs more space.

Initial Extent - The initial space extent (in bytes) allocated to the object.

Next Extent - The next extent (in bytes) that the object will attempt to allocate when more space for the object is required.

Minimum Extents - The appropriate minimum extents value for the object.

Maximum Extents - The appropriate maximum extents value for the object.

Percent Increase - Magnifies how an object grows and, can materially affect available free space in a tablespace. Select a value in the corresponding box.

Optionally, you can modify the Percent Free , Percent Used , or Max Transactions values.

Lets you modify the following performance settings:

Parallel Query

Option group

Lets you specify Degrees and Instances settings for processing queries using many query server processes running against multiple CPUs, which provides substantial performance gains such as reduction of the query completion time.

Cache group The Cache setting keeps the blocks in memory by placing it at the most recently used end. This option is useful for small lookup tables.

Lets you view the following usage and the space distribution details:

Space

Utilization group

Displays the percent of space reserved for future updates.

FreeLists group Displays the allocation of data blocks when concurrent processes are issued against the cluster. Identifying multiple freelists can reduce contention for freelists when concurrent inserts take place and potentially improve the performance of the cluster.

Extents group The unit of space allocated to an object whenever the object needs more space.

537 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Tables

Settings and tasks

Lets you view details for each cluster column. Details for each column include the key column in the cluster, the clustered table name, and the key column in the table.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

DDL

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

D ATABASE L INKS E DITOR (O RACLE )

The Database Links Editor lets you view connection string information for a database link.

To edit a database link

1 Open an editor on the database link. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Definition

DDL

Settings and tasks

Displays connection string information for a database link. Details include the Public setting, the User name and Password associated with the database link, and a Connect

String .

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

D IRECTORIES E DITOR (O RACLE )

The Directories Editor lets you change the path for a directory and modify associated privileges.

To edit a directory object

1 Open an editor on the directory. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Definition

Privileges

Settings and tasks

Lets you view or modify the SQL code for the directory.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 538

MODIFYING OBJECTS USING EDITORS

F OREIGN K EYS E DITOR (O RACLE )

The Foreign Keys Editor lets you enable a foreign key, manage its column mappings, and specify a delete rule.

To edit a foreign key

1 Open an editor on the foreign key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Column Mapping

Properties

DDL View

Settings and tasks

The existing column mapping for the foreign key is represented by selected columns in the Main Table and Referenced Table lists. Additional candidates in the Referenced

Table list are indicated by enabled column check boxes.

If necessary, use the Table dropdown in the Referenced Table group to choose a new table for this foreign key. Select or deselect columns in the Main Table list and

Referenced Table list to form the referential constraint between the two tables.

Lets you set the foreign key as Enabled and specify a Delete Rule of CASCADE or NO

ACTION.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

F UNCTIONS E DITOR (O RACLE )

The Functions Editor lets you modify basic properties and modify the CREATE/REPLACE DDL for a function.

To edit a function

1 Open an editor on the function. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Definition

Dependencies

Settings and tasks

Lets you view properties in the following categories:

Properties Lets you view function

Status and Last Modified details for the

Size Information Lets you view Source SIze , Parsed Size , Code Size , and

Error Size for the function

Lets you modify the CREATE OR REPLACE FUNCTION DDL for the function.

For details on using this tab, see " Working with Object Dependencies " on page 458.

539 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Permissions

Settings and tasks

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

I NDEXES E DITOR (O RACLE )

The Indexes Editor lets you manage columns, basic properties, storage, space, and partitioning for an index.

To edit an index

1 Open an editor on the index. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Storage

Settings and tasks

Displays a listing of the columns making up the index. Optionally, you can:

Use the Sort column check box to specify a sort option.

Click the New button to add a new column to the index.

Select an existing column and click the Delete button to delete that column from the index.

Lets you work with settings in the following categories:

Attributes Lets you view IsValid and Function-Based properties. Lets you set Index Type

(UNIQUE, NONUNIQUE, BITMAP), No Sort , Logging , Reverse , and Invisible properties.

Parallel Query

Option

Lets you view the No Parallel Execution property. Lets you set the Parallel

Degree and Parallel Instances values.

Lets you work with settings in the following categories:

Data Block

Storage

Extents

Lets you choose the

Transactions , and

Lets you specify

Tablespace

Max Transactions values

Initial Extent ,

, and specify

Next Extent

Extents , and Percent Increase values.

,

.

Percent Free , Initial

Minimum Extents , Maximum

Freelists Lets you specify Freelists and Freelist Groups values.

Buffer Pool Lets you specify a buffer pool.

RAPID SQL 8.6/XE5 USER GUIDE 540

MODIFYING OBJECTS USING EDITORS

Tab

Space

Partition

Settings and tasks

Lets you view settings in the following categories:

Space

Utilization

Lets you view the Size and number of Blocks settings.

Statistics Lets you view Index Level , Distinct Keys , Cluster Factor , Leaf Blocks , Leaf

Blks/Key and Data Blks/Key properties.

If the index is not currently partitioned, you can click the Convert To Partitioned button to

partition the index. For more information, see " Partitioning Oracle indexes, primary keys, and unique keys " on page 564.

If the index is currently partitioned, this tab displays the following partition details:

Properties Lets you view the Locality (Global/Local), Alignment (Prefixed/Non-Prefixed),

Partition Type (RANGE or HASH), and Subpartition type properties.

Click the Edit Partition button to edit partition details. or more information, see

" Partitioning Oracle indexes, primary keys, and unique keys " on page 564.

Click the Drop Partition button to revert to an unpartitioned index.

Use the Partition Commands menu items to initiate object actions. For details, see the following topics:

" Allocate Extent " on page 593

" Analyze " on page 594

" Coalesce " on page 610

" Deallocate Unused Space " on page 627

Mark Unusable - opens a dialog that lets you select one or more partitions/ subpartitions to be marked as unusable.

Rebuild - opens a dialog that lets you select one or more unusable subpartitions to be rebuilt.

Split - opens a dialog that lets you divide a single partition into two partitions.

You can split partitions if a single partition is causing maintenance problems because it is too large.

NOTES:

If you are preparing to drop or rebuild an index, mark local indexes as unusable.

If you want to make unusable indexes valid or to recover space and improve performance, rebuild the unusable indexes.

You cannot split a local index partition defined on a hash or composite table.

Make sure that you specify an upper bound for the column that is lower than the upper bound for that column in the original partition.

Columns

Partition

Definitions

Displays partitioning columns.

Displays the list of partition definitions. For each partition definition, listing shows the partition definition Value , the associated Tablespace , and whether the index is

Usable or has been marked as Unusable by Oracle. Use the Partition Commands menu Mark Unusable or Rebuild commands to change the current Usable value.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

DDL View

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

541 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

J OB Q UEUE E DITOR (O RACLE )

The Job Queue Editor lets you change the sql procedure specified for the job as well as manage the job’s schedule and status.

To edit a job queue

1 Open an editor on the job queue. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Definition

DDL

Settings and tasks

Lets you modify the Submit as disabled , Next Date , Run Again , Every , Time Unit , Use

Custom Expression , and Custom Expression properties. For details on these

properties, see " Job Queues (Oracle) - Properties " on page 387.

This tab also displays the following properties:

Job - the unique identifier assigned when the job was created.

User - the user who submitted the job.

Schema User - the user schema for which to parse the job

Priv User - the user whose privileges the job is to run under.

This tab lets you modify the DBMS_JOB.SUBMIT call’s WHAT parameter, specifying the name of the PL/SQL procedure to run.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

J OBS E DITOR (O RACLE )

The Jobs Editor lets you modify details of a job.

To edit a job

1 Open an editor on the job. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

DDL View

Settings and tasks

For details on using these settings, see " Jobs (Oracle) - Properties " on page 388.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 542

MODIFYING OBJECTS USING EDITORS

L IBRARIES E DITOR (O RACLE )

The Libraries Editor lets you view and modify library definitions and manage dependencies and privileges for the library.

To edit a library

1 Open an editor on the library. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Definition

Dependencies

Privileges

DDL View

Settings and tasks

The Definition tab of the Libraries Editor lets you modify the file name and path for a library and view the current status and whether the library is dynamic.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

M ATERIALIZED V IEWS E DITOR (O RACLE )

The Materialized Views Editor lets you view and modify materialized view information and partitions.

To edit a materialized view

1 Open an editor on the materialized view. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Information

Settings and tasks

Lets you work with properties in the following categories:

Master Lets you work with the Table Name and Master View properties.

Last Refresh

Refresh

Configuration

Lets you work with the

Lets you work with the

Last Date

Type ,

and Errors properties.

Refresh Method , and

Rollback Usage Lets you work with the Local and Master properties.

Mode properties.

Options Lets you work with the Updatable and Enable Query Rewrite properties.

543 RAPID SQL 8.6/XE5 USER GUIDE

Tab

Storage

Performance

Query

Partitions

Dependencies

Privileges

DDL View

MODIFYING OBJECTS USING EDITORS

Settings and tasks

Lets you work with properties in the following categories:

Placement Lets you work with Tablespace and Cluster values.

Data Block

Storage

Extents

Lets you work with Percent Free , Percent Used , Initial transactions , and

Maximum transactions values.

Lets you work with Initial Extent , Next Extent, Minimum Extents , Maximum

Extents , and Percent Increase values.

Lets you work with settings in the following categories:

Parallel Query

Option

The Parallel server query option lets you process queries using many query server processes running against multiple CPUs. This option provides substantial performance gains such as reduction of the query completion time.

Degrees - Lets you type a value indicating the number of query server processes that should be used in the operation.

Instances - Lets you type a value indicating how you want the parallel query partitioned between the Parallel Servers.

Logging

Cache

Select Logging to create a log for all Materialized View updates.

Select Cache if you want Oracle to put data you access frequently at the most recently used end of the list in the buffer cache when a full table scan is performed. This option is useful for small lookup tables.

Displays the associated query.

Partitioning

Method

Displays the partitioning method, including Range-Hash Composite or Range-

List Composite.

Hash partitions partition the table according to a hash function. Composite partitions use both range and hash types, first partitioning the data by a range of values, and then further dividing the partitions into subpartitions by way of a hash function.

List partitioning lets you control how rows map to partitions.

You can specify a list of discrete values for the partitioning column in the description for each partition.

If its key is updated, migrates the row to a new partition.

Row

Movement

Partitioning

Columns

Displays partitioning columns.

Subpartitionin g Columns

Partitions

Displays subpartitioning columns.

Subpartition

Template

Click Add or Edit to open the Partition dialog.

Click Drop to drop a partition.

If the partitioning type is Range-Hash Composite, displays a list of subpartitions in the subpartition template.

Click Add , I nsert , or Edit to open the Subpartition dialog.

Click Drop to drop a subpartition.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

RAPID SQL 8.6/XE5 USER GUIDE 544

MODIFYING OBJECTS USING EDITORS

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

M ATERIALIZED V IEW L OGS E DITOR (O RACLE )

The Materialized View Logs Editor lets you view replication log table details, and manage space, storage, and performance details for a materialized view log.

To edit a materialized view log

1 Open an editor on the materialized view log. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Information

Storage

Performance

Dependencies

Settings and tasks

Displays information on the log table used for replication.

Lets you work with settings in the following categories:

Data Block Storage Lets you view the associated Tablespace and Initial

Transactions value, and modify the Percent Free , Percent

Used , and Max Transactions values.

Extents Lets you view Initial Extent , Next Extent , Minimum Extents ,

Maximum Extents , and Percent Increase values.

Column Filtering Lets you select the filter columns to be recorded in the materialized view log. You can specify only one primary key, one ROWID and one filter column list per materialized view log.

The ROWID is a globally unique identifier for a row in a database. It is created at the time the row is inserted into a table, and destroyed when it is removed from a table.

Lets you work with settings in the following categories:

Parallel Query Option The Parallel server query option lets you process queries using many query server processes running against multiple

CPUs. This option provides substantial performance gains such as reduction of the query completion time.

Degrees - Lets you type a value indicating the number of query server processes that should be used in the operation.

Instances - Lets you type a value indicating how you want the parallel query partitioned between the Parallel Servers.

Logging

Cache

Select Logging to create a log for all Materialized View updates.

Select Cache if you want Oracle to put data you access frequently at the most recently used end of the list in the buffer cache when a full table scan is performed. This option is useful for small lookup tables.

For details on using this tab, see " Working with Object Dependencies " on page 458.

545 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

DDL View

Settings and tasks

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

O UTLINES E DITOR (O RACLE )

The Outlines Editor lets you view information on an outline, and modify its category and associated SQL statement.

NOTE: The only SQL statements possible with stored outlines are SELECT, DELETE, UPDATE,

INSERT…SELECT, and CREATE TABLE…AS SELECT.

To edit an outline

1 Open an editor on the outline. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Definition

DDL View

Settings and tasks

In addition to displaying basic creation and identification properties, this tab lets you select a new Category for the outline.

Lets you view and modify the SQL Statement associated with the outline.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P ACKAGE B ODIES E DITOR (O RACLE )

While listed as separate objects in the Datasource Navigator, package bodies are created and edited on the Body

tab of the Packages Editor. For details, see " Packages Editor (Oracle) " on page 546.

P ACKAGES E DITOR (O RACLE )

The Packages Editor lets you view and modify header and body specifications of a package.

RAPID SQL 8.6/XE5 USER GUIDE 546

MODIFYING OBJECTS USING EDITORS

To edit package

1 Open an editor on the package. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Header

Body

Information

Dependencies

Permissions

Settings and tasks

Lets you modify the package header specifications.

Lets you modify the package body specifications.

Lets you work with status and size properties in the following categories:

Header and Body Lets you view Status , Created , and Last Modified Source

SIze , Parsed Size , Code Size , and Error Size details for the header and body of the package.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P RIMARY K EYS E DITOR (O RACLE )

The Primary Keys Editor lets you manage columns, basic properties, storage and space, and partitions for a primary key.

To edit primary key

1 Open an editor on the primary key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Settings and tasks

Displays a listing of the columns making up the primary key. Optionally, you can:

Click the New button to add a new column to the index.

Select an existing column and click the Delete button to delete that column from the index.

Lets you work with settings in the following categories:

Enforcing

Index

Lets you view User Defined , Index Owner , and Index Name properties.

Attributes Lets you work with No Sort (only available if Enabled is set), Logging (YES, NO, or

NONE), Reverse (disabled if No Sort is enabled), Validate , Deferrable , Deferred

(IMMEDIATE or DEFERRED and only enabled if Deferrable is enabled), Enabled ,

Cascade (disabled if Enabled is set), Rely and Update Date properties.

547 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Storage

Space

Partition

Settings and tasks

Lets you work with settings in the following categories:

Data Block

Storage

Lets you specify

Transactions

Tablespace

values.

, Percent Free , Initial Transactions , and Max

NOTE: You should never place primary keys on the SYSTEM tablespace.

Extents Displays Initial Extent , Next Extent , Percent Increase , Minimum Extents and

Maximum Extents values.

Freelists

Buffer

Pool

Lets you specify Freelists and

Lets you specify a buffer pool.

Freelist Groups

Lets you work with settings in the following categories:

values.

Lets you view Size and Blocks properties.

Space

Utilization

Statistics Lets you view Index Level , Distinct Keys

Key , and Data Blks/Key properties.

, Cluster Factor , Leaf Blocks , Leaf Blks/

If the primary key is currently partitioned, this tab displays the following partition details:

Properties Lets you view the Locality (Global/Local), Alignment (Prefixed/Non-Prefixed),

Partition Type (RANGE or HASH), and Subpartition type properties.

Click the Edit Partition button to edit partition details. or more information, see

Partitioning Oracle indexes, primary keys, and unique keys

.

Click the Drop Partition button to revert to an unpartitioned primary key.

Use the Partition Commands menu items to initiate object actions. For details, see the following topics:

" Allocate Extent " on page 593

" Analyze " on page 594

" Coalesce " on page 610

" Deallocate Unused Space " on page 627

Mark Unusable - opens a dialog that lets you select one or more partitions to be marked as unusable.

Rebuild - opens a dialog that lets you select a partition to be rebuilt.

Split - opens a dialog that lets you divide a single partition into two partitions. You can split partitions if a single partition is causing maintenance problems because it is too large.

Columns

Partition

Definitions

Displays partitioning columns.

Displays details for each partition.

If the primary key is not currently partitioned, you can click the Convert To Partitioned button to partition the primary key. For more information, see

Partitioning Oracle indexes, primary keys, and unique keys

.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

DDL View

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 548

MODIFYING OBJECTS USING EDITORS

P ROCEDURES E DITOR (O RACLE )

The Procedures Editor lets you view and modify the SQL code and properties of a procedure.

To edit a procedure

1 Open an editor on the procedure. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Definition

Dependencies

Permissions

Settings and tasks

Lets you work with properties in the following categories:

Properties Lets you view Status , and Last Modified properties.

Size Information Lets you view Source Size , Parsed Size , Code Size , and

Error Size

Lets you modify the SQL code for a procedure.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P ROFILES E DITOR (O RACLE )

The Profiles Editor lets you manage limits and manage user assignments for the profile.

549 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a profile

1 Open an editor on the profile. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Resources

Users

DDL

Settings and tasks

Lets you work with settings in the following categories:

General Limits

Session Limits

Time Limits

Call Limits

Lets you specify Composite Limit and Private SGA settings.

Lets you specify the limit on the amount of private space a session can allocate in the shared pool of the SGA. Specific settings are Sessions Per User , CPU Per Session , Logical

Reads .

Lets you specify the limit on total connection time per session. Specific settings are Connect Time and Idle Time .

Lets you specify the CPU time limit for a call (a parse, execute, or fetch), expressed in hundredths of seconds. Specific settings are CPU Per Call and Logical Reads .

Login Limits

Password Limits

Lets you specify the number of Failed Login Attempts on the user account before the account is locked and the Account

Lock Time .

Lets you specify the Lifetime , Reuse Time , Reuse Max ,

Grace Period and a Verify Function for passwords.

Use the Assign button to open a dialog that lets you assign a user to this profile or select a user from the list, and click the Unassign button to open a dialog prompting you to confirm that the user is to be unassigned.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P ROGRAMS E DITOR (O RACLE )

The Programs Editor lets you modify details of a program.

To edit a program

1 Open an editor on the program. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Action

Arguments

DDL View

Settings and tasks

For details on using these settings, see " Programs (Oracle) - Action " on page 404.

For details on using these settings, see " Programs (Oracle) - Arguments " on page 404.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

RAPID SQL 8.6/XE5 USER GUIDE 550

MODIFYING OBJECTS USING EDITORS

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

R EDO L OG G ROUPS E DITOR (O RACLE )

The Redo Log Groups Editor lets you manage the members in a redo log group.

To edit a redo log group

1 Open an editor on the redo log group. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Redo Log Members

DDL View

Settings and tasks

Lets you add new members to the redo log group, edit existing members, and delete members from the redo log group.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

R OLES E DITOR (O RACLE )

The Roles Editor lets you manage authentication and grant/revoke profiles for users and logins.

To edit a role

1 Open an editor on the role. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Authentication

User/Roles

Object Privileges and

System Privileges

Settings and tasks

Lets you manage role identity. When creating a role, you must establish certain rules governing its use. You can specify whether or not a role must be identified when used.

If you require role identification, you can authenticate the user externally through the operating system, or with a specific password.

If you specified that the role requires identification, provide a Password and specify whether the role is to be authenticated Globally or Externally .

Displays permissions for this role to logins or users. Click Grant to open a dialog that lets you grant this role to a login or another role. Select a role or login and click Revoke to revoke the role or login.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

551 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

DDL View

Settings and tasks

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

For information on activating and deactivating roles for the current login in the current session,

see " Role Activation " on page 694.

R OLLBACK S EGMENTS E DITOR (O RACLE )

The Rollback Segments Editor lets you view rollback segment status, manage rollback segment storage, and view activity levels.

To edit a rollback segment

1 Open an editor on the rollback segment. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Status

Storage

Activity

DDL

Settings and tasks

Lets you enable and disable a rollback segment and displays status details for the rollback segment. The tab displays whether the rollback segment is online or offline and provides the associated Tablespace , Size , and No. of Extents .

Lets you work with settings in the following categories:

Extents The unit of space allocated to an object whenever the object needs more space.

Initial Extent - The initial space extent (in bytes) allocated to the object.

Next Extent - The next extent (in bytes) that the object will attempt to allocate when more space for the object is required.

Optimal Size - optimal extent size

Minimum Extents - The appropriate minimum extents value for the object.

Maximum Extents - The appropriate maximum extents value for the object.

Displays extent details.

Extent Detail

Lets you work with settings in the following categories:

Activity Levels Displays Active Transactions , Writes , Gets and Waits values.

Dynamic Sizing Displays High Watermark , Extends , Shrink s, and Wraps values.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 552

MODIFYING OBJECTS USING EDITORS

S CHEDULES E DITOR (O RACLE )

The Schedules Editor lets you modify details of a schedule.

To edit a schedule

1 Open an editor on the schedule. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Action

DDL View

Settings and tasks

For details on using these settings, see " Schedules (Oracle) - Properties " on page 407.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

S EQUENCES E DITOR (O RACLE )

The Sequences Editor lets you manage parameters for a sequence, manage database objects dependent on the sequence, and manage privileges for the sequence.

To edit a sequence

1 Open an editor on the sequence. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Definition

Settings and tasks

Lets you work with settings in the following categories:

Parameters

Current/Next

Sequence Numbers

Options

Lets you specify increment, minimum value and maximum value settings.

Lets you work with sequence cycle numbers.

Lets you specify Cache Size , Cycle When Reach Max/Min , and Generate

Numbers in Order (useful when you are using the sequence number as a timestamp) values.

Dependencies

For details on using this tab, see " Working with Object Dependencies " on page 458.

Privileges

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

DDL

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

553 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

S YNONYMS E DITOR (O RACLE )

The Synonyms Editor lets you view base object information and manage database objects dependent on a synonym.

To edit a synonym

1 Open an editor on the synonym. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Dependencies

DDL View

Settings and tasks

Displays the type, owner, name, and other details of the object referenced by the synonym.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

T ABLES E DITOR (O RACLE )

The Tables Editor lets you manage columns, constraints, storage and space, and partitions for a table.

RAPID SQL 8.6/XE5 USER GUIDE 554

MODIFYING OBJECTS USING EDITORS

To edit a table

1 Open an editor on the table. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Indexes

Settings and tasks

Displays the currently defined columns in the table. For any selected column, the Property/

Value list provides additional detail on that column. Available properties depend on the datatype you choose as well as on the property values you select:

Virtual - indicates whether this column is defined as an Oracle virtual column. If selected, the value is provided by the calculation in the Default Value box.

Datatype properties- Lets you select a type and depending on your selection, additional properties such as Scale , Width , and Unused may be available.

Allow Nulls - Select this check box to allow nulls in this column.

Encryption properties include Password , Salted , and EncryptionAlgorithm .

Default Value - If Virtual is selected, this box lets you specify a valid Oracle column expression. Otherwise, it can contain a pseudocolumn (CURRENT_TIMESTAMP, USER,

SYSDATE, or UID) or an expression.

lets you choose among CURRENT_TIMESTAMP, USER, SYSDATE, and UID.

Comment lets you add a comment to the column.

LOB Storage settings are available for bfile, blob, clob, and nclob types. They include

Segment Name , Configuration properties ( Tablespace , Chunk , Percent Version , Enable

Storage In Row , Cache , and Logging ), and Storage properties ( Initial Extent , Next Extent ,

Percent Increase , Minimum Extents , Maximum Extents , Free Lists , and Free List Groups).

Optionally, you can:

Select a column, and in the Property / Value list modify property values for that column.

Click Add Column , provide a name for the new column, and set property values for the column.

Select a column and click Delete to remove the column from the table.

Lets you work with settings in the following categories:

Table Lets you work with the following properties, corresponding to CREATE

TABLE clauses: Cache , Row Movement , Parallel Degree , and Parallel

Instances .

Physical Lets you view the Row Organization property. Lets you set the Logging and

Table Compression properties.

Lets you manage indexes for a table. On opening, the list of current indexes for the table is displayed. Optionally, take one of the following actions:

Click Add to open a dialog that lets you add a new index to the table.

Select an index and click Edit to open a dialog that lets you edit index properties.

Select an index and click Drop to open a dialog that lets you remove the index from the table.

555 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Constraints

Storage

IOT Properties

Space

LOB columns

Partition

Comment

Dependencies

Permissions

DDL View

Settings and tasks

Lets you manage constraints for the table. Constraints are grouped by type, under folders.

Optionally take one of the following actions:

Select a constraint type folder and click Add to open a dialog that lets you add a constraint of that type.

Select a constraint and click Edit to open a dialog that lets you modify the constraint details.

Select a constraint and click Drop to remove the constraint.

Lets you work with settings in the following categories:

Data Block

Storage

Extents

Percent

Threshold

Key

Compression

Lets you choose the Tablespace Name , and specify Percent Free , Initial

Transactions , and Max Transactions values.

Lets you view Initial Extent , Next Extent , Minimum Extents , Maximum

Extents , and Percent Increase values.

Freelists

Bufferpool

Lets you specify Freelists and Freelist Groups values.

Lets you specify a Buffer Pool .

Lets you work with settings in the following categories:

Ungrouped Lets you specify an overflow segment.

Lets you specify the percentage of space reserved for an index-organized table.

Lets you enable or disable compression and provide a compression value.

Lets you work with settings in the following categories:

Space

Utilization

Lets you view Size and number of Blocks .

Row

Information

Extents

Lets you view the properties.

Let you view the

Number of Rows ,

Number of Extents

Average Row Length

and

, and

Maximum Extents

Chain Rows

values.

Lets you work with settings in the following categories:

LOB Column

Segment and

LOB Column

Index

Lets you view the Segment Name , No. of Extents , Max Extents , Size , and

Blocks properties.

Segment

Extents and

Index

Extents

Lets you view the

Lets you work with table partitions

Extent ID , File ID , Block ID properties for segment and index extents.

and number of Blocks

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 556

MODIFYING OBJECTS USING EDITORS

T ABLESPACES E DITOR (O RACLE )

The Tablespaces Editor lets you manage datafiles, space, storage, quotas, and objects for a tablespace.

To edit a tablespace

1 Open an editor on the tablespace. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab Settings and tasks

Datafiles

Properties

The tab lists details for each datafile on the tablespace. Optionally you can add or delete files or

edit file attributes. For detailed information on using this tab, see " Tablespaces (Oracle) -

Datafiles " on page 420.

This tab lets you view the Name , Big File , Type , Encrypted , Locally Managed , Minimum Extent

Size , Uniform Allocation , Use Default Block Size , Block Size , Automatic Segment Space

Management , Initial Extent , Next Extent , Minimum Extents , Maximum Extents , and Percent

Increase properties. This tab lets you modify the Status , Logging , Force Logging , and

Compression Type

properties. For more information on these properties, see " Tablespaces

(Oracle) - Properties " on page 418.

Extent Details Provides details ( Name , Type , File ID , Extent ID , Block ID , Blocks , and Bytes ) for each extent in the tablespace.

Space Displays free blocks versus used blocks statistics for the tablespace, including a pie chart representation.

Map This tab presents a graphical, segment map of the tablespace. The map is color-coded to show usage of each segment (FREE, SELECTED, OTHER, TEMPORARY, ROLLBACK, CACHE, TABLE,

INDEX, TABLE PARTITION, NESTED TABLE, INDEX PARTITION, INDEX SUBPARTITION, TEXT,

CLUSTER, LOB, LOBSEGMENT, LOBINDEX, or LOB PARTITION).

Optionally you can:

Click Legend to view the color legend of the map.

Hover the mouse over a segment to display its Segment ID , Block ID , Size (kb), Size (in blocks), Tablespace File ID , and Segment Type details.

Click Display to open a window that aids in navigating the graphical segment map. The

Overview window displays a smaller version of the segment map. The selected area can be dragged up and down the window, displaying the selected area in the larger, main map. The selected area can also be resized, to display a larger or smaller area in the main map.

Select an INDEX or TABLE segment on the map and click Reorganize to initiate a Rebuild

Indexes or Reorganize

(respectively) action. For details, see " Rebuild Index " on page 669

and " Reorganize /Reorg " on page 676.

The Object Demographics area provides a tabular representation of the tablespace map. It provides details on a segment-by-segment basis.

For background information, see " About Oracle Tablespace Storage " on page 559.

557 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Objects

Quotas

Settings and tasks

Displays the objects currently stored on the tablespace, grouped under object type folders.

Optionally you can:

Specify a logging option using the Log Changes When Scheme/Data is Modified?

radio set.

Select an object under one of the object folders and click Edit to open an object editor on that object.

Oracle limits the amount of space that can be allocated for storage of a user's objects within the specified tablespace to the amount of the quota. Users with privileges to create certain types of objects can create those objects in the specified tablespace.

The Quotas tab of the Tablespace editor lets you manage user space quotas for tablespaces on the current datasource. Optionally, you can:

Click Add or select a user and click Edit to assign a user unlimited or a specific space usage quota on the tablespace. For details, see Adding or Editing User Tablespace Quotas .

Select an existing user and click Drop to delete the quota for that user

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

DDL View

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

A DDING OR E DITING U SER T ABLESPACE Q UOTAS

When you assign a quota:

• Users with privileges to create certain types of objects can create those objects in the specified tablespace.

• Oracle limits the amount of space that can be allocated for storage of a user's objects within the specified tablespace to the amount of the quota.

NOTE: This functionality is available for Oracle only.

User tablespace quotas are added and modified from the Tablespaces editor. For more

information, see " Tablespaces Editor (Oracle) " on page 557.

The table below describes the options and functionality on the Add User Quota...

or Edit User

Quota...

dialogs:

Option

User selection list (Add only)

Quota

Description

Lets you select one or more users to assign a quota.

Lets you set a quota for the selected user or users. You can select an unlimited, or a specified size.

Unlimited - Lets you place an unlimited quota on the tablespace.

Other - Lets you place a specified quota in KB or MB on the tablespace.

RAPID SQL 8.6/XE5 USER GUIDE 558

MODIFYING OBJECTS USING EDITORS

A BOUT O RACLE T ABLESPACE S TORAGE

The Storage tab of the Tablespace Editor lets you view storage details for tablespaces on the current datasource.

TIP: Always create tablespaces for user data and never place user tables and indexes in the

SYSTEM tablespace. Placing user objects in the SYSTEM tablespace can degrade performance and introduce space-related headaches to the database.

Oracle or later supports locally managed tablespaces, which can all but eliminate the problem of tablespace fragmentation. It totally does away with the storage parameters of MINEXTENTS,

MAXEXENTS, PCTINCREASE, and NEXT. With locally managed tablespaces you either specify the initial extent size and let Oracle automatically size all other extents, or specify a uniform extent size for everything.

TIP: One of the best ways to avoid fragmentation in a tablespace is to pre-allocate the space that your objects will use. If possible, plan for one to two years' growth for each object and allocate your space accordingly. Having initial empty objects will not affect table scan times as Oracle only scans up to the high-water mark (the last used block) in a table.

Of all your tablespaces, you want to avoid fragmentation problems in your SYSTEM tablespace the most as this is the major hotbed tablespace for Oracle activities. The easiest way to avoid this is to not allow any user (even the default DBA ID's SYS and SYSTEM) to have access to it.

There are three ways to do this:

• Ensure no user has a DEFAULT or TEMPORARY tablespace assignment of SYSTEM.

• Ensure no user has a quota set for SYSTEM.

Ensure no user has been granted the UNLIMITED TABLESPACE privilege.

T RIGGERS E DITOR (O RACLE )

The Triggers Editor lets you modify actions, events, and other details for a trigger.

559 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a trigger

1 Open an editor on the trigger. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Events

Column Selection

Action

Dependencies

DDL View

Settings and tasks

In addition to displaying basic identification and creation properties, this tab lets you work with settings in the following categories:

Attributes

Correlation Names

Status

Lets you specify whether the trigger is Enabled , select the

Trigger Timing (BEFORE, AFTER, COMPOUND), and the

Trigger Type (ROW, STATEMENT).

Lets you provide an Old Table Alias and a New Table Alias as well as construct a When Clause .

Lets you view Object Status , Create Date , Last Modified , and Base Object Type properties.

Size Information Lets you view Source Size , Parsed Size , Code Size , and

Error Size properties.

For detailed information on these properties, see " Triggers (Oracle) - Properties " on page 421.

Lets you select the DDL, DML, or Database manipulation events that fire this trigger. For

detailed information,see " Triggers (Oracle) - Events " on page 422.

For triggers firing on UPDATE events, lets you work with the associated columns. For

detailed information,see " Triggers (Oracle) - Column Selection " on page 422.

Lets you modify the trigger action PL/SQL block for any trigger on the datasource. You modify the body of the trigger in the Trigger Action (PL/SQL Block) area. For detailed

information,see " Triggers (Oracle) - Action " on page 422.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

T YPE B ODIES E DITOR (O RACLE )

The Type Bodies Editor contains the code for the methods that implement an object type. To create or replace a type body in one of your schema, you must have the CREATE TYPE or

CREATE ANY TYPE system privilege. To replace a type in another user’s schema, you must have the DROP ANY TYPE system privilege.

While listed as separate objects in the Datasource Navigator, type bodies are created and edited on the Body

tab of the Types Editor. For details, see " Types Editor (Oracle) " on page 561.

RAPID SQL 8.6/XE5 USER GUIDE 560

MODIFYING OBJECTS USING EDITORS

T YPES E DITOR (O RACLE )

The Types Editor lets you manage header text and body text for a type.

To edit a type

1 Open an editor on the type. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Header

Body

Information

Dependencies

Privileges

Settings and tasks

Lets you manage the type header text.

Lets you create and modify type body text for the type. For information on creating type

bodies, see " Object Types Wizard (Oracle) " on page 423.

Displays the header and body information for a type.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

U NIQUE K EYS E DITOR (O RACLE )

The Unique Keys Editor lets you manage columns, basic properties, storage and space, and partitions for a unique key.

To edit a unique key:

1 Open an editor on the unique key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Settings and tasks

Displays a listing of the columns making up the index. Details include the Column name, the

Datatype , and whether the definition allows Nulls . Optionally, you can:

Click the New button to add a new column to the index.

Select an existing column and click the Delete button to delete that column from the index.

In addition to displaying basic identification information, this tablets you work with settings in the following categories:

Enforcing

Index

Lets you view User-Defined , Index Owner , and Index Name settings.

Attributes Lets you set No Sort , Logging , Reverse , Validate , Deferrable , Deferred ,

Enabled , Cascade , Rely , and Update Date properties.

561 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Storage

Space

Partition

Settings and tasks

Lets you work with settings in the following categories:

Data Block

Storage

Extents

Lets you choose the

Transactions , and

Lets you specify

Tablespace Name

Max Transactions values

Initial Extent ,

, and specify

Next Extent

Extents , and Percent Increase values.

,

.

Percent Free

Minimum Extents ,

, Initial

Maximum

Freelists Free lists let you manage the allocation of data blocks when concurrent processes are issued against the cluster. Identifying multiple free lists can reduce contention for free lists when concurrent inserts take place and potentially improve the performance of the cluster.

This tab lets you specify Freelists and Freelist Groups values.

Buffer Pool Lets you select a Buffer Pool .

Lets you work with settings in the following categories:

Displays the Size and number of Blocks properties.

Space

Utilization

Statistics Lets you view Index Level , Distinct Keys

Blks/Key and Data Blks/Key settings.

, Cluster Factor , Leaf Blocks , Leaf

Extents The unit of space allocated to an object whenever the object needs more space. This tab lets you view Number of Extents and Maximum Extents properties.

If the unique key is currently partitioned, this tab displays the following partition details:

Properties Lets you view the Locality (Global/Local), Alignment (Prefixed/Non-Prefixed),

Partition Type (RANGE or HASH), and Subpartition type properties.

Click the Edit Partition button to edit partition details. For more information,

see " Partitioning Oracle indexes, primary keys, and unique keys " on page 564.

Click the Drop Partition button to revert to an unpartitioned unique key.

Use the Partition Commands menu items to initiate object actions. For details, see the following topics:

" Allocate Extent " on page 593

" Analyze " on page 594

" Coalesce " on page 610

" Deallocate Unused Space " on page 627

Mark Unusable

Rebuild

Split

Columns

Partition

Definitions

Displays partitioning columns.

Displays details for each partition.

If the unique key is not currently partitioned, you can click the Convert To Partitioned button to partition the unique key. For more information, see

Partitioning Oracle indexes, primary keys, and unique keys

.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

DDL View

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 562

MODIFYING OBJECTS USING EDITORS

U SERS E DITOR (O RACLE )

The Users Editor lets you manage basic properties, roles, tablespace quotas, and associated objects for a user.

To edit a user

1 Open an editor on the user. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Role

Quota

Objects

Object Privileges and

System Privileges

DDL View

Settings and tasks

Lets you work with settings in the following categories:

Defaults

Account

Lets you select a Default Tablespace and Temporary Tablespace as well as select the Profile used by this user. For more on creating profiles, see

" Profiles Wizard (Oracle) " on page 401.

Identified By - Lets you select among REQUIRED YES, REQUIRED

EXTERNAL, and REQUIRED_GLOBAL.

Password - (available with Identified By value of REQUIRED_YES only) lets you specify a password.

External Name - (available with Identified By value of

REQUIRED_GLOBAL only) lets you specify the name of the user in the enterprise directory service.

Account Locked - lets you lock this user account.

Password Expired - (available with Identified By value of REQUIRED_YES only) lets you mark the password as expired, forcing the user to change their password before being allowed to connect.

Lets you select the roles that are to be assigned to this user.

Lets you set tablespace quotas for the user. Set an unlimited quota by selecting a tablespace and selecting the Unlimited radio button. Set a specific quota by selecting a tablespace, selecting the Other radio button, and providing a Quota value in kilobytes or megabytes.

Lets you manage database objects associated with a user. Objects are grouped within object type folders. Optionally, you can:

Select an object and click Edit to open an object editor on the selected object.

Select an object and click Drop to initiate dropping the selected object.

For details on using these tabs, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

563 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

V IEWS E DITOR (O RACLE )

The Views Editor lets you work with view columns and manage the dependencies and permissions for the view.

To edit a view

1 Open an editor on the view. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Definition

Comment

Dependencies

Permissions

Settings and tasks

Displays a listing of the columns making up the view.

Lets you view and modify the DDL that will implement any changes made with the editor.

For details on using this tab, see " Adding a Comment to an object " on page 459.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P ARTITIONING O RACLE INDEXES , PRIMARY KEYS , AND UNIQUE KEYS

The Add Partition wizard lets you partition an Oracle index, primary key, or unique key.

To partition an index, primary key, or unique key

1 Open an editor on the index, primary key, or unique key. For details, see " Opening an

Object Editor " on page 453.

2 On the Partition tab, click Convert to Partitioned .

NOTE: If the object is already partitioned, the Convert to Partitioned button is not present.

3 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Columns

Settings and tasks

In addition to displaying basic identification and ownership properties, this pane lets you work with the following settings:

Locality - GLOBAL or LOCAL.

Alignmen t - displays whether this partitioned object is prefixed or non-prefixed.

Partition Type - RANGE or HASH.

Subpartition Type - displays the subpartition type.

For each column to be added, click New to add a column, select a Column name, and specify a Sort order.

RAPID SQL 8.6/XE5 USER GUIDE 564

MODIFYING OBJECTS USING EDITORS

Tab

Range Definitions

(only available for a

Partition Type of

RANGE)

Hash Definitions

(only available for a

Partition Type of

HASH)

Settings and tasks

Lets you create an ordered list of partitions. For each partition, click New to open the Add

Partition Definition wizard. On the Partition Definition pane, provide a Name , select a

Tablespace , and enable or disable Logging . On the Storage pane, provide Data Block

Storage , Extents , and Freelists property values. Click Add .

The Range Definitions pane also lets you edit and remove partitions.

Lets you specify a Partition method:

None

Number of Partitions - Specify a Number of Partitions , and then for each partition, click the

New button and select a tablespace.

By Partition Name - For each partition, click New , specify a Name and select a Tablespace .

4 When ready, click Finish .

S YBASE ASE O BJECT E DITORS

Rapid SQL includes an Object Editor for all supported Sybase ASE objects. To see an Editor for a specific object, click the corresponding link below:

NOTE: If an objects has dependent objects, such as tables, triggers, procedures and views, you can view and access their dependent objects in the editor.

Aliases Editor (Sybase ASE)

Check Constraints Editor (Sybase ASE)

Databases Editor (Sybase ASE)

Defaults Editor (Sybase ASE)

Extended Procedures Editor (Sybase ASE)

Foreign Keys Editor (Sybase ASE)

Functions Editor (Sybase ASE)

Groups Editor (Sybase ASE)

Indexes Editor (Sybase ASE)

Logins Editor (Sybase ASE)

Primary Keys Editor (Sybase ASE)

Procedures Editor (Sybase ASE)

Rules Editor (Sybase ASE)

Segments Editor (Sybase ASE)

Tables Editor (Sybase ASE)

565 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Triggers Editor (Sybase ASE)

Unique Keys Editor (Sybase ASE)

User Datatypes Editor (Sybase ASE)

Users Editor (Sybase ASE)

Users Editor (Sybase ASE)

For access to object editors for different supported DBMS platforms and an introduction to

editor usage, see " Modifying objects using editors " on page 452.

A LIASES E DITOR (S YBASE ASE)

The Aliases Editor lets you view and modify an alias definition.

To edit an alias

1 Open an editor on the alias. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

DDL View

Settings and tasks

Lets you change the user referenced by the alias.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

C HECK C ONSTRAINTS E DITOR (S YBASE ASE)

The Check Constraints Editor lets you manage a check constraint definition and modify the condition expression.

RAPID SQL 8.6/XE5 USER GUIDE 566

MODIFYING OBJECTS USING EDITORS

To edit a check constraint

1 Open an editor on the check constraint. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Definition

DDL View

Settings and tasks

Lets you edit the condition in the Check Condition box. The Table Columns button acts a time saver in editing the condition. It opens a dialog that lets you select and paste column names into the check condition expression.

NOTE: If the Check Condition box shows a Source text for this compiled object is hidden message, source text for this compiled object has been hidden. For more information, see

Hide Text .

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

D ATABASES E DITOR (S YBASE ASE)

The Databases Editor lets you manage properties, placement, and binds for a database as well as view associated space statistics.

To edit a database

1 Open an editor on the database. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Placement

Space

Bindings

Settings and tasks

For information on working with these settings, see " Databases (Sybase ASE) -

Properties " on page 430.

Displays device fragments. Optionally you can:

Select a fragment to view the Device Name , Size , and Device Type

(DATA AND LOG or DATA ONLY) for the fragment.

Click the New button to open a dialog that lets you provide the data device and log device details for a new database fragment.

NOTE: We strongly recommend that you place the transaction log on a separate device from all other database fragments.

Lets you view pie charts showing the data space usage and the transaction log (if available) space usage for the database.

This tab is only available for databases created with a Type of TEMP. It displays all applications or logins bound to the database. Optionally, you can:

567 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab Settings and tasks

Bind another application or login to the database by selecting the

APPLICATION or LOGIN folder as appropriate, clicking Add , and in the dialog that opens select a login or provide an application name.

Remove bindings by selecting the specific application or login and clicking Drop .

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

DDL View

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

D EFAULTS E DITOR (S YBASE ASE)

The Defaults Editor lets you modify the value and manage bindings for a default.

To edit a default

1 Open an editor on the default. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Dependencies

DDL View

Settings and tasks

Lets you change the Value of the default.

NOTE: If the Value box shows a Source text for this compiled object is hidden message, source text for this compiled object has been hidden. For more information,

see " Hide Text " on page 652.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

E XTENDED P ROCEDURES E DITOR (S YBASE ASE)

The Procedures Editor lets you view and modify an extended procedure definition.

RAPID SQL 8.6/XE5 USER GUIDE 568

MODIFYING OBJECTS USING EDITORS

To edit an extended procedure

1 Open an editor on the extended procedure. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

DDL View

Dependencies

Permissions

Settings and tasks

Lets you specify the Library Name for the extended procedure.

NOTE: If the Library Name box shows a Source text for this compiled object is hidden message, source text for this compiled object has been hidden. For more information,

see " Hide Text " on page 652.

For details on using this tab, see

Viewing the SQL/DDL for an Object .

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

F OREIGN K EYS E DITOR (S YBASE ASE)

The Foreign Keys Editor lets you modify the column mapping and specify properties of a foreign key.

To edit a foreign key

1 Open an editor on the foreign key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Column Mappings

Properties

DDL View

Settings and tasks

The existing column mapping for the foreign key is represented by selected columns in the Main Table and Referenced Table lists. Additional candidates in the Referenced

Table list are indicated by enabled column check boxes.

If necessary, use the Table dropdown in the Referenced Table group to choose a new table for this foreign key. Select or deselect columns in the Main Table list and

Referenced Table list to form the referential constraint between the two tables.

Lets you specify a Match Full value of TRUE or FALSE.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

569 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

F UNCTIONS E DITOR (S YBASE ASE)

The Functions Editor lets you view and modify the body of a function, as well as work with permissions and dependencies.

To edit a function:

1 Open an editor on the function. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Definition

Dependencies

Permissions

Settings and tasks

Lets you view and modify the CREATE FUNCTION statement, including the function body, for the function.

NOTE: If the Definition tab for the function shows a Source text for this compiled object is hidden message, source text for this compiled object has been hidden. For

more information, see " Hide Text " on page 652.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

G ROUPS E DITOR (S YBASE ASE)

The Groups Editor lets you manage users in a group and the group’s associated privileges.

TIP: The r efresh button lets you refresh or clear the editor’s contents, and log SQL.

To edit a group

1 Open an editor on the group. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Users

Object Privileges

System Privileges

DDL

Settings and tasks

Lets you add users to, or remove users from the group. To move a user from one of the

Users Not In Group or Users In Group lists to the other list, select the user in the list and click the Join Group or Leave Group button.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 570

MODIFYING OBJECTS USING EDITORS

I NDEXES E DITOR (S YBASE ASE)

The Indexes Editor lets you manage columns, properties, and partitions, and view statistics for an index.

To edit an index

1 Open an editor on the index. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Partition

Statistics

DDL View

Settings and tasks

Lets you manage columns that make up the index. On opening, this tab shows the existing columns. For each column, the datatype (and if applicable the precision in brackets) and whether the table definition permits nulls in the target table column.

Optionally you can:

Change the Sort order of a column.

Click the New button and select a column name from the dropdown, to add a column to the index.

Select a column and click the Drop button to delete the column from the index.

Select a column and use the arrow buttons to reorder the columns in the index.

Lets you work with settings in the following categories:

Attributes Has the Index Type (UNIQUE or NONUNIQUE), Clustered , Ignore

Duplicate Key (available with Index Type of UNIQUE), Ignore Duplicate

Rows (available with Clustered enabled), Allow Duplicate Rows (available with Clustered enabled), and Maximum Rows Per Page properties.

Storage Lets you set Reserve Page Gap , Segment Name , Fill Factor , Prefetch

Strategy , MRU Replacement Strategy settings

Lets you work with settings in the following categories:

Properties Lets you view the Locality (Global/Local), Alignment (Prefixed/Non-

Prefixed), Partition Type (including Range-Hash Composite or Range-List

Composite), and Subpartition type properties.

Columns Displays partitioning columns.

Partition

Definitions

Displays details for each partition.

Lets you view statistics in the following categories:

Page

Statistics

Data Pages

Page Ratio .

, Reserved Pages , Used Pages , OAM Page Ratio , and Index

Row

Statistics

Maximum Row Size

Row , and

, Minimum Row Size

Maximum Rows Per Page .

, Max Size of Non-Leaf Index

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

571 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

L OGINS E DITOR (S YBASE ASE)

The Logins Editor lets you manage basic properties for a login, associated users and roles, and accounting.

To edit a login:

1 Open an editor on the login. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Users

Roles

Accounting

DDL

Settings and tasks

Lets you work with the following properties set when creating the login: Name , FullName ,

Default database , Default language , Locked (or Account Locked ), Password , Password expiration , Minimum password length , Maximum Login attempts , and Authentication

Mechanism .

Against Sybase 15.7 and higher, servers, Profile (with an additional default option available) and

Exempt Inactive Lock parameters are available.

For detailed information on these settings, see " Logins Wizard (Sybase ASE) " on page 436.

In addition, when editing an existing login, you have access to the following settings:

Is currently logged in

Login trigger

Displays whether the user is currently logged in.

Displays the login trigger currently configured for this login. This is the stored procedure automatically executed when the user logs on.

For information on configuring login triggers for a login, see " Add/Modify

Login Trigger " on page 592 and "

Drop Login Trigger " on page 635.

Lets you maintain database user accounts for a login. For more detailed information, see " Logins

(Sybase ASE) - Users " on page 438.

Lets you maintain the roles granted to this login. For more detailed information, see " Logins

(Sybase ASE) - Users " on page 438.

For information on activating and deactivating roles for the current login in the current session,

see " Role Activation " on page 694.

The Accounting tab of the Logins Editor lets you manage chargeback accounting statistics for every login on the current server. Chargeback accounting statistics are CPU and I/O usage statistics that Sybase ASE accumulates for every login. To start a new accounting period, the system administrator must clear all previous login statistics.

Optionally, you can click the Clear Statistics button to start a new accounting interval. The Clear

Statistics dialog lets you clear statistics immediately or use scheduling options.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P RIMARY K EYS E DITOR (S YBASE ASE)

The Primary Keys Editor lets you manage the columns that make up the primary key and its basic properties, as well as view statistics for the primary key.

RAPID SQL 8.6/XE5 USER GUIDE 572

MODIFYING OBJECTS USING EDITORS

To edit a primary key

1 Open an editor on the primary key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Statistics

DDL View

Settings and tasks

Lets you manage columns that make up the primary key. On opening, this tab shows the existing columns. For each column, the datatype (and if applicable the precision in brackets) and whether the table definition permits nulls in the target table column.

Optionally you can:

Change the Sort order of a column.

Click the New button and select a column name from the dropdown, to add a column to the primary key.

Select a column and click the Drop button to delete the column from the primary key.

Select a column and use the arrow buttons to reorder the columns in the primary key.

Lets you work with settings in the following categories:

Attributes Lets you set the Clustered and Maximum Rows Per Page properties.

Storage Lets you set Reserve Page Gap , Segment

SYSTEM), and Fill Factor properties.

(DEFAULT, LOGSEGMENT or

Lets you view statistics in the following categories:

Page

Statistics

Row

Statistics

Data Pages

Page Ratio .

, Reserved Pages

Maximum Row Size

Row , and

,

, Used Pages

Minimum Row Size

Maximum Rows Per Page .

,

, OAM Page Ratio , and Index

Max Size of Non-Leaf Index

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P ROCEDURES E DITOR (S YBASE ASE)

The Procedures Editor lets you view and modify procedure definitions and modify associated privileges and dependencies.

573 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a procedure

1 Open an editor on the procedure. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Definition

Dependencies

Permissions

Settings and tasks

Lets you modify the SQL code for a procedure.

NOTE: If the Definition tab for the procedure shows a Source text for this compiled object is hidden message, source text for this compiled object has been hidden. For

more information, see " Hide Text " on page 652.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

R ULES E DITOR (S YBASE ASE)

The Rules Editor lets you modify basic properties of a rule.

To edit a rule

1 Open an editor on the rule. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Dependencies

DDL View

Settings and tasks

Lets you specify a Restriction and select a Type (STANDARD_RULE,

AND_ACCESS_RULE, OR_ACCESS_RULE).

NOTE: If the Restriction box shows a Source text for this compiled object is hidden message, source text for this compiled object has been hidden. For more information,

see " Hide Text " on page 652.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

S EGMENTS E DITOR (S YBASE ASE)

The Segments Editor lets you manage segment location, associated objects, segment space, and segment thresholds.

RAPID SQL 8.6/XE5 USER GUIDE 574

MODIFYING OBJECTS USING EDITORS

To edit a segment

1 Open an editor on the segment. For details, see

Opening an Object Editor

.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Location

Objects

Space

Threshold

DDL

Settings and tasks

This tab lets you view the Name and Max Size settings you specified when creating the segment. It also lets you change the Grow By and Threshold Free Space settings. For

information on these settings, see " Segments (Sybase ASE) - Properties " on page 442.

This tab also displays a Hysteresis value, the global variable

@@thresh_hysteresis , that controls threshold sensitivity to variations in free space.

Lets you Drop or Extend selected segments.

Lets you manage database objects associated with the segment. Objects are organized in a tree structure. You can open an object editor on a table, index, or constraint by

double-clicking that object. For information on specific editors, see " Sybase ASE Object

Editors " on page 565.

Displays a summary of segment space distribution, broken down into data, indexes, unused, and other. Also provides reserved, data, indexes, and unused space values for each object on the segment.

Displays a list of the free pages thresholds for the segment. For a selected threshold, the

Property / Value list displays the associated procedure name. Optionally you can:

Click the Add button to specify the number of free pages and procedure name for a new segment threshold.

Select an existing threshold and modify the threshold’s procedure name value.

Select an existing threshold and click the Delete button to delete that threshold

For details on using this tab, see

Viewing the SQL/DDL for an Object .

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

T ABLES E DITOR (S YBASE ASE)

The Tables Editor lets you manage columns, basic properties, constraints, storage and space, and partitions of a table.

575 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a table

1 Open an editor on the table. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Indexes

Settings and tasks

Displays the currently defined columns in the table. For any selected column, the Property/Value list provides additional detail on that column. Available properties depend on the datatype you choose as well as on the property values you select:

Computed and Computed Expression - Let you define a column as a computed column and provide the computed column expression.

Type - Lets you select a datatype (depending on the type, additional properties such as Size ,

Width , and Scale may be available).

Identity Column - Select this check box to define the column as an identity column.

Allow Nulls - Select this check box to allow nulls in this column.

Default Collation - available for text/character datatypes, lets you specify a default collation.

Default Value - Lets you type a constant value or select a function returning a constant value to serve as the default for the column

Default Binding and Rule Binding - Let you bind a rule or default to a column.

Optionally, you can:

Select a column, and in the Property / Value list modify property values for that column.

Click Add Column , provide a name for the new column, and set property values for the column.

Select a column and click Delete to remove the column from the table.

Lets you work with properties in the following categories:

Physical

Storage

Lets you set the

Page ,

Segment Name

Reserve Page Gap , and

(DEFAULT, SYSTEM),

Identity Gap

Maximum Rows Per

properties.

Cache Strategy Lets you set MRU Replacement Strategy and Prefetch Strategy properties.

Row Locking

Strategy

Lets you view the Expected Row Size property and set the Lock Scheme

(ALLPAGES, DATAPAGES, ROWPAGES) property.

Lets you manage indexes for a table. On opening, the list of current indexes for the table is displayed. Optionally, take one of the following actions:

Click Add to open a dialog that lets you add a new index to the table.

Select an index and click Edit to open a dialog that lets you edit index properties.

Select an index and click Drop to open a dialog that lets you remove the index from the table.

RAPID SQL 8.6/XE5 USER GUIDE 576

MODIFYING OBJECTS USING EDITORS

Tab

Constraints

Space

Partitions

Settings and tasks

Lets you manage constraints for the table. Constraints are grouped by type, under folders.

Optionally take one of the following actions:

Select a constraint type folder and click Add to open a dialog that lets you add a constraint of that type.

Select a constraint and click Edit to open a dialog that lets you modify the constraint details.

Select a constraint and click Drop to remove the constraint.

Lets you view the table usage and the distribution of table space for a table. Optionally, doubleclick a slice in the pie chart for detailed statistics.

Displays partition details for the table including the Partition Type (ROUNDROBIN, HASH, LIST,

RANGE), partitioning Columns (name and datatype) and Partition Definitions (Name, values, segments).

You can also add or modify partition definitions. For more information, see " Partitioning Sybase

ASE Tables " on page 577.

Dependencies

For details on using this tab, see " Working with Object Dependencies " on page 458.

Permissions

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

DDL View

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

P ARTITIONING S YBASE ASE T ABLES

The Create Partition and Edit Partition wizards let you work with table partitions.

To create or edit table partitions

1 Open an editor on a table. For details, see " Opening an Object Editor " on page 453.

2 On the Partition tab, click the Create Partition or Edit Partition button.

3 Use the following table as a guide to understanding and modifying the settings on the tabs of this wizard:

Tab

Properties

Columns (not available for a

Partition Type of

ROUNDROBIN)

Range Definitions

(only available for a

Partition Type of

RANGE)

Settings and tasks

In addition to displaying basic identification and ownership properties, this pane lets you select a Partition Type (ROUNDROBIN, HASH, LIST, RANGE).

For each column to be added, click New to add a column and select a Column name.

Lets you create an ordered list of partitions. For each partition, click New to open the Add

Partition Definition wizard. Provide a Name , select a Segment , (DEFAULT, SYSTEM,

LOGSEGMENT) and click Add .

The Range Definitions pane also lets you edit and remove partitions.

577 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Partitions

Definitions (only available for a

Partition Type of

HASH)

List Definitions

(only available for a

Partition Type of

LIST)

Settings and tasks

Lets you specify a Partition method:

None

Number of Partitions - Specify a Number of Partitions , and then for each partition, click the

New button and select a segment.

By Partition Name - For each partition, click New , specify a Name and select a Segment .

Lets you create a list of partition definitions. For each partition, click New to open the Add

Partition Definition wizard. Provide a Name , select a Segment , (DEFAULT, SYSTEM,

LOGSEGMENT) and click Add .

The List Definitions pane also lets you edit and remove partitions.

4 When ready, click Finish .

T RIGGERS E DITOR (S YBASE ASE)

The Triggers Editor lets you modify the trigger body of a trigger and change its enabled/ disabled status.

To edit a trigger:

1 Open an editor on the trigger. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Definition

Dependencies

Settings and tasks

Lets you view the basic identifying properties of the trigger and its parent view or table:

Parent Type , P arent Owner , Parent Name , Owner , Name , Create Date , Fire On

Insert , Fire On Update , and Fire On Delete . For details on these properties, see

" Triggers (Sybase ASE) - Properties " on page 446.

This panel also lets you specify whether the trigger is Enabled.

Lets you modify the CREATE TRIGGER body for a trigger. To modify a trigger, Rapid SQL must drop then create the trigger.

NOTE: If the Definition tab for the trigger shows a Source text for this compiled object is hidden message, source text for this compiled object has been hidden. For more

information, see " Hide Text " on page 652.

For details on using this tab, see " Working with Object Dependencies " on page 458.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459

U NIQUE K EYS E DITOR (S YBASE ASE)

The Unique Keys Editor lets you manage the columns and basic properties for a unique key as well as view page and row statistics.

RAPID SQL 8.6/XE5 USER GUIDE 578

MODIFYING OBJECTS USING EDITORS

To edit a unique key

1 Open an editor on the unique key. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Columns

Properties

Statistics

DDL View

Settings and tasks

Lets you manage columns that make up the unique key. On opening, this tab shows the existing columns. For each column, the datatype (and if applicable the precision in brackets) and whether the table definition permits nulls in the target table column.

Optionally you can:

Change the Sort order of a column.

Click the New button and select a column name from the dropdown, to add a column to the index.

Select a column and click the Drop button to delete the column from the index.

Select a column and use the arrow buttons to reorder the columns in the index.

Lets you work with properties in the following categories:

Attributes Lets you set Clustered and Maximum Rows Per Page properties.

Storage Lets you set the Reserve Page Gap , and

LOGSEGMENT, SYSTEM) properties.

Segment (DEFAULT,

Lets you view statistics in the following categories:

Page

Statistics

Row

Statistics

Data Pages

Page Ratio .

, Reserved Pages

Maximum Row Size

Row , and

,

, Used Pages

Minimum Row Size

Maximum Rows Per Page .

,

, OAM Page Ratio , and Index

Max Size of Non-Leaf Index

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

U SER D ATATYPES E DITOR (S YBASE ASE)

The User Datatypes Editor lets you view and modify user datatype definitions and view objects associated with a user datatype.

579 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

To edit a user datatype

1 Open an editor on the user datatype. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Usage

DDL View

Settings and tasks

Lets you work with properties in the following categories:

Base datatype Lets you set Type , Size , Allow Nulls , and Identity settings.

Bindings Lets you set Default Binding and Rule Binding properties.

Displays all objects referring to or referenced by a user datatype.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

U SER M ESSAGES E DITOR (S YBASE ASE)

The User Messages Editor lets you manage user messages and their respective object bindings.

NOTE: On Sybase ASE, user messages are only available under the Master database.

To edit a user message

1 Open an editor on the user message. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Information

Bindings

DDL View

Settings and tasks

Displays the message text for each language version of the message and offers the options to add a new language version, drop a language version, or modify a language

version. For detailed instructions, see " User Messages (Sybase ASE) - Information " on page 449.

Displays any constraints to which the user message is bound. This tab also lets you create

new bindings and delete current bindings. For details, see " User Messages (Sybase ASE)

- Bindings " on page 450.

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 580

MODIFYING OBJECTS USING EDITORS

U SERS E DITOR (S YBASE ASE)

The Users Editor lets you view and modify user definitions and manage associated logins and objects.

To edit a user

1 Open an editor on the user. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Logins

Objects

Settings and tasks

Lets you view the user Name and Login Name for the user. Lets you specify a Group

Name for the user.

Lets you assign logins to a user by selecting associated check boxes.

Lets you manage database objects associated with the user. Objects are organized in a tree structure with folders containing the objects. Optionally, take one of the following actions:

Select an object and click Edit to open an object editor on the selected object.

Object Permissions and

System Permissions

Comment

DDL View

Select an object and click Drop to initiate dropping the selected object.

For details on using these tab, see " Working with Privileges and Permissions " on page 456.

For details on using this tab, see

Adding a Comment to an object .

For details on using this tab, see " Viewing the SQL/DDL for an Object " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

V IEWS E DITOR (S YBASE ASE)

The Views Editor lets you view the columns for the view and work directly with the SQL to create the view.

To edit a view

1 Open an editor on the view. For details, see " Opening an Object Editor " on page 453.

2 Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:

Tab

Properties

Settings and tasks

Displays all columns for the view. Details for each column include the Column Name , the

Datatype (and if applicable, with the precision in parentheses), and whether or not Nulls are allowed for that column.

581 RAPID SQL 8.6/XE5 USER GUIDE

MODIFYING OBJECTS USING EDITORS

Tab

Definition

Dependencies

Permissions

Settings and tasks

Displays the SQL (CREATE VIEW) for the view.

NOTE: If the Definition tab for the view shows a Source text for this compiled object is hidden message, source text for this compiled object has been hidden. For more

information, see " Hide Text " on page 652.

For details on using this tab, see " Working with Object Dependencies " on page 458.

For details on using this tab, see " Working with Privileges and Permissions " on page 456.

3 When finished, you can submit your changes. For details, see " Previewing and Submitting

Object Editor Changes " on page 459.

RAPID SQL 8.6/XE5 USER GUIDE 582

MODIFYING OBJECTS USING EDITORS

583 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

O

BJECT ACTIONS

In addition to letting you create and perform basic editing on various object types, Rapid SQL offers a number of actions that can be applied to objects. While object action support differs by

DBMS platform, they are most commonly implementations of:

• ALTER OBJECT TYPE clauses/options not typically available from object editors, such as

REBUILD INDEX and RENAME

• Other SQL commands such as TRUNCATE, REORG, and LOCK

• System procedures and other available utilities

Most object actions are implemented as multi-panel wizards that guide you through the action.

For an introduction to invoking object actions and working through the panels, see " Overview of object actions/operations execution " on page 584.

For a listing of available actions and access to detailed instructions, see " Available object actions by DBMS " on page 588.

O VERVIEW OF OBJECT ACTIONS / OPERATIONS EXECUTION

Most commonly, initiating an object operation opens a wizard with panels that guide you through initiating the action. For details, see the following topics

Initiating an object operation

Using object operation wizards

I NITIATING AN OBJECT OPERATION

Object operations are most commonly available as right-click context menu selections on the

Database Navigator, available with one or more objects selected.

RAPID SQL 8.6/XE5 USER GUIDE 584

OBJECT ACTIONS > OBJECT ACTIONS

NOTE: To verify availability of an object action for a specific object type and DBMS platform,

see the topic covering that object type in " Supported Objects " on page 180.

To Initiate an Object Operation

1 Connect to the datasource that contains the object you want to perform the operation

against. For more information, see " Connecting to Datasources " on page 153.

2 On the Database Navigator, expand nodes until the target object type is visible and then expand the target object type. See the following topics for more information:

• " Database Explorer " on page 31 - for general information on working with the Explorer.

• " Supported Objects " on page 180, specific object type topic - for information on

navigating Datasource Navigator nodes to the target object type.

Rapid SQL displays objects of that type.

585 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

3 Take one of the following actions:

• To initiate an operation against a single object, right-click the object and select the operation from the context menu.

• To initiate an operation against a multiple objects, use CTRL-clicking to select multiple objects, right-click one of the selected objects and then select an operation from the context menu.

NOTE: Not all object operations can be applied to multiple objects.

Rapid SQL opens the wizard for the selected object operation.

For information on using the wizard panels to provide required information and execute an

operation, see " Using object operation wizards " on page 586.

U SING OBJECT OPERATION WIZARDS

A typical object operation wizard is a multi-panel window that walks you through the steps necessary to execute the operation. The wizard typically opens on a first panel named either

Action Options or using a name specific to that object action. For example, the first panels for the Rename and Drop operations:

The wizard’s Next and Back buttons let you navigate through the wizard panels. While the remaining panels of the wizard differ by action type, the following are the most common:

Dependencies

Preview

RAPID SQL 8.6/XE5 USER GUIDE 586

OBJECT ACTIONS > OBJECT ACTIONS

After providing information and inspecting settings on the panels, there are two execution options:

• Use the Execute (or Finish ) button to execute the operation immediately

• Use the Schedule button to schedule the operation to execute the operation at a later time

or to be executed on a regular basis. For information, see " Scheduling " on page 856.

D EPENDENCIES

For those object action wizards that include a Dependencies panel, it lists the objects potentially impacted by this object action. Within the main categories of Referencing Objects and Referenced Objects , objects are grouped within object type folders.

CAUTION: A Dependencies panel, if present, is provided for information only. Rapid SQL does not attempt to resolve the current action in referenced or referring objects.

P REVIEW

The Preview panel lets you inspect the SQL generated by wizards or editors when you create, edit, or perform other actions against a database object. Depending on the action being taken, this panel may contain the following controls:

Button Description

Lets you save the SQL.

Lets you print the SQL.

Lets you send the SQL via e-mail.

Opens an SQL Editor on the SQL contained in the Preview dialog. For more information, see

" Using the SQL Editor " on page 789.

Opens a dialog that lets you select job scheduling options. Once you have selected your options,

a third-party job scheduler opens. For more information, see " Scheduling " on page 856.

Executes the SQL.

Closes the Preview dialog without executing the SQL and returns you to the wizard, editor, or dialog box from which you invoked the Preview dialog. Since you cannot edit the SQL in the

Preview dialog, this lets you make changes before once again previewing and then executing the

SQL.

587 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

A VAILABLE OBJECT ACTIONS BY DBMS

The table below lists the object actions provided by Rapid SQL

Add or Modify Check Constraint

Add/Modify Login Trigger

Add Private Key

Allocate Extent

Analyze

Analyze Tables

Attach Database

Backup Certificate

Bind Package

Bind To Temporary Database

Build

Build Query

Change Access Status

Change Category

Change Password

Change Status

Check Tables

Checkpoint

Checksum Tables

Coalesce

Compile

Convert Tables

Copy Object Names

Copy Schema

Create Alias

Create Clone

Create Insert Statements

Create Like

Create Synonym

Create View

DBCC

Deallocate Unused Space







































































 



































 







































RAPID SQL 8.6/XE5 USER GUIDE 588

OBJECT ACTIONS > OBJECT ACTIONS

Delete Statistics

Describe

Detach Database

Disable Index

Disable Job

Disable Keys

Disable/Enable Triggers

Drop

Drop Automatic Storage Path(s)

Drop By Category

Drop Clone

Drop Java

Drop Login Trigger

Drop Materialized Query Table

Drop Unused

Drop Unused Columns

Backup Certificate

Enable Job (Job Queue)

Enable Keys

Enable Recycle Bin

Enable/Disable (Oracle Jobs)

Estimate Size

Exchange Data With Clone

Execute

Extract

Extract Data as XML

Flashback Table

Flashback Recycle Bin Entry

Flush Cache

Flush Tables

Free (Packages)

Free Plan

Generate Package/Procedure/

Statement

Hide Text



































 









 















































 

















589 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Import Data From File

Load Java

Lock

Lower High Water Mark

Move Log

Move Table

Next Used Filegroup

Object Properties

Optimize Tables

Optimize Tables

Place

Population status

Purge Recycle Bin

Purge Recycle Bin Entry

Quiesce

Reassign By Category

Rebalance

Rebind Packages

Rebind Plans

Rebuild (Full-text Catalogs)

Rebuild Index

Rebuild Outlines

Rebuild Table

Recompile

Refresh Table

Rename

Reorganize /Reorg

Repair Tables

Report

Restart Sequence(s)

Resynchronize

Run Job (Oracle Jobs)

Run Job (job queues)

Role Activation

Run Job (job queues)

RAPID SQL 8.6/XE5 USER GUIDE













  



 



































 













 























































590

OBJECT ACTIONS > OBJECT ACTIONS

Schema

Select * From

Set Default

Set Integrity

Set Online/Offline

Set Statistics

Set UNDO

Shrink

Start Database

Stop Database

Stop Job

Switch Online

Transfer Ownership

Truncate

Unbind From Temporary

Database

Update Statistics









































 





 









  









A DD OR M ODIFY C HECK C ONSTRAINT

This action opens a Check Constraints Editor or Check Constraints Wizard.

Platform Availability

DB2 LUW , DB2 z/OS

,

ITB/FBD ,

MySQL , ORCL , SQL SVR , SYB ASE

To Open the Check Constraint Editor or Check Constraint Wizard

1 On the Navigator, right-click the Check Constraints node and select Create .

2 Use the following table as a guide to creating or editing the constraint:

Step

Definition

Settings and tasks

Table Owner or Table Schema

(DB2 LUW, DB2 z/OS, SQL Server, Oracle,

Sybase ASE)

Select the owner of the table for which the check constraint is to be created.

Table or Table Name (DB2 LUW, DB2 z/

OS, Interbase/Firebird, SQL Server, Oracle,

Sybase ASE)

Lets you select where you want to place the check constraint.

591 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Step Settings and tasks

Name (DB2 LUW, DB2 z/OS, Interbase/

Firebird, SQL Server, Oracle, Sybase ASE)

Lets you type the name of the constraint, which can be up to 30 characters long and must be unique across the entire database.

Enables or disables the check constraint.

Enabled or Enforced (DB2 LUW, DB2 z/

OS, SQL Server, Oracle)

Not for Replication (SQL Server) Enabling this feature ensures that the constraint is not enforced if the table is replicated for another database.

DDL View

Check Condition (DB2 LUW, DB2 z/OS,

Interbase/Firebird, SQL Server, Oracle,

Sybase ASE)

Comment (DB2

LUW)

Lets you type a comment.

Type the check constraint condition. As a convenience, use the Table Columns button to paste in column names as part of the condition.

Preview the DDL generated by your choices. Finally, use the Execute button to create the check constraint.

A DD /M ODIFY L OGIN T RIGGER

This action lets you build and submit an sp_modifylogin or ALTER LOGIN call that specifies a login script option. The target login trigger can be any stored procedure located on the user’s default database, and the procedure will run each time the user successfully logs in. The action can be used to:

• Add a login trigger to a login that currently has no login trigger configured

• Change the specified stored procedure for a login that already has a login trigger configured

Platform Availability

SYB ASE

To Specify the Stored Procedure Used as a Login Trigger for a Login:

1 Expand the Logins node. Rapid SQL displays all logins for the datasource.

2 Right-click a login and select Login Trigger Actions > Add/Modify Login Trigger from the context menu. Rapid SQL opens the Add/Modify Login Trigger dialog.

3 Use the following table as a guide to understanding and modifying settings in the wizard:

Step

Action options

Dependencies

Preview

Settings and tasks

From the Login Procedure dropdown, choose the default database stored procedure that is to be configured as the login trigger for this login.

Review the referring and referred objects that will be automatically resolved when you

execute this operation. For details, see " Dependencies " on page 587.

Preview the DDL generated for the operation and when ready, click Execute .

RAPID SQL 8.6/XE5 USER GUIDE 592

OBJECT ACTIONS > OBJECT ACTIONS

After executing this action, the specified stored procedure name is available in the Login editor.

For details, see " Logins Editor (Sybase ASE) " on page 572.

Related Information

• " Drop Login Trigger " on page 635

A DD P RIVATE K EY

The Add Private Key object action builds and submits an ALTER CERTIFICATE... WITH PRIVATE

KEY statement, optionally including a DECRYPTION BY PASSWORD argument. This lets you change the private key for a certificate, add a private key to a certificate that currently does not have one, and optionally, specify a decryption password.

NOTE: This functionality is available for Microsoft SQL Server only.

To change a certificate’s private key

1 Initiate an Add Private Key

action against a certificate. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Add Private Key dialog box.

2 Use the following table as a guide to understanding and modifying settings in the dialog:

Step

Action options

Dependencies

Preview

Settings and tasks

Lets you work with the following settings:

Private Key File The full path and filename (local or UNC) of the file to which the private key is to be written.

Decryption Password The password required to decrypt the key.

Review the referring and referred objects that will be automatically resolved when you

execute this operation. For details, see " Dependencies " on page 587.

Displays the DDL that will execute the object action. For details, see " Preview " on page 587.

3 Finally, use the Execute button to create the object.

For related information, see "Backup Certificate " on page 597.

A LLOCATE E XTENT

The Allocate Extent dialog lets you explicitly allocate extents for clusters, tables, and indexes in

Oracle. Though Oracle dynamically allocates extents when additional space is required, explicit allocation of additional extents can be useful if you know that an object grows.

593 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Explicit allocation of additional extents can be particularly helpful when using Oracle Parallel

Server. When using Oracle Parallel Server and allocating additional extents, you can allocate an extent explicitly to a specific instance in order to minimize contention for free space among multiple instances.

Platform Availability

ORCL

Important Notes

For composite-partitioned tables, you can allocate extents to subpartitions as well as partitions.

To Allocate an Extent for a Cluster, Table, or Index

1 Initiate an Allocate Extent action against a table, cluster, index, primary key, or unique key.

For more information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to setting the options on this dialog:

Option Description

Extent Size Specify an extent size in KBs or MBs.

Datafile

Instance

Lets you select the new datafile. You can choose a specific datafile from which to take space for the added extent. If you choose (Default), Oracle takes the space from any accessible datafile in the tablespace containing the table, index, or cluster.

Lets you specify a freelist from which to draw the extent. If you are using Oracle Parallel Server, you can assign the new extent to a free list group associated with a specific instance. The number you enter in the Instance text box should be the number of the freelist group that you wish to use, rather than the number of the specific instance. If you are using Oracle Parallel Server and you omit this parameter, Oracle allocates the extent, but the extent is drawn from the master freelist by default.

Only use this parameter for Oracle Parallel Server.

NOTE: The number you enter in the Instance field should be the number of the free list group that you wish to use, rather than the number of the specific instance.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

A NALYZE

This action lets you work with statistics for tables, indexes (primary keys and unique keys), and clusters.

Platform Availability

ORCL

RAPID SQL 8.6/XE5 USER GUIDE 594

OBJECT ACTIONS > OBJECT ACTIONS

When using this action, Rapid SQL lets you build and submit the following ANALYZE statement variations or DBMS_STATS package procedure calls:

Options

Compute Statistics

Gather Statistics

Delete Statistics

Estimate Statistics

Validate Structure

Import Statistics

List Chained Row Into Table

ANALYZE statement variation or DBMS_STATS call generated

ANALYZE INDEX/CLUSTER/TABLE... COMPUTE STATISTICS

DBMS_STATS.GATHER_INDEX_STATS

DBMS_STATS.GATHER_TABLE_STATS,

ANALYZE INDEX/CLUSTER/TABLE... DELETE STATISTICS

DBMS_STATS.DELETE_INDEX_STATS

DBMS_STATS.DELETE_TABLE_STATS

ANALYZE INDEX/TABLE/CLUSTER... ESTIMATE STATISTICS

ANALYZE INDEX/TABLE/CLUSTER... VALIDATE STRUCTURE

DBMS_STATS.IMPORT_INDEX_STATS

DBMS_STATS.IMPORT_TABLE_STATS

ANALYZE TABLE/CLUSTER... LIST CHAINED ROWS INTO

NOTE: Before using this object action, consult Oracle documentation for information on the

ANALYZE statement and relevant DBMS_STATS package procedures. Be familiar with restrictions, required permissions, partition options, parameter values, and requirements. For more information, see

Accessing Third Party Documentation .

To obtain or modify statistics for a database object:

1 Initiate an Analyze action against one or more clusters, indexes, primary keys, unique keys,

or tables. For more information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Analyze wizard:

Step

Action Options

Preview

Settings and tasks

Take the following steps:

If you are not working against a cluster, either select the Use dbms_stats_package check box to generate one of the DBMS_STATS procedure calls or deselect the Use dbms_stats_package check box to generate an ANALYZE statement variation.

From the Type dropdown, select one of the Rapid SQL options from the table above.

Additional options are offered depending on the Type value you choose. They correspond to ANALYZE statement clauses or DBMS_STATS procedure parameters. See

Oracle documentation for details.

Displays the DDL that will execute the object action. For details, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

595 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

A NALYZE T ABLES

Rapid SQL lets you issue an ANALYZE TABLE statement, analyzing and storing the key distribution for a table.

Platform Availability

MySQL

To analyze a table:

1 Initiate an Analyze Tables action against one or more tables. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in this wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Lets you review the tables you selected.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

A TTACH D ATABASE

The Attach Database object action lets you specify a set of previously detached data and transaction files to be used to attach a database to a Microsoft SQL Server instance. This makes the database available in exactly the same state it was in when it was detached

Platform Availability

SQL SVR

To Attach a Database

1 Initiate an Attach Database

action against a database. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Attach Database File(s) dialog.

2 In the Database Name to be Attached box, type the database name.

RAPID SQL 8.6/XE5 USER GUIDE 596

OBJECT ACTIONS > OBJECT ACTIONS

3 In the grid, do one of the following:

• Select the target database file(s).

• To add database file(s), click Add and then enter the name of the MDF (master data file) of the database to attach.

Rapid SQL automatically adds the appropriate *.ldf file.

4 To drop database file(s), click Drop and then select the target file(s).

5 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

Related Information

"Detach Database " on page 628

B ACKUP C ERTIFICATE

The Backup Certificate object action builds and submits a BACKUP CERTIFICATE... TO FILE statement with optionally, a WITH PRIVATE KEY clause. This lets you back up a certificate to file.

Platform Availability

SQL SVR

To write a certificate to disk

1 Initiate a Backup Certificate

action against a certificate. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Attach Database File(s) dialog box.

2 Use the following table as a guide to understanding and modifying settings in the dialog:

Step

Action options

Dependencies

Preview

Settings and tasks

Lets you work with the following settings:

File The full path and filename (local or UNC) of the file to which the certificate is to be written.

Private Key File

Encryption Password

The full path and filename (local or UNC) of the file to which the private key is to be written.

The password used to encrypt the private key before writing the key to the backup file.

Decryption Password The password used to decrypt the private key before backing up the key.

Lets you review the objects potentially impacted by this action. For more information, see

" Dependencies " on page 587.

Preview the DDL generated for the operation and when ready, use the Schedule or Execute button to perform this action.

597 RAPID SQL 8.6/XE5 USER GUIDE

3 Finally, use the Execute button to create the object.

For related information, see "Add Private Key " on page 593.

OBJECT ACTIONS > OBJECT ACTIONS

B IND P ACKAGE

The Bind Package Wizard lets you set package parameters, add environments, and set package properties.

Platform Availability

DB2 z/OS

To Package Parameters, Add Environments, and Set Package Properties

1 Expand an owning schema, right-click Packages , and select Bind from the context menu.

Rapid SQL opens the Bind Package wizard.

2 Use the following table as a guide to understanding and setting options on this wizard:

Step

1

2

Settings and tasks

Location Lets you select the name of the location to connect to.

Collection Lets you select the location of the DBMS where the package binds and where the description of the package resides.

Would you like to Copy an Existing Package from Another Collection

New Package if you select No for the

Would you like ... control)

(available Lets you select a Package Name and PDS Name.

Copy Package (available if you select Yes for the

Would you like ... control)

Lets you qualify with the following:

Collection - the collection to copy from.

Options - COMMAND or COMPOSITE.

Package - Lets you select a package.

Version - Lets you select a version of the package.

Lets you select a package Owner , a Qualifier (the package creator), an Action of ADD or REPLACE, and the Version of the package.

RAPID SQL 8.6/XE5 USER GUIDE 598

OBJECT ACTIONS > OBJECT ACTIONS

Step

3

Settings and tasks

Isolation Determines how far to isolate an application from the effects of other running applications.

Keep Dynamic Specifies that DB2 keeps dynamic SQL statements after commit points. The application does not need to prepare an SQL statement after every commit point. DB2 keeps the dynamic SQL statement until the application process ends, a rollback operation occurs or the application executes an explicit PREPARE statement with the same statement identifier.

If the prepared statement cache is active, DB2 keeps a copy of the prepared statement in the cache. If the prepared statement cache is not active, DB2 keeps only the SQL statement string past a commit point. DB2 then implicitly prepares the SQL statement if the application executes an OPEN, EXECUTE, or DESCRIBE operation for that statement.

Current Data

Degree

DB Protocol

Determines whether to require data currency for read-only and ambiguous cursors when the isolation level of cursor stability is in effect. It also determines whether block fetching can be used for distributed, ambiguous cursors.

Determines whether to attempt to run a query using parallel processing to maximize performance. Lets you select an option.

Specifies which protocol to use when connecting to a remote site that is identified by a three-part name statement.

Dynamic Rules Determines what values apply at run time for the following dynamic SQL attributes:

The authorization ID that is used to check authorization

The qualifier that is used for unqualified objects

The source for application programming options that DB2 uses to parse and semantically verify dynamic SQL statements

Whether dynamic SQL statements can include GRANT, REVOKE, ALTER, CREATE, DROP, and RENAME statements

Release

Validate

Commit - Releases resources at each commit point.

Deallocate - Releases resources only when the program terminates.

Determines whether to recheck, at run time, errors found during bind. The option has no effect if all objects and needed privileges exist.

Bind - If not all objects or needed privileges exist at bind time, the wizard displays an error messages, and does not bind the package.

Run - If not all objects or privileges exist at bind time, the process issues warning messages, but the bind succeeds. DB2 checks existence and authorization again at run time for SQL statements that failed those checks during bind. The checks use the authorization ID of the package owner.

599 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Step

4

5

Settings and tasks

Explain Obtains information about how SQL statements in the package are to execute, and then inserts that information into the table owner.PLAN_TABLE, where owner is the authorization ID of the owner of the plan or package. This option does not obtain information for statements that access remote objects.

Optimization

Hint

Reoptvars

Encoding

Query optimization hints are used for static SQL.

Re-determines the access path at run time.

Lets you select type of language for the package.

Defer Prepare Optionally, prepares dynamic SQL statements that refer to remote objects. Lets you choose from DEFER(PREPARE) and NODEFER(PREPARE).

Degree

Page Writes

1 or ANY.

NO, PH1, or YES.

Flag Lets you select flag for messages to display: all (default), completion, error or warning, and informational.

Use the arrow buttons to move system connections between the Disabled Environments and Enabled

Environments lists.

3 When ready, click Finish .

B IND T O T EMPORARY D ATABASE

This action builds and submits a sp_tempdb bind system procedure call. It lets you bind a login to a temporary database.

Platform Availability

SYB ASE

To Bind a Login to a Temporary Database

1 Initiate a Bind To Temporary Database action against one or more logins. For more

information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Bind To

Temporary Database wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Select the target temporary database from the Bind To Temporary Database dropdown.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For details, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

RAPID SQL 8.6/XE5 USER GUIDE 600

OBJECT ACTIONS > OBJECT ACTIONS

B UILD

This action lets you build a procedure, specifying a Build utility function (ALTER_REBUILD,

REBUILD, REBIND, or DESTROY), a Build owner , Precomplie options , Compile options ,

Prelink options , Link options , and Bind options .

Platform Availability

DB2 z/OS

To Build a Procedure

1 Initiate a Build

action against a procedure. For more information see " Initiating an object operation " on page 584.

2 Type or select the build options in the Procedure Build Options dialog:

3 Click Build .

B UILD Q UERY

Right-clicking a table and selecting Build Query opens a tool that lets you create, structure, and

manipulate queries. For details, see " Query Builder " on page 861.

C HANGE A CCESS S TATUS

This action builds and submits a basic ALTER TABLE... READ ONLY/READ WRITE statement. This lets you toggle the table between READ ONLY and READ/WRITE modes.

NOTE: The Browser listing for an Oracle table has a Read-Only field that displays the current

status for a table. For more information, see " Browsers " on page 34.

Platform Availability

ORCL 11g

To Change Between READ ONLY and READ WRITE Modes for a Table

1 Initiate a Change Access Status action against one or more tables. For more information,

see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the dialog:

Step

Action options

Dependencies

Settings and tasks

Select the Read-only check box to generate a ALTER TABLE... READ ONLY statement, putting the table into read-only mode. Deselect the Read-only check box to generate a

ALTER TABLE... READ WRITE statement, putting the table into read-write mode.

Lets you review the objects potentially impacted by this action. For more information, see

" Dependencies " on page 587.

601 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Step

Preview

Settings and tasks

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

C HANGE C ATEGORY

Rapid SQL lets you change the category of a target Stored Outline.

Platform Availability

ORCL

To Change the Category of a Stored Outline

1 Initiate a Change Category action against a stored outline. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Change

Category wizard:

Step

Action options

Dependencies

Preview

Settings and tasks

From the Category dropdown, choose a new, target category.

Review the referring and referred objects that will be automatically resolved when you

execute this operation. For more information, see " Dependencies " on page 587.

Displays the DDL that will execute the object action. For details, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

Related Information

• " Drop By Category " on page 633

• " Reassign By Category " on page 666

C HANGE P ASSWORD

The Change Password dialog lets you change user or login passwords, which you should do on a regular basis to guard against security leaks.

Platform Availability

MySQL , ORCL , SQL SVR , SYB ASE

RAPID SQL 8.6/XE5 USER GUIDE 602

OBJECT ACTIONS > OBJECT ACTIONS

To Change the Password for a User or Login

1 Take one of the following actions:

• For Sybase ASE or SQL Server, expand the Logins node.

• For MySQL and Oracle, expand the Users node.

2 Right-click the user or login, and then select Change Password from the context menu.

Rapid SQL opens the Change Password dialog.

3 For Oracle and SQL Server datasources, in the Old Password box, type the old password.

Providing the old password is optional on SQL Server datasources.

4 In the New Password box, type the new password.

5 In the Confirm Password box, type the new password.

6 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

C HANGE S TATUS

You can change the status of a number of relevant object types. For details, see the following topics:

• Change Status (InterBase Triggers)

Change Status (Oracle, SQL Server, and Sybase ASE triggers)

Change Status (SQL Server DDL triggers)

Change Status (Full-text Indexes)

Change Status (check constraints)

Change Status (tablespaces)

C HANGE S TATUS (I NTER B ASE T RIGGERS )

This action lets you build an ALTER TRIIGGER statement with an ACTIVE or INACTIVE argument, and issue the statement against one or more triggers.

To Change the Status of a Trigger:

1 Initiate a Change Status action against one or more triggerss. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the dialog:

Step

Action options

Settings and tasks

With Enabled selected, the ALTER TRIGGER statement is created with an ACTIVE argument.

Deselected, the ALTER TRIGGER statement is created with an INACTIVE argument.

603 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Step

Dependencies

Preview

Settings and tasks

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

C HANGE S TATUS (O RACLE , SQL S ERVER , AND S YBASE ASE TRIGGERS )

The Change Status object action lets you build an issue an ALTER TABLE statement that specifies a DISABLE (DISABLE TRIGGER) or ENABLE (ENABLE TRIGGER) option. This lets you enable or disable any triggers.

Loading a database from a previous dump causes any triggers defined in the database to fire. To speed the time required to load a database you should disable triggers.

NOTE: Disabling triggers can lead to problems with maintaining referential integrity and business rules

To enable or disable a trigger:

1 Initiate a Change Status action against one or more triggers. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Change

Status wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Select the Enabled check box to enable the trigger. Deselect it to disable the trigger.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For details, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

C HANGE S TATUS (SQL S ERVER DDL TRIGGERS )

The Change Status object action lets you build and issue a DISABLE TRIGGER... ON DATABASE or ENABLE TRIGGER... ON DATABASE statement. This lets you enable or disable one or more database triggers.

NOTE: The Browser listing for a database trigger indicates its current status. For more

information, see " Browsers " on page 34.

RAPID SQL 8.6/XE5 USER GUIDE 604

OBJECT ACTIONS > OBJECT ACTIONS

To enable or disable a trigger:

1 Initiate a Change Status action against one or more triggers. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Change

Status wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Select the Enabled check box to enable the trigger. Deselect it to disable the trigger.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For details, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

C HANGE S TATUS (F ULL TEXT I NDEXES )

The action builds and submits an ALTER FULLTEXT INDEX statement with an ENABLE or

DISABLE argument, letting you enable or disable the full-text index. Full-text searching is unavailable on tables or views with a disabled full-text index.

Platform Availability

SQL SVR

To Enable or Disable a Full-text Index

1 Initiate a Change Status action against one or more full-text indexes. For more information,

see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the dialog:

Step

Action Options

Preview

Settings and tasks

Select the Enabled check box to enable the full-text index. Deselect the Enabled check box to disable the full-text index.

Note that on opening the dialog, the Enabled check box state reflects whether the index is currently enabled or disabled.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

C HANGE S TATUS ( CHECK CONSTRAINTS )

Rapid SQL lets you change the enabled/disabled status of check constraints, foreign key constraints, primary key constraints, and unique key constraints.

For detailed instructions, see:

605 RAPID SQL 8.6/XE5 USER GUIDE

• Setting constraint status for Microsoft SQL Server objects

• Setting Constraint Status for Oracle Objects

OBJECT ACTIONS > OBJECT ACTIONS

S ETTING CONSTRAINT STATUS FOR M ICROSOFT SQL S ERVER OBJECTS

The Set Constraint Status dialog lets you specify the ability of a group of constraints to be replicated, and (for Microsoft SQL Server version 7 or later) enable or disable check constraints, foreign key constraints, primary key constraints, and unique key constraints.

Completing the Set Constraint(s) Status Dialog Box

To complete this dialog, do the following:

1 Initiate a Change Status action against one or more check constraints. For more information

see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying the settings on the

Change Status wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Enabled Deselect to temporarily override listed check constraints. Useful when you need to execute special processes that would ordinarily incur constraint-related errors.

Not for Replication When you duplicate the table schema and data of a source database containing constraints marked "Not for Replication", these objects are not carried over to the duplicate of the schema.

View the dependencies on the tablespace. For more information, see " Dependencies " on page 587.

Preview the DDL generated from your choices. For more information, see " Preview " on page 587.

3 Use the Execute or Schedule button to complete the operation.

S ETTING C ONSTRAINT S TATUS FOR O RACLE O BJECTS

The Set Constraint(s) Status dialog lets you change the status of check constraints, foreign key constraints, primary key constraints, and unique key constraints. Rapid SQL lets you enable or disable selected constraints and, in the case of primary key and unique key constraints, lets you enable with or without validation and disable with or without the changes cascading.

When enabled, the rule defined by the constraint is enforced on the data values in the columns on which the constraint is placed. When disabled, the constraint rule is not enforced but the constraint continues to be stored in the data dictionary.

RAPID SQL 8.6/XE5 USER GUIDE 606

OBJECT ACTIONS > OBJECT ACTIONS

Temporarily disabling constraints can improve performance when you are loading large amounts of data or when you are making massive changes to a table. Disabling constraints also can be useful if you are importing or exporting one table at a time.

NOTE: Primary keys for index-organized tables cannot be disabled.

NOTE: You cannot drop a unique or primary key constraint that is part of a referential integrity constraint without also dropping the foreign key. To drop the referenced key and the foreign key together, select the Cascade check box in the Set Constraint(s) Status dialog

The table below describes the options and functionality on the Set Constraint(s) Status dialog.

NOTE: The options differ by object.

Option

Enable

Validate

Cascade

Description

Enabling the constraint and not selecting the Validate check box automatically uses Oracle

ENABLE NOVALIDATE clause which enables a constraint so that it does not validate the existing data. A table using constraints in enable novalidate mode can contain invalid data but you cannot add new invalid data to that table.The enable novalidate mode is useful as an intermediate state or when you do not want the constraint to check for possible exceptions (e.g., after a data warehouse load).

Enabling the constraint and selecting the Validate check box causes Oracle to validate all existing data in the key columns of the table with the constraint. If an exception exists, Oracle returns an error and the constraint remains disabled.

Selecting the Cascade check box when disabling a primary key or foreign key constraint instructs

Oracle to simultaneously disable any constraints that depend on the primary or unique key.

Selecting the Delete Cascade check box instructs Oracle to delete data in the child table (on which the foreign key is defined) if the referenced data is the parent table is deleted.

Completing the Set Constraint(s) Status Dialog Box

To complete this dialog box, do the following:

1 Initiate a Change Status action against one or more check constraints. For more information

see " Initiating an object operation " on page 584.

2 Use the table above to select dialog box options.

3 Use the Execute or Schedule button to complete the operation.

C HANGE S TATUS ( TABLESPACES )

You can change the online, offline, or read only status of a tablespace to control access to its segments. In addition, when setting a tablespace offline, you can choose between NORMAL,

TEMPORARY, or IMMEDIATE modes of taking the tablespace offline.

Platform Availability

ORCL

607 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

To Change the Status of a Tablespace

1 Initiate a Change Status action against one or more tablespaces. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Change

Status wizard:

Step

Action options

Dependencies

Preview

Settings and tasks

From the Change Status dropdown, select ONLINE, OFFLINE, or READ ONLY. If you select

OFFLINE, from the OfflineMode dropdown, select NORMAL, TEMPORARY, or IMMEDIATE.

Review the referring and referred objects that will be automatically resolved when you

execute this operation. For more information, see " Dependencies " on page 587.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

C HECK T ABLES

Rapid SQL lets you issue a CHECK TABLE statement, checking one or more tables for errors.

This operation returns a standard CHECK TABLE result set. Each returned message consists of

Table (name), Op (with a value of CHECK), Msg_type (STATUS, ERROR, INFO, WARNING), and

Msg_text components.

Platform Availability

MySQL

To Check a Table for Errors

1 Initiate a Check Tables action against one or more tables. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in this wizard:

Step

Action Options

Preview

Settings and tasks

Changed Only check tables that have changed since the last check.

Extended

Fast

Medium

Perform a full key lookup for all keys in each row.

Check only tables that have not been properly closed.

Scan rows to verify that deleted links are valid. Calculate a key checksum for the rows and verify using a calculated checksum for keys.

Quick Perform a full key lookup for all keys in each row.

Displays the DDL that will execute the object action. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

The results set opens on the Results tab of an ISQL editor window. For more information, see

" Using the Results Editor " on page 830.

RAPID SQL 8.6/XE5 USER GUIDE 608

OBJECT ACTIONS > OBJECT ACTIONS

C HECKPOINT

Running a Checkpoint lets you force all dirty pages for the current database to be written to disk.

A dirty page is any data or log page which, after being read into the buffer cache, is modified but not yet written to disk. The Checkpoint statement saves time in a subsequent recovery by creating a point at which all modifications to data and log pages are guaranteed to have been written to disk. If the current database is in log-truncate mode, CHECKPOINT also truncates the inactive portion of the log.

Platform Availability

SQL SVR , SYB ASE

Important Notes

The default permission for executing a checkpoint is the db_owner fixed database role.

To Run a Checkpoint Against One or More Databases

1 Initiate a Checkpoint action against one or more databases. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to working through the panels of the Checkpoint dialog

Step

Action options

Preview

Description

Displays the names of the database(s) you chose.

Displays the DDL generated to execute the Checkpoint operation. For more information,

see " Preview " on page 587.

3 Use one of the Schedule or Execute buttons to execute the Checkpoint.

C HECKSUM T ABLES

Rapid SQL lets you issue a CHECKSUM TABLE statement, returning a live checksum.

Platform Availability

MySQL

To Check a Table for Errors:

1 Initiate a Checksum Tables action against one or more tables. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in this wizard:

Step

Action Options

Settings and tasks

Extended Specifies that the whole table is to be read, row by row.

609 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Step

Preview

Settings and tasks

Quick Specifies that the live checksum is to be reported. For information on

enabling a live checksum for a table, see " Tables wizard (MySQL) " on page 372.

Displays the DDL that will execute the object action. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

The results set opens on the Results tab of an ISQL editor window. For more information, see

" Using the Results Editor " on page 830.

C OALESCE

You can maximize the size of free space chunks in tablespaces to avoid the situation in which an object cannot acquire enough contiguous free space to accommodate its next extent size.

Towards this goal, look for opportunities to coalesce adjacent blocks of free space into a single, larger block.

Oracle automatically coalesces adjacent free space chunks with a background process. However, it still supports the commands for coalescing free space manually. Depending on the size of the tablespace, coalescing its free space can take a long time. So determine when to perform this operation. It you coalesce immediately, Rapid SQL locks the tablespace.

Platform Availability

ORCL

Important Notes

• You cannot coalesce on an UNDO tablespace.

To Coalesce a Tablespace

1 Initiate a Coalesce action against one or more tablespaces. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Coalesce wizard:

Step

Action options

Dependencies

Preview

Settings and tasks

Verify display of the tablespaces to be coalesced.

Review the referring and referred objects that will be automatically resolved when you

execute this operation. For more information, see " Dependencies " on page 587.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

RAPID SQL 8.6/XE5 USER GUIDE 610

OBJECT ACTIONS > OBJECT ACTIONS

C OMPILE

Rapid SQL lets you recompile specific objects by issuing the proper ALTER statement. The explicit recompilation of invalid objects eliminates the need for implicit run-time recompilation which, in turn, can cause run-time compilation errors and performance overhead. Recompile objects after you make changes to that object or dependent objects.

The following table lists the object types by DBMS for which the Compile operation is available:

DB2 LUW

Oracle Functions Java

Sources

Procedures

Materialized

Views

Packages Package

Bodies

Procedures Schema Types and

Type

Bodies

Views

NOTE: The objects you can compile and the steps in compiling them differ according to the type of data source you are working against. Before proceeding, make sure you are

familiar with the material in " Compiling Oracle Objects " on page 612.

To Compile an Object

1 Initiate a Compile action against one or more supported objects (see the table above). For

more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Compile wizard. Options offered on the Action Options tab differ by object type. For example, no options are provided when compiling Java Sources, while a full range of dependent object-based and debug options are provided when compiling procedures.

611 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

2 Use the following table as a guide to working through the panels of the dialog box

Step Settings and tasks

Action options Compile dependents

If enabled, this option compiles statements for all objects referenced by the object being compiled.

For example, if you compile a function that references a specific procedure and you select to compile the dependent objects, an ALTER

COMPILE statement is created for that referenced procedure.

If disabled, only the current object is compiled and the object’s dependencies are ignored. This is the default setting.

Compile only invalid dependents

If you enabled the Compile dependents option, enabling this option compiles only invalid dependent objects - Creates ALTER COMPILE statements for only those objects that are currently invalid.

Compile system dependents

If you enabled the the debug option.

Compile dependents option, enabling this option compiles dependent system objects - Compiles all of the referenced objects with

Availability

DB2 LUW Procedures

Oracle Functions,

Packages, Procedures,

Types, and Views

DB2 LUW Procedures

Oracle Functions,

Packages, Procedures,

Types, and Views

DB2 LUW Procedures

Oracle Functions,

Packages, Procedures,

Types, and Views

Compile with debug

Enabling this option instructs the Oracle PL/SQL compiler to generate and store the code for use in debugging sessions.

DB2 LUW Procedures

Oracle Functions,

Packages, Package

Bodies, Procedures,

Types, Type Bodies, and

Views

Displays the DDL generated to execute the Checkpoint operation. For more information, see

" Preview " on page 587.

DB2 LUW Procedures

Dependencies Lets you review any dependencies before you proceed. For more information, see

" Dependencies " on page 587.

Preview

Keep specific name

When enabled, compilation will keep the current name.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

C OMPILING O RACLE O BJECTS

To recompile an object it must belong to your schema or you need ALTER ANY privileges on that object. You must also have appropriate privileges for any associated objects. Prior to compiling objects of a particular type, see the relevant topic below:

• Notes on Compiling Oracle Functions

• Notes on Compiling Oracle Java Sources

Notes on Compiling Oracle Materialized Views

Notes on Compiling Oracle Packages and Package Bodies

RAPID SQL 8.6/XE5 USER GUIDE 612

OBJECT ACTIONS > OBJECT ACTIONS

Notes on Compiling Oracle Procedures

Notes on Compiling Oracle Types and Type Bodies

Notes on Compiling Oracle Views

N OTES ON C OMPILING O RACLE F UNCTIONS

Rapid SQL lets you recompile a function. Oracle first recompiles any invalid objects on which the function depends. In addition, it marks any objects that depend on the function as invalid.

To recompile a function that is part of a package, compile the package itself. Rapid SQL uses the

ALTER FUNCTION statement to compile a stand-alone function. However, you should not use the ALTER FUNCTION statement to individually recompile a function that is part of a package.

For more information, see

"Compile " on page 611

.

N OTES ON C OMPILING O RACLE J AVA S OURCES

Oracle lets you compile a Java source. Oracle resolves references to other Java sources.

For more information, see

"Compile " on page 611

.

N OTES ON C OMPILING O RACLE M ATERIALIZED V IEWS

Rapid SQL lets you compile materialized views. If a materialized view fails to revalidate after you recompile, that materialized view cannot be fast refreshed ON DEMAND or used for query rewrite.

For more information, see

"Compile " on page 611

.

N OTES ON C OMPILING O RACLE P ACKAGES AND P ACKAGE B ODIES

Rapid SQL lets you recompile a package, and recompiles all package objects together.

Recompiling a package in Rapid SQL compiles both the package specification and the package body by issuing two consecutive ALTER statements. However, Rapid SQL shows only the ALTER statement for the specification in the Preview: Confirm Compile dialog. You can recompile only the package body by explicitly compiling the package body itself.

When recompiling the entire package, Oracle recompiles the package even if it is invalid.

However, if there are compilation errors, the package remains invalid and Oracle invalidates all dependent objects.

Recompiling only a package body does not invalidate objects that depend upon the package specification regardless of whether or not the package body has compilation errors.

For more information, see

"Compile " on page 611

.

613 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

N OTES ON C OMPILING O RACLE P ROCEDURES

Rapid SQL lets you compile a procedure that is part of a package, by compiling the package itself. Rapid SQL uses the ALTER PROCEDURE statement to compile a stand-alone procedure.

However, you should not use the ALTER PROCEDURE statement to individually recompile a procedure that is part of a package.

For more information, see

"Compile " on page 611

.

N OTES ON C OMPILING O RACLE T YPES AND T YPE B ODIES

Rapid SQL lets you recompile a type. Rapid SQL recompiles both the type specification and the type body.

For more information, see

"Compile " on page 611

.

N OTES ON C OMPILING O RACLE V IEWS

Rapid SQL lets you recompile a view when you have altered an object referenced by that view.

When you recompile a view, Oracle invalidates all dependant objects.

For more information, see

"Compile " on page 611

.

C ONVERT T ABLES

This action lets you build and submit an ALTER TABLE statement, specifying an ENGINE= option, specifying any available storage engine.

NOTE: For information on how to quickly convert a table to use the INNODB storage engine,

see " Rebuild Table " on page 672.

Platform Availability

MySQL

To Change the Storage Engine for a Table

1 Initiate a Convert Tables action against one or more tables. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in this wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Use the Convert To dropdown to select an available storage engine.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

RAPID SQL 8.6/XE5 USER GUIDE 614

OBJECT ACTIONS > OBJECT ACTIONS

C OPY O BJECT N AMES

The Copy Object Names functionality lets you copy and then paste object name(s) into other applications.

Platform Availability

ORCL , SQL SVR

To Copy an Object Name to be Pasted into Another Application

1 On the Database Navigator, expand nodes until the target object type is visible and then expand the target object type.

2 Right-click on the specific database object or objects and select Copy object name(s) .

C OPY S CHEMA

This action lets you quickly make copies of a database schema and its corresponding objects.

Platform Availability

DB2 LUW

To Copy a Schema

1 In the data sources pane, right-click a data source and select Copy Schema from the context menu.

2 Use the following table as a guide to understanding and choosing options the options in the

Copying Schema dialog:

Pane

Action Options

Tablespace mapping

Preview

Options

Lets you specify Copying Schema , Target Schema , specify a Copy Mode of COPY,

COPYNO, or DDL, specify a Log filename (COPY and COPYNO modes only), select an

Object Owner , and Error table schema , provide an Error table name , and specify a

Drop error table after action execution options.

Lets you specify source and target tablespace options.

Displays the DDL generated to execute the operation. For more information, see

" Preview " on page 587.

3 Execute or Schedule the action.

615 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

C REATE A LIAS

The Create Alias object action lets you create an alias to a selected object. The following table shows the object types for which this action is available:

DB2 LUW

DB2 z/OS

Materialized Query Tables



Sequences



Tables





Views





To create an alias to one of the supported object types:

1 Initiate a Create Alias action against a supported object (see the table above). For more

information see " Initiating an object operation " on page 584.

Rapid SQL opens the Alias Wizard. For information on using the Alias editor, see the topic corresponding to the DBMS you are working against:

• " Aliases Wizard (DB2 LUW) " on page 259

• " Aliases Wizard (DB2 Z/OS) " on page 286

C REATE C LONE

Rapid SQL provides support for the ADD CLONE option functionality, letting you create a clone on an existing base table. This creates a table with a cloned definition but with no data.

NOTE: The base table must reside on a universal tablespace. For more information, see

" Tablespaces Wizard (DB2 Z/OS) " on page 304.

Platform Availability

DB2 z/OS version 9 ^

To Create a Clone for One or More Tables:

1 Initiate a Create Clone action against one or more tables. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Create

Clone wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Lets you provide a Clone Name .

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

RAPID SQL 8.6/XE5 USER GUIDE 616

OBJECT ACTIONS > OBJECT ACTIONS

The clone for a table is not displayed in the Datasource Navigator listing of tables for a data source. To determine whether a table has a clone, see the Dependencies tab/panel on a Table editor or on the wizard for object actions such as Drop or Rename.

After creating a clone for a table, you can exchange data between the base table and the clone.

Related Information

• " Exchange Data With Clone " on page 643

• " Drop Clone " on page 633

C REATE I NSERT S TATEMENTS

The Create Insert Statements dialog box lets you automatically create a set of Insert Statements for selected columns and records and based on the data in a table.

Platform Availability

DB2 LUW , DB2 z/OS

,

ITB/FBD ,

MySQL , ORCL , SQL SVR , SYB ASE

To Create Insert Statements Based on Existing Table Data

1 In the left pane of the application, select the Tables node.

Rapid SQL displays the tables.

2 In the right pane of the application, right-click a table, and then select Create Insert

Statements .

Rapid SQL opens the Create Insert Statements dialog.

3 In Columns, select columns to be included in the INSERT statement.

4 Optionally, in the Where box, type a WHERE clause.

5 Enable or disable Include owner information in insert statements .

617 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

6 Enable or disable Set row count , which lets you specify a row count, the number of rows in a table that were affected by the Insert statement executed against the table, or a view based on the table.

7 Click OK .

An ISQL window opens with a set of Insert statements corresponding to the criteria you provided and the table data.For more information, see " Using the Results Editor " on page 830.

C REATE L IKE

The Create Like Editor lets you create a new object based on an existing object. The following table shows availability of the Create Like function for particular object types by DBMS:

DB2 LUW

Materialized Query Tables

Tables

DB2 Z/OS

Tables

ITB/FBD

Tables

MySQL

Tables

SQL Server Oracle

Logins

Tables

Users

Tables

Sybase ASE

Logins

Tables

Users

To Create an Object Bbased on Another Object

1 Initiate a Create Like

action against a table. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens a Create Like wizard.

2 Provide a name for the new object.

RAPID SQL 8.6/XE5 USER GUIDE 618

OBJECT ACTIONS > OBJECT ACTIONS

3 Modify settings on each panel of the wizard as required.

For particular object types, tasks and settings on the panels of the Create Like wizard are similar to those for the object editors for that object type. For information, see:

• " Materialized Query Tables Editor (IBM DB2 LUW) " on page 466

• " Tables Editor (IBM DB2 LUW) " on page 472

• " Tables Editor (IBM DB2 Z/OS) " on page 490

• " Tables editor (InterBase/Firebird) " on page 505

• " Tables editor (MySQL) " on page 533

• " Logins Editor (SQL Server) " on page 517

• " Tables Editor (SQL Server) " on page 524

• " Users Editor (SQL Server) " on page 528

• " Tables Editor (Oracle) " on page 554

• " Logins Editor (Sybase ASE) " on page 572

• " Tables Editor (Sybase ASE) " on page 575

• " Users Editor (Sybase ASE) " on page 581

4 Click Execute to create the new object.

C REATE OR E DIT J AVA S OURCE

The Java Editor lets you enter Java code. The table below describes the Java Editor toolbar options:

Option

Lock/Unlock Connection

Create

Errors

Description

Click to lock or unlock connection.

Click to open the Create Options dialog, which lets you select the options for creating the java source.

Click to split the workspace in half, displaying the error messages in the lower half of the workspace.

When you add a script in a new file, you not only choose a name for the file, but choose among create options. Finally, when you complete your script, you can Preview, Schedule or immediately Execute it.

Platform Availability

ORCL

619 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

C REATE S YNONYM

Rapid SQL lets you perform an ad hoc Create Synonym operation against a specific object

displayed in the Datasource Navigator. For background information, see " Synonyms " on page 236.

Platform Availability

ORCL

You can perform this operation against the following object types:

Functions

Procedures

Materialized Views

Sequences

Packages

Tables

Package Bodies

Views

To Create a Synonym for an Object

1 Expand the node corresponding to one of the object types supported for this operation, listed in the table above.

The right-hand pane is populated with all objects of that type.

2 Right-click the target object and select Create Synonym from the context menu.

3 A Create Synonym wizard opens.

For information on using the wizard, see " Synonyms Wizard (Oracle) " on page 409.

C REATE V IEW

Right-clicking one or more tables in the Navigator and selecting Create View opens a wizard that lets you create a new view. For more information, see the following topics:

Views Wizard (DB2 LUW)

Views Wizard (DB2 Z/OS)

Views Wizard (ITB/FBD)

Views Wizard (SQL Server)

Views Wizard (Oracle)

Views Wizard (Sybase ASE)

DBCC

Rapid SQL’s DBCC (Database Consistency Check) function box lets you:

• Specify single or multiple tables or indexes for validation.

RAPID SQL 8.6/XE5 USER GUIDE 620

OBJECT ACTIONS > OBJECT ACTIONS

• Perform database-wide validations.

• Perform object-level validations of databases.

Platform Availability

SQL SVR , SYB ASE

To Perform a Database Consistency Check

1 Initiate a DBCC action against a database, table, or index, as follows:

• If you are checking consistency of a Sybase ASE or SQL Server database or a SQL Server table, right-click the object and select DBCC from the context menu, as appropriate.

• If you are checking consistency of a Sybase ASE table, right-click the table and select either DBCC > Check Allocation , DBCC > Check Table , DBCC > Check Text , or DBCC

> Rebuild Index from the context menu, as appropriate.

• If you are checking consistency of a Sybase ASE index, right-click the index and select either DBCC > Check Allocation , or DBCC > Check Index from the context menu, as appropriate.

• If you are checking consistency of a SQL Server index, right-click the table and select either DBCC > Check Fragmentation , DBCC > Update Usage , DBCC > Check Index , or

DBCC > Show Statistics from the context menu, as appropriate.

For more information see " Initiating an object operation " on page 584.

Rapid SQL opens a dialog that lets you specify DBCC options.

2 See the following topics as a guide to understanding and setting options on the dialog:

• DBCC for Microsoft SQL Server Databases

• DBCC for Microsoft SQL Server Tables

DBCC for Microsoft SQL Server Indexes

• DBCC for Sybase ASE Databases

• DBCC for Sybase ASE Tables

• DBCC for Sybase ASE Indexes

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

DBCC FOR M ICROSOFT SQL S ERVER

The DBCC (Database Consistency Check ) dialog lets you specify single or multiple tables or indexes for validation in Microsoft SQL Server. Use this dialog box to perform table-level or index-level validations of databases which are too large to undergo database-level DBCC operations in a time-efficient manner.

The DBCC dialog includes the following elements:

621 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

• A window displaying the target database objects

• A drop-down list of DBCC Operations

• Buttons for previewing the operation’s SQL code, scheduling the operation, and executing the operation

For more information, see:

DBCC for Microsoft SQL Server Databases

DBCC for Microsoft SQL Server Tables

DBCC for Microsoft SQL Server Indexes

DBCC FOR M ICROSOFT SQL S ERVER D ATABASES

The DBCC dialog for databases lets you perform database-wide validations. You should validate your databases as part of regular database maintenance to guard against corruption and failure.

Microsoft SQL Server offers a set of DBCC commands to validate the integrity of your databases.

Generally, you should perform these DBCC commands prior to dumping your databases to ensure that you are capturing clean backups of your databases.

The fundamental difference between the DBCC dialog for databases, tables and indexes is the content of the DBCC Operation drop-down list.

The table below describes the options and functionality on the DBCC dialog.

DBCC Operation

Check Allocation

Check Catalog

Check Database

Check FileGroup

Show Oldest

Transaction

Update Usage

Description

Executes a DBCC CHECKALLOC command. Makes sure that all data and index panels are correctly allocated and used. It reports on the amount of space allocated and used in the database. When checking allocation, you have the option to skip non-clustered indexes by selecting the Skip non-clustered indexes check box.

Executes a DBCC CHECKCATALOG command. Checks for consistency in and between system tables.

Executes a DBCC CHECKDB command. Verifies that all tables and indexes are properly linked, that indexes are in proper sorted order, that all pointers are consistent, that the data on each panel is reasonable, and that panel offsets are reasonable. When checking a database, you have the option to skip non-clustered indexes by selecting the Skip nonclustered indexes check box.

Executes a DBCC CHECKFILEGROUP command. Verifies that all tables and indexes for the specified filegroup are properly linked, that indexes are in proper sorted order, that all pointers are consistent, that the data on each panel is reasonable, and that panel offsets are reasonable. When checking filegroups, you have the option to skip non-clustered indexes by selecting the Skip non-clustered indexes check box.

Executes a DBCC OPENTRAN command. Displays information on the oldest active transaction and the oldest distributed and non distributed replicated transactions, if any, within the specified database.

Executes a DBCC UPDATEUSAGE command. Reports and corrects the rows, used, reserved, and dpanels columns of the sysindexes table for any clustered indexes on objects of the type

U (user-defined table) or S (system table).

For more information, see

"DBCC " on page 620 .

RAPID SQL 8.6/XE5 USER GUIDE 622

OBJECT ACTIONS > OBJECT ACTIONS

DBCC FOR M ICROSOFT SQL S ERVER T ABLES

The DBCC dialog for tables lets you perform table-level validations of databases. The fundamental difference between the DBCC dialog for tables and indexes is the content of the

DBCC Operation drop-down list.

The table below describes the options and functionality on the DBCC dialog.

Option

Check Current Identity

Value

Check Fragmentation

Check Table

Check Text / Image

Allocation

Pin Table

Rebuild Index

Unpin Table

Description

Checks the current identity value for the target objects, correcting values if needed depending on parameter specifications. Identity columns created with a NOT FOR

REPLICATION clause in either the CREATE TABLE or ALTER TABLE statement are not corrected by this operation.

Displays the target table's data and index fragmentation information, determining whether the table is heavily fragmented.

When a table is heavily fragmented, you can reduce fragmentation and improve read performance by dropping and recreating a clustered index (without using the

SORTED_DATA option). Doing so reorganizes the data, resulting in full data pages. To adjust the level of fullness, use the Rebuild Index operation’s FILLFACTOR option.

When INSERT, UPDATE, and DELETE statements fragment tables, they usually do so with unequal distribution across the entire database so that each page varies in fullness over time, forcing additional page reads for queries that scan part or all of a table.

Checks the linkages and sizes of text, ntext and image pages for selected tables. For the data, index, text, ntext, and image pages of the target tables, this operation also checks that index and data pages are correctly linked, indexes are in their proper sorted order, pointers are consistent, the data on each page is reasonable, and the page offsets are reasonable. DBCC CHECKTABLE requires a shared lock on all tables and indexes in the database for the duration of the operation. However, DBCC

CHECKTABLE does not check the allocations of pages in the specified table (for this, use DBCC CHECKALLOC). To perform DBCC CHECKTABLE on every table in the database, use DBCC CHECKDB.

Checks the allocation of text, ntext, or image columns for a table. In later versions of

Microsoft SQL, use DBCC CHECKTABLE to check the integrity of the data, index, text, ntext, and image pages for the target table.

Pins target tables in memory so that they are not flushed when Microsoft SQL Server needs space to read in new pages. DBCC PINTABLE is best used for keeping small, frequently referenced tables in memory.

Pinning a large table can consume a large portion of the buffer cache, leaving inadequate memory to service other tables in the system. A pinned table that is larger than the buffer cache itself can fill the entire cache, necessitating a shut down of the system by a sysadmin user, who must then restart Microsoft SQL Server and unpin the table. Pinning too many small tables can result in a similar problem.

Dynamically rebuilds one, multiple, or all indexes for a table in the target database, allowing indexes which enforce either primary key or unique constraints to be rebuilt without need for dropping and recreating. This operation is not supported for use on system tables.

Marks target tables as unpinned, rendering their pages flushable from the buffer cache if space is needed to read in a new page from disk.

623 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Option

Update Usage

Description

Reports and corrects inaccuracies in the sysindexes table (which can result in incorrect space usage reports by the sp_spaceused system stored procedure) and corrects the rows, used, reserved, and dpages columns of the sysindexes table for tables and clustered indexes. If there are no inaccuracies in sysindexes, DBCC UPDATEUSAGE returns no data. Use this operation to synchronize space-usage counters. Executing this operation on large tables or databases can require some time, so it should typically be used only when you suspect incorrect values returned by sp_spaceused.

For more information, see

"DBCC " on page 620 .

DBCC FOR M ICROSOFT SQL S ERVER I NDEXES

Rapid SQL supports the following Database Console Commands, letting you perform indexlevel validations of databases.

Option

Check

Fragmentation

Update Usage

Check Index

Show Statistics

Description

Lets you build and submit a DBCC SHOWCONTIG command, to display fragmentation information for the selected index, letting you determine whether the table is heavily fragmented.

When a table is heavily fragmented, you can reduce fragmentation and improve read

performance by dropping and recreating a clustered index. For details, see " Rebuild Index

(SQL Server) " on page 671.

Lets you build and submit a DBCC UPDATEUSAGE command, reporting on and correcting pages and row count inaccuracies that can result in incorrect space usage reports.

The Count Rows control lets you add a WITH COUNT_ROWS argument, dictating that the row count column be corrected as necessary.

The No Informational Messages control lets you add a WITH NO_INFOMSGS argument, suppressing all informational messages.

Lets you build and submit a DBCC CHECKTABLE command, verifying the integrity of pages and structures of the table or indexed view.

Disabling the Show Informational Messages control adds a WITH NO_INFOMSGS argument, suppressing informational messages.

Lets you build and submit a DBCC SHOW_STATISTICS command, displaying current query optimization statistics for the owning table or indexed view.

For more information, see

"DBCC " on page 620.

DBCC FOR S YBASE ASE

The DBCC (Database Consistency Check) dialog lets you specify single or multiple databases, tables or indexes for validation in Sybase ASE. Use this dialog box to perform table-level or index-level validations of databases which are too large to undergo database-level DBCC operations in a time-efficient manner.

The DBCC dialog includes the following elements:

• A window displaying the target database objects

• A drop-down list of DBCC Operations

RAPID SQL 8.6/XE5 USER GUIDE 624

OBJECT ACTIONS > OBJECT ACTIONS

• Buttons for previewing the operation’s SQL code, scheduling the operation, and executing the operation

For more information, see:

DBCC for Sybase ASE Databases

DBCC for Sybase ASE Tables

DBCC for Sybase ASE Indexes

DBCC FOR S YBASE ASE D ATABASES

The DBCC dialog for databases lets you perform database-wide validations. The fundamental difference between the DBCC dialog for databases, tables and indexes is the content of the

DBCC Operation drop-down list.

The table below describes the options and functionality on the DBCC dialog.

Option

Check Allocation

Check Catalog

Check Database

Check Storage

Database Repair

Description

Checks the allocation and use of all pages in the target database.

Checks for consistency in and between system tables in the target database.

Checks the allocation and structural integrity of all the objects in the target database.

Checks the target database for allocation, OAM page entries, page consistency, text valued columns, allocation of text valued columns, and text column chains. The results of this operation are stored in the dbccdb database.

Drops a damaged database.

For more information, see

"DBCC " on page 620 .

DBCC FOR S YBASE ASE T ABLES

The DBCC dialog for tables lets you perform table-level validations of databases. The fundamental difference between the DBCC dialog for tables and indexes is the content of the

DBCC Operation drop-down list.

The table below describes the options and functionality on the DBCC dialog.

Option

Check Allocation

Check Table

Description

Checks the database to see that every page is correctly allocated, and that no allocated page is unused. Use TABLEALLOC frequently (daily) to check page linkages in the Adaptive Server before performing a database dump to ensure the integrity of the dumped data.

Checks the linkages and sizes of text, ntext and image pages for selected tables. For the data, index, text, ntext, and image pages of the target tables, this operation also checks that index and data pages are correctly linked, indexes are in their proper sorted order, pointers are consistent, the data on each page is reasonable, and the page offsets are reasonable.

DBCC CHECKTABLE requires a shared lock on all tables and indexes in the database for the duration of the operation. However, DBCC CHECKTABLE does not check the allocations of pages in the specified table (for this, use DBCC CHECKALLOC). To perform DBCC

CHECKTABLE on every table in the database, use DBCC CHECKDB.

625 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Option

Check Text

Rebuild Index

Description

Upgrades text values after you have changed an Adaptive Server's character set to a multibyte character set.

Dynamically rebuilds one, multiple, or all indexes for a table in the target database, allowing indexes which enforce either primary key or unique constraints to be rebuilt without need for dropping and recreating. This operation is not supported for use on system tables.

DBCC Operation Options

Rapid SQL offers additional options for selected operations which you can specify to further customize a database consistency check. The table below describes each option:

Option

Error Option

Job Scope

Update Index

Option

Description

Click Fix Error to instruct Rapid SQL to fix any allocation errors it finds. You must put your database in single-user mode to fix errors, so specify this option during times of low usage.

Select Optimize to produce a report based on the allocation pages listed in the object allocation map (OAM) pages for the table. It does not report and cannot fix unreferenced extents on allocation pages that are not listed in the OAM pages. The optimized option is the default. Select Full to perform the equivalent of a table-level

CHECKALLOC, reporting all types of allocation errors. Select Fast to produce an exception report of pages that are referenced but not allocated in the extent. Fast does not produce an allocation report.

Click this check box to skip non-clustered indexes when updating index options.

For more information, see

"DBCC " on page 620 .

DBCC FOR S YBASE ASE I NDEXES

The DBCC dialog for indexes lets you perform index-level validations of databases. Unlike the

DBCC dialog for tables, this DBCC dialog offers only one option on the DBCC Operation dropdown list: Check Allocation. This option checks the specified database to see that all pages are correctly allocated and that no allocated page is unused.

The table below describes the options and functionality on the DBCC dialog.

Option

Error Option

Description

DBCC Option Checks the specified database to see that all pages are correctly allocated and that no page that is allocated is not used.

Rapid SQL to fixes any allocation errors it finds. You must put your database in single-user mode to fix errors, so specify this option during times of low usage

Job Scope Produces a report based on the allocation pages listed in the object allocation map (OAM) pages for the table. It does not report and cannot fix unreferenced extents on allocation pages that are not listed in the OAM pages. The optimized option is the default. A full job is the equivalent to a table-level CHECKALLOC, reporting all types of allocation errors. A fast job does not produce an allocation report, but produces an exception report of pages that are referenced but not allocated in the extent.

For more information, see

"DBCC " on page 620 .

RAPID SQL 8.6/XE5 USER GUIDE 626

OBJECT ACTIONS > OBJECT ACTIONS

D EALLOCATE U NUSED S PACE

The Deallocate Unused Space dialog lets you deallocate space from clusters, indexes, and tables. You can also deallocate unused space from table partitions and subpartitions. When you find that allocated space is not being used, you can free that space for use by other objects by explicitly deallocating space. Oracle releases the freed space to the user quota for the tablespace in which the deallocation occurs.

Oracle deallocates unused space from the end of the object toward the high water mark. In other words, Oracle frees space starting with the space that would have been used last. If an extent is completely contained in the space to be deallocated, then the whole extent is freed. If an extent is only partially contained in the space to be deallocated, then Oracle shrinks that extent to the size of the used space up to the high water mark, and frees the unused space in the extent.

If you are deallocating unused space from and index and the index is range-partitioned or hashpartitioned, Oracle deallocates unused space from each partition in the index. If an index is a local index on a composite-partitioned table, Oracle deallocates unused space from each of the subpartitions in the index.

TIP: You can verify that the deallocated space is freed by going to the Space tab in the appropriate Rapid SQL editor.

Platform Availability

ORCL

To Deallocate Unused Space from an Index or Table

1 Initiate a Deallocate Unused Space action against one or more Clusters, Indexes, Primary

Keys, Tables, or Unique Keys. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Deallocate Unused Space dialog.

2 Use the following table as a guide to understanding and specifying options on this dialog:

Option

Specify the number of bytes above the high-water mark that the objects will have after deallocation. If no value is specified, all unused space will be freed.

Description

If you do not specify an amount of unused space and the high water mark is above the size of INITIAL and MINEXTENTS, then all of the unused space is freed. If the high water mark is less than the size of

INITIAL or MINEXTENTS, then all unused space above MINEXTENTS is freed.

If you specify an amount of unused space and the remaining number of extents is smaller than MINEXTENTS, then the MINEXTENTS value changes to reflect the new number. If the initial extent becomes smaller as a result of the deallocation, the INITIAL value changes to reflect the new size of the initial extent.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

627 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

D ELETE S TATISTICS

Lets you create and issue a DELETE STATISTICS statement, allowing you to delete statistics for a table or for specified columns of a table.

Platform Availability

SYB ASE

To Delete Statistics for a Table

1 Initiate a Delete Statistics action against one or more tables. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Delete

Statistics wizard:

Step

Action options

Columns (Sybase

ASE 15 only)

Dependencies

Preview

Settings and tasks

Displays the names of the tables you selected and if appropriate, lets you select a specific

Partition Name .

All columns - lets you delete statistics for all columns in the table.

Specific columns - select this option and then select check boxes associated with each specific column for which statistics are to be deleted.

Review the referring and referred objects that will be automatically resolved when you

execute this operation. For more information, see " Dependencies " on page 587.

Preview the DDL generated for the operationn. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

D ESCRIBE

RIght-clicking a table, view, procedure or function in the Navigator and selecting Describe opens a window that lets you view columnar information (for tables and views) or input

parameter information (for procedures and functions). For details, see " Describe Window " on page 31.

D ETACH D ATABASE

The Detach Database object action removes the database from the server but leaves the database intact within the data and transaction log files that compose the database. These data and transaction log files can then be used to attach the database to any instance of Microsoft

SQL Server, including the server from which the database was detached. This makes the database available in exactly the same state it was in when it was detached.

RAPID SQL 8.6/XE5 USER GUIDE 628

OBJECT ACTIONS > OBJECT ACTIONS

Platform Availability

SQL SVR

To Detach Data and Transaction Files for a Database

1 Initiate a Detach Database

action against a database. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Detach Database(s) dialog.

2 To skip the UPDATE STATISTICS operation when detaching the database, select the Skip

Checks check box for the target database(s).

TIP: This option is useful for databases that are to be moved to read-only media.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

Related Information

"Attach Database " on page 596

D ISABLE I NDEX

The Disable Index(es) action lets you mark an index as disabled or inactive and unavailable for use.

Platform Availability

ITB/FBD ,

SQL SVR

NOTE: On SQL Server this action can also be applied to primary keys and unique keys.

To Disable an Index

1 Initiate a Disable Index(es) action against one or more indexes. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the wizard:

Step

Action options

Dependencies

Preview

Settings and tasks

Displays the name of the index, primary key, or unique key being disabled.

Review the referring and referred objects that will be automatically resolved when you

execute this operation. For more information, see " Dependencies " on page 587.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

629 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

D ISABLE J OB

Rapid SQL lets you enable or disable any job queue. Job Queues are built-in mechanisms that let you schedule a variety of SQL-based or command-line driven tasks.

Platform Availability

ORCL

To Disable a Job Queue

1 Initiate a Disable Job

action against a job queue. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Disable dialog.

2 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

Related Information

" Enable Job (Job Queue) " on page 639

" Run Job (job queues) " on page 695.

D ISABLE K EYS

Rapid SQL lets you issue an ALTER TABLE statement that specifies the DISABLE KEYS option.

This action tells MySQL stop updating nonunique indexes.

Platform Availability

MySQL

To Stop Updates to Nonunique Indexes

1 Initiate a Disable Keys action against one or more tables. For more information see

" Initiating an object operation " on page 584.

Rapid SQL opens the Disable Keys dialog.

2 Use the following table as a guide to understanding and modifying settings in this wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Lets you review the tables you selected.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For more information, see " Preview " on page 587.

RAPID SQL 8.6/XE5 USER GUIDE 630

OBJECT ACTIONS > OBJECT ACTIONS

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

NOTE:

You can subsequently recreate missing indexes. For details, see " Enable Keys " on page 640.

D ISABLE /E NABLE T RIGGERS

These actions let you build and submit ALTER TABLE statements that specify ENABLE TRIGGER or DISABLE TRIGGER options.

Platform Availability

SQL SVR , SYB ASE

To Enable or Disable Triggers for a Table

1 On the Database Navigator, select the Tables node. Rapid SQL displays the tables.

2 On the Database Navigator, right-click one or more selected tables and select Enable

Triggers or Disable Triggers .

Rapid SQL opens the Enable Triggers or Disable Triggers dialog, as appropriate.

3 Click Execute .

D ROP

The Confirm Drop dialog lets you drop one or more database objects and remove their definition from the system catalog.

Platform Availability

DB2 LUW , DB2 z/OS

,

ITB/FBD ,

MySQL , ORCL , SQL SVR , SYB ASE , SYB IQ

To Drop an Object

1 Initiate a Drop

action against one or more objects. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Confirm Drop dialog on the Action Options panel.

2 On the Action Options panel, select any options specific to the object type or configuration of the object you are dropping.

631 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

3 Navigate to the Dependencies pane to view database objects that are dependent on the object you are dropping.

NOTE: For Microsoft SQL Server, when dropping Logins, you also have the option to delete corresponding user objects.

NOTE: For Microsoft SQL Server, when dropping Databases, you also have the option to delete the backup and restore history for the database.

4 Navigate to the Preview pane to verify that the correct DDL was created, and if necessary navigate backward and modify your choices.

5 Click Execute to drop the object.

D ROP A UTOMATIC S TORAGE P ATH ( S )

This action lets you remove tablespace storage paths on a datasource and subsequently rebalance any affected tablespaces. It builds and submits:

• An ALTER DATABASE DROP STORAGE ON... statement specifying the storage paths to be removed

• Optionally, one ALTER TABLESPACE... REBALANCE statement for each tablesapce impacted by the ALTER DATABASE DROP STORAGE ON... statement

Platform Availability

DB2 LUW 9.7^

Prerequisites or Setup Tasks

This object action is only available for datasources configured for autostorage and that have at least two autostorage paths configured.

To drop storage paths on a datasource

1 Initiate a Drop Automatic Storage Path(s) action against a datasource. For more

information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in this wizard:

Step

Path(s) Selection

Settings and tasks

Path: Select the check box associated with each storage path that is to be dropped.

This object action will not allow you to select all storage paths on a datasource. At least one path must be left active.

Rebalance the affected tablespaces: Selecting this check box generates an ALTER

TABLESPACE... REBALANCE statement for each tablesapce affected by the storage paths you selected to drop.

RAPID SQL 8.6/XE5 USER GUIDE 632

OBJECT ACTIONS > OBJECT ACTIONS

Step

Preview

Settings and tasks

Displays the DDL that will execute the object action. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

For related information, see " Rebalance " on page 667.

D ROP B Y C ATEGORY

This action lets you build and submit one or more calls to the outln_pkg.drop_by_cat subprogram, letting you drop outlines belonging to specified categories.

Platform Availability

ORCL

To Drop One or More Stored Outlines of a Particular Category

1 Initiate a Drop By Category action against one or more stored outlines. For more

information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in this Drop By

Category wizard:

Step

Action Options

Preview

Settings and tasks

Select the categories to drop.

Displays the DDL that will execute the object action. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

Related Information

• " Change Category " on page 602

• " Reassign By Category " on page 666

D ROP C LONE

If you have created a clone from a base table, you can drop that clone. To determine whether a table has a clone, see the Dependencies tab/panel on a Table editor or on the wizard for object actions such as Drop or Rename.

Platform Availability

DB2 z/OS version 9 ^

633 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

To Drop the Clones of One or More Tables

1 Initiate a Drop Clone action against one or more tables. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Confirm

Drop Clone wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Lets you review the action you initiated.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

Related Information

• " Create Clone " on page 616

• " Exchange Data With Clone " on page 643

D ROP J AVA

This action lets you make use of the dropjava tool, deleting schema objects corresponding to

Java files.

Platform Availability

ORCL

To Drop Schema Objects Assocaited with a Java File

1 Initiate a Drop Java action against one or more Java Classes. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings on the Drop

Jave Objects dialog:

Setting

Who Owns the

Java Object

Description

Select the owner of objects to be dropped.

File to be dropped Use these controls to build a list of Java files for which assocaited objects are to be dropped.

Drop Synonym Drops any sysnonyms defined for objects being dropped.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

RAPID SQL 8.6/XE5 USER GUIDE 634

OBJECT ACTIONS > OBJECT ACTIONS

Related Information

• " Load Java " on page 654

D ROP L OGIN T RIGGER

The Drop Login Trigger action lets you build and submit an sp_modifylogin or ALTER LOGIN call that specifies a NULL login script option. This removes the configured login trigger for the login, the default database stored procedure that executes each time the user successfully logs in.

NOTE: If a login has a login trigger configured, the specified stored procedure name is visible

in the Login editor. For details, see " Logins Editor (Sybase ASE) " on page 572.

Platform Availability

SYB ASE

To Remove the Currently Configured Login Trigger for a Login

1 Expand the Logins node. Rapid SQL displays all logins for the datasource.

2 Right-click a login and select Login Trigger Actions > Drop Login Trigger from the context menu. Rapid SQL opens the Drop Login Trigger dialog.

3 Use the following table as a guide to understanding and modifying settings in the wizard:

Step

Action options

Dependencies

Preview

Settings and tasks

Displays the login you selected to run the action against.

Review the referring and referred objects that will be automatically resolved when you

execute this operation. For details, see " Dependencies " on page 587.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

Related Information

• " Add/Modify Login Trigger " on page 592

D ROP M ATERIALIZED Q UERY T ABLE

The Drop Materialized Query action lets you convert a materialized query table to a regular table.

Platform Availability

DB2 LUW

635 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

To Convert a Materialized Query Table to a Regular Table

1 Initiate a Drop Materialized Query Table action against one or more materialized query

tables. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Confirm MQT Conversion to Regular dialog.

2 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

D ROP U NUSED

This action lets you build and submit one or more calls to the outln_pkg.drop_unused subprogram, letting you drop outlines that have not been used since being created.

Platform Availability

ORCL

To Drop One or More Unused Stored Outlines

1 Initiate a Drop Unused action against one or more stored outlines. For more information

see " Initiating an object operation " on page 584.

Rapid SQL opens the Drop Unused dialog.

2 Use the following table as a guide to understanding and modifying settings in this wizard:

Step

Preview

Settings and tasks

Displays the DDL that will execute the object action. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

D ROP U NUSED C OLUMNS

This action lets you build and submit an ALTER TABLE... DROP UNUSED COLUMNS statement, letting you remove columns currently marked as unused.

Platform Availability

ORCL

RAPID SQL 8.6/XE5 USER GUIDE 636

OBJECT ACTIONS > OBJECT ACTIONS

To Drop the Clones of one or more Tables

1 Initiate a Drop Unused Columns action against one or more tables. For more information

see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Drop

Unused Columns wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Displays the tables you selected

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For details, see " Preview " on page 587.

3 Click Execute . For information on the other options, see

Preview and

Scheduling

.

E DIT D ATA

Right-clicking a table and selecting Edit Data lets you edit table data. For details, see " Data

Editor " on page 902.

E NABLE /D ISABLE (O RACLE J OBS )

This action builds and submits a DBMS_SCHEDULER.DISABLE or DBMS_SCHEDULER.ENABLE call, letting you enable or disable a job or program.

Platform Availability

ORCL 10g ^

To enable or disable a job or program

1 On a connected Oracle datasource, expand the Scheduler nodes and select the Jobs or

Programs node.

2 Right-click a job or program and select Enable/Disable from the context menu.

3 Use the following table as a guide to understanding and modifying settings in the dialog:

Step

Action options

Dependencies

Preview

Settings and tasks

Select the Enabled check box to enable the job or program. Leave the Enabled check box deselected to disable the job or program.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For details, see " Preview " on page 587.

4 Click Execute . For information on the scheduling option, see " Scheduling " on page 963.

637 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

E NABLE /D ISABLE F ILETABLE ( S )

This action lets you build and submit an ALTER TABLE statement, specifying either an ENABLE

FILETABLE_NAMESPACE or DISABLE FILETABLE_NAMESPACE argument. This enables or disables system-defined constraints on a FileTable.

Platform Availability

SQL SVR

To enable or disable system-defined constraints on a FileTable

1 Initiate an Enable/Disable Filetables action against one or more tables. For more

information see " Initiating an object operation " on page 584.

Rapid SQL opens the Enable/Disable Filetable(s) dialog box.

2 Use the following table as a guide to understanding and modifying settings in the dialog:

Step

Action options

Dependencies

Preview

Settings and tasks

Enabled If selected, an ALTER TABLE with an ENABLE

FILETABLE_NAMESPACE argument is generated. If unselected, an ALTER TABLE with a DISABLE

FILETABLE_NAMESPACE argument is generated.

Lets you review the objects potentially impacted by this action. For more information, see

" Dependencies " on page 587.

Preview the DDL generated for the operation and when ready, use the Schedule or Execute button to perform this action.

3 Finally, use the Execute button to create the object.

For information on setup of filegroups, FileTable, and Filestream, see the following topics:

• " Databases Wizard (SQL Server) " on page 335

• " Tables Wizard (SQL Server) " on page 359

E NABLE /D ISABLE S TORED O UTLINE A UTO CREATION /A UTO USE

Rapid SQL provides two operations that can be performed against one or more stored outlines, that dictate whether execution plans are automatically generated or used:

Enable/disable stored outline auto-creation

Enable/disable stored outline auto-use

Lets you specify whether Oracle to create a stored outline for every query submitted to the server.

Lets you specify whether Oracle uses stored outlines to generate execution plans.

Platform Availability

ORCL

RAPID SQL 8.6/XE5 USER GUIDE 638

OBJECT ACTIONS > OBJECT ACTIONS

To Specify Whether Stored Outlines are Automatically Created and Used

1 Initiate an Enable/disable stored outline auto-use or Enable/disable stored outline autocreation

action against one or more stored outlines. For more information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the wizard:

Step Settings and tasks

Action Options Automatically create stored outlines or Automatically use stored outlines

Category

Lets you enable or disable the feature assocaited with your selection.

No Override

Lets you select an outline category. This option is only available if you enabled the feature.

If selected, outlines will not override. This option is only available if you enabled the feature.

Dependencies Review the referring and referred objects that will be automatically resolved when you execute this operation.

Preview

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

3 When ready, click Execute .

E NABLE J OB (J OB Q UEUE )

Rapid SQL lets you enable or disable any job queue. Job Queues are built-in mechanisms that let you schedule a variety of SQL-based or command-line driven tasks.

Platform Availability

ORCL

To Enable a Job Queue

1 Initiate an Enable Job

action against a job queue. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Enable dialog.

2 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

Related Information

• " Disable Job " on page 630

• " Run Job (job queues) " on page 695

639 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

E NABLE K EYS

Rapid SQL lets you issue an ALTER TABLE statement that specifies the ENABLE KEYS option.

This action tells MySQL to recreate missing indexes.

Platform Availability

MySQL

To Recreate Missing Indexes

1 Initiate an Enable Keys action against one or more tables. For more information see

" Initiating an object operation " on page 584.

Rapid SQL opens the Enable Keys dialog.

2 Use the following table as a guide to understanding and modifying settings in this wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Lets you review the tables you selected.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

NOTE: You can also instruct MySQL to stop updating nonunique indexes. For details, see

" Disable Keys " on page 630.

E NABLE R ECYCLE B IN

This action builds and submits an ALTER SYSTEM SET "_recyclebin"=TRUE or ALTER SYSTEM

SET "_recyclebin"=FALSE statement, letting you enable or disable the Oracle Recycle Bin.

This action lets you enable or disable the Oracle Recycle Bin, building and submitting one of the following version-specific statement variations:

• Oracle 10g R1 - ALTER SYSTEM SET "_recyclebin" TRUE / FALSE

• Oracle 10g R2 - ALTER SYSTEM SET RECYCLEBIN ON / OFF SCOPE=BOTH

• Oracle 11g - ALTER SYSTEM SET RECYCLEBIN ON / OFF DEFERRED SCOPE=BOTH (note that in this case, the change takes effect after reconnecting to the datasource)

When the Recycle Bin is enabled, dropped objects are stored in the Recycle Bin until explicitly purged.

RAPID SQL 8.6/XE5 USER GUIDE 640

OBJECT ACTIONS > OBJECT ACTIONS

To Enable or Disable the Recycle Bin

1 Right-click an Oracle datasource node, and select Enable Recycle Bin from the context menu.

2 Use the following table as a guide to understanding and modifying settings in this wizard:

Panel

Action Options

Preview

Settings and tasks

Select the Enable check box to enable Recycle Bin functionality. Deselect the Enable check box to disable the feature.

Displays the DDL that will execute the object action. For details, see " Preview " on page 587.

NOTE: In general, you can determine the current enabled/disabled state of the Recycle Bin by opening the Enable Recycle Bin dialog. If the Enable check box is selected, the

Recycle Bin is currently Note however, that the Enable Recycle Bin action reads the current state of the Recycle Bin by querying the v$parameter object. On some Oracle

10g R1 servers, the "_recyclebin" parameter does not appear listed in v$parameter – it is hidden. As a result, for this specific case, the value of the check box when opening the Enable Recycle Bin dialog will always be TRUE, regardless of the actual value.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

Related Information

• " Recycle Bin " on page 228 (for a support summary including topics such as displaying

Recycle Bin contents)

• " Flashback Recycle Bin Entry " on page 647

• " Purge Recycle Bin Entry " on page 664

• " Purge Recycle Bin " on page 662

E RROR

The Error message displays a warning. After reading the warning, click Close to continue.

E STIMATE S IZE

The Estimate Size dialog for tables and indexes lets you estimate how large a table or index will become given a row growth projection. The results let you proactively plan your space-related object needs.

Platform Availability

ORCL , SYB ASE

641 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

To Estimate Size for a Table or Index

1 Initiate an Estimate Size action against one or more tables or indexes. For more information

see " Initiating an object operation " on page 584.

Rapid SQL opens the Estimate Size dialog.

2 Use the following topics as a guide to estimating size and using the other options offered on this dialog:

Estimating Oracle index or table sizes

Estimating Sybase ASE index or table sizes

E STIMATING O RACLE INDEX OR TABLE SIZES

The Estimate Size dialog remains open until you manually close it. This lets you run several estimations, varying the method and various metrics. Each estimation run is a three-step process:

1 Select a size estimation method:

• Use current row data from current statistics - The table or index must have been previously analyzed for statistics to be obtained. Note that the Analyze Index(es) and

Analyze Table(s) buttons can be used to initiate this action. For more details, see

Analyze .

• Use table/index definition source - The maximum row length for the index or table will be calculated. Note that this usually produces much higher space estimates.

• Manually enter estimation metrics - Manually enter in data for space estimates if the objects have no data or if the index definition source method is not desired.

2 Depending on the method you chose, provide additional metrics:

• Percent Free

• Row Size

• Number of rows

3 Click the Estimate Size button and view the estimate in the Estimated Index Size box.

Other options include:

• Use the Report button to generate an HTML report of results

• Use the Save As button to save a result grid file

• Use the Owner and Name controls to select another table or index for size estimates.

• Use the Add Index or Add Table button to add another table or index to your size estimates. Similarly, use the Remove Index or Remove Table button to remove a table or index from the dialog.

RAPID SQL 8.6/XE5 USER GUIDE 642

OBJECT ACTIONS > OBJECT ACTIONS

E STIMATING S YBASE ASE INDEX OR TABLE SIZES

The Estimate Size dialog remains open until you manually close it. This lets you run several estimations, varying the available metrics. Each estimation run is a two-step process:

1 Provide the metrics for your estimate:

• Fill Factor (indexes only) - Specify a percentage of how full each index page can become.

• Number of rows - Specify the number of rows for your size estimate.

NOTE: Optionally you can use the Update Statistics button to open a dialog that lets you

generate new statistics for the index or table. For details, see " Update Statistics " on page 710.

2 Click the Estimate Size button and view the estimate in the Estimated Index Size box.

Other options include:

• Use the Report button to generate an HTML report of results

• Use the Save As button to save a result grid file

• Use the Database , Owner , Table Name , and Index Name controls to select another table or index for size estimates.

• Use the Add Index or Add Table button to add another table or index to your size estimates. Similarly, use the Remove Index or Remove Table button to remove a table or index from the dialog.

E XCHANGE D ATA W ITH C LONE

This action lets you issue an EXCHANGE statement with the DATA BETWEEN TABLE table1

AND table2 syntax, letting you swap data between a base table and its clone. To determine whether a table has a clone, see the Dependencies tab/panel on a Table editor or on the wizard for object actions such as Drop or Rename.

Platform Availability

DB2 z/OS version 9 ^

To Exchange Data Between One or More Tables and their Clones

1 Initiate a Clone Actions > Exchange Data With Clone action against one or more tables.

For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Exchange Data With Clone dialog.

2 Use the following table as a guide to understanding and modifying settings in this wizard:

Step

Action Options

Settings and tasks

Lets you review the action you initiated.

643 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Step

Dependencies

Preview

Settings and tasks

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

Related Information

• " Create Clone " on page 616

• " Drop Clone " on page 633

E XECUTE

The Execution dialog lets you execute extended procedures, functions, and procedures.

Platform and object type availability

DB2 LUW DB2 z/OS ITB/FBD

Extended procedures

Functions

Procedures   

MySQL Oracle





SQL Server Sybase

ASE



 

To Compile an Extended Procedure, Function, or Procedure

1 Expand the node corresponding to valid object type. Objects of that type are displayed below the object type node.

2 Right click the target object and select Execute from the context menu.

NOTE: If the extended procedure, function, or procedure takes input parameters, Rapid SQL opens an execution dialog. For more information, see

Working With Execution

Parameters .

The Results editor opens, showing either results of a successfully executed extended procedure, function, or procedure, or showing error messages if execution was not successful. For details, see " Using the Results Editor " on page 830.

W ORKING W ITH E XECUTION P ARAMETERS

If you initiate an Execute action against an extended procedure, function, or procedure that takes input parameters, Rapid SQL opens a dialog that lets you provide parameter values and otherwise manage parameters.

RAPID SQL 8.6/XE5 USER GUIDE 644

OBJECT ACTIONS > OBJECT ACTIONS

The Procedure Execution dialog lets you:

• Save input parameters as *.prm files to preserve specific input parameter configurations.

• Open *.prm files to save the effort of reentering specific input parameters.

• Reset parameters to their default setting.

The table below describes the options and functionality of the Procedure Execution dialog:

Option

Parameter

Open

Save

Reset

Default

Continue

Description

Specify the required input parameters in this window. If input parameters are not required for the execution of the target procedure, a message displays in this window, stating that the procedure

“has no input parameters. Press execute to run it.”

Click to open an Open dialog, from which you can open an existing *.prm file. The saved parameters immediately populate the dialog box upon opening.

Click to save the values of your input parameters as a *.prm file. You can reopen a saved *.prm file from this dialog box at any time.

Click to reset the parameters in the Parameter window to their default values.

Select to gather default information from the data dictionary. ORACLE ONLY: You can not specify non-default parameters after specifying a default parameter.

Click to execute the procedure once you have entered values for all required parameters in the

Parameter window.

For more general information on the Execute

operation, see " Execute " on page 644.

E XTRACT

Rapid SQL lets you extract the statements required to create existing objects into an Interactive

SQL window.

NOTE:

For information on setting preferences for this action, see " DDL Extract Options " on page 97.

Platform Availability

DB2 LUW , DB2 z/OS

,

ITB/FBD ,

MySQL , ORCL , SQL SVR , SYB ASE , SYB IQ

To Extract the DDL for an Object

1 Initiate an Extract

action against one or more objects. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the DDL Editor with the DDL to create the selected objects. For more information, see " Using the DDL Editor " on page 843.

645 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

E XTRACT D ATA AS XML

This function allows you to take SQL data, extract it, and make it available as XML data. The XML

Editor Filter allows you to pick and choose among columns and designate rows and then creates the For XML statement that enables the operation. The resulting XML document is created and presented in an active XML Editor. At this point the document can be saved in XML format.

CAUTION: To use the Extract Data as XML feature in Sybase ASE, you must first purchase and install an XML Services license from Sybase.

Platform Availability

ORCL 9i ^, SQL SVR , SYB ASE 12.5.1 ^

To Open the XML Editor Filter

1 Initiate an Extract Data as XML

action against a table. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens an XML Editor Filter dialog.

2 In the Columns area, select the check boxes corresponding to the columns with data you want to extract.

3 Optionally, in the Where box, type a WHERE clause to qualify the records that will be extracted.

NOTE: As you select options, inspect the Select box to verify the query you are creating.

4 Use the table below as a guide to understanding and specifying the optional DBMS-specific settings in this dialog:

DBMS

Sybase ASE

Oracle

Setting or group

Row Set Tag

Description

Refer to Sybase online documentation for details onXML mapping information. For

assistance, see " Accessing Third Party Documentation " on page 21.

Identify the XML element name you want to use to replace the Row Set tag.

Row Tag

Max Rows.

Identify the XML element names you want to use to replace the Row tag.

The maximum number of rows to fetch

RAPID SQL 8.6/XE5 USER GUIDE 646

OBJECT ACTIONS > OBJECT ACTIONS

DBMS Setting or group

XML Mode

Description

SQL Server

XML Options

AUTO mode returns query results as nested XML elements. For any table in the From clause with a column in the Select clause, it is represented as an XML element.

When you select RAW mode, each row in the query result set is transformed into an XML element with the generic row identifier. The

XML attribute name will be the same as the column name for non-null columns.

XML DATA specifies that an XML data schema will be returned.

ELEMENTS specifies that columns will be returned as subelements-otherwise they are mapped to XML attributes. This is an option only if

AUTO is selected.

When BINARY BASE64 is selected, any binary data is encoded in base-64 format. You must specify this option in RAW mode. It is the default for AUTO.

5 When ready, click OK . Rapid SQL opens an XML representation of the extracted data in an

XML editor.

F LASHBACK R ECYCLE B IN E NTRY

This action lets you build and submit a FLASHBACK TABLE... TO BEFORE DROP statement against a table in the Recycle Bin. This recovers the table and restores it to its state immediately before the drop.

NOTE: The Datasource Explorer entry for a Recycle Bin entry has a Can Undrop field that indicates whether a Flashback Recycle Bin Entry action can be performed against the item

Platform Availability

ORCL 10g^

To Recover a Table Currently in the Recycle Bin

1 Expand the Recycle Bin node to display its contents.

2 Right-click one or more selected tables in the Recycle Bin and select Flashback Recycle Bin

Entry from the context menu. The Flashback Recycle Bin Entry dialog opens.

3 Use the following table as a guide to understanding and modifying settings in the wizard:

Step

Action options

Dependencies

Preview

Settings and tasks

Displays the table entries you selected to restore.

Review the referring and referred objects that will be automatically resolved when you

execute this operation. For details, see " Dependencies " on page 587.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

647 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

4 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

Related Information

• " Recycle Bin " on page 228 (for a support summary including topics such as displaying

Recycle Bin contents)

• " Enable Recycle Bin " on page 640

• " Purge Recycle Bin Entry " on page 664

• " Purge Recycle Bin " on page 662

F LASHBACK T ABLE

This action builds and submits a FLASHBACK TABLE statement, letting you restore a table to a state at some specified time in the past.

NOTE: Before using this object action, consult Oracle documentation for information on restrictions, required permissions, and details on System Change Numbers and

Restore Points. For more information, see " Accessing Third Party Documentation " on page 21.

Platform Availability

ORCL 10g ^

NOTE: Available options differ by the version of Oracle that Rapid SQL is working against.

RAPID SQL 8.6/XE5 USER GUIDE 648

OBJECT ACTIONS > OBJECT ACTIONS

To Restore a Table to Some Previous State

1 Initiate a Flashback Table

action against a table. For more information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings on the dialog:

Panel Settings and tasks

Action Options Type Lets you select a specific FLASHBACK TABLE clause:

BEFORE DROP - If the table is currently in the Recycle Bin, the table will be restored to its state immediately before being dropped.

SCN - restores the table to a time corresponding to a specified System Change

Number.

TIMESTAMP - restores the table to a time corresponding to a specified timestamp value.

RESTORE POINT - (10g R2 ^) restores the table to a time corresponding to a specified name associated with an SCN.

SCN

Timestamp

If you selected a Type value of SCN, type a System Change Number.

If you selected a Type value of TIMESTAMP, use this control to provide a timestamp.

If you selected a Type value of RESTORE POINT, select a restore point.

Restore Point

(10g R2 ^)

Enable Trigger If you selected a Type value of SCN, TIMESTAMP, or RESTORE POINT, selecting this check box overrides the default behavior, ensuring that triggers remain enabled during the flashback process.

Rename To If you selected a Type value of BEFORE DROP, specify a new name for the table being retrieved from the Recycle Bin.

Dependencies

For details on using this tab, see " Dependencies " on page 587.

Preview

Displays the DDL that will execute the object action. For details, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

Related Information

" Flashback Recycle Bin Entry " on page 647

F LUSH C ACHE

Rapid SQL lets you clear all dynamic SQL in the cache for a package and forces IBM DB2 for

Linux, Unix, and Windows to recompile the SQL the next time it is called.

Platform Availability

DB2 LUW

649 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

To Flush the Cache for a Package

1 Initiate a Flush Cache

action against a package. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Flush Package Cache dialog.

2 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

F LUSH T ABLES

This action lets you build and submit a FLUSH statement, specifying a TABLE or TABLES option.

This flushes the specified tables and removes all query results from the query cache.

Platform Availability

MySQL

To Flush One or More Tables

1 Initiate a Flush Tables action against one or more stored tables. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in this wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Displays the tables selected for this flush operation.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

F REE (P ACKAGES )

Rapid SQL lets you delete one or more packages.

Platform Availability

DB2 z/OS

RAPID SQL 8.6/XE5 USER GUIDE 650

OBJECT ACTIONS > OBJECT ACTIONS

To Delete Packages

1 Initiate a Free Packages action against one or more packages. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Confirm

Free wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Displays the names of the packages you chose to free. This panel also lets you select a Order

Drop By Selection setting, which dictates whether drop statements are generated in the order objects are selected.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

F REE P LAN

This action lets you drop plans associated with packages.

To Drop a Plan Associated with a Package

• Click the Free button on the Plans/Packlists tab of the Packages editor. For more

information, see " Packages Editor (IBM DB2 Z/OS) " on page 485.

For more information on dropping database objects, see " Drop " on page 631.

G ENERATE P ACKAGE /P ROCEDURE /S TATEMENT

Rapid SQL lets you generate simple packages, procedures, and statements for selected tables and lets you generate a simple select statement for views. Because the packages and procedures generated by Rapid SQL are rudimentary, they are intended merely as a starting point and should be modified to reflect your specific needs. Rapid SQL opens the generated statements in the ISQL Window.

When Rapid SQL creates a package from a table, it generates a series of procedures designed to emulate the typical variety of procedures in a package. Rapid SQL lets you choose the IN and

OUT columns and generates the procedures based on your selections. Rapid SQL creates procedures and statements from tables in the same way.

Platform Availability

DB2 z/OS , ITB/FBD

, ORCL , SQL SVR , SYB ASE

651 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Important Notes

None

For more information, see:

• Generate Packages, Procedures, and Statements

• Generate Select Statement

G ENERATE P ACKAGES , P ROCEDURES , AND S TATEMENTS

Rapid SQL opens this dialog box when you want to generate code for an Insert, Update, or

Delete statement. This dialog box lets you specify the columns you want to include in the generation of an Insert, Update, or Delete statement or procedure.

G ENERATE S ELECT S TATEMENT

Rapid SQL opens this dialog box when you want to generate code for a Select statement. This dialog box includes two panes: one for specifying Input Columns, one for specifying Output

Columns.

NOTE: This dialog box mirrors the functionality of Rapid SQL’s Embarcadero Code Generator dialog box, which is accessible from the application’s Tools menu and Tools toolbar.

The Select 1 or More Columns dialog lets you specify the IN and OUT columns for a package or procedure, or the columns to select for a Select statement and any associated WHERE clause.

Rapid SQL uses the Input Columns to generate the WHERE clause.

H IDE T EXT

This action lets you build and submit sp_hidetext calls against one or more objects. This allows you to hide the source text for particular object types:

CAUTION: The Hide Text action is irreversible. Once hidden, source text cannot be made viewable or otherwise retrievable again.

NOTE: For details on the specific elements hidden, consult Sybase documentation. See

" Accessing Third Party Documentation " on page 21.

Within Rapid SQL, when viewing an object after hiding text, hidden elements occupying entire tabs or individual property boxes, are annotated with a Source text for this compiled object is hidden message.

RAPID SQL 8.6/XE5 USER GUIDE 652

OBJECT ACTIONS > OBJECT ACTIONS

Hide Text can be applied both to individual objects and to objects containing or owning other objects. Supported object types for which Hide Text can be applied to individual objects, and the resulting Rapid SQL-specific hidden elements in object editors are as follows:

Check constraints

Defaults

Extended procedures

Functions

Procedures

Rules

Triggers

Views

Check Condition box, Definition tab.

Value box, Properties tab.

Library name box, Properties tab.

Definition tab.

Definition tab.

Restriction box, Properties tab.

Definition tab.

Definition tab.

Object-containing or object-referencing object types to which Hide Text can be applied are as follows:

Databases

Tables

Users

Hides the source text of all compiled objects in the selected database.

Hides the source text of all check constraints, defaults, and triggers defined on the selected table.

Hides the source text of all compiled objects owned by the selected user.

CAUTION: Because of the potentially broad scope of hiding text for users and databases, you should exercise extreme care when applying Hide Text to those object types.

Platform Availability

SYB ASE

To Permanently Hide the Source Text for One or More Objects

1 In the Database Navigator, expand the node corresponding to one of the target object types. Objects of that type are shown below the object type node.

2 Right-click one or more selected objects, and then select Hide Text from the context menu.

The Confirm Hide Text dialog opens.

653 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

3 Use the following table as a guide to understanding and modifying settings in the wizard:

Step

Action options

Dependencies

Preview

Settings and tasks

Displays the name of the objects you selected.

Review the referring and referred objects that will be automatically resolved when you

execute this operation. For more information, see " Dependencies " on page 587.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

4 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

Browser views for supported objects show a Hidden property that indicates whether Hide Text has been applied to the object. Y indicates that source text for this compiled object has been irreversibly hidden.

I MPORT D ATA F ROM F ILE

RIght-clicking a table in the Navigator and selecting Import Data From File opens a dialog that

lets you import table data from a file. For details, see " Import Data " on page 912.

L OAD J AVA

Before you can call Java stored procedures, you must load them into the Oracle database and publish them to SQL.

NOTE: This functionality is available for Oracle only.

NOTE:

For related information, see " Drop Java " on page 634.

The Java Load Wizard lets you:

• Select the owner of the Java object and the files to load.

• Select options for the loading of the files.

• Select Resolver options.

For more information, see

Java Load Wizard - Panel 1 .

J AVA L OAD W IZARD - P ANEL 1

The table below describes the options of the first panel of the Java Load Wizard.

Option

Who owns the Java

Object?

Select files to be loaded

Description

Lets you select the owner of the Java object.

Select a file, and then click Add .

RAPID SQL 8.6/XE5 USER GUIDE 654

OBJECT ACTIONS > OBJECT ACTIONS

J AVA L OAD W IZARD - P ANEL 2

The table below describes the options of the second panel of the Java Load Wizard.

Option

When do you want the

Java files to be resolved?

Description

Lets you specify when the source file is loaded as a source schema object, the source file is compiled, class schema objects are created for each class defined in the compiled .java file, and the compiled code is stored in the class schema objects.

Lets you specify the encoding of the .java file.

Select the Encoding

Options

Grant Access to the following users

Lets you select one or more users.

J AVA L OAD W IZARD - P ANEL 3

The table below describes the options of the third panel of the Java Load Wizard.

Option

Other Load

Options

Add Resolver

Options

Description

OPTIONAL: Lets you select options.

Lets you specify the objects to search within the schemas defined.

Add - Click to open the Select a Resolver Option dialog to add a new resolver option in the list.

Edit - Click to open the Resolver Edit dialog to modify a resolver option.

Remove - Select one or more resolver option and click to delete.

L OCK

The Lock Table dialog lets you lock tables to prevent other users from reading or updating the table data. Locking a table saves the time of locking each row of the table that needs to be updated. Lock mode options preventing other users from viewing or modifying table data, or allowing other users to view but not modify table data. Rapid SQL releases locks at the end of a transaction.

Platform Availability

DB2 LUW

To Lock a Table

1 Initiate a Lock

action against one or more tables. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Lock Table dialog.

655 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

2 Select a Lock Mode option:

• Share - Lets other users view but not modify the table data.

• Exclusive - Prevents other users from viewing or modifying the table data.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

L OWER H IGH W ATER M ARK

Against automatically-managed tablespaces, this action lets you build and submit an ALTER

TABLESPACE... REDUCE statement, specifying that existing containers be reduced by a specified size.

Against database-managed tablespaces, you build and submit an ALTER TABLESPACE...

LOWER HIGH WATER MARK statement followed by an ALTER TABLESPACE... REDUCE statement, explicitly lowering the high water mark before reducing the size of the tablespace.

NOTE: Before using this object action, consult DB2 LUW documentation for information on automatic and non-automatic storage, storage reclaimasbility, as well as database

versus system-managed tablespaces. For more information, see " Accessing Third Party

Documentation " on page 21.

Platform Availability

DB2 LUW 9.7 ^

To Lower the High Water Mark for a Tablespace

1 Initiate a Lower High Water Mark action against a tablespace. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and choosing options in the Lower

High Water Mark dialog:

Pane

Action Options

Options

Against automatically-managed tablespaces, this pane lets you provide the REDUCE option value for the generated ALTER TABLESPACE statement. Two options are provided. Selecting MAX specifies that the high water mark be lowered by moving the maximum number of extents to the beginning of the tablespace. Specifying a Size and

Unit specifies the numeric value by which the tablespace is to be reduced through extent movement.

Against database-managed tablespaces, this pane only allows you to specify that All

Containers are to be decreased by a specified Size (in Pages, KB, MB, or GB Unit s). If you want to specify individual containers, use the Containers panel.

RAPID SQL 8.6/XE5 USER GUIDE 656

OBJECT ACTIONS > OBJECT ACTIONS

Pane

Containers

Preview

Options

This tab is only available for database-managed tablespaces. As well, the functionality provided depends on whether you selected the All Containers option on the Action

Options pane.

With All Containers selected, this panel lets you specify an ON DBPRATITIONNUM clause on the ALTER TABLESPACE... REDUCE statement generated, specifying partitions for the container operations. Click the Partitions button, select one or more partitions on the Select Partitions dialog, and click OK .

With All Containers deselected, this panel lets you specify an ON DBPRATITIONNUM clause and also lets you specify a database container clause on the ALTER

TABLESPACE... REDUCE statement generated. For each container to be included in the databae container clause, click the Add Container button, select a container from the dropdown, and select a Size and Unit (Pages, KB, MB, or GB) for the container.

Displays the DDL generated to execute the operation. For more information, see

" Preview " on page 587.

3 Execute or Schedule the action.

M OVE L OG

Rapid SQL lets you move a transaction log from one device to another.

Platform Availability

SYB ASE

To Move a Database Transaction Log to Another Device

1 Initiate a Move Log action against one or more databases. For more information see

" Initiating an object operation " on page 584.

Rapid SQL opens the Move Log dialog.

2 From the New Device dropdown, select the defined device to which you want to move the transaction log.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

657 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

M OVE T ABLE

The Move Table action lets you move data in an active table into a new, identically-named table, leaving the data online and available for use. This action lets you build and submit one or more SYSPROC.ADMIN_MOVE_TABLE calls. A single call, corresponding to the MOVE command, lets you execute all move operations in a single step. Multiple calls correspond to use of the INIT, COPY, REPLAY, VERIFY, SWAP, CLEANUP or CANCEL commands, and let you execute the move operations in individual steps.

NOTE: Before using this object action, consult DB2 LUW documentation for information on the

ADMIN_MOVE_TABLE procedure, specifically the options and parameters used by the

procedure. For more information, see " Accessing Third Party Documentation " on page 21.

Platform Availability

DB2 LUW 9.7 ^

RAPID SQL 8.6/XE5 USER GUIDE 658

OBJECT ACTIONS > OBJECT ACTIONS

To move table data

1 Initiate a Move Table

action against a table. For more information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and choosing options the options in the dialog:

Pane Categories and Option Descriptions

Action Options Method

Tablespace

The Use Target Table option lets you select from the two methods available with use of the ADMIN_MOVE_TABLE procedure.

Select the Use Target Table check box if you have already created the target tabl , and are using this action to move the data to that table.

Leave the Use Target Table check box unselected to specify tablespaces used by the new table and have this action create the table before moving data to the new table.

These options are only available with the Use Target Table check box deselected. They let you optionally specify new data, index, and LOB tablespaces for the target table.

Preview

Target Table

Operations

This option is only available with the Use Target Table check box selected.

It lets you specify an existing table to be used as the target table during the move.

The Generate...

options correspond to the ADMIN_MOVE_TABLE

Operation input parameters. These can be used in one of two mutually exclusive ways. You can generate a single ADMIN_MOVE_TABLE call specifying MOVE to have all operations performed at one time.

Alternatively, you can generate one or more ADMIN_MOVE_TABLE calls corresponding to each of the selected INIT, COPY, REPLAY, VERIFY, SWAP,

CLEANUP, or CANCEL options, to have the table moved one step at a time.

MOVE, INIT,

COPY, REPLAY,

VERIFY, SWAP,

CLEANUP, and

CANCEL Options

A set of options is displayed for each selected Generate...

option.

Depending on the Generate...

selection, KEEP, COPY_USE_LOAD,

COPY_WITH_INDEXES, FORCE, NO_STATS, COPY_STATS,

NO_AUTO_REVAL, REORG, NO_TARGET_LOCKSIZE, CLUSTER,

NON_CLUSTER, and LOAD_MSGPATH options may be available. Keep in mind that CLUSTER and NON_CLUSTER options are mutually exclusive and that LOAD_MSGPATH is only available when COPY_USE_LOAD is selected.

Displays the DDL generated to execute the operation. For more information, see " Preview " on page 587.

3 Click the Execute or Schedule button.

N EXT U SED F ILEGROUP

This action builds and submits an ALTER PARTITION SCHEME... NEXT USED statement, letting you alter the designated NEXT USED filegroup for a partition scheme.

Platform Availability

SQL SVR

659 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

To Change a Partition Scheme’s Next Used Filegroup

1 Initiate a Next Used Filegroup action against a partition scheme. For more information, see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the dialog:

Step

Next Used

Filegroup

Preview

Settings and tasks

Select the new filegroup from the Filegroup Name dropdown.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

O BJECT P ROPERTIES

This action submits a sp_iqhelp procedure call against a selected object of one of the following types:

Domains

System Tables

Events

Tables

Functions

Views

Procedures

Standard sp_iqhelp output, providing information about the object, is opened in a Results

Editor.

Platform Availability

SYB IQ

To display sp_iqhelp information for an object

1 Initiate an Object Properties action against an object of one of the types in the table above.

For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the output in a Results Editor.

O PTIMIZE T ABLES

Rapid SQL lets you issue an OPTIMIZE TABLE statement, reclaiming unused space and defragmenting the data file.

Platform Availability

MySQL

RAPID SQL 8.6/XE5 USER GUIDE 660

OBJECT ACTIONS > OBJECT ACTIONS

To Optimize Table Storage

1 Initiate an Optimize Tables action against one or more tables. For more information see

" Initiating an object operation " on page 584.

Rapid SQL opens the Optimize Tables dialog.

2 Use the following table as a guide to understanding and modifying settings in this wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Lets you review the tables you selected.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

P LACE

The Placement dialog lets you place tables and indexes on different segments. From a performance standpoint it is not recommended to have a table and its supporting indexes on the same device or disk segment. It is also good to have more frequently accessed indexes and tables grouped together on higher speed devices, if possible.

Platform Availability

SYB ASE

To Place an Index or Table on a Segment

1 Initiate a Place action against one or more tables or indexes. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Place wizard:

Step

Action options

Dependencies

Preview

Settings and tasks

Use the Segment dropdown to specify the segment on which you can place objects, the default, logsegment or system.

Review the referring and referred objects that will be automatically resolved when you

execute this operation. For more information, see " Dependencies " on page 587.

Preview the DDL generated for the operationn. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

661 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

P OPULATION STATUS

This action builds and submits an ALTER FULLTEXT INDEX statement with a START

{FULL|INCREMENTAL|UPDATE} POPULATION or STOP | PAUSE | RESUME POPULATION argument, letting you start, stop, pause or resume population of the full-text index.

NOTE: Before using this action, consult Microsoft SQL Server documentation for detailed information on topics such as timestamp column restrictions on the INCREMENTAL option and the interaction of these options with the background update index and auto change tracking features

. For more information, see " Accessing Third Party

Documentation " on page 21.

Platform Availability

SQL SVR

To Control Population of a Full-text Index

1 Initiate a Population Status action against one or more full-text indexes. For more

information, see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the dialog:

Step

Action Options

Preview

Settings and tasks

Select an option from the Action dropdown:

START FULL - every row of the table is retrieved for full-text indexing, even rows that have already been indexed.

START INCREMENTAL - only the rows modified since the last population are retrieved. This option only works properly against tables with a timestamp column.

START UPDATE - only insertions, updates, or deletions processed since the last changetracking index update. Change-tracking population must be enabled on the table, but the background update index or the auto change tracking should be disabled.

STOP - stops a paused population or population in progress.

PAUSE - pauses a FULL population in progress

RESUME - resumes a paused FULL population.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

P URGE R ECYCLE B IN

This action builds and submits a PURGE RECYCLEBIN, PURGE DBA_RECYCLEBIN, PURGE

TABLESPACE tablespacename , or PURGE TABLESPACE tablespacename USER username statement. This lets you select one of the following purge Recycle Bin options:

• Purge all objects belonging to the current user

• Purge all objects belonging to all users

RAPID SQL 8.6/XE5 USER GUIDE 662

OBJECT ACTIONS > OBJECT ACTIONS

• Purge all objects residing on a specified tablespace

• Purge all objects residing on a specified tablespace and belonging to a specified user

Platform Availability

ORCL 10g ^

To Purge Objects in the Recycle Bin Tables and Associated Objects

1 Right-click the Recycle Bin node and select Purge Recycle Bin from the context menu.

2 Use the following table as a guide to understanding and modifying settings on the Confirm

Purge Recycle Bin wizard:

Panel

Action Options

Preview

Settings and tasks

Purge

Tablespace

User

Select a PURGE option type:

RECYCLEBIN purges all objects belonging to the current user.

DBA_RECYCLEBIN purges objects system wide.

TABLESPACE purges objects residing on a specific tablespace.

If you selected a Purge value of TABLESPACE, select the tablespace for which all residing objects will be purged. Optionally, use the User control to further qualify the objects that will be purged.

If you selected a Purge value of TABLESPACE, you can use this control to restrict purging to only those tablespace-residing objects belonging to a particular user.

Displays the DDL that will execute the object action. For details, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

Related Information

• " Recycle Bin " on page 228 (for a support summary including topics such as displaying

Recycle Bin contents)

• " Enable Recycle Bin " on page 640

• " Flashback Recycle Bin Entry " on page 647

• " Purge Recycle Bin Entry " on page 664

663 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

P URGE R ECYCLE B IN E NTRY

This action builds and submits a PURGE INDEX or PURGE TABLE statement, letting you permanently delete tables or indexes from the Oracle Recycle Bin. Once purged, the tables or indexes and any associated objects that were contained in the Recycle Bin are no longer retrievable.

NOTE: The Datasource Explorer entry for a Recycle Bin entry has a Can Purge field that indicates whether a Purge Recycle Bin Entry action can be performed against the item

Platform Availability

ORCL 10g

To Permanently Purge Selected Tables or Indexes Currently in the Recycle Bin

1 Expand the Recycle Bin node to display its contents.

2 Right-click one or more selected tables or indexes in the Recycle Bin and select Purge

Recycle Bin Entry from the context menu. The Confirm Purge Recycle Bin Entry dialog opens.

3 Use the following table as a guide to understanding and modifying settings in the wizard:

Step

Action options

Dependencies

Preview

Settings and tasks

Displays the table and index entries you selected to purge.

Review the referring and referred objects that will be automatically resolved when you

execute this operation. For details, see " Dependencies " on page 587.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

4 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

NOTE: When dropping tables on a datasource with the Recycle Bin feature enabled, the Rapid

SQL Drop action has an option that lets you immediately purge the table.

Related Information

• " Recycle Bin " on page 228 (for a support summary including topics such as displaying

Recycle Bin contents)

• " Enable Recycle Bin " on page 640

• " Flashback Recycle Bin Entry " on page 647

• " Purge Recycle Bin " on page 662

Q UIESCE

Rapid SQL lets you quiesce at the instance or database level. For details, see the following topics:

RAPID SQL 8.6/XE5 USER GUIDE 664

OBJECT ACTIONS > OBJECT ACTIONS

Quiesce (Database)

Quiesce (Instance)

Q UIESCE (D ATABASE )

This action lets you restrict user access to a database.

Platform Availability

DB2 LUW

NOTE: Rapid SQL does not support Quiesce Database for a DB2 8 server from an IBM DB2 for Linux, Unix, and Windows client or for an IBM DB2 for Linux, Unix, and Windows 7 server from an IBM DB2 for Linux, Unix, and Windows client.

To Quiesce a Database

1 On the Navigator, right-click a datasource node and select Command > Quiesce from the context menu. Provide login credentials if prompted.

2 Use the following table as a guide to understanding and modifying settings on the Quiesce

Database dialog:

Setting

Connections

Description

Lets you select an Immediate quiesce or Defer.

3 Click Execute .

Related Information

• " Unquiesce " on page 709

Q UIESCE (I NSTANCE )

This action lets you restrict user access to an instance.

Platform Availability

DB2 LUW

To Quiesce an Instance

1 On the Navigator, right-click the Instance node.

2 Select Command > Quiesce from the context menu. Provide login credentials if prompted.

665 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

3 Use the following table as a guide to understanding and modifying settings on the Quiesce

Instance dialog:

Setting

For user

For group

Connections

Description

Select this radio button to restrict a user and then type the user name in the associated box.

Select this radio button to restrict a group and then type the group name in the associated box.

Lets you select an Immediate quiesce or Defer.

4 Click Execute .

Related Information

• " Unquiesce " on page 709

R EASSIGN B Y C ATEGORY

Rapid SQL lets you reassign the category of stored outlines in Oracle.

Outlines are a set of results for the execution plan generation of a particular SQL statement.

When you create an outline, plan stability examines the optimization results using the same data used to generate the execution plan. That is, Oracle uses the input to the execution plan to generate an outline, and not the execution plan itself.

Platform Availability

ORCL

To Reassign a Stored Outline to a Different Category

1 Initiate a Reassign By Category action against one or more stored outlines. For more

information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Reassign

By Category wizard:

Step

Action options

Preview

Settings and tasks

Displays the outlines you selected. Select a new category for the outline or outlines from the

Category dropdown.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

Related Information

• " Change Category " on page 602

RAPID SQL 8.6/XE5 USER GUIDE 666

OBJECT ACTIONS > OBJECT ACTIONS

• " Drop By Category " on page 633

R EBALANCE

This action lets you build and submit one or more ALTER TABLESPACE... REBALANCE statements. This creates containers on recently added storage paths and drops containers from storage paths that are in DROP PENDING state.

Platform Availability

DB2 LUW 9.7^

Prerequisites or Setup Tasks

This object action is only available for tablespaces that meet the following criteria:

• The tablespace must use automatic storage. That is, in the Tablespace Editor, the Use

Automatic Storage

property is selected.For more information see " Tablespaces Editor

(IBM DB2 LUW) " on page 475.

• In the Tablespace Editor, the Type property specifies LARGE or REGULAR.

To rebalance a tablespace

1 Initiate a Rebalance action against one or more tablespaces.

2 Use the following table as a guide to understanding and modifying settings in this wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Displays the tablespaces selected for this operation.

Review the referring and referred objects that will be automatically resolved when you

execute this operation. For details, see " Dependencies " on page 587.

Displays the DDL that will execute the object action. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

Related Information

• See " Drop Automatic Storage Path(s) " on page 632.

R EBIND P ACKAGES

The Rebind Package dialog lets you update the best access path for SQL statements when the contents of a package changes.

TIP: If the physical storage of a package is changed or dropped, rebinding updates the path of the SQL statements.

667 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Platform Availability

DB2 LUW , DB2 z/OS

To Rebind One or More Packages

1 Initiate a Rebind Packages action against one or more packages. For more information see

" Initiating an object operation " on page 584.

Rapid SQL opens the Rebinding Package dialog.

2 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

R EBIND P LANS

This action lets you update the best access path for SQL statements when the contents of a plan change.

TIP: If the physical storage of a plan is changed or dropped, rebinding updates the path of the SQL statements.

Platform Availability

DB2 z/OS

To Rebind a Plan Associated with a Package

• Click the Rebind button on the Plans/Packlists tab of the Packages editor. For more

information, see " Packages Editor (IBM DB2 Z/OS) " on page 485.

R EBUILD (F ULL TEXT C ATALOGS )

This action builds and submits a basic ALTER FULLTEXT CATALOG catalogname REBUILD statement, with no additional options or arguments. This lets you rebuild the entire catalog by deleting the existing catalog and building a new one.

Platform Availability

SQL SVR

To Rebuild a Full-text Catalog

1 Initiate a Rebuild action against one or more full-text catalogs. For more information, see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the dialog:

Step

Action options

Settings and tasks

Displays the catalogs you selected.

RAPID SQL 8.6/XE5 USER GUIDE 668

OBJECT ACTIONS > OBJECT ACTIONS

Step

Dependencies

Preview

Settings and tasks

Lets you review the objects potentially impacted by this action. For more information, see

" Dependencies " on page 587.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

R EBUILD I NDEX

See the following topics for DBMS-specific instructions on rebuilding indexes:

Rebuild Index (Oracle)

Rebuild Index (SQL Server)

• Rebuild Indexes (InterBase/Firebird)

R EBUILD I NDEX (O RACLE )

The Rebuild Indexes dialog lets you rebuild an index that has become fragmented. Rebuilding an index is a good alternative to coalescing an index because you can move the index to a different tablespace and change both tablespace and storage parameters while eliminating fragmentation. However, rebuilding an index has a higher cost than coalescing an index. These same qualities also make rebuilding an index a viable alternative to dropping an index then recreating it.

As a rule of thumb, check indexes for rebuilds when their level (or tree depth) reaches four or greater, or many deleted leaf rows are found. The Rebuild Indexes dialog can also be used to easily move an index from one tablespace to another.

Important Notes

• If you are rebuilding a function-based index, the index is enabled when the rebuild is finished.

• You cannot rebuild a partitioned index. You must rebuild each partition or subpartition individually.

The table below describes the options and functionality on the Rebuild dialog.

Option

New Tablespace

Logging

Description

Defaults to the tablespace which currently includes the index. To change the tablespace containing the index, choose a new tablespace from the list.

Recoverable - The creation of the index logs in the redo log file.

Non-Recoverable - The creation of the index is not logged in the redo log file.

669 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Option

Use Parallel Processes

Order

Description

Performs processes for the sequential execution of a SQL statement in parallel using multiple parallel processes. One process, known as the parallel execution coordinator, dispatches the execution of a statement to several parallel execution servers and coordinates the results from all of the server processes to send the results back to the user.

NOTE: Only available for Oracle with the Parallel Server option.

NOPARALLEL execution - Select this if you are concerned that the cost of synchronizing parallel processes will impede the throughput of data.

Reverse - Instructs Oracle to store the bytes of the index block in reverse order and to exclude the ROWID when rebuilding the index.

No Reverse - Instructs Oracle to store the bytes of the index block in normal order when rebuilding the index.

To Rebuild an Oracle Index

1 Initiate a Rebuild

action against one or more indexes. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Rebuild Indexes dialog.

2 To move the index to a new tablespace, click the New Tablespace list and then click the new tablespace.

3 In the Logging box, click:

• The Recoverable option button to make the operation log in the redo file.

• The Non-Recoverable option button if you do not want the operation logged in the redo file.

4 If you are using Parallel Server, select the Parallel Server check box and:

• Type a value indicating the number of query server processes that should be used in the operation in the Degree box.

• Type a value indicating how you want the parallel query partitioned between the Parallel

Servers in the Instances box.

5 In the Order box:

• Click the Reverse option button to rebuild the index to store the bytes of the index block in reverse order.

• Click the No Reverse option button to rebuild the index to store the bytes of the index block in order.

6 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

RAPID SQL 8.6/XE5 USER GUIDE 670

OBJECT ACTIONS > OBJECT ACTIONS

R EBUILD I NDEX (SQL S ERVER )

The Rebuild Indexes dialog lets you rebuild an entire index, primary key, or unique key or a single partition of those objects. Depending on your choice, a number of REBUILD WITH clause options are available.

To Rebuild an Index

1 Initiate a Rebuild Index action against one or more indexes, primary keys, or unique keys.

For more information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Rebuild

Index wizard:

Step

Action options

Dependencies

Preview

Settings and tasks

To rebuild a single partition, specify a Partition number and optionally, provide Sort in tempdb and MaxDOP property values used to create the REBUILD WITH clause.

To rebuild the entire index, primary key, or unique key, DO NOT provide a Partition Number , and optionally, provide Pad Index , Sort in tempdb , Ignore Duplicate Key , Statistics no recompute , Online , Allow Row Locks , Allow Page Locks , MaxDOP , and Fill Factor property values used to create the REBUILD WITH clause.

For more information on these properties, see " Indexes Wizard (SQL Server) " on page 343.

Lets you review the objects potentially impacted by this action.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

R EBUILD I NDEXES (I NTER B ASE /F IREBIRD )

This action rebuilds indexes by issuing ALTER INDEX/INACTIVE followed by ALTER INDEX/

ACTIVE statements.

To Rebuild an Index

1 On the Database Navigator, expand nodes until the Indexes node is displayed.

2 Expand the indexes node and select one or more indexes.

3 Right-click the selected indexes and select Rebuild Indexes from the context menu. The

Rebuild Index dialog opens.

4 Use the following table as a guide to understanding and modifying settings in the wizard:

Step

Action options

Dependencies

Preview

Settings and tasks

Displays the indexes you chose to rebuild.

Lists referring and referenced objects potentially impacted by the change. For details, see

Dependencies

.

Preview the DDL generated for the operation and when ready, use the Schedule or Execute button to perform this action.

671 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

5 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

R EBUILD O UTLINES

Rapid SQL lets you rebuild one or more stored outlines in a single operation.

Platform Availability

ORCL

To Rebuild a Stored Outline

1 Initiate a Rebuild Outlines action against one or more stored outlines. For more information

see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Rebuild

Outlines dialog:

Step

Action options

Dependencies

Preview

Settings and tasks

Displays the stored outlines you selected.

Lets you review the objects potentially impacted by this action.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

R EBUILD T ABLE

This action builds and submits an ALTER TABLE statement with an ENGINE=InnoDB option.

Platform Availability

MySQL

To Rebuild a Table

1 Initiate a Rebuild Table action against one or more tables. For more information, see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Rebuild

Table dialog:

Step

Action options

Dependencies

Settings and tasks

Displays the tables you selected.

Lets you review the objects potentially impacted by this action. For more information, see

" Dependencies " on page 587.

RAPID SQL 8.6/XE5 USER GUIDE 672

OBJECT ACTIONS > OBJECT ACTIONS

Step

Preview

Settings and tasks

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

R ECOMPILE

Rapid SQL lets you recompile one or more tables. Recompilation causes each procedure and trigger that uses the target table to be recompiled the next time it runs.

The queries used by procedures and triggers are optimized only once, when they are compiled.

As you add indexes or make other changes to your database that affect its statistics, your compiled procedures and triggers may lose efficiency. By recompiling the procedures and triggers that act on a table, you can optimize the queries for maximum efficiency.

Platform Availability

SQL SVR , SYB ASE

To Recompile One or More Tables

1 Initiate a Recompile

action against one or more tables. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Recompile Tables dialog.

2 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

1

R EFRESH T ABLE

The Refresh Table dialog lets you reload materialized query tables that have been defined with refresh options.

Platform Availability

DB2 LUW

673 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

To Reload a Materialized Query Table

1 Initiate a Refresh Table action against one or more materialized query tables. For more

information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings on the Refresh

Materialized Query Table dialog:

Pane

Action Options

Preview

Description

Select an Online Option of ALLOW NO ACCESS, ALLOW READ ACCESS or ALLOW

WRITE ACCESS.

Enable or disable Query Optimization .

Select an INCREMENTAL or NOT INCREMENTAL Refresh Option.

Preview the DDL generated by the options you chose. For more information, see

" Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

Important Notes

For procedures on restoring a damaged master database, consult the Commands Reference

Manual.

R ENAME

This action lets you rename an object. In general, all referenced or referring objects are updated to reflect the new name.

The following table outlines object type support for the operation for all supported DBMS:

DB2 LUW DB2 z/OS ITB/FBD MySQL Oracle SQL SVR Sybase

ASE

Blob filters

Check constraints

Databases

Defaults

Domains

Exceptions

Extended procedures

Foreign keys

Generators

Indexes

Materialized Views

Primary keys

Procedures











 















 































RAPID SQL 8.6/XE5 USER GUIDE 674

OBJECT ACTIONS > OBJECT ACTIONS

DB2 LUW DB2 z/OS ITB/FBD MySQL Oracle SQL SVR Sybase

ASE

Roles

Rules

Sequences

Shadows

Stored outlines

Synonyms

Tables

Tablespaces

Unique keys

Views









































The following table notes the exceptions and provides prerequisite tasks to be performed before renaming an object.

DBMS

Microsoft SQL Server

Notes and restrictions on renaming

Microsoft SQL Server lets you rename a database if you own it. Before renaming a database, set it to single-user mode.

Microsoft SQL Server will not rename a table if it is referenced within the body of other objects that call it, such as tables, triggers or views. As a result, renaming a table can result in broken dependencies with other objects. Also, Microsoft SQL Server does not let you rename System Tables.

IBM DB2 for OS/390 and z/OS

Rapid SQL lets you rename a primary key if the underlying table has only one owner.

The rename operation does not rename the table if it is referenced within the body of other objects, such as tables, triggers or views, that call it. As a result, renaming a table can result in broken dependencies with other objects.

Sybase ASE Before renaming a database, set it to single-user mode.

System indexes can not be renamed.

The rename operation does not rename the stored procedure if it is referenced within the body of other objects, such as another stored procedure, that call it. As a result, renaming a stored procedure can result in broken dependencies with other objects.

The rename operation does not rename the table if it is referenced within the body of other objects, such as tables, triggers or views, that call it. As a result, renaming a table can result in broken dependencies with other objects.

The rename operation does not rename the view if it is referenced within the body of other objects, such as stored procedures, triggers or other views, that call it. As a result, renaming a view can result in broken dependencies with other objects.

Databases with a Type of ARCHIVE or with the In-memory property selected cannot be

renamed. For more information, see " Databases (Sybase ASE) - Properties " on page 430.

675 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

To Rename an Object

1 Initiate a Rename action against a supported object (see the table above). For more

information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Rename dialog:

Step

Rename

Dependencies

Preview

Settings and tasks

Name Provide the new name for the object.

Review the referring and referred objects for which naming will be automatically resolved

when you execute the renaming operation. For more information, see " Dependencies " on page 587.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

R EORGANIZE /R EORG

Rapid SQL offer Reorganize or Reorg options against the following DBMS platform/object types:

Reorganizing IBM DB2 for Linux, Unix, and Windows Objects

Reorganizing Oracle Objects

Reorganize (SQL Server indexes, primary keys, and unique keys)

Reorganize (SQL Server Full-text Catalogs)

Reorganize (Sybase ASE Indexes and Tables)

Reorg Index (DB2 z/OS)

Reorg (DB2 z/OS Tablespaces)

RAPID SQL 8.6/XE5 USER GUIDE 676

OBJECT ACTIONS > OBJECT ACTIONS

R EORGANIZING IBM DB2 FOR L INUX , U NIX , AND W INDOWS O BJECTS

Reorganize Dialog Box (One Table)

The table below describes the options and functionality on the Reorganize dialog.

Step

Action Options

Partitions

Preview

Description

• Choose a Reorg Type of table or all indexes of the table.

• Optionally, choose an Index Schema and specify an Index name .

• Enable or disable Inplace Reorg and if you enable, choose an

Inplace reorg mode of Start, Stop, Pause, or Resume.

• Select an Access mode to control read and write access.

• Select an Index reorg mode to clean up empty pages, delete after cleaning up empty pages, or convert to a type 2 index.

• If you did not enable Inplace Reorg , select a Tablespace .

• Select a Long Tablespace .

• Enable or disable the following options: Index scan , Reorg long field and LOB data , Reset Dictionary , No truncate table , and

Reorganize all partitions .

If you did not enable Reorganize all partitions , select the partitions to reorganize.

Preview the DDL code generated from your choices. For more information, see

" Preview " on page 587..

Reorganize Dialog Box (Multiple Tables)

The table below describes the options and functionality on the Reorganize dialog.

Option Description

Temporary Tablespace Associates a temporary tablespace with the table's tablespace. You can select another tablespace from the list.

R EORGANIZE (SQL S ERVER INDEXES , PRIMARY KEYS , AND UNIQUE KEYS )

The Reorganize Indexes dialog lets you reorganize an entire index, primary key, or unique key or a single partition of that object. It also lets you specify a LOB_COMPACTION option.

NOTE: You cannot reorganize an index (primary key, or unique key) that has an Allow Page

Locks

property set to FALSE. For information on setting index properties, see " Indexes

Editor (SQL Server) " on page 516.

677 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

To reorganize an index

1 Initiate a Reorganize action against an index, primary key, or unique key. For more

information see " Initiating an object operation " on page 584.

The Reorganize Index wizard opens.

2 Use the following table as a guide to understanding and modifying settings in the wizard:

Step

Action options

Dependencies

Preview

Settings and tasks

To reorganize a single partition, specify a Partition number and optionally, specify Lob

Compaction used to create the REORGANIZE WITH clause.

To reorganize the entire index, primary key, or unique key, DO NOT provide a Partition

Number , and optionally, specify Lob Compaction used to create the REORGANIZE WITH clause.

Review the referring and referred objects that will be automatically resolved when you

execute this operation. For more information, see " Dependencies " on page 587.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

R EORGANIZING O RACLE O BJECTS

The Reorganize dialog lets you reduce query processing time against tables.

To Reorganize an Oracle Table

1 Initiate a Reorganize

action against a table. For more information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the

Reoganize dialog:

Panel Group

Action Options Reorganize method

Tablespace

Data Block

Storage

Setting and description

Online - If selected, reorganization is carried out online, using

DBMS_REDEFINITION procedures. DBMS_REDEFINITION is Oracle’s online table reorganization package and is available for Oracle 9i.

During an online reorganization, the table can still be accessed using DML statements like SELECT and UPDATE.

If this check box is unselected, reorganization is carried out using a series of simple ALTER TABLE statements. This method is intended for offline usage.

If you want to move the table(s) to a new tablespace, select the new tablespace from this list.

Type ALTER TABLE property values for the Percent Free (PCTFREE property),

Percent Used (PCTUSED property), Initial Transactions (INITTRANS property), and Max Transactions (MAXTRANS property).

RAPID SQL 8.6/XE5 USER GUIDE 678

OBJECT ACTIONS > OBJECT ACTIONS

Panel Group

Extents

Freelists

Setting and description

Type an ALTER TABLE MOVE STORAGE property value for the Initial Extent

(INITIAL) property).

Type ALTER TABLE STORAGE property values for the Next Extent (NEXT property), Percent Increase (PCTINCREASE property), Minimum Extents

(NEXT property), and Maximum Extents (MAXEXTENTS property).

Use the Free Lists and BufferPool (DEFAULT, KEEP, RECYCLE) settings to provide values for the FREELISTS and BUFFER_POOL components of a

STORAGE clause.

Use the Free List Groups setting to provide a value for the FREELIST GROUPS component of a STORAGE clause

Parallel Query Use the Parallel Degree setting to provide a value for the DEGREE component of a PARALLEL clause. This specifies the number of servers used in processing operations.

Physical Logging - When disabled, a NOLOGGING clause is added to the ALTER TABLE statement.

Dependencies

For details on using this tab, see " Dependencies " on page 587.

Preview

For details on using this tab, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

R EORGANIZE (SQL S ERVER F ULL TEXT C ATALOGS )

This action builds and submits a basic ALTER FULLTEXT CATALOG catalogname REORGANIZE statement, with no additional options or arguments. This lets you merge smaller indexes into a larger, master index.

To reorganize a full-text catalog:

1 Initiate a Reorganize action against one or more full-text catalogs. For more information,

see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the dialog:

Step

Action Options

Dependencies

Preview

Settings and tasks

Displays the catalogs you selected.

Lets you review the objects potentially impacted by this action. For more information, see

" Dependencies " on page 587.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

R EORGANIZE (S YBASE ASE I NDEXES AND T ABLES )

The R eorganize dialog lets you reduce query processing time against tables. This functionality is available for both tables and indexes.

679 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

For more information, see

Reorganizing Sybase ASE Tables

Reorganize Sybase ASE Indexes

R EORGANIZING S YBASE ASE T ABLES

This action lets you build and submit one of four REORG subcommands: FORWARDED_ROWS,

RECLAIM_SPACE, COMPACT, or REBUILD. REORG optimizes the use of table space and improves performance.

The Reorganize Table dialog lets you reduce the query processing time against a table by reorganizing the table to ensure that space is properly allocated to it. For lengthy reorganization processes, this dialog box also lets you execute a process in increments, lets you resume an incomplete process, and lets you specify the duration of each increment. For more information, see

Incremental Reorganizations

.

TIP: Frequent update activity on a table can cause data rows to migrate and to chain over multiple data pages. Chained or forwarded rows can degrade performance because more physical reads are required to access a row of data. Consequently, you should monitor chained rows regularly to spot performance bottlenecks before they become severe. In addition, altering physical storage parameters can lead to fragmentation of space on your data pages, which also results in reduced performance levels.

You should consider reorganizing a table if you are experiencing slow performance due to:

• A large number of chained or forwarded rows on your data pages

• A large amount of fragmentation in your data pages

NOTE: You can reorganize tables in Sybase ASE versions 12 and 12.5.

The table below describes the options and functionality on the Reorganize Table dialog:

Option

Compact

Description

Lets you reclaim space and undo row forwarding.

Minimizes interference with other activities by using multiple small transactions of brief duration. Each transaction is limited to eight pages of reorg processing. These three commands also provide resume and time options that allow you to set a time limit on how long a reorg runs and to resume a reorg from the point at which the previous reorg stopped, making it possible to use a series of partial reorganizations at off-peak times to reorg a large table.

For information on result options, see " Incremental Reorganizations " on page 681.

RAPID SQL 8.6/XE5 USER GUIDE 680

OBJECT ACTIONS > OBJECT ACTIONS

Option

Reclaim Space

Rebuild

Undo Row

Forwarding

Options

Description

Lets you reclaim unused space resulting from deletions and row-shortening updates on a page.

Minimizes interference with other activities by using multiple small transactions of brief duration. Each transaction is limited to eight pages of reorg processing. These three commands also provide resume and time options that allow you to set a time limit on how long a reorg runs and to resume a reorg from the point at which the previous reorg stopped, making it possible to use a series of partial reorganizations at off-peak times to reorg a large table.

For information on result options, see " Incremental Reorganizations " on page 681.

Lets you undo row forwarding and reclaim unused page space. It also rewrites all rows to comply with the target table's clustered index, writes rows to data pages to comply with space management setting changes (via sp_chgattribute), and drops and re-creates all the target table's (or tables') indexes.

Reorg rebuild holds an exclusive table lock for its entire duration. On a large table this can be a significant amount of time. However, reorg rebuild accomplishes everything that dropping and re-creating a clustered index does and takes less time. In addition, reorg rebuild rebuilds the table using all of the table's current space management settings. Dropping and recreating an index does not use the space management setting for reservepagegap. In most cases, reorg rebuild requires additional disk space equal to the size of the table it is rebuilding and its indexes.

Lets you undo row forwarding, a process that occurs when an update increases a row's length in a data-only-locked table such that the row is too large to fit on its original page.

Start at the point where a previous reorg left off - Select to resume a previously initiated but incomplete partial reorganization. Then specify the duration for which you want the resumed reorganization to continue before stopping again. This box is disabled for the rebuild command.

I NCREMENTAL R EORGANIZATIONS

If target tables are too long to reorganize in one session, Rapid SQL lets you reorganize them in increments over multiple sessions by specifying a maximum duration for each session. After

Rapid SQL reorganizes tables for the specified duration, the operation stops until you resume it again from the Options box of the Reorganize Table dialog. The Options box lets you specify to resume a previously initiated but incomplete partial reorganization. It also lets you specify the duration for which you want a resumed reorganization to continue before stopping again. The

Option box is disabled for the rebuild command.

NOTE: The duration you specify refers to elapsed time, not CPU time

681 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

In the option box, if you select the check box without specifying a duration, Rapid SQL executes the reorg at the point where the previous reorg stopped and continues to the end of the target tables. If you clear the check box and specify a duration, the reorg starts at the beginning of the target tables and continues for the specified number of minutes. If you select the check box and specify a duration, Rapid SQL runs the reorg from the point where it last left off, and continues for the specified number of minutes.

NOTE: If you reorganize a table using one command (Compact, Reclaim Space, or Undo

Forwarding) for a specified duration, you cannot resume the process from its resume point using a different command. For example, you cannot compact a table for an hour, and then reclaim space on the remainder of the table. A resumed reorganization process must utilize the same command from start to finish. Selecting a different command begins a new reorganization process.

CAUTION: While this option lets you reorganize a large table in multiple manageable pieces, any updates to the table between reorganization runs can cause pages to be skipped or processed more than once.

R EORGANIZE S YBASE ASE I NDEXES

The Reorganize Index dialog lets you reduce the query processing time against a table by running a reorg rebuild command on the target index.

This operation:

• Undoes row forwarding and reclaim unused page space

• Rewrites all rows in the table to comply with the table's clustered index

• Writes rows to data pages to comply with space management setting changes (via sp_chgattribute)

• Drops and re-creates the table's indexes

Reorg rebuild holds an exclusive table lock for its entire duration. On a large table this can be a significant amount of time. However, reorg rebuild accomplishes everything that dropping and re-creating a clustered index does and takes less time. In addition, reorg rebuild rebuilds the table using all of the table's current space management settings. Dropping and re-creating an index does not use the space management setting for reservepagegap. In most cases, reorg rebuild requires additional disk space equal to the size of the table it is rebuilding and its indexes.

R EORG I NDEX (DB2 Z /OS)

This action lets you build and submit a REORG INDEX utility call.

NOTE: Before using this action consult IBM documentation for details on REORG INDEX utility

options. For online access to DB2 documentation, see " Accessing Third Party

Documentation " on page 21.

RAPID SQL 8.6/XE5 USER GUIDE 682

OBJECT ACTIONS > OBJECT ACTIONS

To Reorganize an Index

1 Initiate a Set Default

action against a tablespace. For more information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in this wizard.

Note that some settings are only available based on other selections.

Setting

Select Indexes

Description

On opening, the list displays the index you chose to reorganize.

Optionally, you can add more indexes to the list that are to be reorganized by clicking Add . Adding indexes using the Index Selector dialog is a two-step process. Use the Database Like , Index Creator , Index Like , and Match Case controls to provide a search criteria pattern and then click Query to display qualified indexes in the Index Selector list. Then select one or more indexes from the list, click Add , and close the dialog.

To remove a selected index from the list to be reorganized, select the index in the list and click Delete .

Select this check box to make the utility restartable.

Do you want the utility to be reusable

Share Level

Deadline

Drain Specification

Lets you select share level that allows users to view but not modify the table data: REFERENCE, CHANGE, or None.

Lets you specify a deadline for the switch phase of reorganization to start. If

Rapid SQL estimates that the switch phase will not start by the deadline, Rapid

SQL terminates reorganization.

None - Specifies that there is no deadline for the read-only iteration of log processing.

Timestamp - Specifies the deadline for the switch phase to start processing. labeled-duration-expression

-

Click the ... button to open a dialog that lets you build a custom CURRENT_TIMESTAMP or CURRENT_DATE value.

Lets you specify that DB2 drains the write claim class after the delay. The number of log records, and thus the estimated time, for a future iteration of log processing will be 0.

Fast Switch

Maxro (only available with a

Share Level of CHANGE)

Keeps the data set name unchanged and updates the catalog to reference the newly reorganized data set.

Lets you DEFER or specify the maximum amount of time for the last iteration

(read-only access iteration) of log processing.

Drain

Level

(only available with a

of CHANGE)

Share Lets you specify drain behavior (WRITERS or ALL) at the end of the log phase after the MAXRO threshold is passed and when the last log iteration is to be applied:

Lets you provide a LONGLOG value of CONTINUE, DRAIN, or TERM Long Log (only available with a

Share Level of CHANGE)

Delay (only available with a Share

Level of CHANGE)

Lets you specify the minimum interval between the time REORG sends the

LONGLOG message to the console and the time REORG performs the action specified by the Long Log setting.

Timeout (only available with a

Share Level of CHANGE)

Lets you specify a timeout option of ABEND or TERM.

683 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Setting

Leaf dist limit

Description

Lets you specify the value that is to be compared to the LEAFDIST value for the specified partitions of the index in SYSIBM.SYSINDEXPART. If any LEAFDIST value exceeds the specified Leaf dist limit , REORG is performed or, if you specify REPORTONLY, recommended.

Report

Unload

If selected, REORG is only recommended.

Specify a continue or terminate value of CONTINUE, ONLY, or PAUSE.

Do you want to specify the stats option

Specifies that statistics are to be collected and either reported or stored in the

DB2 catalog.

Do you want to output message to SYSPRINT

Do you want to specify the correlation stats option

Specifies that a set of messages is to be generated to report the collected statistics and output to SYSPRINT.

Lets you specify a correlation-stats-spec for statistics reporting.

Do you want to force aggregation or rollup processing to be done event though some parts do not contain data

Work DDN

Specifies whether statistics are to be aggregated or rolled up when RUNSTATS is executed.

Would you like to preformat

Lets you specify a DD name or a TEMPLATE name from a previous TEMPLATE control statement.

Lets you specify that remaining pages are to be preformatted up to the highallocated RBA in the index space.

3 When ready, click Finish .

R EORG (DB2 Z /OS T ABLESPACES )

The Reorganize Tablespace Wizard reorganizes a tablespace to improve access performance and reclaim fragmented space. The wizard can also reorganize a single partition or range of partitions of a partitioned table space. You can specify the degree of access to the data during reorganization, and optionally collect inline statistics.

Completing the Reorganize Tablespace Wizard

To complete the Reorganize Tablespace Wizard, do the following:

1 Initiate a Reorg

action against a tablespace. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Reorganize Tablespace Wizard.

2 Complete the wizard panels, and then click Finish .

Rapid SQL opens the Preview dialog.

RAPID SQL 8.6/XE5 USER GUIDE 684

OBJECT ACTIONS > OBJECT ACTIONS

R EORGANIZE T ABLESPACE W IZARD - P ANEL 1

The table below describes the options and functionality on this panel of the Reorganize

Tablespace Wizard:

Option

Do you want the utility to be restartable?

Database

Description

Select to make the utility restartable.

Tablespace

Partition

Reuse

Displays the list of databases in the system. You can select the tablespace database or click the filter button to limit the list of databases to a string pattern.

Displays the list of tablespaces.

Lets you specify a partition or a range of partitions.

Select to reuse this tablespace.

R EORGANIZE T ABLESPACE W IZARD - P ANEL 2

The table below describes the options and functionality on this panel of the Reorganize

Tablespace Wizard:

Option

Log

Sort Data

No Sysrec

Sortkeys

Description

List of the sequence of events after you execute the wizard.

Sorts columns alphanumerically in single result sets.

Select Yes for no sysrec.

Select Yes for sortkeys. Specifies that index keys are to be sorted and built in parallel during the

SORTBLD phase to improve performance.

R EORGANIZE T ABLESPACE W IZARD - P ANEL 3

The table below describes the options and functionality on this panel of the Reorganize

Tablespace Wizard:

Option

Share level

Deadline

Drain Specification

Fast Switch

Description

Lets you select share level that allows users to view but not modify the table data: None,

Reference, or Change.

Lets you specify a deadline for the switch phase of reorganization to start. If Rapid SQL estimates that the switch phase will not start by the deadline, Rapid SQL terminates reorganization.

None - Specifies that there is no deadline for the read-only iteration of log processing.

Timestamp - Specifies the deadline for the switch phase to start processing.

Click the button to open the Deadline Expression Builder

dialog.

Lets you specify that DB2 drains the write claim class after the delay. The number of log records, and thus the estimated time, for a future iteration of log processing will be 0.

Keeps the data set name unchanged and updates the catalog to reference the newly reorganized data set.

685 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Deadline Expression Builder

The table below describes the options and functionality on the Deadline Expression Builder dialog

Option

Current Date

Current Timestamp

Description

Lets you select today as the basis of the deadline, click + or -, type the number of years, months, days, hours, minutes, seconds and microseconds.

Lets you select the current timestamp as the basis of the deadline, click + or -, type the number of years, months, days, hours, minutes, seconds and microseconds.

R EORGANIZE T ABLESPACE W IZARD - P ANEL 4

The table below describes the options and functionality on this panel of the Reorganize

Tablespace Wizard:

Option

Local Site Primary

Local Site Backup

Recovery Site Primary

Recovery Site Backup

Description

Lets you specify the Local Site Primary.

Lets you specify the Local Site Backup.

Lets you specify the Recovery Site Primary.

Lets you specify the Recovery Site Backup.

R EORGANIZE T ABLESPACE W IZARD - P ANEL 5

The table below describes the options and functionality on this panel of the Reorganize

Tablespace Wizard:

Option

Off Pos Limit

Ind Ref Limit

Report Only

Description

The specified value is compared to the result of the calculation (NEAROFFPOSF +

FAROFFPOSF) × 100 / CARDF for the specified partitions in SYSIBM.SYSINDEXPART for the explicit clustering indexes for every table in the specified table space. Alternatively, the values in SYSINDEXPART are checked for a single non-partitioned table space, or for each partition if you specified an entire partitioned table space as the target object. If at least one calculated value exceeds the OFFPOSLIMIT value, REORG is performed or recommended.

NOTE: This option is valid for non-LOB table spaces only.

The specified value is compared to the result of the calculation (NEARINDREF + FARINDREF)

× 100 / CARDF for the specified partitions in SYSIBM.SYSTABLEPART for the specified table space. Alternatively, the values in SYSTABLEPART are checked for a single non-partitioned table space, or for each partition if you specified an entire partitioned table space as the target object. If at least one calculated value exceeds the INDREFLIMIT value, REORG is performed or recommended.

NOTE: This option is valid for non-LOB table spaces only.

The reorganization is only recommended, not performed.

RAPID SQL 8.6/XE5 USER GUIDE 686

OBJECT ACTIONS > OBJECT ACTIONS

Option

Unload

Description

Specifies whether the utility job is to continue processing or end after the data is unloaded.

Continue - Specifies that, after the data has been unloaded, the utility continues processing.

Pause - Specifies that after the data has been unloaded, processing ends.

Only - Specifies that after the data has been unloaded, the utility job ends and the status in

SYSIBM.SYSUTIL corresponding to this utility ID is removed.

External - Specifies that after the data has been unloaded, the utility job is to end and the status in SYSIBM.SYSUTIL corresponding to this utility ID is removed.

R EORGANIZE T ABLESPACE W IZARD - P ANEL 5

NOTE: This panel is displays only if the share level is Change.

The table below describes the options and functionality on this panel of the Reorganize

Tablespace Wizard:

Option

Table Owner

Table

Maxrow

Drain

Long Log

Delay

Timeout

Description

Displays the schema names in the system.

Displays all tables for the selected schema.

Lets you specify the maximum amount of time for the last iteration of log processing. During that iteration, applications have read-only access. Type an integer value or select DEFER. DEFER

Specifies that the iterations of log processing with read/write access can continue indefinitely.

Lets you select Writers or All. Specifies that Rapid SQL drains the write claim class after the delay.

The number of log records, and thus the estimated time, for a future iteration of log processing will be 0.

Lets you specify the action that Rapid SQL performs (after sending the LONGLOG message to the console) if the number of log records that are processed during the next iteration is not sufficiently lower than the number of log records that were processed during the previous iterations.

Continue - Specifies that Rapid SQL continues performing reorganization.

Term - Specifies that Rapid SQL terminates reorganization after the delay.

Drain - Specifies that Rapid SQL drains the write claim class after the delay. The number of log records, and thus the estimated time, for a future iteration of log processing will be 0.

Lets you type a lower bound for the interval between the time when REORG sends the LONGLOG message to the console and the time when REORG performs the action specified by the

LONGLOG parameter.

Lets you select timeout option:

Abend - Abnormal end of task

Term - Termination

R EORGANIZE T ABLESPACE W IZARD - P ANEL 6

NOTE: This panel is displays only if the share level is Reference or Change.

687 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

The table below describes the options and functionality on this panel of the Reorganize

Tablespace Wizard:

Option

Local Site Primary Copy

Local Site Backup Copy

Recovery Site Primary

Copy

Recovery Site Backup

Copy

Description

Lets you specify the Local Site Primary Copy.

Lets you specify the Local Site Backup Copy.

Lets you specify the Recovery Site Primary Copy.

Lets you specify the Recovery Site Backup Copy.

R EORGANIZE T ABLESPACE W IZARD - P ANEL 7

The table below describes the options and functionality on this panel of the Reorganize

Tablespace Wizard:

Option

Off Pos Limit

Ind Ref Limit

Report Only

Unload

Description

The specified value is compared to the result of the calculation (NEAROFFPOSF +

FAROFFPOSF) × 100 / CARDF for the specified partitions in SYSIBM.SYSINDEXPART for the explicit clustering indexes for every table in the specified table space. Alternatively, the values in SYSINDEXPART are checked for a single non-partitioned table space, or for each partition if you specified an entire partitioned table space as the target object. If at least one calculated value exceeds the OFFPOSLIMIT value, REORG is performed or recommended.

NOTE: This option is valid for non-LOB table spaces only.

The specified value is compared to the result of the calculation (NEARINDREF + FARINDREF)

× 100 / CARDF for the specified partitions in SYSIBM.SYSTABLEPART for the specified table space. Alternatively, the values in SYSTABLEPART are checked for a single non-partitioned table space, or for each partition if you specified an entire partitioned table space as the target object. If at least one calculated value exceeds the INDREFLIMIT value, REORG is performed or recommended.

NOTE: This option is valid for non-LOB table spaces only.

The reorganization is only recommended, not performed.

Specifies whether the utility job is to continue processing or end after the data is unloaded.

Continue - Specifies that, after the data has been unloaded, the utility continues processing.

Pause - Specifies that after the data has been unloaded, processing ends.

Only - Specifies that after the data has been unloaded, the utility job ends and the status in

SYSIBM.SYSUTIL corresponding to this utility ID is removed.

External - Specifies that after the data has been unloaded, the utility job is to end and the status in SYSIBM.SYSUTIL corresponding to this utility ID is removed.

RAPID SQL 8.6/XE5 USER GUIDE 688

OBJECT ACTIONS > OBJECT ACTIONS

R EORGANIZE T ABLESPACE W IZARD - P ANEL 6

The table below describes the options and functionality on this panel of the Reorganize

Tablespace Wizard:

Option

Do you want to keep the dictionary?

Do you want to specify statistics?

Description

A collection of language-related linguistic information used during text analysis, indexing, retrieval, and highlighting of documents in a particular language.

NOTE: Available only if Continue or Pause option was specified for Unload on the previous panel.

Lets you include statistics for the tablespace in the SQL statement.

Enabled only if Continue or Pause option was specified for Unload on the previous panel.

Lets you specify to output message to SYSPRINT.

Do you want to output message to SYSPRINT?

Do you want to force aggregation or rollup processing to be done even though some parts do not contain data?

Lets you specify to process with forced aggregation, gathered into a mass, or rollup.

R EORGANIZE T ABLESPACE W IZARD - S TATISTICS T ABLES

The table below describes the options and functionality on this panel of the Reorganize

Tablespace Wizard:

Option

Select Tables

Add

Set Properties

Description

Lets you select tables (and columns) to collect statistics for.

The sample column is editable and you can type an integer value into this column.

Opens the Table Selector Dialog Box .

Lets you customize the selection of columns in the selected tables.

R EORGANIZE T ABLESPACE W IZARD - S TATISTICS I NDEXES

The table below describes the options and functionality on this panel of the Reorganize

Tablespace Wizard:

Option

Select Index

Add

Set Properties

Description

Lets you specify the indexes and the correlation values for collecting the statistics.

The sample column is editable and you can type an integer value into this column.

Opens the Index Selector Dialog Box .

Lets you specify the correlation information for each index.

689 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

R EORGANIZE T ABLESPACE W IZARD - P ANEL 7

The table below describes the options and functionality on this panel of the Reorganize

Tablespace Wizard:

Option

Punch DDN

Discard DDN

Unload DDN

Work DDN

Description

Lets you select punch DDN from the list. Contains generated LOAD statements that let you reload the discarded data. Required if Unload External option is chosen on Panel 5.

Lets you select discard DDN from the list.

Lets you select DD name of the unload data set. Required unless NOSYSREC on Panel 2 or

Share level CHANGE Panel 3 is selected.

Lets you select the DD statement for a temporary data set used for intermediate output.

R EORGANIZE T ABLESPACE W IZARD - P ANEL 7

The table below describes the options and functionality on this panel of the Reorganize

Tablespace Wizard:

Option

Discard

No Pad

Add

Set Condition

Description

Lets you select discard DDN from the list.

Rapid SQL does not add a character to fill empty space.

Opens the Table Selector Dialog Box .

Lets you customize the selection of columns in the selected tables.

R EORGANIZE T ABLESPACE W IZARD - P ANEL 8

The table below describes the options and functionality on this panel of the Reorganize

Tablespace Wizard

Option

Would you like to specify the device type?

Do you want to specify the sort number?

Preformat

Description

Lets you specify the device type.

Lets you type the number of datasets to be dynamically allocated by the sort program. The range of the text field is 0 to 2147483647.

Lets you specify that the remaining pages are preformatted up to the high allocated

RBA in the table space and index spaces associated with the table specified in tablename. The preformatting occurs after the data has been loaded and the indexes are built.

RAPID SQL 8.6/XE5 USER GUIDE 690

OBJECT ACTIONS > OBJECT ACTIONS

R EORGANIZE T ABLESPACE W IZARD - P ANEL 9

The table below describes the options and functionality on this panel of the Reorganize

Tablespace Wizard:

Option

Punch DDN

Discard DDN

Unload DDN

Work DDN

Description

Lets you select punch DDN from the list. Contains generated LOAD statements that let you reload the discarded data. Required if Unload External option is chosen on

Panel 5.

Lets you select discard DDN from the list.

Lets you select DD name of the unload data set. Required unless NOSYSREC on

Panel 2 or Share level CHANGE Panel 3 is selected.

Lets you select the DD statement for a temporary data set used for intermediate output.

Condition Dialog Box

The Condition dialog lets you type free form condition text.

NOTE: Rapid SQL does not test the correctness of the condition text.

R EPAIR T ABLES

This action builds and submits a REPAIR TABLE statement, letting you repair a corrupted table.

This operation returns a standard REPAIR TABLE result set. Each returned message consists of

Table (name), Op (with a value of REPAIR), Msg_type (STATUS, ERROR, INFO, WARNING), and

Msg_text components.

Platform Availability

MySQL

To Repair a Possibly Corrupted Table

1 On the Datasource Navigator, expand nodes until the Tables node is visible.

2 Expand the Tables node.

3 Right-click one or more selected tables and select Repair Tables from the context menu.

Rapid SQL opens the Repair Tables dialog.

4 Use the following table as a guide to understanding and modifying settings in this wizard:

Step

Action Options

Settings and tasks

Quick

Extended

Use FRM file

Only the index tree is fixed.

Creates the index row by row instead of creating one index at a time with sorting.

Recreates the .MYI

file header using information in the .frm

file.

691 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Step

Dependencies

Preview

Settings and tasks

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For more information, see " Preview " on page 587.

5 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

The results set opens on the Results tab of an ISQL editor window. For more information, see

" Using the Results Editor " on page 830.

R EPORT

Rapid SQL lets you generate a detailed report of one or more objects of a given type for a single database. For each object, the report contains information similar to that available in the object editor for that object type. The report opens in Rapid SQL’s built-in HTML browser and is also written to an .htm file.

Platform Availability

DB2 LUW , DB2 z/OS

,

ITB/FBD ,

MySQL , ORCL , SQL SVR , SYB ASE

To Generate a Detail Report on One or More Objects

1 On the Datasource Navigator, expand the target object node.

Rapid SQL displays the target objects.

2 Right-click one or more selected objects, and then select Report from the context menu.

Rapid SQL opens the Report dialog.

3 In Report Home Page File Name , type the report name or click Browse to locate the report.

4 Use the Append date and time stamp to report file name and Save report in date specific folders controls to ensure that the disk files are not overwritten each time you generate reports against the specified file name.

5 In Report Title , type the title that is to appear in the report.

6 If you selected multiple objects, use the Report Options controls to specify a Single HTML

File for All Objects or Separate HTML Files for Each Object .

7 Click Execute .

Rapid SQL opens the report in the built-in browser and writes a copy to disk.

RAPID SQL 8.6/XE5 USER GUIDE 692

OBJECT ACTIONS > OBJECT ACTIONS

R ESTART

The Restart Sequence dialog lets you restart a sequence, starting at the value specified in the sequence definition or starting at a specified value.

Platform Availability

DB2 LUW

To Rebuild a Stored Outline

1 Initiate a Restart

action against a sequence object. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Restart Sequence dialog.

2 Select one of the following Restart Sequence at options:

• Originating Value use the value specified in the object definition

• This value lets you specify a custom start value

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

R ESTART S EQUENCE ( S )

This action builds and submits an ALTER SEQUENCE... RESTART/RESTART WITH statement.

This lets you reset the current value to either the initial value specified when the sequence was created, or reset it to a specified value.

Platform Availability

SQL SVR

To reset the value of a sequence

1 Initiate a Restart Sequence(s) action against one or more sequences. For more information,

see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the dialog:

Step

Action options

Dependencies

Preview

Settings and tasks

Start With An integer that will be returned as the next value of the sequence object.

The integer must be within the range specified for the sequence. If no value is provided, sequence numbering restarts with the initial value specified when the sequence was created.

Lets you review the objects potentially impacted by this action. For more information, see

" Dependencies " on page 587.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

693 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

R ESYNCHRONIZE

This action executes an ALTER DATABASE... FOR PROXY_UPDATE statement, forcing resynchronization of proxy tables within the proxy database.

NOTE: This functionality is available for Sybase ASE 12.5.

To manually resynchronize proxy tables

1 Initiate a Resynchronize action against one or more databases. For more information, see

Initiating an object operation

.

2 Use the following table as a guide to understanding and modifying settings in the dialog:

Step

Action options

Preview

Settings and tasks

Lists the database or databases you selected to resynchronize.

Lets you preview the DDL generated for the operation.

3 Click Execute . For information on the other options, see

Preview and

Scheduling

.

R OLE A CTIVATION

Rapid SQL lets you activate or deactivate roles for the current session. The Role Activation action builds and submits one or more SET ROLE commands.

Platform Availability

ORCL , SYB ASE

To Enable or Disable One or More Roles in the Current Rapid SQL Session

1 Right-click on a connected Sybase ASE or Oracle datasource node and select Role

Activation from the context menu. The Role Activation dialog opens.

2 Use the following table as a guide to understanding and modifying settings in the wizard:

Panel

Role Activation

Preview

Settings and tasks

The list contains entries for each role that has been granted to the current login. For

information on granting/assigning roles to a login or user, see Users Editor (Oracle) and

Logins Editor (Sybase ASE) .

To activate a role, select the Active check box associated with the role. If the role is configured to require a password, provide it in the Password box.

To deactivate a role, deselect the Active check box associated with the role.

Preview the DDL generated for the operation and when ready, click Execute .

RAPID SQL 8.6/XE5 USER GUIDE 694

OBJECT ACTIONS > OBJECT ACTIONS

3 Click Execute .

R UN J OB (O RACLE J OBS )

This action builds and submits a DBMS_SCHEDULER.RUN_JOB call, letting you run a job immediately.

Platform Availability

ORCL 10g ^

To run a job immediately

1 On a connected Oracle datasource, expand the Scheduler nodes and select the Jobs node.

2 Right-click a job and select Run Job from the context menu.

3 Use the following table as a guide to understanding and modifying settings in the dialog:

Step

Action options

Dependencies

Preview

Settings and tasks

Select the Use current session check box to provide a USE_CURRENT_SESSION attribute value of TRUE. Deselect the Use current session check box to provide a use_current_session attribute value of FALSE.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For details, see " Preview " on page 587.

4 Click Execute . For information on the scheduling option, see " Scheduling " on page 963.

R UN J OB ( JOB QUEUES )

Rapid SQL lets you immediately run any defined job queue, regardless of its current schedule.

Job Queues are built-in mechanisms that let you schedule a variety of SQL-based or commandline driven tasks.

Platform Availability

ORCL

To Run a Job

1 Initiate a Run Job

action against a job queue. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Run dialog.

2 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

695 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Related Information

• " Enable Job (Job Queue) " on page 639

• " Disable Job " on page 630.

S CHEMA

The Schema dialog lets you view key properties of the columns in a table or view.

Platform Availability

DB2 LUW , DB2 z/OS

,

ITB/FBD ,

MySQL , ORCL , SQL SVR , SYB ASE

To View a Column Summary for a Table or View

1 Initiate a Schema

action against a table or view. For more information see " Initiating an object operation " on page 584.

Rapid SQL opens Schema results in a Results Editor. For information on functionality offered, see " Using the Results Editor " on page 830.

S ELECT * F ROM

This action lets you retrieve all data contained in tables or views. Results are displayed in a row and column grid.

Platform Availability

DB2 LUW , DB2 z/OS

,

ITB/FBD ,

MySQL , ORCL , SQL SVR , SYB ASE

To Select All Data in One or More Tables or Views

1 Initiate a Select * From action against one or more tables or views. For more information

see " Initiating an object operation " on page 584.

For each selected table or view, Rapid SQL opens a two-tabbed window:

• The Results tab displays the data selected from the table, in a grid similar to a spreadsheet.

Right-click and toolbar options offer many of the functions provided in the Results editor.

For more information, see " Using the Results Editor " on page 830.

• The Query tab displays the full query generated for the operation. Right-click and toolbar options offer many of the functions provided in the ISQL editor. For more information, see

" Using the SQL Editor " on page 789.

RAPID SQL 8.6/XE5 USER GUIDE 696

OBJECT ACTIONS > OBJECT ACTIONS

S ET D EFAULT

This function lets you set a tablespace as the default tablespace. Users created without a specified default tablespace will be assigned this default tablespace. If no default tablespace is set, users created without a specified tablespace will have their default tablespace set to

SYSTEM.

Platform Availability

ORCL 10g ^

To Set a Tablespace as the Default

1 Initiate a Set Default

action against a tablespace. For more information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Set

Default wizard:

Step

Action options

Dependencies

Preview

Settings and tasks

Verify that the panel displays the tablespace to be set as default.

Review the referring and referred objects that will be automatically resolved when you

execute this operation. For more information, see " Dependencies " on page 587.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

S ET I NTEGRITY

Rapid SQL provides an implementation of the DB2 SET INTEGRITY statement, letting you perform tasks such as taking tables into and out of set integrity pending state, placing tables into full access state, and pruning the contents of one or more staging tables.

NOTE: This operation should not be performed without an in-depth understanding of the SET

INTEGRITY statement. For online access to DB2 documentation, see " Accessing Third

Party Documentation " on page 21.

Platform Availability

DB2 LUW

697 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

To Open the Set Integrity Wizard

1 On the Navigator, expand a DB2 database, and click or expand the Table node.

2 Select the appropriate table(s), right-click, and choose Set Integrity from the menu. You can select more than one table by clicking CTRL + the tables you want.

OR

Select the appropriate table, click Command on the toolbar, and then choose Set Integrity from the drop-down menu.

The table below lists all fields you can see in the Set Integrity Wizard. Depending on the options you choose, you may not see them all.

Required Field

Tables

Description

Tables

The list of one or more tables you selected appear.

Integrity Option

Specifies the readability of the table while it is in check pending state:

Specifies whether to be immediately cascaded to all descendents

Descendent Types

Integrity Option

OFF --When selected, tables have their foreign key and check constraints, and column generation disabled and so are put in a pending state. This also means materialized query or staging tables are not immediately refreshed and are put in a pending state.

TO DATALINK RECONCILE PENDING --When selected, DATALINK integrity is disabled and tables are put in a check pending no access state. Dependent and descendant tables are not affected.

IMMEDIATE CHECKED --This turns on a table’s integrity checking turned on. Any checking that was deferred is carried out.

FULL ACCESS --Tables become fully accessible as soon as the SET INTEGRITY statement executes.

PRUNE --This is appropriate only for staging tables. The content of the staging table is pruned and set to an inconsistent state. If any table in the table-name list is not a staging table, an error is returned.

UNCHECKED --Allows you turn on some or all integrity checking but the table will not be checked for integrity violations. This can affect data integrity.

Table Readability/Cascade/Descendent Types

NO ACCESS --The table(s) are put in a check pending no access state so read/write access to the table is prohibited.

READ ACCESS --The table(s) are put in a check pending read state. This allows read access to the non-appended portions of any tables.

CASCADE IMMEDIATE --The check pending state for foreign key constraints is immediately extended to descendant foreign key constraints or to materialized query or staging tables.

CASCADE DEFERRED --Only the selected tables are put in the check pending state.

Descendant foreign key, materialized query, or staging tables remain unchanged.

Materialized Query Tables --When selected, the check pending state is immediately cascaded to only descendant materialized query tables.

Foreign Key Tables --When selected, the check pending state is cascaded immediately only to descendant foreign key tables.

Staging Tables --When selected, the check pending state is cascaded immediately only to descendant staging tables.

RAPID SQL 8.6/XE5 USER GUIDE 698

OBJECT ACTIONS > OBJECT ACTIONS

Required Field

Do you want to check on the appended portion (if any) of the table?

List of Base Tables

Description

Check Appended Portion?

Default/Yes/No

Force Generated --If you do not specify this generated column current values will be compared to the computed value of the expression as if an equality check constraint existed. If this is specified, generated columns are computed only for the appended portion.

Prune --Possible only for staging tables. When you check this, the contents of the staging table are pruned and the staging table is set to an inconsistent state.

Full Access --When selected, tables will become accessible after the SET INTEGRITY statement executes.

Specify Exception Tables

Any row that is in violation of a foreign key or check constraint is copied to the exception table you select.

Integrity Options: IMMEDIATE UNCHECKED

IMMEDIATE

UNCHECKED options

Do you want tables to become fully accessible after the SET

INTEGRITY statement executes?

Foreign Key --These constraints are turned on when the table is removed from check pending status.

Check --Check constraints are turned on when the table is removed from check pending status.

Datalink Reconcile Pending --DATALINK integrity constraints are turned on when the table is removed from check pending status.

Materialized Query --Immediate refreshing is turned on for a materialized query table when it is removed from a check pending state.

Generated Column --When the table is removed from check pending status, generated columns are turned on.

Staging --Immediate propagation is turned on for a staging table.

Yes/No

3 When ready, click the Finish button to preview and submit the generated DDL. For more

information, see " Preview " on page 587.

S ET O NLINE /O FFLINE

The Set Database(s) Online/Offline dialog lets you disable your databases to prevent access, and enable your databases to grant access through the Datasource menu.

Platform Availability

SQL SVR , SYB ASE

Important Notes

For Sybase ASE, Rapid SQL only lets you set databases online.

699 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

To Set One or More Databases Online or Offline

1 Initiate a Set Online/Offline action against one or more databases. For more information

see " Initiating an object operation " on page 584.

2 Use the following table as a guide to working through the panels of the Set Online/Offline dialog

Step

Action options

Dependencies

Preview

Settings and tasks

Set offline (SQL

Server only)

Set this to TRUE to set the database offline or set it to True to set the database online.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For details, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

S ET S TATISTICS

This action creates and submits a SET STATISTICS statement, letting you recompute the selectivity of an index.

Platform Availability

ITB/FBD

To Recompute the Selectivity of an Index:

1 On the Database Navigator, expand nodes until the Indexes node is visible, and then expand the Indexes node.

2 Select one or more indexes.

3 RIght click the selected indexes and select Set Statistics from the context menu.

Rapid SQL opens the Set Statistics dialog.

4 Use the following table as a guide to understanding and modifying settings in this wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Displays the indexes you selected.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action.

5 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

RAPID SQL 8.6/XE5 USER GUIDE 700

OBJECT ACTIONS > OBJECT ACTIONS

S ET UNDO

Set UNDO Tablespace dialog lets you dynamically set an UNDO tablespace if the tablespace is running in AUTO UNDO mode.

Platform Availability

ORCL 9i ^

To Dynamically Set an UNDO Tablespace

1 Initiate a Set Undo

action against a tablespace. For more information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying the settings on the Set

Undo Tablespace wizard:

Step

Action Options

Dependencies

Preview

Functionality

Displays the tablespace you selected to be set as an Undo tablespace.

Lists referring and referenced objects potentially impacted by the change. For details,

see " Dependencies " on page 587.

Preview the DDL generated from your choices. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

S HRINK

For details on using Rapid SQL Shrink operations to save or reclaim space, see the following topics:

Shrinking SQL Server databases

Shrinking Oracle rollback segments

Shrinking Oracle tables or indexes

S HRINKING SQL S ERVER DATABASES

Rapid SQL lets you reclaim space from a database that is too large.

701 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

To Shrink a SQL Server Database

1 Initiate a Shrink

action against one or more databases. For more information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying the settings on the

Shrink wizard:

Step Description

Action Options Displays the databases you selected and lets you work with the following settings:

Move data pages to beginning of file before shrink

Release All Unused Space

Select to move data pages to the beginning of the file before the shrink.

Deselect to set the target free space to retain, and then in the Target Free Space to Retain (percent) box, type the new value of free space to retain.

The new size for the database must be at least as large as the Minimum Allowable Size displayed in the Current File

Size box.

Preview

Target free space percent after shrink

Lets you specify the target free space percent after the shrink.

Preview the DDL generated from your choices. For more information, see " Preview " on page 587.

3 Click Execute . For information on the other options, see

Preview and

Scheduling .

S HRINKING O RACLE ROLLBACK SEGMENTS

Rapid SQL lets you shrink the size of rollback segments. The proper sizing of rollback segments is critical to their overall performance. Performance degrades whenever a rollback segment must extend, wrap or shrink in response to transaction loads. Ideally, you want to make the extents of rollback segments as small as possible while still ensuring that each transaction can fit into a single extent.

After an abnormally large transaction load, you might consider shrinking a rollback segment to eliminate unnecessary space. Oracle lets you shrink a rollback segment manually by a specific amount or back to its Optimal Size.

Important Notes

For Oracle 9 or later, Shrink is not available if auto-UNDO management is enabled.

RAPID SQL 8.6/XE5 USER GUIDE 702

OBJECT ACTIONS > OBJECT ACTIONS

To Shrink the Size of One or More Rollback Segments

1 Initiate a Shrink action against one or more rollback segments. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying the settings on the

Shrink wizard:

Step

Action Options

Preview

Description

Displays the rollback segments you selected and lets you work with the following settings:

Specify the size...

If you do not provide a specific number the Rollback Segment uses the OPTIMAL value specified in the Storage clause. If an

OPTIMAL value is not specified, the size defaults to the

MINEXTENTS value of the Storage clause.

Preview the DDL generated from your choices. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

S HRINKING O RACLE TABLES OR INDEXES

Rapid SQL lets you shrink the size of tables or indexes.

Important Notes

Shrink is only available for tables in which the Row Movement property is enabled. For information on setting the Row Movement

when creating or editing a table, see " Tables Wizard

(Oracle) " on page 410 and "

Tables Editor (Oracle) " on page 554.

To Shrink the Size of One or More Indexes or Tables

1 Initiate a Shrink action against one or more indexes or tables. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying the settings on the

Shrink wizard:

Step

Action Options

Dependencies

Preview

Description

Displays the objects you selected and lets you work with the following settings:

Compact Enable segment space and compact rows.

Cascade Enable Cascade to simultaneously shrink all dependent objects.

Lists referring and referenced objects potentially impacted by the change. For details,

see " Dependencies " on page 587.

Preview the DDL generated from your choices. For more information, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

703 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

S TART D ATABASE

The Start Database dialog lets you start a database:

• When the database that has been stopped with a Stop Database dialog. For more

information, see " Stop Database " on page 704.

• After a tablespace, partition, or index has been placed in group buffer pool RECOVER pending status (GRECP) or if pages have been put on the logical page list (LPL) for that object.

Depending on the specified options, the database can be made available for read-only processing, read-write processing, or utility-only processing. In a data sharing environment, the command can be issued from any DB2 on the group that has access to the database.

Platform Availability

DB2 z/OS

To Start a Database

1 On the Datasource Navigator, expand the Databases node.

Rapid SQL displays objects of the selected type.

2 Right-click the target object and select Start Database from the context menu.

Rapid SQL opens the Start Database dialog.

3 Use the following table as a guide to understanding and settings options on this dialog:

Option Description

Database Grid The Partition column is editable and can include one or more unique numeric values separated by commas. Initially the Partition column is blank. No validation is made for the correctness of partition numbers so make sure that the partitions exist.

Access Lets you select access options of Read/Write , Read only , Utility only or Force .

4 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

S TOP D ATABASE

The Stop Database dialog lets you stop a database, optionally letting you allow running applications access until their next COMMIT.

Platform Availability

DB2 z/OS

RAPID SQL 8.6/XE5 USER GUIDE 704

OBJECT ACTIONS > OBJECT ACTIONS

To Stop a Database

1 On the Database Explorer, expand the Databases node.

Rapid SQL displays objects of the selected type.

2 Right-click the target object and select Stop Database from the context menu.

Rapid SQL opens the Stop Database dialog.

3 Use the following table as a guide to understanding and settings options on this dialog:

Option Functionality

Database Grid The Partition column is editable and can include one or more unique numeric values separated by commas. Initially the Partition column is blank. No validation is made for the correctness of partition numbers so make sure that the partitions exist.

Stop at

COMMIT

Enabling this option sends the STOP DATABASE statement.with an AT(COMMIT) clause, allowing running applications to continue access until their next commit.

4 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

S TOP J OB

This action builds and submits a DBMS_SCHEDULER.STOP_JOB call, letting you stop a job immediately.

Platform Availability

ORCL 10g ^

To stop a job

1 On a connected Oracle datasource, expand the Scheduler nodes and select the Jobs node.

2 Right-click a job and select Stop Job from the context menu.

3 Use the following table as a guide to understanding and modifying settings in the dialog:

Step

Action options

Dependencies

Preview

Settings and tasks

Select the Force Stop check box to provide a FORCE attribute value of TRUE forcing the job to terminate immediately. Deselect the Use current session check box to provide a FORCE attribute value of FALSE.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For details, see " Preview " on page 587.

4 Click Execute . For information on the scheduling option, see " Scheduling " on page 963.

705 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

S WITCH O NLINE

The Switch Online dialog lets you access a tablespace by switching it online after the parent container(s) have been recovered or restored.

Platform Availability

DB2 LUW

To Switch a Tablespace Online:

1 Initiate a Switch Online action against one or more tablespaces. For more information see

" Initiating an object operation " on page 584.

Rapid SQL opens the Switch Online dialog.

2 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

T RANSFER O WNERSHIP

Rapid SQL lets an object owner or a user with SECADM authority transfer ownership of an object to another user. The new user is automatically granted the same privileges as the former owner.

Ownership can be transferred on an object-by-object basis or you can transfer all objects currently owned by an individual user.

Platform Availability and object type support

DB2 LUW 9.1 ^

The following table lists the object types that support ownership transfer:

Aliases Check Constraints

Functions Indexes

Materialized Query Tables Schema

Tables

User Datatypes

Tablespaces

Views

Event Monitors

Primary Keys

Sequences

Triggers

Foreign Keys

Procedures

Structured Types

Unique Keys

RAPID SQL 8.6/XE5 USER GUIDE 706

OBJECT ACTIONS > OBJECT ACTIONS

To Transfer Ownership of an Object

1 Initiate a Transfer Ownership action against one or more supported objects (see table

above). For more information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Transfer

Ownership wizard:

Step

Action options

Preview

Settings and tasks

If you initiated the ownership transfer against a user, select the specific objects belonging to that user that are to be assigned to a new user.

Use the New Owner dropdown to select a defined user as the new owner of the selected object or objects.

Preview the DDL generated for the operation. For more information, see " Preview " on page 587.

T RUNCATE

Rapid SQL lets you quickly delete the rows of one or more tables or clusters. Truncating a table is a faster alternative to deleting all of its rows.

CAUTION: If you truncate a table, Rapid SQL deletes all the rows. These rows are not logged as individual drops and cannot be recovered from a transaction log or other type of log.

Platform Availability

DB2 LUW , DB2 z/OS

,

MySQL

,

ORCL

,

SQL SVR , SYB ASE

To Truncate a Table or Cluster

1 Initiate a Truncate or Truncate Table action against one or more tables or clusters. For

more information see " Initiating an object operation " on page 584.

Rapid SQL opens the Truncate wizard/dialog box.

2 For help with DBMS-specific settings and additional information, see the following topics:

Notes on truncating Oracle objects

Notes on truncating Sybase ASE objects

Notes on truncating IBM DB2 z/OS objects

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

N OTES ON TRUNCATING O RACLE OBJECTS

You can truncate any table or cluster in their schema or, if you have the DROP ANY TABLE system privilege, you can truncate any table in any schema.

707 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Observe the following when truncating tables or clusters:

• Before truncating a cluster or table containing a parent key, disable all referencing foreign keys existing in different tables.

• Truncating a cluster or table does not generate any rollback information and commits immediately.

• Oracle alters the storage parameter NEXT to the size of the last extent deleted from the segment.

• Oracle automatically deletes all data in the table's indexes and any materialized view directload INSERT information associated with a truncated table.

• If the table is not empty, all associated nonpartitioned indexes and all partitions of associated global partitioned indexes are marked unusable.

• You cannot truncate a hash cluster nor can you truncate individual tables in a hash cluster or an index cluster.

When you truncate a table or cluster, you can specify whether space currently allocated for the table is returned to the containing tablespace or if it is returned to the system. The table below describes the Truncate dialog options available when truncating an Oracle table or cluster:

Option

Drop Storage

Reuse Storage

Description

Select if you want the freed extents returned to the system where they can be used by other objects.

Select if you want the space to remain allocated to the table or cluster you have just truncated.

N OTES ON TRUNCATING S YBASE ASE OBJECTS

Truncate against a Sybase ASE table can be applied to the entire table or to a single partition.

NOTE: You cannot truncate a table referenced by a foreign key constraint. Instead, use a

DELETE statement without a WHERE clause.

TIP: When you truncate a table, Sybase ASE removes all rows from the target table, but retains the table structure (its indexes, columns, constraints, etc.). The counter used by an identity for new rows is reset to the seed for the column. To retain the identity counter, use a DELETE statement instead of TRUNCATE. To remove the target table definition and its data, use a DROP TABLE statement.

The following table shows the settings on the Truncate Table dialog:

Option

Partition Name (only available with a single table selected)

Description

Selecting a partition name from the dropdown restricts the truncate operation to a single partition.

RAPID SQL 8.6/XE5 USER GUIDE 708

OBJECT ACTIONS > OBJECT ACTIONS

N OTES ON TRUNCATING IBM DB2 Z /OS OBJECTS

When truncating an IBM DB2 z/OS table, the Action Options tab offers the following settings:

Setting

Reuse Storage

Restrict When Delete

Triggers

Immediate

Description

Corresponds to the DROP STORAGE/REUSE STORAGE clause of a TRUNCATE TABLE statement. This setting specifies whether storage currently allocated to the table is reused or dropped.

Corresponds to the RESTRICT WHEN DELETE TRIGGERS/IGNORE DELETE TRIGGERS clause of a TRUNCATE TABLE statement. When enabled, an error is returned if triggers are defined for the table. When disabled, triggers defined for the table are not activated by the Truncate operation.

Corresponds to the IMMEDIATE clause of a TRUNCATE TABLE statement. If enabled, the truncate operation is executed immediately and cannot be undone. If disabled, a

Rollback can undo the Truncate operation.

U NBIND F ROM T EMPORARY D ATABASE

This action builds and submits a sp_tempdb unbind system procedure call. It lets you unbind a login from a temporary database.

Platform Availability

SYB ASE

To Unbind a Login from a Temporary Database

1 Initiate a Unbind From Temporary Database action against one or more logins. For more

information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying settings in the Unbind

From Temporary Database wizard:

Step

Action Options

Dependencies

Preview

Settings and tasks

Displays the logins you selected for unbinding.

Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Displays the DDL that will execute the object action. For details, see " Preview " on page 587.

3 Click Execute

. For information on the scheduling option, see " Scheduling " on page 856.

U NQUIESCE

The Unquiesce operation lets you restore user access to a single database or all databases of an instance previously quiesced.

709 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

Platform Availability

DB2 LUW

NOTE: Rapid SQL does not support Unquiesce Database for supported servers from IBM DB2 for Windows/Unix 7 or earlier clients.

To Restore User Access to a Database

1 Take one of the following actions, based on whether you are unquiescing a single database or all databases on an instance:

• Right-click a datasource node and select Command > Unquiesce from the context menu.

• Right-click the Instance node, select Command > Unquiesce from the context menu, and provide credentials if prompted.

Rapid SQL opens the Unquiesce Database or Unquiesce Database dialog.

2 Click Execute .

Related Information

• " Quiesce " on page 664

U PDATE S TATISTICS

The Update Statistics dialog lets you update the statistics for an active table or index. As indexes grow and shrink in response to data modification, the accuracy of their statistics can deteriorate.

The following topics provide details on updating statistics by supported DBMS and object type:

Updating statistics for tables or indexes (IBM DB2 for Linux, Unix, and Windows version

8.2.2)

Updating statistics for views (IBM DB2 for Windows, Unix, and Linux)

Updating statistics for databases, indexes, or tables (Microsoft SQL Server)

Updating statistics for indexes or tables (Sybase ASE)

U PDATING STATISTICS FOR TABLES OR INDEXES (IBM DB2 FOR L INUX , U NIX , AND W INDOWS VERSION

8.2.2)

To Update Statistics for an Index or Table

1 Initiate an Update Statistics action against one or more tables or indexes. For more

information see " Initiating an object operation " on page 584.

Rapid SQL opens the Update Statistics dialog.

RAPID SQL 8.6/XE5 USER GUIDE 710

OBJECT ACTIONS > OBJECT ACTIONS

2 Use the following table as a guide to understanding and modifying the settings in this dialog.

Tab

Table

Options

Index

Options

Access

Options

Options

Update table statistics

Distribution

Options

Description

Updates table statistics.

Column

Options

Do not collect column statistics - Column statistics provide information that the optimizer uses to choose the best access plans for queries.

Collect column statistics on key columns onl y - Collects column statistics on columns that make up all the indexes defined on the table.

Collect column statistics on all columns - Collects column statistics for all columns.

Column statistics provide information that the optimizer uses to choose the best access plans for queries.

Frequenc y - Lets you specify the maximum number of frequency values to collect, between 1 and 32767.

Quantiles - Lets you specify the maximum number of distribution quantile values to collect, between 1 and 32767.

Do not collect distribution statistics - Does not collect basic statistics or distribution statistics on the columns.

Collect distribution statistics on key columns only - Collects both basic statistics and distribution statistics on key columns only.

Collect distribution statistics on all columns - Collects both basic statistics and distribution statistics on all columns.

For efficiency both of RUNSTATS and subsequent query-plan analysis, you might collect distribution statistics on only the table columns that queries use in WHERE, GROUP BY, and similar clauses. You might also collect cardinality statistics on combined groups of columns. The optimizer uses such information to detect column correlation when it estimates selectivity for queries that reference the columns in the group.

Exclude XML columns - Lets you collect statistics on non-XML columns only. XML columns are not included in statistics collection.

Lets you enable and disable statistics updates for indexes and controls the following settings:

Update index statistics

Collect extended index statistics

Collects extended index statistics, the CLUSTERFACTOR and PAGE_FETCH_PAIRS statistics that are gathered for relatively large indexes.

Collect sample statistics

Allow read only access during collection

Allow read/ write access during collection

Rapid SQL uses a CPU sampling technique when compiling the extended index statistics.

If the option is not specified, every entry in the index is examined to compute the extended index statistics.

Allows read only access while Rapid SQL updates the statistics.

Allows read and write access while Rapid SQL updates the statistics.

711 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

3 Click Execute . For information on the Preview option, see

Preview .

U PDATING STATISTICS FOR VIEWS (IBM DB2 FOR W INDOWS , U NIX , AND L INUX )

For IBM DB2 for Windows, Unix, and Linux, Rapid SQL lets you update the statistics for a view.

To Update Statistics for a View

1 Initiate an Update Statistics action against one or more views. For more information see

" Initiating an object operation " on page 584.

2 Use the following table as a guide to choosing options:

Pane

Action Options

Dependencies

Preview

Options

Lets you work with the following settings:

Column Statistics - lets you enable or disable collection of Column Statistics update,

Distribution Statistics , Frequency , and Quantiles - let you enable and disable collection of distribution statistics and provide num_freqvalues and num_quantiles RUNSTATS options

Allow Write Access - lets you enable or disable write access during statistics collection.

Lets you view referencing or referenced objects. For more information, see

" Dependencies " on page 587.

Lets you view the DDL generated for the operation. For more information, see " Preview " on page 587.

3 Schedule or Execute the statistics update.

U PDATING STATISTICS FOR DATABASES , INDEXES , OR TABLES (M ICROSOFT SQL S ERVER )

You can update statistics so that Microsoft SQL Server performs the most efficient query possible. This feature updates statistical information on your database so that the query processor can determine the optimal strategy for evaluating a query. These statistics record the key values used for distribution in an database.

You can use the Update Statistics dialog if there is significant change in the key values in the database, if a large amount of data in an indexed column has been added, changed, or removed, or if a table has been truncated causing significant changes in the distribution of key values.

The Update Statistics dialog lets you specify tables and indexes for validation. This dialog box offers different update options depending on your version of Microsoft SQL Server.

TIP: Avoid updating statistics on your target tables during busy access periods. Microsoft

SQL Server locks remote tables and indexes while reading data for update statistics.

RAPID SQL 8.6/XE5 USER GUIDE 712

OBJECT ACTIONS > OBJECT ACTIONS

For Microsoft SQL Server version 7 or later, the Update Statistics dialog lets you specify a full or a percentage of a full scan to be used for updating table or index statistics. It also lets you enable or disable future automatic recomputations of statistics. These recomputations are made at Microsoft SQL Server’s discretion. When updating statistics for tables, this dialog box also lets you specify the type of statistics you require.

To Update Statistics for a Database, Index, or Table

1 Initiate an Update Statistics action against one or more databases, indexes, or tables. For

more information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying the settings in the

Update Statistics dialog:

Step

Action Options

Settings and tasks

Scan Range (tables and indexes only)

Full Scan - Select when you want index statistics on every available row.

Sample Scan - Select when database size prohibits a full scan and you can afford to rely on statistics extrapolated from a sample of all available rows.

If you specified a Scan Range of Sample Scan , provide a count.

Sample Count

(tables and indexes only)

Sample Unit (tables and indexes only)

If you specified a Scan Range of Sample Scan , specify either % or

Rows .

Statistics Type

(tables only)

Index - Select if you only require statistics on the target tables’ indexed columns.

Columns - Select if you require statistics on the target tables in their entirety.

All existing statistics - Select if you require statistics on the whole database.

Statistics

Recompute (tables and indexes only)

Select if you want Microsoft SQL Server to recompute and update the statistics for the index as part of its normal internal maintenance.

Deselect if you want the scheduling of future recomputations to be solely your responsibility.

Lets you view referencing or referenced objects.

Dependencies

(tables and indexes only)

Preview

Lets you view the DDL generated for the operation. For more information, see " Preview " on page 587.

3 Use the Execute or Schedule button to perform the operation.

U PDATING STATISTICS FOR INDEXES OR TABLES (S YBASE ASE)

The Update Statistics dialog lets you specify tables and indexes for validation. This dialog box offers different update options depending on your version of Sybase ASE.

TIP: Avoid updating statistics on your target tables during busy access periods. Sybase ASE locks remote tables and indexes while reading data for update statistics.

713 RAPID SQL 8.6/XE5 USER GUIDE

OBJECT ACTIONS > OBJECT ACTIONS

To Update Statistics for a Database, Index, or Table

1 Initiate an Update Statistics action against one or more tables or indexes. For more

information see " Initiating an object operation " on page 584.

2 Use the following table as a guide to understanding and modifying the settings in the

Update Statistics dialog:

Step Settings and tasks

Action Options Index

Table

(tables only)

(tables only)

Enabling this option updates statistics for indexes of the table.

Enabling this option updates table-specific statistics. Column statistics stored in sysstatistiics are not affected.

The name of the partition to be updated.

Partition Name

(available when a single index or table is selected)

Step Values Lets you specify the number of histogram steps.

Consumers Specifies the number of consumer processes to be used for a sort when a list of columns is provided and parallel query processing is enabled.

Preview

Sampling Percent Specifies the percentage of the column to be randomly sampled in order to gather statistics.

Dependencies Lists referring and referenced objects potentially impacted by the change. For details, see

" Dependencies " on page 587.

Lets you view the DDL generated for the operation. For more information, see " page 587.

Preview " on

3 Use the Execute or Schedule button to perform the operation.

RAPID SQL 8.6/XE5 USER GUIDE 714

OBJECT ACTIONS > OBJECT ACTIONS

715 RAPID SQL 8.6/XE5 USER GUIDE

SQL S

CRIPTING

Rapid SQL incorporates a powerful SQL scripting environment, the ISQL Editor. The ISQL Editor lets you write, debug, test and deploy solid SQL code for your database applications. The scripting environment lets you:

• Open multiple interactive script windows.

• Execute multiple scripts on the same desktop.

• Capture multiple result sets on the same desktop.

Rapid SQL's scripting environment is comprised of different windows:

ISQL Editor

DDL Editor

Results Editor

These windows are context sensitive to the type of script you are opening or extracting. For example, if you extract the schema for a table, Rapid SQL opens a DDL Window containing the script. If you execute a script, a result window displays containing the results of your execution statement.

TIP: Since you must drop a database object before you can recreate it, you can set the DDL

Editor to automatically include DROP statements for specified objects.

TIP: You can have multiple ISQL windows open at the same time, with each running separate queries.

ISQL E

DITOR

The ISQL Editor includes the ISQL Window and DDL Editor.

The ISQL Window lets you:

• Insert files and open files.

• Rename and configure query tabs.

• Find and replace with regular expressions.

RAPID SQL 8.6/XE5 USER GUIDE 716

ISQL EDITOR

• Mail your script files.

TIP: To enlarge or reduce (zoom) the display font size, press Ctrl-= or Ctrl-- (plus or minus on the numeric pad), or hold the Ctrl key while scrolling the mouse wheel. To return to the default size, press Ctrl-/ (on the numeric pad).

TIP: To toggle to the next SQL window, press CTRL +T.

TIP: The row limit option lets you display only the first 'n' rows from any submitted query.

TIP: For Oracle, Rapid SQL displays REF CURSOR contents in the ISQL Window and

Results

Tab .

TIP: For IBM DB2 LUW for Linux, Unix, and Windows and Oracle, you can access the Code

Completion functionality with the CTRL+K shortcut.

Related Topics

• Toolbar Options

• Opening ISQL Windows

• Opening DDL Editors

• Opening Script Files

• Inserting Files into an ISQL Window

• Splitter Windows

• Find and Replace in an ISQL Window

• Regular Expressions

• Navigating in an ISQL Window

• Scheduling

• Sending SQL Scripts

• Renaming and Closing Query Window Tabs

• Printing a Script

• Saving and Closing Scripts

• SQL Preprocessor

• "Automated Error Detection and Coding Aid Features" on page 725

• Bind Variable Parameterization in Prepared Statements (Dynamic SQL)

717 RAPID SQL 8.6/XE5 USER GUIDE

ISQL EDITOR

P REPROCESSING # DEFINE AND # INCLUDE D IRECTIVES

Rapid SQL provides SQL preprocessing similar to functionality provided by C language compiler directives. The ISQL Editor supports a simplified version of the following directives.

• #include provides a means to include the contents of a file in a script at the location of the directive

• #define provides a simple, global search and replace function within a script

The following figure illustrates the result of basic preprocessing of a script, nesting of #define directives/references, and the notations required by the ISQL editor. The original script includes two #define directives and a #include reference to a one-line file named fileForInclude.sql

. The referenced file includes two identifiers to be replaced with #define processing.

The key steps in working with SQL preprocessing are:

• Preparing the ISQL editor for #include and #define preprocessing - Prior to using SQL preprocessing features, you should set the paths that will be searched in processing

#include directives. For details, see Setting Up Rapid SQL to Preprocess #include Directives .

• Using #define and #include directives in scripts - While the supported directives approximate typical C language #define and #include functionality, there are differences in functionality and required syntax. For example, identifiers in the #define directive and in all instances to be replaced, must be prefixed with two ampersand characters (

#define &&PI

3.14159

). For detailed information, see #include Functionality and Syntax and #define

Functionality and Syntax .

RAPID SQL 8.6/XE5 USER GUIDE 718

ISQL EDITOR

• Preprocessing and executing scripts containing #define and #include directives - The

ISQL Editor offers two preprocessing options. You can have a script preprocessed without being executed, opening the processed script in a new editor window with all #define and

#include substitutions made. This lets you view the processed script before execution or continue working with the processed SQL. Alternatively, you can have the script preprocessed and executed in a single step. For details, see Preprocessing and Executing

Scripts Containing #define and #include Directives .

S ETTING U P R APID SQL TO P REPROCESS # INCLUDE D IRECTIVES

In ISQL editor processing of a #include directive, Rapid SQL searches the following locations, in the following order, for the specified file:

1 The location specified on the Datasource Properties tab of the Datasource Registration

Wizard/Editor. For details, see Registering or editing datasources .

2 The location specified on the Directories tab of the Options editor. For details, see

Directories Options .

NOTE: For detailed information on setting Rapid SQL options, see

Specifying Rapid SQL application and feature options

.

Before using SQL preprocessing, ensure that server side or server side and local search paths for include files are specified.

# INCLUDE F UNCTIONALITY AND S YNTAX

Rapid SQL support for the #include directive provides a means to include the contents of a file in a script at the location of the directive. For example, if a script contains the following:

#include mydeclarations.sql

then on preprocessing of the script, there are two effects:

• The line containing the #include directive is commented out before the script is sent to the database

• The text in the file mydeclarations.sql is placed in the script following the commented out line with the #include directive.

The #include directive is supported for simple file names only. Supported syntax of the #include directive for use in the ISQL editor, Procedure Object Editor, or Package Body Object Editor, is as follows:

#include < filename.ext

> where:

719 RAPID SQL 8.6/XE5 USER GUIDE

ISQL EDITOR

filename.ext

is a simple filename and extension

NOTE: For those familiar with C compiler functionality, angle bracket and quoted forms are supported only indirectly. While #include < filename .

ext > and #include " filename .

ext " forms are valid, they are functionally equivalent to the #include filename .

ext . Using the angle bracket or quoted forms has no effect on locations searched for the target file.

Searches are performed in the locations specified in the setup for this feature. For details, see

Setting Up Rapid SQL to Preprocess #include Directives .

Error processing is as follows:

• If the preprocessor fails to include the specified file, it displays an error message noting the reason for the failure (such as the file does not exist, insufficient permissions on the file, or file too large ). Preprocessing or execution of the script cannot continue until the error is corrected.

• If the file is found in the first search location specified in Setting Up Rapid SQL to Preprocess

#include Directives but cannot be opened (permission denied for example), no attempt will be made to locate the file in the second specified search location.

# DEFINE F UNCTIONALITY AND S YNTAX

The #define directive provides a simple, global search and replace function within a script. For example, if a script contains the following:

#define &&PI 3.14159

then on execution of the script, there are two effects:

• All instances of &&PI in the script would be replaced by 3.14159

on execution of the script

• The line containing the #define directive is commented out before the script is sent to the database

The #define directive is supported for symbolic constants only. Supported syntax of the #define directive for use in the ISQL editor, Procedure Object Editor, or Package Body Object Editor, is as follows:

#define && Identifier Replacement_text where:

• Identifier is any character string appearing in the script

• Replacement_text is the string that will replace all instances of the string specified by the

Identifier argument. Valid values are strings, numbers or combinations consisting of the digits 0 9 , characters a z , characters A Z , and the underscore character.

NOTE: In addition to the actual #define directive appearing in a script, the ampersand notation is also required in all references that are to be replaced. References that are nor prefixed with ampersand characters are not processed.

Nested #define directives are also supported. For example if a script contains the following:

RAPID SQL 8.6/XE5 USER GUIDE 720

ISQL EDITOR

#define &&myTable Clients

#define &&embtClients Embarcadero

#define &&tempTable New&&myTable

#define &&embtTempTable &&embtClients&&myTable

Select * from &&tempTable;

Select * from &&embtTempTable then after preprocessing, the contents of the script would be as follows:

Select * from NewClients;

Select * from EmbarcaderoClients

P REPROCESSING AND E XECUTING S CRIPTS C ONTAINING # DEFINE AND # INCLUDE

D IRECTIVES

The ISQL editor offer two preprocess/execute modes:

• Rapid SQL can preprocess the script, opening the script in a new tab, with all #define and

#include substitutions made. This lets you view your preprocessed script or continue with edits after preprocessing, before executing it in the new tab.

• Rapid SQL can preprocess and execute the script in a single step.

Preprocessing or preprocessing/executing the script consists of selecting a mode and the executing the script. Preprocessing mode is controlled by the preprocessing dropdown on the

ISQL editor toolbar.

To preprocess a script and have the preprocessed script opened in a new tab:

1 From the Preprocess dropdown, select Pre-Process Only . The Preprocess dropdown icon takes on a distinctive appearance to indicate Pre-Process Only mode.

2 On the ISQL toolbar, click the Execute button.

The script with all #define and #include replacements made, opens in a new ISQL editor.

NOTE: For details on error processing and specific handling of directives, see #include

Functionality and Syntax and #define Functionality and Syntax .

721 RAPID SQL 8.6/XE5 USER GUIDE

ISQL EDITOR

To preprocess and execute a script in a single step:

1 From the Preprocess dropdown, select Pre-Process and Execute .

2 On the ISQL toolbar, click the Execute button.

The script executes. While the script sent to the server for execution includes all #define and #include substitutions, the new Query tab contains the original, unprocessed script.

For related information, see the following topics:

• See

Executing Scripts for other script execution options

• See Preprocessing #define and #include Directives

for an introduction to SQL preprocessing in the ISQL editor

T OOLBAR O PTIONS

The table below describes the options of the ISQL Editor toolbar:

Option

Lock

Execute

Step Execute

Schedule

SQL Begin Transaction

SQL Rollback

SQL Commit

Debug

Preprocess

Description

Lets you lock an ISQL Window to a specific datasource connection:

Locked (manual session termination) - the ISQL window will open a session and keep it open while the window remains open, unless the DBMS terminates the session due to a timeout, or the session is closed. The ISQL Window does not respond to datasource change events in other windows, and only uses the current connection for subsequent execution.

Unlocked (automatic session terminations) - the ISQL window will execute each statement in a new session with no session state maintained between them.

When explicitly unlocking an ISQL window, the connection can be returned to the connection pool or disconnected. For details, see the DBMS specific information under

ISQL Options

.

Executes the script.

Initiates step execution of the script. For more information, see

Step Execution Facility .

Opens a dilaog that lets you schedule an SQL job. For more information, see

Scheduling .

Toggles the Begin Transaction status on and off.

Performs a rollback on the current transaction.

Commits the current transaction.

Opens the Embarcadero SQL Debugger.

Lets you set a preprocessing state for execution of the script.

If you select Pre-process Only , subsequent use of the Execute button will result in the script being preprocessed without beng executed. The script opens n a new editor window with all #define and #include substitutions made.

If you select Pre-process and Execute , all #include and #define directives are carried out and the script is executed. No new editor window opens.

For more information, see

Preprocessing #define and #include Directives

.

RAPID SQL 8.6/XE5 USER GUIDE 722

ISQL EDITOR

Option Description

Script Execution Facility Provides a shotcut to opening the Script Execution Facility. For more information, see

Executing Scripts Against Multiple Datasources .

Query Plan

Activates and deactivates Query Plan mode. For more information, see

Plan Facility .

Using the Query

Query Options

Format

Syntax Check

Errors

Provides a shortcut to opening the Query Options dialog. For more information, see

Query options .

Transforms spaghetti-style written SQL code into an easier read format.

Initiates a syntax check. This is only necessary if SQL parsing is disabled and autmatic

syntax checking is therefore disabled. For more information, see Syntax Checking .

Closes the Errors tab.

ISQL W INDOWS

A script is a collection of SQL statements used to perform a task. Scripts, stored as files, form the foundation of most application projects. Definitions of tables, indexes, stored procedures, as well as reports and batch jobs, are usually stored in script files and shared by groups of developers using version control software. You can manage SQL scripts in SQL windows. Rapid

SQL lets you open multiple SQL windows in one or more workspaces.

Opening ISQL Windows

To open the ISQL Window, do the following:

1 On the File menu, click New ISQL.

OR

On the Main tool bar, click New ISQL.

Rapid SQL opens an SQL window in your current workspace.

For more information, see

ISQL Window Status Bar

ISQL Editor .

ISQL W INDOW S TATUS B AR

The ISQL window Status bar lets you view:

• Auto commit status (Oracle) - Automatically commits SQL statements as soon as the statements are run.

723 RAPID SQL 8.6/XE5 USER GUIDE

ISQL EDITOR

• Begin Transaction ON/OFF (SQL Server and Sybase ASE)

TIP: For Microsoft SQL Server and Sybase ASE, to set Begin Transaction status to “Yes”, on the ISQL Window toolbar, click the SQL Begin Tran button.

TIP: For Oracle, you can apply auto commit status changes to all open ISQL windows. You can modify the Oracle Auto Commit status and ISQL tab of the Options Editor. For details, see

ISQL Options

.

B IND V ARIABLE P ARAMETERIZATION IN P REPARED S TATEMENTS (D YNAMIC SQL)

Rapid SQL lets you provide bind variable values when executing scripts containing prepared statements. Bind variables, or parameterized literals, can help optimize explain/execution plan usage by minimizing the requirement to “hard parse” queries or statements that differ by one or more literal values.

In scripts, Rapid SQL recognizes named or unnamed variables that use the following notation:

DBMS Platform/Driver Type

Oracle with native driver

Oracle With JDBC driver

All other platforms/drivers

Notation

: <name> or : <number>

?

?

For example:

• SELECT * FROM MYTABLE WHERE MYCOLUMN = ?

• CALL MYPROC ( :a, :b, :c )

NOTE: Support for bind variables is enabled on a editor window-by-editor window basis. Bind variable parameterization is enabled by setting the Prepare Batch Query Option, available on all DBMS platforms. For details, see " Setting up the Execution

Environment with Query options " on page 813.

For an enabled SQL Editor window, when using execution options, whenever a statement containing bind variable notation is encountered, a Bind Variables dialog opens.

RAPID SQL 8.6/XE5 USER GUIDE 724

ISQL EDITOR

For each bind variable in the current statement, the dialog lets you specify:

• A type

• An IN, OUT, or INOUT designation for elements such as function or procedure parameters or arguments, variables used in INTO clauses of an INSERT statements and variables used in

RETURNING clauses of an Update statements.

• A value

You can then execute, skip the statement, or abort execution for the currently running script.

A UTOMATED E RROR D ETECTION AND C ODING A ID F EATURES

Rapid SQL analyzes code as you add content to an ISQL editor session and offers the following automated features:

Syntax Checking

automatically flags syntactical errors in your scripts

• Semantic Validation detects object name references to objects not present in the datasource index.

Code Complete

lets you insert or replace object names, selected from suggestion lists, as you edit a script.

Hyperlink Object Actions let you invoke common object operations such as

Open and

Extract , as well as object type-specific operations, from object names referenced in a script.

S YNTAX C HECKING

The ISQL editor can perform on-the-fly or manually-initiated syntax checking. Rapid SQL checks the syntax of the current contents of an ISQL Editor window against the SQL dialect native to the datasource to which the ISQL editor session is connected. Syntax checking can be performed regardless of whether an ISQL editor session is locked to a datasource.

725 RAPID SQL 8.6/XE5 USER GUIDE

ISQL EDITOR

For each syntax error detected, Rapid SQL annotates your script and offers assistance as follows:

• Line numbers for lines containing syntax errors are flagged with an error icon.

• Hovering the mouse over an error icon displays a tooltip with an error message

• The specific error in the line of code is underlined in red

NOTE: A line-by-line listing of individual syntax errors is also available in the ISQL editor’s Error pane. For more information, see

About the Error pane

.

Rapid SQL can be configured to perform syntax checks automatically or to require a syntax check to be initiated manually:

• Automatic - Automatic syntax checking is enabled from the Options Editor. For details, see

ISQL Options - Code Assist Tab .

If the Enable Real-time syntax checking check box is selected, a syntax check is performed whenever there is an interval of 1.5 seconds or more between key strokes. Syntax error annotations persist until the error is corrected and the next automatic syntax check is executed.

• Manual - If automatic syntax checking is disabled, a syntax check is only performed when you click the Syntax button on the ISQL editor toolbar:

When automatic syntax checking is disabled, syntax error annotations persist until the error is corrected and you explicitly run another syntax check.

S EMANTIC V ALIDATION

Semantic validation is an on-the-fly ISQL editor feature that verifies that object names are correctly specified. It ensures that the names of supported object types (columns, tables, synonyms, and views) present in a script match those for the connected datasource. Minimizing errors associated with typographical errors or references to obsolete object definitions, Rapid

SQL analyzes the names of supported object types as you type, and raises an error condition when it detects a name not present on the datasource.

RAPID SQL 8.6/XE5 USER GUIDE 726

ISQL EDITOR

A semantic error can indicate one of the following conditions:

• The object name as specified in the script is not present on the database

• The referenced object is hidden by a SQL filter

• The schema information that Rapid SQL obtains to implement this feature is outdated. This can happen if other users or applications modify the schema during your ISQL editor session. For information on refreshing this information, see

ISQL Options - Code Assist Tab .

When making use of this feature, always consider the following points

• Semantic validation is only available for objects and object types configured to be included

in the datasource index. For more information, see " ISQL Options - Code Assist - Advanced

Tab " on page 116.

• For SQL Server and Sybase ASE datasources, statements that contain temporary table names (that is, tables whose name begins with the # character) are ignored by the semantic validation feature.

• Semantic errors in a statement are not displayed for a statement that currently has outstanding syntax errors. For more information, see

Syntax Checking .

• For SQL Server and Sybase ASE datasources, system table names (that is tables whose name begins with the # character) are ignored by the semantic validation feature.

• While semantic errors can be flagged with an ERROR severity level, they can be more easily distinguished from syntax errors by setting a severity level of WARNING. Similarly, if you do not want semantic errors flagged, you can set the severity level to IGNORE. For details, see

ISQL Options - Code Assist Tab .

• Ensure that the ISQL Editor window is connected to a datasource. Rapid SQL requires a datasource name in order to resolve an object name.

In the case of SQL Server and Sybase ASE, you must also select a database. The exception to this requirement is scripts that have a USE statement, specifying a database, appearing before any object name references.

NOTE: A line-by-line listing of individual semantic errors is also available in the ISQL editor’s

Error pane. For more information, see

About the Error pane .

727 RAPID SQL 8.6/XE5 USER GUIDE

Code Complete

Code Complete lets you quickly and accurately write DML and call\execute statements by providing a fast and intuitive lookup for database objects. Code Complete lets you select from a suggestion box that lists objects appropriate at the cursor location within a statement. Code

Complete offers intelligent suggestions in providing simple object names or in constructing fully-qualified names.

This feature becomes available at all points in INSERT, UPDATE, DELETE, SELECT, CALL, and

EXEC statements, including all legal clauses, where a reference to the name of one of the following object types is valid:

• Columns

• Tables

• Views

• Functions

• Procedures

• Packages

• Synonyms

Before using the Code Complete feature, complete the following setup tasks:

• Ensure that the object types for which Code Complete is to be available, are being indexed

in the datasource index. For details, see " ISQL Options - Code Assist - Advanced Tab " on page 116.

• By default, Code Complete is enabled and configured for automatic invocation. For information on enabling or disabling this feature and configuring auto-activation and other

Code Complete preferences, see " ISQL Options - Code Assist Tab " on page 114.

When the Code Complete feature is enabled, it can be invoked in two ways:

• Automatically, if auto-activation is enabled. A Code Complete suggestion box is offered when you start typing an object name in a relevant location and then stop typing for an interval that exceeds the specified auto-activation delay.

RAPID SQL 8.6/XE5 USER GUIDE 728

ISQL EDITOR

• Manually, if auto-activation is disabled or if the specified auto-activation delay is sufficiently large, by pressing CONTROL+SPACE. or typing a period (.).

NOTE: By default, Code Complete is enabled and configured for automatic invocation. For information on enabling or disabling this feature and configuring auto-activation and

other Code Complete preferences, see ISQL Options - Code Assist Tab .

Code Complete offers context sensitive suggestions based on the cursor location within the statement when Code Complete is invoked. For example:

• When invoked without any preceding text - Code Complete will supply basic suggestions appropriate to that clause.

For example, suggestions for the table name in a FROM clause would help a user construct a qualified table or view name. Against a SQL Server datasource for example, this would include schemas and databases.

Suggestions for the column name in a WHERE clause in the same statement would contain the schemas, databases and tables\views referenced in the FROM clause as well as a listing of the applicable columns based on the referenced tables\views.

729 RAPID SQL 8.6/XE5 USER GUIDE

ISQL EDITOR

• After the delimiter within an object name - Code Complete offers a list that lets you select the next element to build a fully qualified object name.

• After typing one or more characters of an object name - Code Complete offers a listing of the names of all object name elements, relevant to the cursor location within the object name, that start with the typed characters.

RAPID SQL 8.6/XE5 USER GUIDE 730

ISQL EDITOR

• At any point within a partially-specified or complete object name - Code Complete offers all selections appropriate to the location of the cursor.

In addition, you can type additional characters while the suggestion list is available to further filter the items appearing in the list.

To insert or replace a suggestion:

1 Double-click an object name or object name element in the list. Alternatively, you can use the arrow keys and press ENTER.

To dismiss the suggestion list without making a selection:

1 Click anywhere outside the suggestion list or press ESC.

NOTE: The schema information that Rapid SQL obtains to implement this feature can be outdated by the actions of other users or applications during an ISQL editor session.

For information on refreshing this information, see

ISQL Options - Code Assist Tab .

H YPERLINK O BJECT A CTIONS

Hyperlinks let you invoke object actions against object names referenced in an ISQL Editor script. A configured keystroke combination (default, CTRL+right-click) opens a menu with commands specific to the supported object type:

731 RAPID SQL 8.6/XE5 USER GUIDE

ISQL EDITOR

NOTE: In addition to the object type-specific options, the context menu also includes SQL editor options typically available when right-clicking in the editor.

The following table shows the object action availability for supported object type hyperlinks in the SQL editor:

Action (and notes) Object type

Table View Function Procedu re

Package Package

Body

Build Query

Compile

For more information, see

Query Builder

For more information, see

Executing Scripts



Create Like

Create View

Debug

information,

SQL Add-On Tools

Describe For more information, see

Describe Window



Drop

Edit Data





Execute

For more information, see

Data

Editor

For more information, see

Executing Scripts

Extract

Import Data

From File

Open

For more information, see

Import Data

For more information, see

Modifying objects using editors





























































RAPID SQL 8.6/XE5 USER GUIDE 732

ISQL EDITOR

Action (and notes) Object type

Table View Function Procedu re

 

Package Package

Body

 

Report

Select * From









Before using the Hyperlinks feature, complete the following setup tasks:

• Ensure that the object types for which Hyperlink object actions are to be available, are being

indexed in the datasource index. For details, see " ISQL Options - Code Assist - Advanced

Tab " on page 116.

• Ensure that the Hyperlink feature has been enabled, the appropriate keystroke combination

configured, and the menu details selected. For details, see " ISQL Options - Code Assist -

Main Tab " on page 114.

Once setup tasks are complete, the Hyperlinks feature is available in the SQL Editor.

To invoke an object action using the Hyperlink feature

1 Use the configured keystroke combination anywhere within the text of an object name reference for a supported object type.

2 Select an object action from the context menu. For more information, see the online help for the selected action.

U SING C ODE T EMPLATES

Code templates are complete code blocks that can be easily added to open windows or scripts with a few keystrokes. Templates let you define standard or common code units such as loops, comment blocks, query structures, and so on, add them to your code and edit them accordingly.

When you activate Code Assist by typing CTRL+SPACE, the Code Assist menu opens, offering any defined code templates for the currently connected DBMS platform.

Selecting the short name for the code template and pressing RETURN adds the template at the cursor position.

733 RAPID SQL 8.6/XE5 USER GUIDE

ISQL EDITOR

Rapid SQL loads a default set of code templates at startup but you can also add and delete templates from the currently available set. In addition, you can save sets of templates to file and subsequently load specific template sets, allowing you to customize your templates to different platforms or development projects.

Before making use of this feature, you should be familiar with the following tasks:

• Enabling the code templates feature. For details, see Enabling the Code Templates and

Auto Replace Features

.

• Maintaining the list of available templates. For details, see

Maintaining Code Template

Definitions

and Loading and Saving Custom Code Workbench Settings

U SING A UTO R EPLACE E XPRESSIONS

Rapid SQL lets you define shortcuts consisting of a few characters that represent longer character strings. Instances of these Auto Replace expressions are automatically replaced by the replacement string on activation events such as typing SPACE, TAB, or RETURN. This feature is useful for creating shortcuts for one-line commands or SQL statement subsets, or even to detect and fix common typographical errors such as teh for the .

For example, consider an Auto Replace definition with an expression of sel to represent Select *

From :

If the associated activation event includes a SPACE, then on typing sel followed by typing

SPACE, the following replacement occurs.

RAPID SQL 8.6/XE5 USER GUIDE 734

DDL EDITORS

Rapid SQL loads a default set of Auto Replace definitions at startup but you can also add, edit, and delete Auto Replace definitions. In addition, you can save sets of definitions to file and subsequently load specific Auto Replace definitions, allowing you to customize your templates to different platforms or development projects.

Before making use of this feature, you should be familiar with the following tasks:

• Enabling the Auto Replace feature. For details, see Enabling the Code Templates and Auto

Replace Features .

• Creating and maintaining the list of available Auto Replace definitions. For details, see

Maintaining Auto Replace Expressions and

Loading and Saving Custom Code Workbench

Settings

DDL E

DITORS

NOTE: This functionality is available for all platforms.

Rapid SQL lets you open a new DDL Editor when you want to create a script that is tied to an object type in your database. The DDL Editor opens containing a template script for the selected object type. Because the DDL Editor is directly tied to a database, database warning messages can be issued. For example, if you have a create table script which includes a DROP

TABLE statement, the DDL Editor warns you about the existence of this statement and that you could lose existing table data.

Important Notes

None

The table below describes the options and functionality on the Create New Database Object dialog box.

Option

Object Type

Owner

Object Name

Description

Lets you select the object type to which you want to attach the script.

Lets you type the name of the object owner for the object. The name of the owner connected to the current datasource is used as the default.

Lets you type the name of the object type.

Rapid SQL opens a DDL Editor containing a template for the object type you selected.

For more information, see Opening DDL Editors .

735 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

O PENING DDL E DITORS

To open DDL Editors, do the following.

1 On the File menu, click New DDL Editor.

OR

On the Main tool bar, click the Down arrow on New, and then click DDL Editor.

2 In Object Type select the object type to which you want to attach the script.

3 In Owner type the name of the object owner for the object. The name of the owner connected to the current datasource is used as the default.

4 In Object Name type the name of the object type.

5 Click OK.

Rapid SQL pastes the DDL into the ISQL Editor.

For more information, see ISQL Editor .

O PEN F ILES

NOTE: This functionality is available for all platforms.

The Open Files dialog box lets you open existing files.

Important Notes

None

The table below describes the options and functionality on the Open Files dialog box.

Option

File Name

Files of Type

Open Button

Description

Lets you type a script file name. You can open multiple script files simultaneously by selecting multiple file names in the file list.

Lets you control the files displayed in the file list by changing the selection. Rapid SQL displays multiple default file extensions.

Click to open one or more files into the current workspace.

RAPID SQL 8.6/XE5 USER GUIDE 736

DDL EDITORS

Completing the Open Files Dialog Box

To complete the Open Files dialog box, do the following:

1 On the File menu, click Open.

OR

On the Main tool bar, click Open.

2 Select a script file.

OR

3 In File Name, type a script file name.

4 In Files of type, select types of files to display.

5 Click Open to open one or more files into the current workspace.

Rapid SQL pastes the script into the ISQL Editor.

For more information, see ISQL Editor .

W HAT T YPE OF F ILE

NOTE: This functionality is available for all platforms.

The What Type of File Is dialog box lets you select options for unknown file types.

Important Notes

None

The table below describes the options and functionality on the What Type of File Is dialog box:

Option

The file is a general purpose

SQL script

Description

Select if the unknown file is a SQL script.

The file contains the DDL to create a database object of the file contains Oracle

Anonymous PL/SQL.

Lets you select object type, type the owner, and object name.

Always open unknown files into a SQL window without prompting.

Select to hide What Type of File Is Dialog Box for future unknown file types.

For more information, see Completing the What Type of File Is Dialog Box .

737 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

C OMPLETING THE W HAT T YPE OF F ILE I S D IALOG B OX

To complete the What Type of File Is dialog box, do the following:

1 On the File Menu, click Open .

Rapid SQL opens the Open File(s) dialog box.

2 In the Open File(s) dialog box, select the target script, and then click Open .

Rapid SQL opens the What type of file dialog box.

3 Select options, and then click OK.

Rapid SQL opens the target script in an SQL Editor.

For more information, see ISQL Editor .

I NSERT F ILE INTO C URRENT F ILE

NOTE: This functionality is available for all platforms.

The ISQL Editor facilitates the reuse of SQL scripts by letting you insert an existing file into another script.

The table below describes the options and functionality on the Insert File into Current File dialog box.

Option

File Name

Files of Type

Open Button

Description

Lets you type a script file name. You can open multiple script files simultaneously by selecting multiple file names in the file list.

Lets you control the files displayed in the file list by changing the selection. Rapid SQL displays multiple default file extensions.

Click to insert one or more files into the current workspace.

Important Notes

None

For more information, see Completing the Insert File into Current File Dialog Box .

RAPID SQL 8.6/XE5 USER GUIDE 738

DDL EDITORS

C OMPLETING THE I NSERT F ILE INTO C URRENT F ILE D IALOG B OX

To complete the Insert File into Current File dialog box, do the following:

1 On the Edit menu, click Edit Insert File.

OR

On the Edit tool bar, click Edit Insert File.

Rapid SQL opens the Insert File into Current File dialog box.

2 Select a script file.

OR

3 In File Name, type a script file name.

4 In Files of type, select types of files to display.

5 Click Open to insert one or more files into the current workspace.

Rapid SQL inserts the file.

For more information, see ISQL Editor .

S PLITTING W INDOWS

You can split a SQL window into four different screens so that you can view different sections of a document simultaneously. You have the option to split the ISQL Window horizontally, vertically or into quadrants.

Splitting the ISQL Window Horizontally

To split the ISQL Window horizontally, do the following:

1 Point to the split box at the top of the vertical scroll bar on the right side of the SQL window.

2 When the pointer changes, drag it to the desired position.

Splitting the ISQL Window Vertically

To split the ISQL Window vertically, do the following:

1 Point to the split box at the top of the horizontal scroll bar on the bottom left side of the SQL window.

2 When the pointer changes, drag it to the desired position.

Removing Splits from an ISQL Window

Double-click the appropriate split bar to return the SQL window to its normal state.

For more information, see ISQL Editor .

739 RAPID SQL 8.6/XE5 USER GUIDE

F IND

NOTE: This functionality is available for all platforms.

The Find dialog box lets you search text in your SQL scripts.

Important Notes

None

The table below describes the options and functionality on the Find dialog box.

Option

Find What

Match whole word only

Match Case

Regular expression

Wrap around search

Direction

Find Next Button

Mark All Button

Description

Lets you type your search string.

Select to search for only the complete word.

Select to make the search case-sensitive.

Select if you are looking for a regular text expression .

Lets you search from the end of the script and back to the insertion point.

Lets you specify the direction you want to search.

Click the Up or Down option button.

Click to find the next occurrence of your search string.

Click to place a small blue dot next to every line number in the script which meets the required search string criteria.

For more information, see Completing the Find Dialog Box .

C OMPLETING THE F IND D IALOG B OX

To complete the Find dialog box, do the following

1 On the Edit menu, click Find.

OR

On the Edit tool bar, click Find.

2 In Find What, type your search string.

3 Select Match whole word only to search for only the complete word.

4 Select Match Case to make the search case-sensitive.

5 Select Regular expression to search for a regular text expression.

DDL EDITORS

RAPID SQL 8.6/XE5 USER GUIDE 740

DDL EDITORS

6 Select Wrap around search to search from the end of the script and back to the insertion point.

7 In Direction, click Up or Down.

8 Click Find Next to find the next occurrence of your search string.

9 Click Mark All to place a small blue dot next to every line number in the script which meets the required search string criteria.

The ISQL Editor highlights the object name if it matches the search criteria.

For more information, see

Find .

R EPLACE

NOTE: This functionality is available for all platforms.

The Replace dialog box lets you search and replace text in your SQL scripts.

The table below describes the options and functionality on the Replace dialog box.

Option

Find What

Replace With

Match Case

Regular expression

Wrap around search

Direction

Find Next Button

Replace Button

Replace All Button

Description

Lets you type your search string.

Lets you type the replacement text.

Select to make the search case-sensitive.

Select if you are looking for a regular text expression .

Lets you search from the end of the script and back to the insertion point.

Lets you specify the direction you want to search.

Click the Up or Down option button.

Click to find the next occurrence of your search string.

Click replace the current selection.

Click to automatically find and replace all occurrences of your search string within the current window.

For more information, see Completing the Replace Dialog Box .

741 RAPID SQL 8.6/XE5 USER GUIDE

C OMPLETING THE R EPLACE D IALOG B OX

To complete the Replace dialog box, do the following:

1 On the Edit menu, click Replace.

OR

On the Edit tool bar, click Replace.

2 In Find What, type your search string.

3 In Replace With, type the replacement text.

4 Select Match whole word only to search for only the complete word.

5 Select Match Case to make the search case-sensitive.

6 Select Regular expression to search for a regular text expression.

7 Select Wrap around search to search from the end of the script and back to the insertion point.

8 In Direction, click Up or Down.

9 Click Find Next to find the next occurrence of your search string.

10 Click Replace to replace the current selection.

11 Click Replace All to automatically find and replace all occurrences of your search string within the current window.

For more information, see ISQL Editor .

R EGULAR E XPRESSIONS S UPPORT IN R APID SQL

Some features, such as file search, SQL Editor search, and Browser list filtering, support the use of regular expressions. This provides flexibility in in searches and other situations in which text string qualification is required.

Detailed documentation on regular expressions is beyond the scope of this document. For descriptions of syntax and metacharacters, consult third-party documentation on the regular expressions standard. The following table provides short descriptions of the most commonly used regular expression metacharacters used with Rapid SQL features:

+

^

$

\b

Metacharacter

.

*

Description

Matches any single character.

Matches zero or more characters.

Matches one or more characters.

The start of a string.

The end of a string.

Word boundary.

RAPID SQL 8.6/XE5 USER GUIDE 742

DDL EDITORS

|

\

()

\s

Metacharacter

\d, \w and \s

\D, \W and \S

[ ]

[^ ]

{}

Description

Shorthand character classes matching digits, word characters (letters, digits, and underscores), and whitespace (spaces, tabs, and line breaks).

Negated versions of the above that should only be used outside character classes.

Matches any one character enclosed between the square brackets.

Matches any character NOT enclosed between the square brackets.

Matches aspecified number of repetations. For example ab{2,4} matches a bb , a bbb , and abbbb .

OR.

Escape special character.

Tag expression.

Space or Tab.

In the case of some specific features, regular expression usage must be enabled or configured.

For more information, see the Rapid SQL feature topics for details:

• " Find/Replace Options in Coding Environments " on page 784

• " Find in Files " on page 849

• " Column filtering in the Browser " on page 27

G OTO

NOTE: This functionality is available for all platforms.

The Goto dialog box lets you move to a specific line or column in your script.

Important Notes

None

The table below describes the options on the Goto dialog box:

Option

Line Number

Description

Lets you type or select the target line number.

Completing the Goto Dialog Box

To complete the Goto dialog box, do the following:

1 On the Edit menu, click Goto .

Rapid SQL opens the Go To dialog box.

743 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

2 In Line Number, type or select the target line number.

3 Click OK.

Rapid SQL moves the cursor to the target line.

For more information, see ISQL Editor .

S ENDING SQL S CRIPTS

If you have MAPI-compliant E-mail software installed on your computer, then you can send SQL scripts to other users.

To send a SQL script, do the following:

1 On the File menu, click Send.

OR

On the Main tool bar, click Send.

Rapid SQL opens your E-mail application.

2 In the Address box, type the name of the addressee(s) and any other options.

NOTE: The ISQL Editor automatically attaches a file containing your SQL script to the e-mail message.

3 Click Send .

Rapid SQL sends the result set to the specified addressee(s).

For more information, see ISQL Editor .

R ENAMING AND C LOSING Q UERY W INDOW T ABS

SQL windows are tabbed windows that can be closed or renamed.

To rename a Query Tab, you need an open SQL window that includes an executed script. For information on how to execute scripts, see:

Executing Scripts

• Script Execution Facility

RAPID SQL 8.6/XE5 USER GUIDE 744

DDL EDITORS

Renaming a Query Window Tab

To rename a Query Window Tab, do the following:

1 Right-click the Query Tab on the SQL window , and then click Rename .

Rapid SQL opens the Rename Tab dialog box.

NOTE: The Query Tab can be located on the top or bottom of the SQL window. You can set the location of the tab when configuring Datasource options.

2 In the New Name box, type the name of the new Query window.

3 Click OK .

Rapid SQL changes the name and closes the Rename Tab dialog box. The new name of the tab displays directly on the Query Window Tab at the top of the window.

Closing a Query Window Tab

To close a Query Window Tab, do the following:

1 At the top of the ISQL window, right-click the Query Tab, and then click Close or Close All.

Rapid SQL closes the Query.

For more information, see

ISQL Editor .

P RINT

NOTE: This functionality is available for all platforms.

The Print dialog box lets you can specify a range of panels to print, or print the contents of a script window to a file.

Important Notes

None

The table below describes the options and functionality on the Print dialog box.

Tab

Scope

Page Setup

Option

Printer

Print Range

Number of Copies

Header

Description

Displays default printer.

Lets you select the appropriate print range.

Lets you click the Up or Down arrow or type the number of copies you want.

Lets you type header type to display at the top of the page.

745 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

Tab

Options

Documents

Configurations

Option

Footer

Header/Footer not within

Margins

Margins

Chromacoding

Line Numbering

Other Options

Document Box

Clear

Invert

New Configuration Name

Delete

Load

Update

Description

Lets you type header type to display at the bottom of the page.

Select to position header and footer outside the margins.

Lets you specify margins in either inches or centimeters.

Lets you select Use Color if you have a color printer. Lets you select Use Font if script includes italics and bold fonts.

Lets you specify the interval between numbered lines.

Lets you select other options.

Lets you select documents to print.

Click to clear list.

Click to switch printing order.

Lets you type a new configuration which saves you current settings, and then click Create.

Lets you delete an existing configuration.

Lets you load an existing configuration.

Lets you update an existing configuration.

The table below describes the buttons on the Print dialog box:

Button

Save Settings

Font

Setup

Preview

Description

Lets you save settings.

Lets you open the Font dialog box and select fonts.

Lets you open the Print Setup dialog box and select printer options.

Lets you open the Print Preview dialog box that lets you preview the document before you print it.

Lets you print the document.

Print

For more information, see Completing the Print Dialog Box .

RAPID SQL 8.6/XE5 USER GUIDE 746

DDL EDITORS

C OMPLETING THE P RINT D IALOG B OX

To complete the Print dialog box, do the following:

1 On the File menu, click Print.

OR

On the Main tool bar, click Print.

2 On the tabs, select options.

3 Click Print.

For more information, see ISQL Editor .

S AVING AND C LOSING S CRIPTS

Untitled scripts are named SQL1...SQLn by default, and all scripts are saved with the SQL extension. You can save your files with any valid name.

For more information, see:

Saving a Script

Closing a Script

About the Error pane

ISQL Editor

S AVING A S CRIPT

To complete the Save dialog box, do the following:

1 On the File menu, click Save.

OR

On the Main tool bar, click Save.

Rapid SQL opens the Save As dialog box.

2 If this is a new file, in the File Name box, type the name of the file.

3 If this is an existing file and you want to use save as, on the Main menu, click Save As, and in the File Name box, type the name of the file.

4 Click Save.

Rapid SQL closes the Save As dialog box.

For more information, see

Saving and Closing Scripts .

747 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

S AVING M ODIFIED D OCUMENTS

The table below describes the options and functionality on the Save Modified Documents dialog box:

Option

Save All

Save Selected

Invert

Save None

Description

Click to save documents in all open ISQL windows.

Click to save selected documents.

Click to clear selection.

Click to not save documents and close the application.

Important Notes

None

For more information, see

Saving and Closing Scripts .

C LOSING A S CRIPT

To close a script, do the following:

1 On the on the Main menu, click Close.

OR

On the ISQL window tool bar, click Close.

OR

In the upper right corner of the window, double-click the System menu icon.

Rapid SQL starts closing the script.

2 If you have not saved your script, Rapid SQL prompts you to save the file. Click Yes to save and No to close without saving.

For more information, see

Saving and Closing Scripts .

A BOUT THE E RROR PANE

You can view errors currently present in an ISQL editor window in a separate pane. The error pane provides a dynamic, line-by-line listing of the following error types:

• Semantic - errors in specified object names. Semantic problems persist in the Error pane until they are corrected. For more information, see Semantic Validation .

RAPID SQL 8.6/XE5 USER GUIDE 748

DDL EDITORS

• Syntactic - syntax problems associated with the SQL dialect of the data source to which the

ISQL Editor session is connected. Syntax problems persist in the Error pane until they are

corrected. For more information, see Syntax Checking

.

• Execution - errors detected the last time the script was executed in the current ISQL editor window. Execution errors persist in the Error pane until they are refreshed by a subsequent execution.

A single menu command toggles the error pane open and closed.

To open or close the error pane:

1 On the Query menu, select Show Errors.

For more information, see

ISQL Editor .

E DITING S CRIPTS

The ISQL Window incorporates a powerful editor that lets you edit your SQL scripts. The ISQL

Window includes editing features such as:

• Uppercase or lowercase character conversion.

• Commenting and uncommenting blocks of text.

• Selecting text.

• Inserting PL/SQL tags.

• Setting and navigating with bookmarks.

The ISQL Editor provides Paste SQL Syntax and

Paste SQL Statements utilities from which you

can paste syntax for SQL commands and functions directly into an ISQL Window.

Editing a Script

To edit a script, do the following:

1 In the SQL window, type your changes or additions.

2 When you are finished with your changes, on the ISQL window tool bar, click

Execute

to compile the script.

For more information, see ISQL Editor .

P ASTE SQL S YNTAX

NOTE: This functionality is available for all platforms.

749 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

The Paste SQL Syntax facility lets you paste SQL syntax without having to refer to documentation to find syntax for SQL commands. You can also paste the SQL directly into an

ISQL window.The Paste SQL Syntax facility that includes SQL syntax for:

• Commands

• Functions

• XML

• Other object syntax

Important Notes

None

The table below describes the options and functionality on the SQL Syntax dialog box.

Option

SQL Statements

Syntax

Paste Button

Description

Lets you select the target command, functions, or optimizer hint.

Displays the syntax.

Click to paste the SQL statement into your ISQL

Window.

NOTE: You must change the placeholders (e.g., expression) in the statements to reflect the specific objects in your database. For assistance with basic SQL statements, such as

Select, Insert, Update, or Delete, use the Paste SQL Statement facility instead.

The table below describes options for each RDBMS platform:

Oracle

SQL Commands

Number Functions

Character Functions

Date Functions

Conversion Functions

Group Functions

Other Functions (User, NVL, etc.)

Optimizer Hints

Sybase ASE

SQL Commands

Aggregate Functions

Datatype Conversion

Functions

Date Functions

Mathematical Functions

String Functions

System Functions

System Diagnostics

Microsoft

SQL Commands

Aggregate Functions

Datatype Conversion

Functions

Date Functions

Mathematical Functions

String Functions

System Functions

Text/Image Functions

For more information, see Completing the SQL Syntax Dialog Box .

RAPID SQL 8.6/XE5 USER GUIDE 750

DDL EDITORS

C OMPLETING THE SQL S YNTAX D IALOG B OX

To complete the SQL Syntax dialog box, do the following:

1 Place your insertion point in an open SQL window.

2 On the Edit menu, click Paste SQL Syntax.

OR

On the ISQL Window tool bar, click Paste SQL Syntax.

3 In SQL Statements, select the target command, functions, or optimizer hint.

4 To paste the SQL statement into your ISQL Window, click Paste.

For more information, see

Editing Scripts .

P ASTE SQL S TATEMENTS

NOTE: The functionality is available for all platforms.

The Paste SQL Statement facility lets you create Select, Insert, Update, and Delete SQL statements. The Paste SQL Statement window displays all available database object names from which you can choose to construct SQL statements. These statements are dependent on the object type you choose.

Important Notes

None

The table below describes the options and functionality on the Paste SQL dialog box.

Option

Datasource

Database

Owner

Object Type

Select

Update

Insert

Delete

Description

Lets you select the target datasource.

Lets you select the target database.

Lets you select the owner.

Lets you select the target object type.

Click if you want a SELECT SQL statement.

Click if you want an UPDATE SQL statement.

Click if you want an INSERT SQL statement.

Click if you want a DELETE SQL statement.

751 RAPID SQL 8.6/XE5 USER GUIDE

Option

Object Type Box

Middle Box

Right Box

Description

Rapid SQL displays a column of objects, given your selections of datasource, owner, and object type.

Lets you select the check box next to the target object type, or click All to select all.

Paste - Click to paste this object into your Editor window.

Rapid SQL displays attributes appropriate to the type of object you selected. For example, if you select Tables, Rapid SQL fills the second column with the columns of the table you select in the first column. If you select Procedures, Rapid SQL fills the second column with available parameters for the procedure you select in the first column.

Lets you click the target object type properties or click All to select all. For example, if you selected a Table, then select one or more columns in the middle box; or, if you selected a Procedure, then select parameters in the middle box.

Paste - Click to paste the object properties into your Editor window, under the Object Type box.

Displays the SQL statement.

Paste - Click when you are satisfied with the entire

SQL statement. Rapid SQL pastes the SQL statement into your Editor window.

For more information, see Completing the Paste SQL Dialog Box .

C OMPLETING THE P ASTE SQL D IALOG B OX

To complete the Paste dialog box, do the following

1 Place your insertion point in an open Editor window.

2 On the Edit menu, click Paste SQL.

OR

On the Editor window tool bar, click Paste SQL.

3 In Datasource, select the target datasource.

4 In Database, select the target database.

5 In Owner, select the owner.

6 In Object Type, select the target object type.

7 Click Select if you want a SELECT SQL statement.

8 Click Update if you want an UPDATE SQL statement.

9 Click Insert if you want an INSERT SQL statement.

RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

752

DDL EDITORS

10 Click Delete if you want a DELETE SQL statement.

11 In the Object Type Box, select the check box next to the target object type, or click All to select all.

12 Click Paste to paste this object into your Editor window.

13 In the Middle Box, click the target object type properties or click All to select all.

14 Click Paste to paste the object properties into your Editor window, under the Object Type box.

Rapid SQL the SQL statement in the right box.

15 In the Right Box, click Paste when you are satisfied with the entire SQL statement.

Rapid SQL pastes the SQL statement into your Editor window.

For more information, see

Editing Scripts .

S ELECTING T EXT

The ISQL Editor lets you select a single word, a single line, or a block of text.

Selecting a Single Word

To select a single word, do the following:

1 In the ISQL Editor window, position the pointer in the word and double-click.

Selecting a Line of Text

Rapid SQL offers two ways to select a line of text:

1 In the ISQL Editor window, click the line number listed on the left side of the window.

OR

2 Position the pointer at the beginning of the line of text, hold down the SHIFT key, and then click the end of the line of text.

Selecting a Block of Text

To select a block of text, do the following:

1 In the ISQL Editor window, drag until the block of text is selected.

For more information, see

Editing Scripts .

753 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

M OVING AND C OPYING T EXT IN AN ISQL W INDOW

You can move or copy information anywhere in an Editor window or into a different Editor window by dragging it.

Moving Text

To move text, do the following:

1 In the ISQL Editor window, select the text you want to move.

2 Drag to the target location.

Copying Text

To copy text, do the following:

1 In the ISQL Editor window, select the text you want to copy.

2 On the Edit menu, click Copy .

3 Drag to the target location.

NOTE: If you are dragging between different Editor windows, arrange the Editor windows so that the source and destination windows are open and visible. You must be able to see both the original and target locations.

For more information, see

Editing Scripts .

C OMMENTING AND U NCOMMENTING S CRIPTS

For most developers and development teams, documenting code is a fundamental part of the coding process. Besides contributing explanatory material for others who need to analyze or maintain your code later, the ability to comment and uncomment code can be very useful for bypassing statements in a procedure during compilation.

Commenting Code

To commenting out code, do the following:

1 On the Edit menu, click Comment Out.

OR

Select a line of code, and on the Edit tool bar, click Comment Out.

Rapid SQL comments code.

RAPID SQL 8.6/XE5 USER GUIDE 754

DDL EDITORS

Uncommenting Code

To uncomment code, do the following:

1 On the Edit menu, click Undo Comment Out.

OR

Select a line of code, and on the Edit tool bar, click Undo Comment Out.

Rapid SQL uncomments code.

For more information, see

Editing Scripts .

C HANGING C ASE

When writing SQL scripts, you can change the letter casing of certain statements or lines of code. You can change case from lowercase to uppercase, or from uppercase to lowercase, using the case functions.

Changing Case

To change case, do the following:

1 Select one or more letters in your script.

2 On the Edit menu, click Upper Case.

OR

On the Edit menu, click Lower Case.

OR

On the Edit tool bar, click Upper Case.

OR

On the Edit tool bar, click Lower Case.

Rapid SQL changes the case.

For more information, see

Editing Scripts .

C UTTING , C OPYING AND P ASTING T EXT AND C OLUMNS IN AN ISQL W INDOW

The Editor window incorporates Cut, Copy and Paste text, and whole columns functions. You can move the selected text or columns to and from the Windows clipboard.

For more information, see:

Copying and Pasting Text

Cutting and Pasting Text

Copying and Pasting a Column

755 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

Cutting and Pasting a Column

C OPYING AND P ASTING T EXT

To copy and paste text, do the following:

1 In the Editor window, select the target text.

2 On the Edit menu, click Copy.

OR

On the Editor tool bar, click Copy.

Rapid SQL copies the text.

3 On the Edit menu, click Paste.

OR

On the Editor tool bar, click Paste.

Rapid SQL pastes the text.

For more information, see Cutting, Copying and Pasting Text and Columns in an ISQL Window .

C UTTING AND P ASTING T EXT

To cut and paste text, do the following:

1 In the Editor window, select the target text.

2 On the Edit menu, click Cut.

OR

On the Editor tool bar, click Cut.

Rapid SQL cuts the text.

3 On the Edit menu, click Paste.

OR

On the Editor tool bar, click Paste.

Rapid SQL pastes the text.

For more information, see Cutting, Copying and Pasting Text and Columns in an ISQL Window .

C OPYING AND P ASTING A C OLUMN

To copy and paste a column, do the following:

1 In the Editor window, position the pointer in front of the column of the target text.

2 Press ALT and simultaneously drag the pointer over the target column.

RAPID SQL 8.6/XE5 USER GUIDE 756

DDL EDITORS

3 On the Edit menu, click Copy.

OR

On the Editor tool bar, click Copy.

OR

Right-click the text, and then click Copy .

Rapid SQL copies the column.

4 In the Editor window, position the pointer where you want to paste the column.

5 On the Edit menu, click Paste.

OR

On the Editor tool bar, click Paste.

OR

Right-click the text, and then click Paste .

Rapid SQL pastes the column.

For more information, see Cutting, Copying and Pasting Text and Columns in an ISQL Window .

C UTTING AND P ASTING A C OLUMN

To cut and paste a column, do the following:

1 In the Editor window, position the pointer in front of the column of the target text.

2 Press ALT and simultaneously drag the pointer over the target.

3 On the Edit menu, click Cut.

OR

On the Editor tool bar, click Cut.

OR

Right-click the text, and then click Cut .

Rapid SQL cuts the column.

4 In the Editor window, position the pointer where you want to paste the column.

5 On the Edit menu, click Paste.

OR

On the Editor tool bar, click Paste.

OR

Right-click the text, and then click Paste .

Rapid SQL pastes the column.

757 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

For more information, see Cutting, Copying and Pasting Text and Columns in an ISQL Window .

S ETTING B OOKMARKS

Bookmarks are useful tools for navigating throughout an Editor window. You can jump back and forth between bookmarks easily, and there is no practical limit to the number of bookmarks you can set.

The table below describes the options for setting bookmarks:

Feature

Bookmarks:

Description

Bookmarks are valuable navigation aids for jumping from one portion of a script to another. You can add bookmarks in important areas of your scripts, then jump back and forth between bookmarks.

Setting a Bookmark

To set a bookmark, do the following:

1 In the Editor window, position the pointer in front of the line you want to bookmark.

2 On the Editor window tool bar, click Bookmark.

Rapid SQL inserts a blue dot in the gutter next to the line you have book marked.

For more information, see:

Moving Between Bookmarks

Clearing Bookmarks

M OVING B ETWEEN B OOKMARKS

You use the Next Bookmark and the Previous Bookmark buttons to move back and forth between bookmarks.

Goto the Next Bookmark

To goto the next bookmark, do the following:

1 In the Editor window, position the pointer where you have set bookmarks, and then click

Bookmark.

Rapid SQL jumps to the next bookmark.

RAPID SQL 8.6/XE5 USER GUIDE 758

DDL EDITORS

Goto the Previous Bookmark

To goto the previous bookmark, do the following:

1 In the Editor window, position the pointer where you have set bookmarks, and then click

Goto Bookmark.

Rapid SQL jumps to the previous bookmark.

For more information, see Setting Bookmarks .

C LEARING B OOKMARKS

To clear bookmarks, do the following:

1 On the Editor tool bar, click Clear Bookmark.

Rapid SQL clears all bookmarks.

NOTE: This does not clear any error indicators (red dots) that might be showing in the gutter.

For more information, see Setting Bookmarks .

E XECUTING S CRIPTS

The ISQL Editor lets you execute all or part of your SQL scripts. Unless you are executing large scripts that have multiple statements within them, or you need to view optimizer statistics, you execute most of your SQL scripts without options.

NOTE: For Oracle Client 8.0.5, if you execute a multi-line SQL statement with an error in the syntax, the cursor does not jump to the line of the error.

The ISQL Editor incorporates multiple features to refine and ease script execution. The table below describes these features:

Feature

Script Execution Facility

Description

The Script Execution Facility lets you execute scripts in parallel against multiple datasources. The facility also lets you schedule a job to perform the script execution at the appointed time, which saves development time and ensures accuracy and integrity across your databases.

Executes the statement in which the cursor is currently placed.

Executing the Current

Statement

Step Execution Facility

Query Plan

The Step Execution Facility processes batches from one delimiter to the next.

The Query Plan Facility provides a graphical display that lets you identify the execution path that your SQL follows.

Rapid SQL's Query Plan window now displays data for the estimated costs, number of rows, and bytes returned by each plan step.

759 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

Feature Description

Query Options Dialog Box MICROSOFT SQL SERVER and SYBASE ASE ONLY:

The Query Options dialog box lets you customize what you see when you execute your query.

Executing a Script

To execute a script, do the following:

1 On the Editor window tool bar, click Execute.

OR

In the Editor window, right-click, and then click Execute.

Rapid SQL starts executing the script.

Executing Partial Scripts

To execute a partial script, select the portion of the script to be executed and follow the steps outlined above. This feature is helpful while debugging large scripts and stored procedures.

S CRIPT E XECUTION F ACILITY

Rapid SQL has a Script Execution Facility that lets you run parallel queries against multiple datasources. This facility is also a stand-alone utility that is available from the utilities tool bar. If used as a stand-alone utility, you can directly type your script or copy and paste a script in an additional tab. Once you have selected the desired options, Rapid SQL establishes multiple threads and database connections to run the script simultaneously against the selected target datasources. Additionally, ANSI SQL scripts can run against multiple datasources from different

DBMS vendors.

The Script Execution Facility runs with two output modes:

• Graphical

• File

Graphical output mode opens multiple result windows, one for each target datasource.

File output mode sends all output to a specified file or files. This feature allows for the execution of scripts against a large number of target datasources in a single operation and enables scheduling capabilities.

Once the scripts have finished executing, you have the option to send a notification message indicating that the script execution has completed via e-mail or Net Send. This message includes attachments of all the output files generated.

For more information, see

Executing Scripts Against Multiple Datasources .

RAPID SQL 8.6/XE5 USER GUIDE 760

DDL EDITORS

E XECUTING S CRIPTS A GAINST M ULTIPLE D ATASOURCES

To execute scripts against multiple datasources, do the following:

1 On the Utilities menu, click Script Execution Facility.

OR

On the Utilities tool bar, click Script Execution Facility.

OR

On the Editor window tool bar, click Script Execution Facility.

The table below describes the options and functionality on the Script Execution Facility dialog box.

NOTE: This option is not available for a DDL Editor or PL/ISQL Editor. To execute a script from a DDL or a PL/ISQL Editor, use the stand-alone Script Execution Facility.

2 If you selected File output:

Option

Script

Target

Output

Notify

Description

Lets you type, copy and paste, or cut and paste a script.

Only Connected Datasources - Select to see only your currently connected datasources.

All DBMS Types - Select to see all DBMS types.

In the Datasource grid, select the check boxes next to the datasources against which you want to run your query, or click Select All to select all datasources.

Database - Lets you type the name of the target database.

Specify how you want the output to be handled

Graphical Output - Select for graphical output.

File Output - Select for file output.

In the Directory box, type the full path and directory name in which you want to place the output file, or click Browse File icon to locate the directory.

Click the File Type list to specify the file type you want to apply to the output file.

Include column titles when saving - Select to include column titles in your saved file.

Open files with registered applications - Select to open the files with registered application.

Job Description - Lets you type a job description to supply a subject in your e-mail message.

E-mail addresses - Lets you type the e-mail address(es) separated by semi-colons.

Net Send User Names - Lets you type the Net

Send user name(s) separated by semi-colons.

761 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

Option

Schedule Button

Description

This option is available when you select the File

Output Option button and have the Microsoft

Task Scheduler installed. For more information regarding scheduling, see

Scheduling

.

For more information, see Script Execution Facility .

C OMPILATION E RROR T AB

Rapid SQL displays any errors encountered when a package, function or procedure was last compiled by a user in a separate tab of those object editors. The Errors Tab provides the line number, column position and error message for each compilation error.

For more information, see

Executing Scripts

.

C OMMAND H ISTORY

The ISQL Editor is equipped with a command history box, which lets you keep a history of

previously used SQL commands. The Command History is a list that is available in the Results

window. Command history lets you go back and run previously used commands from the list rather than opening or inserting a script.

Executing from Command History

To execute from Command History, do the following:

1 In the Results window, click the Command History list, and then click the command you want to execute.

The Query window is automatically populated with the selected command.

2 To execute the command, click Execute.

For more information, see

Executing Scripts

.

C ANCELING A Q UERY

The ISQL Editor lets you cancel a query while the rows are still being returned.

Canceling a Query

To cancel a query, do the following:

1 On the Editor window tool bar, click Cancel.

NOTE: This button is only enabled after a script has begun executing.

RAPID SQL 8.6/XE5 USER GUIDE 762

DDL EDITORS

For more information, see

Executing Scripts

.

S TEP E XECUTION F ACILITY

Step execution of scripts is an invaluable method to debug your scripts. The Step Execution facility lets you step through each batch in your script. While some batches can include many lines of code, some batches can consist of one line. Rapid SQL parses the statements and moves from batch to batch during the step execution process, each step controlled by you clicking the step execution button.

The table below describes how Rapid SQL provides a number of useful tools for working with step execution of your scripts:

Feature

ISQL Window

Gutter

Script Line

Numbers

Automatic Error

Flagging

Point and Click

Error

Navigation

Step

Step Back

Description

The ISQL Window Gutter is a vertical gray display bar located to the left of the ISQL window. It includes location indicators such as line numbers, error indicators, and bookmarks. The gutter is a quick visual cue to your current position in the script.

Line numbers are included to let you navigate large scripts. Error messages in the output window indicate the line number where the error occurred.

When using the Step Execution mode, Rapid SQL flags errors with a red dot in the ISQL window gutter. The errors are flagged sequentially as they are stepped into.

Rapid SQL displays errors in the output window at the bottom of the screen and selects the errors as they occur. You can click each error and Rapid SQL takes you directly to the line where that error occurred.

Click the Step button to step into the next batch of code.

Step Over

Click the Step Back icon to step back to the most previous batch of code.

Click the Step Over icon to jump over a batch to the next batch.

Run to Cursor

Cancel Step

Execution

Click the Run to Cursor icon to execute all of the code between the beginning of the script to wherever you have inserted the pointer.

Click the Cancel Step Execution icon to change to regular execution mode.

For more information, see Using the Step Execution Facility .

763 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

U SING THE S TEP E XECUTION F ACILITY

Rapid SQL offers three ways to use the step execution facility:

1 Open a script.

2 On the Query menu, click Step-Execute .

OR

On the Editor window tool bar, click Step-Execute.

OR

Right-click, and then click, Step-Execute.

Rapid SQL starts the procedure and displays errors at the bottom of the Editor window.

NOTE: Rapid SQL indicates each executing line with a yellow arrow in the gutter of the Editor window. The gutter is that gray area between the line numbers on the left and the code window. As you step through your batches, Rapid SQL moves the arrow to indicate your current location.

3 To continue stepping through the script, on the Editor window tool bar, click Step, which displays in the Editor window after you have started the Step Execute procedure.

4 To step back, on the Editor window tool bar, click Step Back, which displays in the Editor window after you have started the Step Execute procedure.

5 To step over a batch and execute the next batch, on the Editor window tool bar, click Step

Over, which displays in the Editor window after you have started the Step Execute procedure.

6 To stop Step Execution mode, on the Editor window tool bar, click Stop Step Execute , which displays in the Editor window after you have started the Step Execute procedure.

7 To Run to Cursor , on the Editor window tool bar, click Run to Cursor, which is available when the pointer is in the Editor window.

For more information, see

Executing Scripts

.

E XECUTING THE C URRENT S TATEMENT

The Execute Statement command lets you execute an individual statement where statements in the script are terminated with a valid delimiter ( ; or / ).

NOTE: The Execute Statement command is only available if the Scan entire file for context

option in the Options Editor is selected. For details, see " ISQL Options - Code Assist -

Advanced Tab " on page 116.

To execute a delimiter-terminated statement

1 Place the cursor anywhere within the statement.

2 From the Query menu, select Execute Statement .

RAPID SQL 8.6/XE5 USER GUIDE 764

DDL EDITORS

The statement is executed and if results are returned, the Results Editor opens. For details, see

" Using the Results Editor " on page 830.

As a visual aid, Rapid SQL highlights the executed statement.

For similar options and context information, see " Execution and Execution-related SQL Editor options " on page 812.

U SING THE Q UERY P LAN F ACILITY

Each RDBMS platform lets you view the execution path that your SQL follows. For details, see the following topics:

• Viewing a tree-based Query Plan (IBM DB2 for LUW, SQL Server, Sybase ASE)

• Viewing a graphical Query Plan (Oracle)

V IEWING A TREE BASED Q UERY P LAN (IBM DB2 FOR LUW, SQL S ERVER , S YBASE ASE)

For IBM DB2 for Windows, Unix, and Linux, Microsoft SQL Server, and Sybase ASE, Rapid SQL lets you view a tree-based representation of a query plan. The Query Plan toolbar button is a toggle. Set it to enable the Show Plan mode.

Rapid SQL's Query Plan window displays data for the estimated costs, number of rows, and bytes returned by each plan step.

NOTE: For IBM DB2 for Linux, Unix, and Windows, Rapid SQL includes a tree view of statements and associated costs.

To view a tree-based representation of a query plan

1 Open a script.

2 On the Query menu, click Query Plan.

Rapid SQL starts the Show Plan mode.

3 To generate the Show Plan in a separate result window, click Execute.

For more information, see

Query options .

V IEWING A GRAPHICAL Q UERY P LAN (O RACLE )

For Oracle, Rapid SQL lets you view a graphical representation of a query plan. You can toggle the view between the graph-based view and a tree-based view, view details for each step, and work with a number of viewing options.

The Query Plan toolbar button is a toggle. Set it to enable the Show Plan mode.

765 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

To view a graphical representation of a query plan

1 Open a script.

2 On the Query menu, click Query Plan.

Rapid SQL starts the Show Plan mode.

3 To generate the Show Plan in a separate result window, click Execute.

Options when working with the Query Plan facility include:

• Hovering the mouse over an execution step node to display detailed cost details for that step

• Right-clicking and choosing Find Node or Find Next Node to search large plans for nodes whose label contains a specified text string

• Right-clicking and choosing Zoom In or Zoom Out

• Right-clicking and choosing an Orientation sub-menu command to change the orientation of the view

• Right-clicking and choosing Overview Window to open a small window showing the entire plan

• Right-clicking and choosing Save to File to open a dialog that lets you save the graphical plan as a graphics file

• Clicking the Query Plan button to toggle between the graphical view and a tree-based view

• For multiple plans created rom the same script/ISQL window, using the dropdown at the top of the plan to change the plan displayed

Q UERY OPTIONS

Rapid SQL offers a set of options corresponding to DBMS-specific query options. They let you customize the execution environment for an ISQL session with query-handling directives in areas such as performance, logging/reporting, and error handling.

See the following topics for descriptions of the options available for the DBMS you are working against:

DB2 LUW Query options

DB2 z/OS Query options

MySQL Query options

• Oracle Query options

SQL Server Query options

• Sybase ASE Query options

RAPID SQL 8.6/XE5 USER GUIDE 766

DDL EDITORS

• Sybase IQ Query options

If you do not change the default settings, Rapid SQL will use a set of default query option settings to send to the server, one set per DBMS platform. You can, however save a set of query option settings for each DBMS, and have that set of settings used as the default for ISQL sessions against that platform. As well, during any ISQL session, you can modify the query option settings for the current session.

The query options you select apply only to the current ISQL window instance. In addition, nondefault query option settings you specify are not saved. You can however, save a set of query option settings to a file and subsequently open that file in other ISQL editor sections to have those settings applied to that session.

To specify query options:

1 With the SQL Editor open, select Query Options from the Query menu.

Once open, you have the following options:

• Set each option manually using the associated check box. For detailed descriptions of

query options, see When query options are sent to the server

.

• Use the Save button to open a dialog that lets you save the current option query settings to an XML file. The dialog also has a Load these query options as default option that lets you use the settings in the saved file as the default query option settings for the current platform. Exercising this option sets the Load Query Options feature on the DBMSspecific ISQL tab of the Options editor to specify the file you saved. For more information,

see ISQL Options

.

• Use the Load button to open a dialog that lets you locate and open a previously-saved

XML file containing query option settings.

• Use the Reset button to restore the Rapid SQL query option defaults.

2 Click OK to set query options for the current ISQL window session.

NOTE:

For information on conditions for which query options are sent to the server, see When query options are sent to the server .

When query options are sent to the server

Rapid SQL optimizes sending query options to the server for locked connections. Since an unlocked connection results in a new connection for each execution, query options must be sent with each execution. The following table outlines the specific cases:

Session unlocked When you open an ISQL window, if you not lock the connection, all query options are sent to the server each time you execute a script, immediately before executing the actual script. As long as the connection remains unlocked, all query options are sent to the server at each execution.

Similarly if you unlock a currently locked session, all query options are sent to the server at each subsequent execution.

For information on locking sessions, see

Toolbar Options

.

767 RAPID SQL 8.6/XE5 USER GUIDE

Session locked

DDL EDITORS

When you open an ISQL and lock the connection, all query options are sent to the server on the first execution. On subsequent executions, if you do not modify query option settings, no query options are sent to the server on subsequent executions.

If you open Query Options dialog and modify options, on the next execution only the modified settings are sent to the server. For more information, see The query options you select apply only to the current ISQL window instance. In addition, non-default query option settings you specify are not saved. You can however, save a set of query option settings to a file and subsequently open that file in other ISQL editor sections to have those settings applied to that session.

.

These rules apply as long as the connection remains locked.

DB2 LUW Q UERY OPTIONS

The following settings are available when setting query options against a DB2 LUW datasource:

Category

Execution Options

Query Option

Batch Delimiter

Check syntax when executing

Create Explain plan tables if required

Description

The batch separator must be a viewable character and not a space, new line, or tab. The default (semi-colon) has been selected to ensure compatibility with the features of Rapid SQL and the respective platform, but can be customized.

Note: A custom delimiter works only from within an ISQL window and can’t be used for extraction operations.

TRUE/FALSE

Create explain plan tables on the

SYSTOOLS schema

Max Errors Before

Aborting

Row Count

If set to TRUE, Explain Plan tables are created, as necessary. If set to FALSE and you don’t manually create tables, Explain Plan operations will fail.

If set to TRUE, Explain Plan tables are created on the SYSTOOLS schema. If the tables already exist in the user’s default schema,

Rapid SQL continues to use those tables. Refer to DB2 documentation for a listing of Explain Plan tables that must be deleted in order to use the SYSTOOLS option.

If set to FALSE, Explain Plan tables are created under the user’s default schema.

Select the maximum number of errors encountered before Rapid

SQL aborts a script. Setting this value to zero disables the feature.

When set to TRUE, Rapid SQL terminates the query after returning the specified number of rows.

TRUE/FALSE

Transactions

Run Script with batch execution

Isolation Level

Prepare Batch

Lets you set DB2 Isolation Levels of UNCOMMITED READ, RESET,

CURSOR STABILITY, REPEATABLE READ, or READ STABILITY.

For the current SQL Editor window, setting this check box enables bind variable parameterization. This lets you provide named and unnamed variable values as a script executes. For details, see

" Bind Variable Parameterization in Prepared Statements (Dynamic

SQL) " on page 724.

For more general information, see

Query options .

RAPID SQL 8.6/XE5 USER GUIDE 768

DDL EDITORS

DB2 Z /OS Q UERY OPTIONS

The following settings are available when setting query options against a DB2 z/OS datasource:

Query Option

Batch Delimiter

Description

The batch separator must be a viewable character and not a space, new line, or tab. The default (semi-colon) has been selected to ensure compatibility with the features of Rapid SQL and the respective platform, but can be customized.

Note: A custom delimiter works only from within an ISQL window and can’t be used for extraction operations.

TRUE/FALSE Check syntax when executing

Max Errors Before

Aborting

Row Count

Select the maximum number of errors encountered before Rapid SQL aborts a script. Setting this value to zero disables the feature.

When set to TRUE, Rapid SQL terminates the query after returning the specified number of rows.

TRUE/FALSE Run Script with batch execution

Prepare Batch For the current SQL Editor window, setting this check box enables bind variable parameterization. This lets you provide named and unnamed variable values as a script

executes. For details, see " Bind Variable Parameterization in Prepared Statements (Dynamic

SQL) " on page 724.

For more general information, see

Query options .

I NTER B ASE /F IREBIRD Q UERY O PTIONS

The following settings are available when setting query options against an InterBase/Firebird datasource:

Query Option

Batch Delimiter

Prepare Batch

Description

A delimiting character used to separate multiple SQL statements within a statement batch.

For the current SQL Editor window, setting this check box enables bind variable parameterization. This lets you provide named and unnamed variable values as a script

executes. For details, see " Bind Variable Parameterization in Prepared Statements (Dynamic

SQL) " on page 724.

M Y SQL Q UERY OPTIONS

The following settings are available when setting query options against a MySQL datasource:

Query Option

Batch Delimiter

Description

The batch separator must be a viewable character and not a space, new line, or tab. The default (semi-colon) has been selected to ensure compatibility with the features of Rapid SQL and the respective platform, but can be customized.

Note: A custom delimiter works only from within an ISQL window and can’t be used for extraction operations.

769 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

Query Option

Big Tables

Description

When set to TRUE, allows big result sets by saving all temporary sets to file. This can slow queries.

Client Character

Insert ID

Default character set.

Choose a value to be used a following INSERT or ALTER TABLE statement when you supply an AUTO_INCREMENT value.

Interactive Timeout 28800 default

Last Insert ID

Max Errors Before

Aborting

Set the value to be stored in the binary log when you use LAST_INSERT_ID() in a statement that updates a table.

Select the maximum number of errors encountered before Rapid SQL aborts a script. Setting this value to zero disables the feature.

Query Cache Type The query is cached for ON or DEMAND.

Row Count When set to TRUE, Rapid SQL terminates the query after returning the specified number of rows.

SET Other Variables Variables to be set at runtime.

SQL Auto IS NULL

SQL Big Selects

When set to TRUE, enables you to find the last inserted row for a table.

When set to TRUE, SELECT statements likely to take a very long time to execute will be aborted (i.e., where the number of rows examined exceeds the max join size)

TRUE/FALSE SQL Big Tables

SQL Buffer Result

SQL Log Bin

SQL Log Off

SQL Log Update

SQL Low Priority

Updates

When set to TRUE, forces results from SELECT statements into temporary tables.

When set to TRUE, allows logging to the binary log.

When set to TRUE, no logging is done to the general query log.

When set to TRUE, allows logging to the binary log.

When set to TRUE, gives table modifying operations lower priority than SELECT operations.

SQL Max Join Size When set to TRUE, you can catch SELECT statements where keys are not used properly and that would probably take a long time. Set it if your users tend to perform joins that lack a

WHERE clause, that take a long time, or that return millions of rows.

When set to TRUE, table and column names will be quoted.

SQL Quote Show

Create

SQL Safe Updates When set to TRUE, the query aborts UPDATE or DELETE statements that do not use a key in the WHERE clause or a LIMIT clause. This makes it possible to catch UPDATE or DELETE statements where keys are not used properly and that would probably change or delete a large number of rows

SQL Select The maximum number of records that should be returned from SELECT statements.

SQL Warnings

Transaction

Isolation

Unique Checks

Prepare Batch

Defines whether or not single row insert statements generate an information string in the event of a warning.

Repeatable Read is the default. Read Committed, Read Uncommitted, and Serializable are the other options. Refer to MS SQL Query Options dialog box for an explanation.

Performs uniqueness checks for secondary indexes of MyISAM tables.

For the current SQL Editor window, setting this check box enables bind variable parameterization. This lets you provide named and unnamed variable values as a script

executes. For details, see " Bind Variable Parameterization in Prepared Statements (Dynamic

SQL) " on page 724.

RAPID SQL 8.6/XE5 USER GUIDE 770

DDL EDITORS

For more general information, see

Query options .

O RACLE Q UERY OPTIONS

The following settings are available when setting query options against an Oracle datasource:

Category

Query Analysis

Miscellaneous

Query Option

Network Activity

Execution

Information

I/O Activity

Sort Activity

Index Activity

Parse Activity

Table Activity

OS Activity

Wait Activity

Batch Delimiter

Description

True/False

True/False

True/False

TRUE/FALSE

True/False

TRUE/FALSE

True/False

TRUE/FALSE

True/False

The batch separator must be a viewable character and not a space, new line, or tab. The default (“/”) has been selected to ensure compatibility with the features of Rapid SQL and the respective platform, but can be customized.

Note: A custom delimiter works only from within an ISQL window and can’t be used for extraction operations.

TRUE/FALSE Check syntax when executing

LONG Size Bytes

Max Errors Before

Aborting

Row Count

8,192 is the default

Select the maximum number of errors encountered before Rapid

SQL aborts a script. Setting this value to zero disables the feature.

When set to TRUE, Rapid SQL terminates the query after returning the specified number of rows.

TRUE/FALSE Run Script with batch execution

Prepare Batch For the current SQL Editor window, setting this check box enables bind variable parameterization. This lets you provide named and unnamed variable values as a script executes. For details, see

" Bind Variable Parameterization in Prepared Statements (Dynamic

SQL) " on page 724.

For more general information, see

Query options .

771 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

SQL S ERVER Q UERY OPTIONS

The following settings are available when setting query options against a SQL Server datasource:

Category

Query Analysis

Arithmetic

SET Options

Query Option

Show Plan

No Count

No Exec

Force Plan

Statistics I/O

Statistics Time

Parse Only

Description

When set to TRUE, reports data retrieval methods chosen by the

Microsoft SQL Server query optimizer.

Terminates the message indicating the number of rows affected by a Transact-SQL statement from being returned as part of the results.

When set to TRUE, compiles each query without executing it.

When set to TRUE, processes a join in the same order as tables appear in the FROM clause of a SELECT statement only.

Lets you display information regarding the amount of disk activity generated by Transact-SQL statements.

Displays the number of milliseconds required to parse, compile, and execute each statement.

When set to TRUE, checks the syntax of each Transact-SQL statement and returns any error messages without compiling or executing the statement.

When TRUE, makes Microsoft SQL Server only parse the statement. When FALSE, makes Microsoft SQL Server compile and execute the statement.

Do not use Parse Only in a stored procedure or a trigger.

Ignore Overflow When set to TRUE, Rapid SQL will ignore any overflow caused by a resulting value that is larger than a column’s specified size.

Abort On Overflow If set to TRUE, queries will be aborted on encountering a value greater than the specified size.

The Send Set Options setting dictates whether the remaining ANSI SQL Options in this category are sent to the server. The default for this option is set using the Enable SET query options setting on the ISQL tab of the Options editor. For details, see

ISQL

Options

.

If the Send Set Options setting is enabled, the remaining settings in this category let you specify the specific ANSI SQL options that are sent to the server: ansi_defaults, ansi_nulls, ansi_null_dflt_on, QUOTED IDENTIFIER, cursor_close_on_commit,

ANSI_PADDING, ANSI WARNINGS, IMPLICIT_TRANSACTIONS, and

CONCAT_NULL_YIELDS_NULL.

The initial default values are hard-coded, not obtained from server settings.

RAPID SQL 8.6/XE5 USER GUIDE 772

DDL EDITORS

Category

Transactions

Miscellaneous

Query Option

Isolation Level

Batch Delimiter

Max Errors Before

Aborting

Row Count

Description

Read Committed: Microsoft SQL Server default transaction isolation level. Specifies that shared locks are held while data is read to avoid dirty reads. You can change the data before the end of the transaction, resulting in nonrepeatable reads or phantom data.

Read Uncommitted: The lowest level of transaction isolation.

Transactions are isolated to ensure that physically corrupt data is not read. Applies dirty read, or isolation level 0 locking, which ensures that no shared locks are issued and no exclusive locks are honored.

If set, it is possible to read uncommitted or dirty data values in the data can be changed and rows can appear or disappear in the data set before the end of the transaction.

Repeatable Read: Places locks on all data used in a query, preventing other users from updating the data. Other users can insert new phantom rows into the data and are included in later reads in the current transaction.

Concurrency is lower than Read Committed. Use this option only when necessary.

Serializable: The highest level of transaction isolation.

Transactions are completely isolated from one another.

Places a range lock on the data set, preventing other users from updating or inserting rows into the data set until the transaction is complete.

Concurrency is lower than Repeatable Read. Use this option only when necessary.

The batch separator must be a viewable character and not a space, new line, or tab. The default (“go”) has been selected to ensure compatibility with the features of Rapid SQL and the respective platform, but can be customized.

Note: A custom delimiter works only from within an ISQL window and can’t be used for extraction operations.

Select the maximum number of errors encountered before Rapid

SQL aborts a script. Setting this value to zero disables the feature.

When set to TRUE, Rapid SQL terminates the query after returning the specified number of rows.

TRUE/FALSE Run Script with batch execution

Text Size

Prepare Batch

8,192 is the default

For the current SQL Editor window, setting this check box enables bind variable parameterization. This lets you provide named and unnamed variable values as a script executes. For details, see

" Bind Variable Parameterization in Prepared Statements (Dynamic

SQL) " on page 724.

For more general information, see

Query options .

773 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

S YBASE ASE Q UERY OPTIONS

The following settings are available when setting query options against a Sybase ASE datasource:

Category

Query Analysis

Transactions

Arithmetic

Query Option

Show Plan

No Count

No Exec

Statistics I/O

Statistics Time

Statistics Subquery

Cache

Force Plan

Prefetch

Parse Only

Chained

Isolation Level

Description

When set to TRUE, reports data retrieval methods chosen by the Microsoft

SQL Server query optimizer.

Terminates the message indicating the number of rows affected by a

Transact-SQL statement from being returned as part of the results.

When set to TRUE, compiles each query without executing it.

Lets you display information regarding the amount of disk activity generated by Transact-SQL statements.

Displays the number of milliseconds required to parse, compile, and execute each statement.

Displays the number of cache hits, misses, and the number of rows in the subquery cache for each subquery.

When set to TRUE, processes a join in the same order as tables appear in the FROM clause of a SELECT statement only.

When set to TRUE, enables large I/Os to the data cache. When set to

FALSE, disables large I/Os to the data cache.

When set to TRUE, checks the syntax of each Transact-SQL statement and returns any error messages without compiling or executing the statement.

When TRUE, makes Microsoft SQL Server only parse the statement. When

FALSE, makes Microsoft SQL Server compile and execute the statement.

Do not use Parse Only in a stored procedure or a trigger.

Invokes a begin transaction before the following statements: delete, insert, open, fetch, select, and update. You must still explicitly close the transaction with a commit.

0

1: Sybase default isolation level.

Prevents dirty reads.

2: Prevents dirty and non-repeatable reads.

3: Prevents dirty and non-repeatable reads and phantoms. This level is equivalent to performing all selects with holdlock.

Ignore Overflow When set to TRUE, Rapid SQL will ignore any overflow caused by a resulting value that is larger than a column’s specified size.

Abort On Overflow If set to TRUE, queries will be aborted on encountering a value greater than the specified size.

Abort On

Truncation

Specifies behavior following a loss of scale by an exact numeric datatype during an implicit datatype conversion. When set to TRUE, a statement that causes the error is aborted but other statements in the transaction or batch continue to be processed. When set to FALSE, Rapid SQL truncates the query results and continues processing.

RAPID SQL 8.6/XE5 USER GUIDE 774

DDL EDITORS

Category

DBCC

Traceflags

Query Option

Index Selection

Join Selection

Description

Valuable when tuning query performance.

Valuable when tuning query performance.

Output to Execution

Window

TRUE/FALSE

TRUE/FALSE Output to Server

Error Log

Miscellaneous ANSI NULL

Set Quoted

Identifier

Batch Delimiter

When set to TRUE, controls results of logical operations with NULL values.

TRUE/FALSE

The batch separator must be a viewable character and not a space, new line, or tab. The default (“go”) has been selected to ensure compatibility with the features of Rapid SQL and the respective platform, but can be customized.

Note: A custom delimiter works only from within an ISQL window and can’t be used for extraction operations.

Row Count

Table Count

Text Size

Max Errors Before

Aborting

Run Script with batch execution

When set to TRUE, Rapid SQL terminates the query after returning the specified number of rows.

Sets the number of tables that Sybase ASE considers at one time while optimizing a join.

8,192 is the default

Select the maximum number of errors encountered before Rapid SQL aborts a script. Setting this value to zero disables the feature.

TRUE/FALSE

775 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

Category

Text Formatting

(Sybase ASE 15)

Query Option

These options let you generate diagnostic output in text format, using the Sybase ASE set option command. To use these options, you must be using the sa_role or have the set tracing permission.

You can select ON, OFF BRIEF, or LONG standard Sybase ASE settings.

If you are not using the sa_role or do not have the set tracing permission, use only the DEFAULT selection for each Text Formatting Set option is available. That setting has no effect. Using other selections without the required role or permission will result in an error on the next execution.

For detailed information on these options and required permissions or roles, see the Sybase

documentation. For access, see Accessing Third Party Documentation

.

Short descriptions message content displayed for Text Formatting set option command options are:

Show

Description

A collection of details, where the collection depends on the choice of

BRIEF, LONG, ON, or OFF.

Show Lop

Show Managers

Show Props

Show Parallel

Logical operators used.

Data structure managers used during optimization.

Logical properties evaluated.

Details of parallel query optimization.

Show Histograms Processing of histograms associated with SARG/join columns.

Show Abstract Plan Details of an abstract plan.

Show Search Engine Details of the join-ordering algorithm.

Show Counters Optimization counters.

Show Best Plan

Show Code Gen

Show Pio Costing

Show Lio Costing

Details of the best query plan selected by the optimizer.

Details of code generation.

Estimates ofreads/writes from/to disk.

Estimates of reads/writes from/to memory.

Show Pll Costing

Show Elimination

Estimates relating to costing for parallel execution.

Partition elimination.

Show Missing Stats Details of useful statistics missing from SARG/join columns.

Prepare Batch For the current SQL Editor window, setting this check box enables bind variable parameterization. This lets you provide named and unnamed

variable values as a script executes. For details, see " Bind Variable

Parameterization in Prepared Statements (Dynamic SQL) " on page 724.

For more general information, see

Query options .

S YBASE IQ Q UERY OPTIONS

The following settings are available when setting query options against a Sybase IQ datasource:

Query Option

Send SET Options

Description

The Send Set Options setting applies to all settings except those in the bottom-most

Miscellaneous category. It dictates whether the child options are sent to the server. The default for this option is set using the Enable SET query option setting on the ISQL tab of the Options editor. For details, see

ISQL Options .

RAPID SQL 8.6/XE5 USER GUIDE 776

DDL EDITORS

Query Option

Isolation Level Specifies the locking isolation level for Catalog Store tables.

Allow Nulls By Default Sets the ALLOW_NULLS_BY_DEFAULT option, controling whether new columns created without specifying either NULL/NOT NULL are allowed to contain NULL values.

ANSI Null Sets the ANSINULL option, controlling the interpretation of using = and != with NULL.

Conversion Error

Description

Sets the CONVERSION_ERROR option, controlling reporting of data type conversion failures on fetching information.

Divide-by-zero Error Sets the DIVIDE_BY_ZERO_ERROR option, controlling reporting of division by zero.

SET quoted_identifier Sets the QUOTED_IDENTIFIER option, controlling the interpretation of strings enclosed in double quotes.

SQL Flagger Error

Level

SQL Flagger Warning

Level

String R-Truncation

Sets the SQL_FLAGGER_ERROR_LEVEL option, controlling the behavior in response to any SQL code that is not part of the specified standard.

Sets the SQL_FLAGGER_WARNING_LEVEL option, controlling the response to any SQL that is not part of the specified standard.

T-SQL Variables

Sets the STRING_RTRUNCATION option, determining whether an error is raised when an

INSERT or UPDATE truncates a CHAR or VARCHAR string.

Sets the TSQL_VARIABLES option, controlling whether the @ sign can be used as a prefix for Embedded SQL host variable names.

Disable RI Check

Early Predicate

Execution

Extended Join Syntax

Index Advisor

Sets the DISABLE_RI_CHECK option, allowing LOAD, INSERT, UPDATE, or DELETE operations to bypass the referential integrity check to improve performance.

Sets the EARLY_PREDICATE_EXECUTION option, controlling whether simple local predicates are executed before query optimization.

Sets the EXTENDED_JOIN_SYNTAX option, controlling whether queries with an ambiguous syntax for multi-table joins are allowed or reported as an error.

Sets the INDEX_ADVISOR option, generateing messages suggesting additional column indexes that may improve performance of queries.

Index Advisor Max

Rows

Infer Subquery

Predicates

Join Optimization

Large Doubles

Accumulator

Minimize Storage

No Exec

Non ANSI NULL

Varchar

On Charset Conversion

Error

Query Name

Sets the INDEX_ADVISOR_MAX_ROWS option, setting the maximum number of unique advice messages stored by the index advisor.

Sets the INFER_SUBQUERY_PREDICATES option, controlling the optimizer’s inference of additional subquery predicates.

Sets the the JOIN_OPTIMIZATION option, enabling or disabling the optimization of the join order.

Sets the LARGE_DOUBLES_ACCUMULATOR option, controlling which accumulator to use for SUM or AVG of floating-point numbers.

Sets the MINIMIZE_STORAGE option, minimizing use of disk space for newly created columns.

Sets the NOEXEC option, generating the optimizer query plans instead of executing the plan.

Sets the NON_ANSI_NULL_VARCHAR option, controlling whether zero-length

VARCHAR data is treated as NULLs for INSERT, lLOAD, and UPDATE operations.

Sets the ON_CHARSET_CONVERSION_FAILURE option, controlling the action taken on a character conversion error.

Sets the QUERY_NAME option, giving a name to an executed query in its query plan.

Query Detail Sets the QUERY_DETAIL option, specifying whether additional query information is included in the Query Detail section of the query plan.

777 RAPID SQL 8.6/XE5 USER GUIDE

DDL EDITORS

Query Option

Query Plan

Query Plan After Run

Query Plan as HTML

Query Plan as HTML

Directory

Query Rows Returned

Limit

Query TempSpace

Limit

Query Timing

Batch Delimiter

Row Count

Max Errors Before

Aborting

Run Script With Batch

Execution

Prepare Batch

Description

Sets the QUERY_PLAN option, specifying whether or not additional query plans are printed to the message file.

Sets the QUERY_PLAN_AFTER_RUN option, printing the entire query plan after query execution is complete.

Sets the QUERY_PLAN_AS_HTML option, generating graphical query plans in HTML format.

Sets the QUERY_PLAN_AS_HTML_DIRECTORY option, specifying the directory into which Sybase IQ writes HTML query plans.

Sets the QUERY_ROWS_RETURNED_LIMIT option, setting the row threshold for rejecting queries based on an estimated size of the result set.

Sets the QUERY_TEMP_SPACE_LIMIT option, specifying the maximum estimated amount of temp space before rejecting a query.

Sets the QUERY_TIMING option, determining whether specific timing statistics are collected and displayed.

A delimiting character used to separate multiple SQL statements within a statement batch.

Lets you limit the number of rows returned by a query.

Lets you limit the number of errors returned before aborting a query.

When selected, scripts are executed statement by statement (batch delimited).

For the current SQL Editor window, setting this check box enables bind variable parameterization. This lets you provide named and unnamed variable values as a script

executes. For details, see " Bind Variable Parameterization in Prepared Statements

(Dynamic SQL) " on page 724.

For more general information, see

Query options .

R ESULT O PTIONS

The Result Options dialog box lets you set the SQL Results Window options. The table below describes Results options:

NOTE: The options you select only apply to the current window. To make options permanent, set the options in the Options Editor.

Interface

Element

Option Description

Result Window Single Window Displays all results in one tabbed result window. Multiple result sets are appended together in the window.

Single Window and Multiple Windows options are mutually exclusive.

Default

Selected

RAPID SQL 8.6/XE5 USER GUIDE 778

DDL EDITORS

Interface

Element

Placement

Format

Option Description Default

Multiple

Windows

Attached to

Editor

Displays multiple result sets one result set per window. Single Window and

Multiple Windows options are mutually exclusive.

Used in conjunction with Single

Window option or Multiple Window option. Indicates that results appear as tabbed windows attached to the

ISQL Window. Attached to Editor and

Unattached options are mutually exclusively.

Not selected

Selected

Unattached Used in conjunction with Single

Window option or Multiple Windows option. Indicates that results appear in windows separate from the ISQL

Window. Attached to Editor and

Unattached options are mutually exclusive.

Standard Grid Displays all result sets in a standard grid format. Result sets are only displayed in grid format in SQL

Editors that are opened after you have selected this option. It does not apply to SQL Editors that are already open.

HTML

Not Selected

Selected

Displays all result sets as HTML tables.

Result sets are only displayed in HTML format in SQL Editors that are opened after you have selected this option. It does not apply to SQL Editors that are already open.

Not selected

ASCII Text Displays all result sets as ASCII Text.

Result sets are only displayed in ASCII

Text format in SQL Editors that are opened after you have selected this option. It does not apply to SQL

Editors that are already open.

Not selected

U SING THE T OKEN M ATCHING C APABILITY

When you are working with a large script with multiple levels of embedded steps, compare left and right parentheses, curly braces, square brackets and BEGIN/END pairs to make sure that you have delimited your code properly.

The Token Matching capability of Rapid SQL helps you achieve clean code.

779 RAPID SQL 8.6/XE5 USER GUIDE

RESULTS EDITOR

Finding Matching Tokens

To find matching tokens, do the following:

1 Position the insertion pointer just to the left of the first token in a token pair you want to locate.

2 Click Match Token.

Rapid SQL jumps the pointer to the next available token.

For more information, see

Query Plan Facility .

R

ESULTS

E

DITOR

The results of your SQL queries are displayed in the Results Tab of each Editor Window, which captures result sets in a virtual data grid that accommodates large result sets. The data grid offers many of the features of a basic Windows spreadsheet, giving you a great deal of flexibility in editing the worksheet and formatting its contents.

TIP: For Oracle, Rapid SQL displays REF CURSOR contents in the ISQL Window and Results

Tab.

You have many choices for navigating and viewing your SQL query results. The Results window includes functionality to set result window options, find and replace, export data to other products such as Microsoft Excel, and mail your results files.

For more information, see

Configuring Result Set Windows .

C ONFIGURING R ESULT S ET W INDOWS

Result set windows can be configured in a variety of ways. You can configure your result set windows to present result sets in multiple or single panels, attached or detached from the corresponding ISQL window. These options can be set globally to save you the hassle of setting options for each result window. Additionally, Result windows can be torn off and dropped onto an open area of the workspace to create separate windows. These are known as Tear Off Tab

Windows.

You can set the Result Window to display result sets in any of the following modes:

• Single result sets in one attached tab window.

• Multiple result sets in one attached tab window.

• Single result sets in one separate unattached tab windows.

• Multiple result sets in one separate unattached tab windows.

• Tear Off Tab windows.

RAPID SQL 8.6/XE5 USER GUIDE 780

RESULTS EDITOR

V IEWING M ULTIPLE R ESULT S ETS IN S EPARATE U NATTACHED W INDOWS

To set the option to have multiple result sets displayed in multiple unattached windows, do the following:

1 On the File menu, click Options.

OR

On the Main tool bar, click Options.

Rapid SQL opens the Options Editor.

2 In the Options Editor, click the list, and then click Results or click the Results Tab.

3 In the Results Window grid, click the Multiple Windows option.

4 In the Results Window grid, click the Unattached option.

5 Click OK.

Rapid SQL saves the settings and closes the Options Editor.

For more information, see

Configuring Result Set Windows .

V IEWING M ULTIPLE R ESULT S ETS IN O NE A TTACHED T AB W INDOW

To set the option to have multiple result sets displayed in one attached tab window, do the following:

1 On the File menu, click Options.

OR

On the Main tool bar, click Options.

Rapid SQL opens the Options Editor.

2 In the Options Editor, click the list, and then click Results or click the Results Tab.

3 In the Results Window grid, click the Multiple Windows option.

4 In the Results Window grid, click the Attached to Editor option.

5 Click OK.

Rapid SQL saves the settings and closes the Options Editor.

For more information, see

Configuring Result Set Windows .

781 RAPID SQL 8.6/XE5 USER GUIDE

RESULTS EDITOR

V IEWING S INGLE R ESULT S ETS IN O NE S EPARATE U NATTACHED W INDOW

To set the option to have a single result set displayed in one unattached window, do the following:

1 On the File menu, click Options.

OR

On the Main tool bar, click Options.

Rapid SQL opens the Options Editor.

2 In the Options Editor, click the list, and then click Results or click the Results Tab.

3 In the Results Window grid, click the Single Window option.

4 In the Results Window grid, click the Unattached option.

5 Click OK.

Rapid SQL saves the settings and closes the Options Editor.

For more information, see

Configuring Result Set Windows .

V IEWING S INGLE R ESULT S ETS IN O NE A TTACHED T AB W INDOW

To set the option have all SQL query results displayed in a single attached tab window, do the following:

1 On the File menu, click Options.

OR

On the Main tool bar, click Options.

Rapid SQL opens the Options Editor.

2 In the Options Editor, click the list, and then click Results or click the Results Tab.

3 In the Results Window grid, click the Multiple Windows option.

4 In the Results Window grid, click the Attached to Editor option.

5 To re-use the same result set window for subsequent result sets, select the Reuse window check box. This option is only valid for single, attached result windows.

6 Click OK.

Rapid SQL saves the settings and closes the Options Editor.

For more information, see

Configuring Result Set Windows .

RAPID SQL 8.6/XE5 USER GUIDE 782

RESULTS EDITOR

E XPORTING D ATA TO O THER P RODUCTS

You can export data from a result set to traditional spreadsheet products, such as Microsoft

Excel. You can copy part or all of a result set and paste it into your traditional spreadsheet product by way of the Microsoft Windows Clipboard function. You can also save your result sets as tab delimited files, comma separated files or as HTML tables. HTML tables can be opened in your default Internet browser. Tab delimited files and CSV files can be opened in any spreadsheet or word processing program.

NOTE: Rapid SQL supports pipe delimited ( '|" ) files when you save result sets.

For more information, see

Results Editor .

S ETTING R ESULT W INDOWS TO R EAD O NLY M ODE

To set your result windows to read only mode to keep anyone from accidentally editing or altering a result set, do the following:

1 Select a Result window that you want to make read only.

2 On the Edit menu, click Read Only .

Rapid SQL places a check-mark next to read only and sets the command.

NOTE: The Read Only command is a toggle. When it is set, the formatting buttons on the Edit menu are not available.

For more information, see

Results Editor .

R ESULT W INDOW S TATUS B AR

The Result Window Status Bar displays information about each Result window at the bottom of each window. You can display or hide the status bar by setting the Status Bar preference. This preference applies to all result windows.

For more information, see

Results Editor .

M AILING R ESULT S ETS

If you have MAPI-compliant electronic mail software installed on your computer, then you can mail result sets to other users.

783 RAPID SQL 8.6/XE5 USER GUIDE

RESULTS EDITOR

Mailing a Result Set

To mail a result set, do the following:

1 Open the Message dialog box:

2 On the File menu, click Send.

OR

On the File tool bar, click Send.

Rapid SQL opens the open Message dialog box.

3 In the Address box, type the name of the addressee(s) and any other options.

The ISQL Editor automatically attaches a file containing your result set to the mail message.

4 Click Send .

Rapid SQL sends the result set to the specified addressee(s).

For more information, see

Results Editor .

C LOSING AND R ENAMING R ESULT W INDOW T ABS

Rapid SQL lets you close or rename tabbed Result set windows.

Renaming a Result Window Tab

To rename a Result Window Tab, do the following:

1 Place your pointer over the Results Tab.

2 Right-click the Results Tab, and then click Rename .

Rapid SQL opens the Rename Tab Editor.

3 In the New Name box, type the new name.

4 Click OK.

Rapid SQL changes the name and closes the Rename Tab Editor.

Closing a Result Window Tab

To close a Result Window Tab, do the following:

1 On the Result Window Tab tool bar, click Close.

OR

Right-click the Results Tab, and then click Close.

Rapid SQL cl oses the Result Window Tab.

RAPID SQL 8.6/XE5 USER GUIDE 784

RESULTS EDITOR

For more information, see

Results Editor .

S AVING AND C LOSING R ESULT S ETS

You can save your result sets using the standard Save and Save As functions. You can save multiple copies of the same result set and modify each copy to specific formatting requirements.

Saving Results

To save results, do the following:

1 On the File menu, click Save.

OR

On the Main tool bar, click Save.

Rapid SQL opens the Save Results dialog box.

2 In the File name box, type the name of the result set.

3 In Save as type, select the file type.

TIP: You can now save data in Excel 2000 or later .xls, user-specified delimited .txt, and

XML formats.

4 To include column titles, select Include column titles when saving.

5 For delimited results, in User Specified Delimiter type the delimiter.

6 Click Save.

Rapid SQL saves the file and closes the Save As dialog box.

Closing a Result Set

To close a result set, do the following:

1 On the Main menu, click Close.

OR

On the Result tool bar, click Close.

OR

In the upper-right corner of the window, double-click the System menu icon.

Rapid SQL closes the Result Set.

2 If you have not saved your result set, Rapid SQL prompts you to save the file. Click Yes to save and No to close without saving.

For more information, see

Results Editor .

785 RAPID SQL 8.6/XE5 USER GUIDE

RESULTS EDITOR

E DITING R ESULT S ETS

The Results Editor provides many ways to edit and customize your result windows. The Data Grid offers a host of features for manipulating, sorting and formatting data.

Topics

• Cutting, Copying, and Pasting Cell Contents

• Cutting, Copying, and Pasting Rows

• Cutting, Copying, and Pasting Columns

• Adding and Inserting Rows

• Adding and Inserting Columns

• Deleting Rows and Column

• Resizing Rows and Columns

• Sorting Data

C UTTING , C OPYING , AND P ASTING C ELL C ONTENTS

The Result window supports standard cut, copy and paste functionality.

Cutting Cell Contents

To cut cell contents, do the following:

1 In the Results window, double click or tab to the target cell. A double line bounds the selected cell. You can also select text using standard text selection techniques.

2 On the Edit menu, click Cut.

OR

On the Result tool bar, click Cut.

Rapid SQL cuts the cell.

RAPID SQL 8.6/XE5 USER GUIDE 786

RESULTS EDITOR

Copying Cell Contents

To copy cell contents, do the following:

1 In the Results window, double click or tab to the target cell. A double line bounds the selected cell. You can also select text using standard text selection techniques.

2 On the Edit menu, click Copy.

OR

On the Result tool bar, click Copy.

Rapid SQL copies the cell.

Pasting Cell Contents

To paste cell contents, do the following:

1 In the Results window, double click or tab to the target cell. A double line bounds the selected cell.

2 On the Edit menu, click Paste.

OR

On the Result tool bar, click Paste.

Rapid SQL pastes the cell.

For more information, see

Editing Result Sets

.

C UTTING , C OPYING , AND P ASTING R OWS

You can perform standard cut, copy, and paste functions on rows, just as you can on individual cells.

Cutting Rows

To cut a row, do the following:

1 In the Results window, click the numbered row heading on the left side of the row.

2 On the Edit menu, click Cut.

OR

On the Result tool bar, click Cut.

Rapid SQL cuts the row.

787 RAPID SQL 8.6/XE5 USER GUIDE

RESULTS EDITOR

Copying Rows

To copy rows, do the following:

1 In the Results window, double click or tab to the target row. A double line bounds the selected row. You can also select text using standard text selection techniques.

2 On the Edit menu, click Copy.

OR

On the Result tool bar, click Copy.

Rapid SQL copies the row.

Pasting Rows

To paste rows, do the following:

1 In the Results window, double click or tab to the target row. A double line bounds the selected row.

2 On the Edit menu, click Paste.

OR

On the Result tool bar, click Paste.

Rapid SQL pastes the row.

For more information, see

Editing Result Sets

.

C UTTING , C OPYING , AND P ASTING C OLUMNS

You can perform standard cut, copy, and paste functions on columns, just as you can on rows.

Cutting Columns

To cut columns, do the following:

1 In the Results window, click the column heading above the first row.

2 On the Edit menu, click Cut.

OR

On the Result tool bar, click Cut.

Rapid SQL cuts the column.

RAPID SQL 8.6/XE5 USER GUIDE 788

RESULTS EDITOR

Copying Columns

To copy columns, do the following:

1 In the Results window, click the column heading.

2 On the Edit menu, click Copy.

OR

On the Result tool bar, click Copy.

Rapid SQL copies the column.

Pasting Columns

To paste columns, do the following:

1 In the Results window, click the column heading above the first row to select the target column.

2 On the Edit menu, click Paste.

OR

On the Result tool bar, click Paste.

Rapid SQL pastes the column.

For more information, see

Editing Result Sets

.

A DDING AND I NSERTING R OWS

You can add or insert rows to expand or rearrange your result sets.

Adding a Row

To add a row, do the following:

1 To add a row as the last row of the result set, position the pointer inside the result set.

2 On the Edit menu, click Add Row.

3 To add a row inside the result set, click the numbered row heading where you want to add a row.

4 On the Edit menu, click Add Row .

Inserting a Row

To insert a row, do the following:

1 To insert a row as the last row of the result set, position the pointer inside the result set.

2 On the Edit menu, click Insert Row .

789 RAPID SQL 8.6/XE5 USER GUIDE

RESULTS EDITOR

3 To insert a row inside the result set, click the numbered row heading where you want to insert a row.

4 On the Edit menu, click Insert Row.

For more information, see

Editing Result Sets

.

A DDING AND I NSERTING C OLUMNS

You can add or insert columns to expand or rearrange your result sets.

Adding a Column

To add a column, do the following:

1 Position the pointer inside the result set.

2 Select Edit, Add Column from the main menu. The new column is added as the last column of the result set.

Inserting a Column

To insert a column, do the following:

1 Select the column where you want to insert a column.

2 Select Edit, Insert Column from the main menu. The new column is inserted to the left of the column that you selected.

For more information, see

Editing Result Sets

.

D ELETING R OWS AND C OLUMNS

You can delete entire rows and columns to edit your result sets.

Deleting a Row

To delete a row, do the following:

1 Select the target row of data to delete.

2 On the Edit menu, click Delete Row.

OR

Right-click the row, and then click Delete Row.

Rapid SQL deletes the row.

RAPID SQL 8.6/XE5 USER GUIDE 790

RESULTS EDITOR

Deleting a Column

To delete a column, do the following:

1 Select the target column of data to delete.

2 On the Edit menu, click Delete Column.

OR

Right-click the column, and then click Delete Column.

Rapid SQL deletes the column.

For more information, see

Editing Result Sets

.

R ESIZING R OWS AND C OLUMNS

Resizing rows and columns can aid readability of the spreadsheet contents or condense space for editing and formatting purposes.

Resizing Rows to Their Default Height

To resize rows to their default height, do the following:

1 Select one or more rows by clicking on the numbered row headings to the left of the rows.

2 Right-click the selected rows, and then click Resize Rows.

Resizing Rows to a New Height

To resize rows to a new height, do the following:

1 Select one or more rows by clicking the numbered row headings to the left of the rows.

2 Change the pointer to a solid horizontal bar with arrows on top and bottom by moving it to one of the upper or lower borders of the row heading.

3 Click and grab the row border and drag the pointer to enlarge or shrink the height of the row.

Resizing Columns to Their Default Widths

To resize columns to their default widths, do the following:

1 Select one or more columns by clicking the column headings.

2 Right-click the selected columns, and then click Resize Columns.

791 RAPID SQL 8.6/XE5 USER GUIDE

RESULTS EDITOR

Resizing Columns to a New Width

To resize columns to a new width, do the following:

1 Select one or more columns by clicking the column headings.

2 Change the pointer to a solid horizontal bar with arrows on top and bottom by moving it to one of the upper or lower borders of the column heading.

3 Click and grab the column border and drag the pointer to enlarge or shrink the height of the column.

For more information, see

Editing Result Sets

.

S ORTING D ATA

To order and organize data in a coherent manner, you can sort columns alphanumerically in single result sets.

Sorting Data

To sort data, do the following:

1 In the data grid, select the column(s) you want to sort.

2 Double click the column header(s) to sort the data in the column in ascending, alphanumeric order. To sort the column in descending order, double click the column header again.

NOTE: This option is not valid for multiple result sets.

For more information, see

Editing Result Sets

.

F ORMATTING R ESULT S ETS

The ISQL Editor provides flexibility in formatting result sets, for analysis and reporting, from within a Result Window. Result sets can be formatted to best suit your purpose, whether it be sending via e-mail, printing, or exporting a file to other programs, such as Microsoft Excel. Some of these features change only the screen display of the results, while others allow you to format for printing.

Topics

• Setting Alignment Properties

• Setting Border Properties

• Setting Result Set Display Properties

• Setting Fonts

• Setting Colors

RAPID SQL 8.6/XE5 USER GUIDE 792

RESULTS EDITOR

S ETTING A LIGNMENT P ROPERTIES IN R ESULT W INDOWS

You can use the format menu or the shortcut menu to alter result set alignment properties.

Selecting the Alignment command displays the Format Styles tabbed dialog box:

Setting Alignment Properties

To set alignment properties, do the following:

1 On the Format menu, click Alignment.

OR

Right-click the Result data grid, and then click Alignment.

Rapid SQL opens the Format Styles dialog box.

2 Click the Align Tab.

3 To change Horizontal properties, click the appropriate option button in the Horizontal box.

4 To enable Wrap Text , Allow Enter and/or Auto Size, select the appropriate check boxes.

5 To disable Wrap Text , Allow Enter and/or Auto Size, select the appropriate check boxes and deselect these options.

The table below describes alignment properties:

Property Option Description

Horizontal Standard Aligns data in cells based on their default datatype alignment properties. For example, numbers are right aligned, whereas text is left aligned.

Left

Aligned

Forces all data to be left aligned, regardless of datatype

Vertical

Wrap Text

Allow Enter

Auto Size

Center

Right

Aligned

Forces centering of all data, regardless of datatype

Forces all data to be right aligned, regardless of datatype

Standard Aligns data in cells based on their default datatype alignment properties. For example, numbers are right aligned, whereas text is left aligned.

Top

Center

Bottom

Forces all data to be aligned to the top of each cell

Forces all data to be aligned in the center of each cell

Forces all data to be aligned at the bottom of each cell

Specifies that data exceeding the length of the cell should wrap to additional lines in the same cell

Specifies that the contents of cells can be edited or not

Specifies whether or not rows should size automatically to accommodate the longest data item in a column

For more information, see

Formatting Result Sets

.

793 RAPID SQL 8.6/XE5 USER GUIDE

RESULTS EDITOR

F ORMAT B ORDER S TYLES

You can use the format menu or the shortcut menu to alter border properties. Selecting the

Border command displays the Format Styles tabbed dialog box.

Completing the Format Styles Dialog Box

To complete the Format Styles dialog box, do the following:

1 On the Format menu, click Borders.

OR

Right-click the Result data grid, and then click Borders.

Rapid SQL opens the Format Styles dialog box.

2 Click the Borders Tab.

3 On the Border box, you can indicate whether or not a border should appear on the top, bottom, right, left, or for a range of cells by clicking the corresponding boxes.

4 To set a range of cells apart by setting a particular border style around that range, select the range in the result set before opening the Format Styles dialog box. To select the Range property, click the range box.

5 In the Type box, you can select the type of line you want to border the cell or cells by clicking the corresponding boxes.

6 To select a color, click the Color list, and then click the border color.

7 Click OK.

Rapid SQL saves your changes and closes the Format Styles dialog box.

For more information, see

Formatting Result Sets

.

D ISPLAY S ETTINGS

You can use the format menu or the shortcut menu to alter display properties. Selecting the

Properties command displays the Display Setting dialog box.

The Display Settings dialog box lets you set a number of format properties for the result set window:

• How titles and grid lines are displayed.

• How lines in the grid are displayed.

• How the result set window background is displayed.

• How current cells, rows and columns are indicated.

RAPID SQL 8.6/XE5 USER GUIDE 794

RESULTS EDITOR

Completing the Display Settings Dialog Box

To complete the Display Settings dialog box, do the following:

1 On the Format menu, click Properties.

OR

Right-click the Result data grid, and then click Properties.

Rapid SQL opens the Display Settings dialog box.

2 In the Titles and Gridlines box, select the target display properties check boxes. The change is displayed in the right-pane Preview window of the Properties dialog box.

3 In the Color box, click the property you want to change, and then click the new color.

Changes are propagated automatically when you change them.

4 To alter the user properties, in the User Properties list, click the attribute you want applied to the current cell.

5 To save your changes to the current configuration, select the Save settings to profile check box.

6 Click OK.

Rapid SQL saves your changes and closes the Properties dialog box.

For more information, see

Formatting Result Sets

.

F ORMAT F ONT S TYLES

You can use the format menu or the shortcut menu to alter font properties. Selecting the Font command displays the Format Styles tabbed dialog box.

Completing the Format Styles Dialog Box

To complete the Format Styles dialog box, do the following:

1 On the Format menu, click Font.

OR

Right-click the Result data grid, and then click Font.

Rapid SQL opens the Format Styles dialog box.

2 Click the Font Tab.

3 In the Font Combo box, type or click the font you want to use.

4 In the Outline Combo box, type or click the outline you want to use.

5 In the Size Combo box, type or click the size you want to use.

795 RAPID SQL 8.6/XE5 USER GUIDE

RESULTS EDITOR

6 To make a line cross through the length of the text, in the Effects box, select the Strikeout check box.

7 To underline the text, in the Effects box, select the Underline check box.

8 To change the text color, click the Text Color list, and then click the new color.

The Preview box displays the sample text of your selections

For more information, see

Formatting Result Sets

.

F ORMAT C OLOR S TYLES

You can use the format menu or the shortcut menu to alter color properties. Selecting the Color command displays the Format Styles tabbed dialog box.

The table below describes the options and functionality on the Format Styles dialog box:

Option

Interior

3D-Effect

Description

To change the result set pattern, in the box, click the list, and then click a new pattern.

To set the foreground color of the result set, in the box, click a foreground group color button.

To set the background color of the result set, in the box, click a background group color button.

To change the 3D-Effect, in the box, click the appropriate option button:

The Normal option button provides a standard flat appearance.

The Raised option button provides a raised 3D appearance in the selected cells.

The Inset option button provides a depressed appearance in the selected cells. The default is typically set to Normal.

Completing the Format Styles Dialog Box

To complete the Format Styles dialog box, do the following:

1 On the Format menu, click Color.

OR

Right-click the Result data grid, and then click Color.

Rapid SQL opens the Format Styles dialog box.

For more information, see

Formatting Result Sets

.

RAPID SQL 8.6/XE5 USER GUIDE 796

RESULTS EDITOR

N OTES ON XML T YPES AND U NICODE D ISPLAY IN THE R ESULTS E DITOR

When viewing data in the Results grid, keep the following in mind:

• XML data types are supported for IBM DB2 for Windows, Unix, and Linux, Microsoft SQL

Server, and Oracle. In the Results grid, XML data types are displayed as LOB content.

• Support for display of Uincode characters is provided as follows:

• IBM DB2 for Windows, Unix, and Linux: character , clob , varchar , and longvarchar types

• SQL Server: nchar , nvarchar , ntext , and nvarchar(max) types

• Oracle 9i, and 10g: NCHAR , NVARCHAR2 and NCLOB for non-Unicode UTF8 Character

Set Instances and NCHAR , NVARCHAR2 , CHAR , VARCHAR2 , LONG , NCLOB and CLOB for Unicode UTF8 Character Set Instances

• Sybase ASE 12.5 and 15.2: UNICHAR , UNIVARCHAR and UNITEXT for non-Unicode UTF8

Character Set Instances and UNICHAR , UNIVARCHAR , UNITEXT , NCHAR , NVARCHAR ,

CHAR , VARCHAR and TEXT for Unicode UTF8 Character Set Instances

797 RAPID SQL 8.6/XE5 USER GUIDE

P

ERMISSIONS

M

ANAGEMENT

Rapid SQL includes permissions management capabilities that include:

• Explicit Permissions

• Cascading Permissions

• Using Roles to Grant Permissions and Privileges

• Using Roles to Revoke Permissions and Privileges

• Grant Privilege(s) To

• Revoke Privilege(s) From

• Deny Privileges From

E XPLICIT P ERMISSIONS

Explicit permissions are permissions specifically granted by one user to another. Granting a permission is an integral part of database security and management. Rapid SQL tracks explicit permission changes across your enterprise. Multiple explicit permissions can be consolidated in roles. Different groups and roles can share permissions for an object. Rapid SQL lets you grant permissions with the Roles Editor. Embarcadero lets you edit permissions on the Privileges tabs of the object editors.

TIP: The Admin option is similar to the grantable option for privileges. If the user has the admin option, they can grant that role to other people.

TIP: In most cases, you will want to make all roles granted, default roles. If you do not make a role default for a user, they will have to enable it with a SQL command. To avoid this complication, assign roles as default unless business rules specify otherwise.

TIP: The Grantable option gives the user the ability to grant that privilege to other users.

Use the Grantable option SPARINGLY.

For more information, see

Permissions Management .

C ASCADING P ERMISSIONS

Cascading permissions are the path of privileges granted from one user to another user, group, or role. Using cascading permissions is a way to manage multiple sets of permissions and privileges for groups of users. When you drop a user with a revoke cascade command, all permissions and privileges granted by the dropped user are also revoked. Embarcadero lets you edit and set grant permission parameters with the Permissions Editor.

Once a user with grant permission privileges is dropped with cascade, reinstate permissions for all affected users.

RAPID SQL 8.6/XE5 USER GUIDE 798

PER MISSIONS MANAGEMENT

For more information, see

Permissions Management .

U SING R OLES TO G RANT P ERMISSIONS AND P RIVILEGES

Roles are sets of user privileges you associate with access to objects within a database. Roles streamline the process of granting permissions. You can use roles to grant sets of permissions and privileges to users and groups. Rapid SQL lets you grant permissions to roles with the Roles

Editor.

For more information, see

Permissions Management .

U SING R OLES TO R EVOKE P ERMISSIONS AND P RIVILEGES

Roles can be effective in revoking permissions and privileges from users. Rather than individually revoke permissions from users, you can revoke groups of permissions from multiple users simultaneously using roles. Rapid SQL lets you revoke permissions with the Roles Editor.

Rapid SQL lets you identify existing users and their database permissions, and to detect and manage changes to user permissions by rolling change back or forward. Rapid SQL lets you manage database permissions in a cross-platform database environment. and gives you the ability to compare objects/permissions and migrate them to other instances. Using the compare functionality for permissions management, Rapid SQL gives you:

• Enhanced permissions management across the enterprise (Oracle, Sybase ASE, Microsoft

SQL Server, and IBM DB2 LUW for Linux, Unix, and Windows).

• Faster detection of changed user rights.

• Ability to detect database accounts (users/logins) that are invalid.

• Rollback of invalid permissions in a single click.

• Archives of users, groups, roles and their permissions.

For more information, see

Permissions Management .

G RANT P RIVILEGE ( S ) T O

The Grant Privilege(s) To dialog box lets you select or clear the check boxes corresponding to the target privileges.

Permissions and privileges allow or limit access to system database administration and database objects. To manage databases, it is important to monitor who can access the enterprise structure and change the underlying schema. It is also important to monitor who can grant and revoke permissions and privileges in the enterprise. Rapid SQL lets you manage permissions and privileges in the Grant Privilege(s) To dialog box.

799 RAPID SQL 8.6/XE5 USER GUIDE

PER MISSIONS MANAGEMENT

On the Privileges Tab of the editor, you can see whether a privilege was inherited from a role or group, or if it was granted explicitly by a user.Rapid SQL also shows if the privilege is grantable

(granted with the GRANT OPTION.) The table below describes the icons:

NOTE: The available privileges depend on the target DBMS and object.

The table below describes the options and functionality on the Grant Privilege(s) From Dialog

Box:

Option

Privilege

Description

Lets you select or clear the check boxes corresponding to the target privileges.

Select No to prevent cascading the privileges to other users. Grantable

The table below describes the object permissions:

Object

Index

Packages

Schema

Tables

Tablespaces

Views

For more information, see:

Permissions Management

Permission(s)

CONTROL

BIND, CONTROL, EXECUTE

ALTERIN, CREATIN, DROPIN (w/GRANT OPTION)

ALTER, CONTROL, DELETE, INDEX, INSERT,

REFERENCES (& on column), SELECT, UPDATE (& on column) (w/GRANT OPTION)

USE (w/GRANT OPTION)

CONTROL, DELETE, INSERT, SELECT, UPDATE (& on column) (w/GRANT OPTION)

R EVOKE P RIVILEGE ( S ) F ROM

The table below describes the options and functionality on the Revoke Privilege(s) From dialog box:

Option

Privilege

Cascade

Description

Lets you select or clear the check boxes corresponding to the target privileges.

Select No to prevent cascading the revocation privileges to other users.

RAPID SQL 8.6/XE5 USER GUIDE 800

PER MISSIONS MANAGEMENT

For more information, see:

Permissions Management

D ENY P RIVILEGES F ROM

NOTE: Deny Privileges is available for Microsoft SQL Server only.

The Deny Privileges From dialog box lets you deny a privilege from a security account in the current database.

The table below describes the options and functionality on the Deny Privilege(s) From dialog box:

Option

Privilege

Cascade

Description

Lets you select or clear the check boxes corresponding to the target privileges.

Select No to prevent cascading the deny privileges to other users.

TIP: On the editor, the Deny privilege can be Revoked, just as a Grant permission can be revoked.

For more information, see:

Permissions Management

801 RAPID SQL 8.6/XE5 USER GUIDE

P

ROJECT

M

ANAGEMENT

Rapid SQL offers the following project managment-oriented functions:

Project support

Version Control

P

ROJECT SUPPORT

Rapid SQL database project management facilities help you organize, alter, and keep track of changes to database objects or SQL scripts. The project management facilities act as a repository to maintain all source code for a database project. Rapid SQL also incorporates version control functions and build management facilities to help you manage and build projects. Once a project has been created, Rapid SQL lets you:

• Review a file's history.

• Return to earlier versions of a file.

• Develop concurrently.

A project generally includes SQL script files that you can maintain and create in unison with your database administration and development cycle. Projects can also contain subfolders (for easy categorization) as well as other projects (subprojects.) You can create projects manually by inserting existing SQL script files. You can also create projects automatically by reverseengineering a database schema or an existing version control project.

When administering or developing SQL database schemas, SQL source code files are the foundation of effective change management for database objects. The DDL commands used to create database objects on SQL database servers are often in a constant state of flux as new columns and constraints are added to table schemas or stored procedure logic is changed. The ability to track and store these changes to files directly from Rapid SQL alleviates any disruption in the development environment.

Lengthy script files containing the DDL to compile stored procedures and triggers on a database server such as Oracle or Sybase Adaptive Server go through constant revisions similar to C program files and word processing documents. Rapid SQL's Project Management facilities let you effectively monitor revisions for your database servers.

For more information, see:

Create a New Project

Working With Projects

RAPID SQL 8.6/XE5 USER GUIDE 802

PROJECT SUPPORT

C REATE A N EW P ROJECT

Creating a project can be a very time-consuming task. Rapid SQL eases this task by providing step-by-step wizards to guide you through the process. You have a variety of options to choose from when you create a new project. Rapid SQL lets you create new projects:

• From a database.

• From existing files.

• From a version control project.

Without initialization.

The

New Project dialog box lets you select how you want to create a new project. Using the New

Project dialog box, you can name, specify a file location, and provide a description of the project.

N EW P ROJECT D IALOG B OX

The New Project dialog box lets you select how you want to create a new project. Using the New

Project dialog box, you can name, specify a file location, and provide a description of the project.

Important Notes

None

The table below describes the options and functionality of the New Project dialog box:

Option

Name

Location

Description

Initialize New Project

Description

Lets you enter a name for the project.

Lets you type or browse and locate a directory for the project.

NOTE: This is set as the working directory for your project.

OPTIONAL: Lets you enter a description of the project.

Lets you select how you want to create a new project.

From Database

- Lets you reverse engineer an existing database.

From Existing Files - Lets you create a project from scratch, or

use an existing project.

From Version Control - Lets you reverse-engineer a project

from existing version control system projects. This is helpful for users who have already created database projects in their version control systems.

Do Not Initialize - Lets you create an empty project where you

can later add files and/or database objects.

For more information, see

Completing the New Project Dialog Box .

803 RAPID SQL 8.6/XE5 USER GUIDE

PROJECT SUPPORT

C OMPLETING THE N EW P ROJECT D IALOG B OX

To complete the New Project Dialog Box, do the following:

1 On the File menu, select New, and then Project.

Rapid SQL opens the New Project Dialog Box.

2 In Name, enter a name for the project.

3 In Location, type or browse and locate a directory for the project.

4 OPTIONAL: In Description, lets you enter a description of the project.

5 In Initialize New Project, select how you want to create a new project.

6 Click OK.

C REATE A N EW P ROJECT F ROM A D ATABASE

Rapid SQL offers a context-sensitive wizard that reverse-engineers all or part of an existing database. When extracting database schema, Rapid SQL captures the complete definition of the following objects:

• Tables

• Views

• Stored Procedures

• Functions

Rapid SQL then creates a project containing files based on the relevant object types. Rapid SQL creates a separate file for each database object.

Reverse engineering is a powerful tool for analyzing, controlling, and documenting existing database objects. You can use the extracted SQL source code for archival and reference purposes.

Important Notes

• You must create a New Project from a Database in order to access the New Project Reverse

Engineering Wizard.

• Rapid SQL automatically discovers and sets the project script file build order by referencing the system catalog to determine dependencies.

• In the New Project dialog box , you must select the From Database option.

For more information, see

Creating a New Project from a Database

.

RAPID SQL 8.6/XE5 USER GUIDE 804

PROJECT SUPPORT

C REATING A N EW P ROJECT FROM A D ATABASE

To create a new project, do the following:

1 On the File menu, click New, and then click Project.

OR

On the Main toolbar, click the drop-down arrow to the right of the New button.

OR

On the Project toolbar, click the New Project.

OR

In the workspace, right-click New, and then click Project.

Rapid SQL opens the New Project dialog box.

2 Complete the New Project dialog box and select the

From Database option .

3 Click OK .

Rapid SQL opens the New Project Reverse Engineering Wizard.

4 Complete the New Project Reverse Engineering Wizard .

C OMPLETING THE N EW P ROJECT R EVERSE E NGINEERING W IZARD

NOTE: You must create a

New Project from a Database in order to access the New Project

Reverse Engineering Wizard.

NOTE: Rapid SQL automatically discovers and sets the project script file build order by referencing the system catalog to determine dependencies.

To complete the New Project Reverse Engineering Wizard, do the following:

1 Complete the New Project dialog box, and then click OK.

NOTE: You must select the From Database option.

Rapid SQL opens the New Project Reverse Engineering Wizard.

2 Complete the wizard.

3 To make changes, click Back to the appropriate panels of the Wizard and make changes.

4 When you are satisfied with the definition, click Execute .

Rapid SQL starts creating project files from database.

For more information, see New Project Reverse Engineering Wizard - Panel .

805 RAPID SQL 8.6/XE5 USER GUIDE

PROJECT SUPPORT

N EW P ROJECT R EVERSE E NGINEERING W IZARD - P ANEL 1

The first panel of the New Project Reverse Engineering Wizard lets you specify the datasource that you want to reverse engineer into a project.

The table below describes the options and functionality of the first panel of the New Project

Reverse Engineering Wizard:

Option

Select a Datasource

Description

Lets you select a datasource to reverse engineer. Select a datasource.

For more information, see Completing the New Project Reverse Engineering Wizard .

N EW P ROJECT R EVERSE E NGINEERING W IZARD - P ANEL 2

The second panel of the New Project Reverse Engineering Wizard lets you specify the target database on the server.

The table below describes the options and functionality of the second panel of the New Project

Reverse Engineering Wizard:

Option

Select Database to reverseengineer

Description

Lets you select a database to reverse engineer. Select a database.

For more information, see Completing the New Project Reverse Engineering Wizard .

N EW P ROJECT R EVERSE E NGINEERING W IZARD - P ANEL 2

The third panel of the New Project Reverse Engineering Wizard lets you specify the database object owners, the database object types, and general script types of the objects you want to extract.

The table below describes the options and functionality of the third panel of the New Project

Reverse Engineering Wizard:

Option

Select Database Object

Types

Extract Scope

Description

Owner list - Lets you select the owner of the objects you want to extract.

Objects - Lets you select the objects types you want to extract.

TIP: To select or deselect all object types right-click to Select or

Unselect all.

Lets you select the objects to extract from the database.

All Objects - Lets you extract all objects for each object type that you select. Opens Panel 4 for All Objects .

Selected Objects Only - Lets you specify the specific objects that you want to extract. Opens Panel 4 for Selected Objects .

NOTE: Rapid SQL continues to a different Panel 4 depending on which option you choose for the Extract Scope.

RAPID SQL 8.6/XE5 USER GUIDE 806

PROJECT SUPPORT

Option

Include Indexes with Table

DDL

Description

If selected, includes indexes when extracting table DDL.

Include FKs with Table DDL If selected, includes foreign keys when extracting table DDL.

Include Drop Statement If selected, includes drop statements when extracting database

SQL.

Include Object Privileges If selected, includes object privileges when extracting database SQL.

For more information, see Completing the New Project Reverse Engineering Wizard .

New Project Reverse Engineering Wizard - Panel 3 for All Objects

This panel of the New Project Reverse Engineering Wizard lets you specify the ownership.

The table below describes the options and functionality of the fourth panel of the New Project

Reverse Engineering Wizard for All Objects:

Option

Retain

Exclude

Transfer

Description

Select to include the existing object owners' names in the

CREATE statements.

Select to exclude the object owners' names in the CREATE statements.

Select to include the designated owner's name in the CREATE statements. Select a user.

For more information, see Completing the New Project Reverse Engineering Wizard .

N EW P ROJECT R EVERSE E NGINEERING W IZARD - P ANEL 4 FOR S ELECTED O BJECTS

This panel of the New Project Reverse Engineering Wizard only applies if you have chosen to generate a customized script. You can select specify objects and set script options for each object type.

The table below describes the options and functionality of the fourth panel of the New Project

Reverse Engineering Wizard for selected objects.

NOTE: You must select options and statements for each object type you select.

Option

Object Type

Object list

Options for Objects

Description

Lets you select an object type.

Lists the owner and names of objects for the selected type in the database.

Lets you select an option for the object type.

NOTE: Options vary depending on the object type selected.

807 RAPID SQL 8.6/XE5 USER GUIDE

PROJECT SUPPORT

Option

Statements

Description

Lets you select a script option for the particular object type.

NOTE: Statements vary depending on the option and object type selected.

For more information, see Completing the New Project Reverse Engineering Wizard .

N EW P ROJECT R EVERSE E NGINEERING W IZARD - P ANEL 4

This panel of the New Project Reverse Engineering Wizard lets you review the Reverse

Engineering definition to verify its accuracy.

NOTE: If you have specified to integrate Rapid SQL with an underlying version control system during installation, Rapid SQL asks to add the new files to version control. Click Yes to add the files.

For more information, see Completing the New Project Reverse Engineering Wizard .

C REATE A N EW P ROJECT F ROM E XISTING F ILES

Rapid SQL lets you create a new project from:

• Scratch.

• Existing files.

To create a new project from an existing file, do the following:

1 On the File menu, click New, and then click Project.

OR

On the Main toolbar, click the drop-down arrow to the right of the New button.

OR

On the Project toolbar, click the New Project.

OR

In the workspace, right-click New, and then click Project.

Rapid SQL opens the New Project dialog box.

2 Complete the New Project dialog box and select the From Existing Files option.

3 Click OK .

Rapid SQL opens the Add File(s) to Project dialog box.

RAPID SQL 8.6/XE5 USER GUIDE 808

PROJECT SUPPORT

4 In the Add File(s) to Project dialog box, type the files that you want to add in the File name field. Use the following to help locate the files:

• In Directories, browse by clicking a directory.

• In the List files of type list, select a file type.

• In the Drives list, select a drive.

5 Click Add to add a file or click Add All to add all the files.

6 When you finish, click OK .

Rapid SQL creates the project.

NOTE: If you have specified to integrate Rapid SQL with an underlying version control system during installation, Rapid SQL asks to add the new files to version control. Click Yes to add the files.

C REATE A N EW P ROJECT F ROM A V ERSION C ONTROL P ROJECT

Rapid SQL lets you reverse-engineer a project from existing version control system projects. This is helpful if you have already created database projects in a version control system.

NOTE: The Intersolv PVCS API does not support the creation of a project from a source code control project.

Rapid SQL also lets you create a project from a version control project that contains subdirectories, while including files from those sub-directories in the Rapid SQL project.

To create a new project from a Version Control project, do the following:

1 On the File menu, click New, and then click Project.

OR

On the Main toolbar, click the drop-down arrow to the right of the New button.

OR

On the Project toolbar, click the New Project.

OR

In the workspace, right-click New, and then click Project.

Rapid SQL opens the New Project dialog box.

2 Complete the New Project dialog box and select

From Version Control Project .

3 Click OK .

Rapid SQL opens the Choose project from (Version Control name) dialog box.

4 Select the project or files you want to include, and then click OK .

Rapid SQL opens the Files to be included in (project path) dialog box.

809 RAPID SQL 8.6/XE5 USER GUIDE

PROJECT SUPPORT

5 Select the project of files you want to include, and then click OK.

Rapid SQL creates the project.

C REATE A N EW P ROJECT W ITHOUT I NITIALIZATION

Rapid SQL gives you the option to not initialize a project. Rapid SQL creates a project tab with the name you specify in the New Project dialog box. This tab functions as a shell to:

Add files.

Add database objects .

To create a new project without initialization, do the following:

1 On the File menu, click New, and then click Project.

OR

On the Main toolbar, click the drop-down arrow to the right of the New button.

OR

On the Project toolbar, click the New Project.

OR

In the workspace, right-click New, and then click Project.

Rapid SQL opens the New Project dialog box.

2 Complete the New Project dialog box and select the

Do Not Initialize option.

3 Click OK .

Rapid SQL creates the Project Tab.

W ORKING WITH P ROJECTS

A project is similar to a file system. Both are a collection of files that you create and maintain.

Because projects are hierarchical, you can place a

subproject under another project, and a

subproject under a subproject. Once you have created a new project, Rapid SQL provides many functions to help you maintain and modify the project.

Related Topics

New Project Dialog Box

Opening an Existing Project

Opening a Recent Project

Closing a Project

RAPID SQL 8.6/XE5 USER GUIDE 810

PROJECT SUPPORT

Build Project

Set Build Order

Add Database Object File(s) to Project Wizard

Execute Project Files

Add File(s) to a Project

Open a File from a Project

Subprojects

Project Properties

Confirm Delete Dialog Box

O PENING AN E XISTING P ROJECT

To open an existing project, do the following:

1 On the File menu click Open Project .

Rapid SQL opens the Open Project dialog box.

2 In File name , type the name and location of the project or use browse to locate the project.

NOTE: Project files are designated with a *.epj extension.

3 Click Open.

Rapid SQL opens the Project Tab containing the project.

For more information, see

Working with Projects.

O PENING A R ECENT P ROJECT

To open a recent project, do the following:

1 On the File menu select Recent Project, and then select a project.

Rapid SQL opens the Project Tab containing the project.

For more information, see

Working with Projects

.

811 RAPID SQL 8.6/XE5 USER GUIDE

C LOSING A P ROJECT

To close a project, do the following:

1 On the File menu, click Close Project.

2 On the Project Tab , right-click and then click Close Project.

Rapid SQL closes the project.

For more information, see

Working with Projects

.

B UILD P ROJECT

The Build Project dialog box lets you:

• Generate a project build script and display it in a SQL window.

• Execute the project build immediately on build target.

• Schedule a project build.

Important Notes

None

The table below describes the Build Project dialog box:

Option

Datasource

Database

Build subprojects

Description

Displays the target datasource.

Displays the target database.

Select to include subprojects.

Select to generate the project build script and have Rapid SQL display it in a SQL window.

Generate a Project Build

Script and Display it in a

SQL window.

Execute Project Build

Immediately on Build Target

Schedule Project Build for a

Later Time

Select to execute build immediately.

Select to schedule the build and then specify optional options.

For more information, see

Completing the Build Project Dialog Box

.

C OMPLETING THE B UILD P ROJECT D IALOG B OX

To complete the Build Project dialog box, do the following:

1 On the File menu click Open Project .

Rapid SQL opens the Open Project dialog box.

RAPID SQL 8.6/XE5 USER GUIDE

PROJECT SUPPORT

812

PROJECT SUPPORT

2 In File name , type the name and location of the project or use browse to locate the project.

NOTE: Project files are designated with a *.epj extension.

3 Click Open.

Rapid SQL opens the Project Tab containing the project.

1 On the Project Tab, right-click the target project, and then select Build.

Rapid SQL opens the Build Project dialog box.

2 Select options.

3 Click OK.

Rapid SQL builds the project according to your specifications.

S ET B UILD O RDER

You can specify the order in which you want Rapid SQL to build your project files in the Set Build

Order dialog box. If you created your project manually or from a version control project, you must specify a build order, otherwise the files are built in the order that they appear in the tree of the Project Tab.

Setting Build Order

1 On the File menu click Open Project .

Rapid SQL opens the Open Project dialog box.

2 In File name , type the name and location of the project or use browse to locate the project.

NOTE: Project files are designated with a *.epj extension.

3 Click Open.

Rapid SQL opens the Project Tab containing the project.

4 On the Project menu, click Build Order.

OR

On the Project toolbar, click Build Order.

OR

On the Project Tab, right-click a project file, and then click Build.

Rapid SQL opens the Set Build Order dialog box.

5 Click the files you want to move and then click the Up and Down to change the order to build the files.

813 RAPID SQL 8.6/XE5 USER GUIDE

6 When you finish specifying the order, select OK .

Rapid SQL sets the build order.

NOTE: The next time you build the project, Rapid SQL uses this build order.

A DD D ATABASE O BJECT F ILE ( S ) TO P ROJECT W IZARD

You can add database objects to an existing project using a simple wizard that can reverseengineer an entire database or any portion of it. This lets you keep your project in sync with databases where objects are constantly being created and updated.

For more information, see:

Working with Projects

Completing the Add Database Object File(s) to Project Wizard

C OMPLETING THE A DD D ATABASE O BJECT F ILE ( S ) TO P ROJECT W IZARD

To add database objects to a project, do the following:

1 On the File menu click Open Project .

Rapid SQL opens the Open Project dialog box.

2 In File name , type the name and location of the project or use browse to locate the project.

NOTE: Project files are designated with a *.epj extension.

3 Click Open.

Rapid SQL opens the Project Tab containing the project.

4 On the Project menu, click Add Database Objects.

OR

On the Project toolbar click Add Database Objects.

OR

On the Project Tab, right-click and then click Add Database Objects.

Rapid SQL opens the first panel of the Add Database Object File(s) to Project Wizard .

For more information, see

Add Database Objects to a Project Wizard

.

A DD D ATABASE O BJECT F ILE ( S ) TO P ROJECT W IZARD - P ANEL 1

The first panel of the Add Database Object File(s) to Project Wizard lets you specify the datasource that you want to reverse engineer into a project.

RAPID SQL 8.6/XE5 USER GUIDE 814

PROJECT SUPPORT

The table below describes the options and functionality of the first panel of the Add Database

Object File(s) to Project:

Option

Select a Datasource

Description

Lets you select a datasource to reverse engineer.

For more information, see

Completing the Add Database Object File(s) to Project Wizard

.

A DD D ATABASE O BJECT F ILE ( S ) TO P ROJECT W IZARD - P ANEL 2

The second panel of the Add Database Object File(s) to Project Wizard lets you specify the target database on the server.

The table below describes the options and functionality of the second panel of the Add

Database Object File(s) to Project:

Option

Select Database to reverseengineer

Description

Lets you select a database to reverse engineer.

For more information, see

Completing the Add Database Object File(s) to Project Wizard

.

A DD D ATABASE O BJECT F ILE ( S ) TO P ROJECT W IZARD - P ANEL 3

The third panel of the Add Database Object File(s) to Project Wizard lets you specify the database object owners, the database object types, and general script types of the objects you want to extract.

The table below describes the options and functionality of the third panel of the Add Database

Object File(s) to Project:

Option

Select Database Object

Types

Extract Scope

Description

Owner list - Lets you select the owner of the objects you want to extract.

Objects - Lets you select the objects types you want to extract.

TIP: To select or deselect all object types, in the Object list, right-click to Select or Unselect all.

Lets you select the objects to extract from the database.

All Objects - Lets you extract all objects for each object type that you select. Opens Panel 4 for All Objects .

Selected Objects Only - Lets you specify the specific objects that you want to extract. Opens Panel 4 for Selected Objects .

NOTE: Rapid SQL opens a different Panel 4 depending on which option you choose for the Extract Scope.

Include Indexes with Table

DDL

Includes indexes when extracting table DDL.

Include FKs with Table DDL Includes foreign keys when extracting table DDL.

Include Drop Statement Includes drop statements when extracting database SQL.

815 RAPID SQL 8.6/XE5 USER GUIDE

PROJECT SUPPORT

Option

Include Object Privileges

Description

Includes object privileges when extracting database SQL.

For more information, see

Completing the Add Database Object File(s) to Project Wizard

.

A DD D ATABASE O BJECT F ILE ( S ) TO P ROJECT W IZARD - P ANEL 4 FOR S ELECTED O BJECTS

This panel of the Add Database Object File(s) to Project Wizard only applies if you have chosen to generate a customized script. You can select specify objects and set script options for each object type.

The table below describes the options and functionality of the fourth panel of the Add Database

Object File(s) to Project for selected objects.

NOTE: You must select options and statements for each object type you select.

Option

Object Type list

Object list

Options for Object list

Statement list

Description

Lets you select an object type.

Lists the owner and names of objects for the selected type in the database.

Lets you select an option for the object type.

NOTE: Options vary depending on the object type selected.

Lets you select a script option for the particular object type.

NOTE: Statements vary depending on the option and object type selected.

For more information, see

Completing the Add Database Object File(s) to Project Wizard

.

Add Database Object File(s) to Project Wizard - Panel 4 for All Objects

The fourth panel of the Add Database Object File(s) to Project Wizard lets you specify the ownership.

The table below describes the options and functionality of the fourth panel of the Add Database

Object File(s) to Project for All Objects:

Option

Retain

Exclude

Transfer

Description

Select to include the existing object owners' names in the

CREATE statements.

Select to exclude the object owners' names in the CREATE statements.

Select to include the designated owner's name in the CREATE statements. Select a user.

For more information, see

Completing the Add Database Object File(s) to Project Wizard

.

RAPID SQL 8.6/XE5 USER GUIDE 816

PROJECT SUPPORT

A DD D ATABASE O BJECT F ILES ( S ) TO P ROJECT W IZARD - P ANEL 5

This panel of the Add Database Object File(s) to Project Wizard lets you retain, exclude, or transfer object ownership.

The table below describes the options and functionality on this panel:

Option

Retain

Exclude

Transfer ownership to following user:

Description

Select to retain object ownership.

Select to exclude object ownership.

Select to transfer ownership, and then select the target user from the list.

For more information, see

Completing the Add Database Object File(s) to Project Wizard

.

A DD D ATABASE O BJECT F ILE ( S ) TO P ROJECT W IZARD - P ANEL 6

This panel of the Add Database Object File(s) to Project Wizard lets you review the Reverse

Engineering definition to verify its accuracy.

NOTE: If you have specified to integrate Rapid SQL with an underlying version control system during installation, Rapid SQL asks to add the new files to version control. Click Yes to add the files.

For more information, see

Completing the Add Database Object File(s) to Project Wizard

.

E XECUTE P ROJECT F ILES

You can directly execute project script files from the Project Tab using the File Execution Facility.

You can also execute multiple scripts in parallel against different datasources. If a file has been placed under version control, you need to perform a Check Out operation to execute the file.

Otherwise, the file opens in read-only mode.

For more information, see:

Working with Projects

Executing Project Files

E XECUTING P ROJECT F ILES

To execute project files, do the following:

1 On the Project Tab , right-click the files you want to execute, and then click File Execution

Facility .

Rapid SQL opens the

Script Execution Facility dialog box.

For more information, see

Execute Project Files .

817 RAPID SQL 8.6/XE5 USER GUIDE

PROJECT SUPPORT

A DD F ILE ( S ) TO A P ROJECT

You can add external files to your project. This lets you manipulate and expand your project as needed.

The Add File(s) to Project dialog box lets you add files to a project.

The table below describes the options and functionality of the Add Files to Project dialog box:

Option

File Name

Directories

List files of type

Drives

Network

Add

Add All

Description

Lets you type the files that you want to add.

Lets you browse by select a directory.

Lets you select a file type.

Lets you select a drive.

Open the Map Network Drive dialog box.

Lets you add a file.

Lets you add all the files.

For more information, see:

Working with Projects

Completing the Add Files to Project Dialog Box

C OMPLETING THE A DD F ILE ( S ) TO P ROJECT D IALOG B OX

To add files to a project from, do the following:

1 On the Project menu, click Add Files.

OR

On the Project Tab, right-click and then click Add Files.

Rapid SQL opens the Add Files to Project

dialog box.

2 In File name , type the file name(s) or select the file(s) that you want to add to the project.

3 In Directories browse for the project. that contains the file(s) that you want to add to the project.

4 In the List files of type select the type of files you want to add to the project.

5 In Drives select a drive.

6 Click Network to open the Map Network Drive dialog box.

7 Click Add to add a file or click Add All to add all of the files.

8 Click OK .

Rapid SQL adds the files to the project.

RAPID SQL 8.6/XE5 USER GUIDE 818

PROJECT SUPPORT

O PEN A F ILE FROM A P ROJECT

You can open a file directly from the Project Tab using a number of different methods.

For more information, see:

Working with Projects

Opening a File from a Project

O PENING A F ILE FROM A P ROJECT

To open a file from a project, do the following:

1 On the Project Tab , right-click the file(s) you want to open, and then click Open .

OR

On the Project Tab , double-click the file(s).

Rapid SQL opens the file(s) in a new SQL window.

For more information, see

Open a File from a Project .

S UBPROJECTS

Subprojects are projects within projects. you can use them to help categorize your source code files. On the Project Tab of the Database Explorer Rapid SQL lets you:

Create subprojects

.

Delete subprojects

.

Rename subprojects .

Sort subprojects .

For more information, see Working with Projects .

C REATING A N EW S UBPROJECT

Rapid SQL offers three ways to create a new subproject:

1 On the File menu click Open Project .

Rapid SQL opens the Open Project dialog box.

2 In File name , type the name and location of the project or use browse to locate the project.

NOTE: Project files are designated with a *.epj extension.

3 Click Open.

Rapid SQL opens the Project Tab containing the project.

819 RAPID SQL 8.6/XE5 USER GUIDE

PROJECT SUPPORT

4 On the Project menu, click New SubProject.

OR

On the Project toolbar, click New SubProject.

OR

On the Project Tab, right-click the project or subproject, and then click New SubProject.

5 Type the name of the new subproject and then press Enter.

For more information, see

Subprojects .

D ELETING A S UBPROJECT

To delete a project, do the following:

1 On the File menu click Open Project .

Rapid SQL opens the Open Project dialog box.

2 In File name , type the name and location of the project or use browse to locate the project.

NOTE: Project files are designated with a *.epj extension.

3 Click Open.

Rapid SQL opens the Project Tab containing the project.

4 On the Project Tab, right-click a subproject, and then click Delete.

OR

On the Project Tab, select a subproject, and then click Delete.

Rapid SQL opens the Confirm Delete dialog box.

5 In the Confirm Delete dialog box, select the Delete local copy to delete the local copy of the subproject, and then click OK.

Rapid SQL deletes the subproject.

For more information, see

Subprojects .

C ONFIRM D ELETE D IALOG B OX

The table below describes the options and functionality on the Confirm Delete Dialog Box:

Option

Delete local copy

Description

Deletes the local copy of the subproject.

For more information, see

Deleting a Subproject

.

RAPID SQL 8.6/XE5 USER GUIDE 820

PROJECT SUPPORT

R ENAMING A S UBPROJECT

To rename a subproject, do the following:

1 On the File menu click Open Project .

Rapid SQL opens the Open Project dialog box.

2 In File name , type the name and location of the project or use browse to locate the project.

NOTE: Project files are designated with a *.epj extension.

3 Click Open.

Rapid SQL opens the Project Tab containing the project.

4 On the Project Tab , right-click a subproject, and then click Rename .

5 Type the name of the new subproject and then press Enter.

Rapid SQL renames the subproject.

For more information, see

Subprojects .

S ORTING S UBPROJECTS

So sort a subproject, do the following:

1 On the File menu click Open Project .

Rapid SQL opens the Open Project dialog box.

2 In File name , type the name and location of the project or use browse to locate the project.

NOTE: Project files are designated with a *.epj extension.

3 Click Open.

Rapid SQL opens the Project Tab containing the project.

4 On the Project Tab , right-click the directory containing the subprojects you want to sort and then click Sort.

Rapid SQL sorts the subproject(s).

For more information, see

Subprojects .

P ROJECT P ROPERTIES

Rapid SQL lets you view properties of Projects, Subprojects and individual files in Projects or

Subprojects. The

Project Properties

, Subproject Properties , and File Properties

dialog boxes display information about the Projects, Subprojects, and files.

For more information, see

Working with Projects

.

821 RAPID SQL 8.6/XE5 USER GUIDE

PROJECT SUPPORT

V IEWING P ROJECT P ROPERTIES

To view project properties, do the following:

1 On the File menu click Open Project .

Rapid SQL opens the Open Project dialog box.

2 In File name , type the name and location of the project or use browse to locate the project.

NOTE: Project files are designated with a *.epj extension.

3 Click Open.

Rapid SQL opens the Project Tab containing the project.

4 On the Project menu, click Project Properties.

OR

On the Project Tab, right-click a project and then click Properties.

Rapid SQL opens the Project File Properties dialog box.

5 Complete the Project File Properties dialog box .

6 Click OK.

For more information, see:

Project Properties

Project File Properties Dialog Box

P ROJECT F ILE P ROPERTIES D IALOG B OX

The table below describes the options and functionality of the Project Properties dialog box:

Option

Name

Full Specification

Description

Associated Datasource

Associated Database

Description

Displays the name of the project.

Displays the project location.

Displays the project description.

OPTIONAL: Lets you type or edit the project description.

Lets you select a datasource for the project.

Lets you type the name of the database.

For more information, see

Viewing Project Properties .

RAPID SQL 8.6/XE5 USER GUIDE 822

PROJECT SUPPORT

V IEWING S UBPROJECT P ROPERTIES

To view subproject properties, do the following:

1 On the File menu click Open Project .

Rapid SQL opens the Open Project dialog box.

2 In File name , type the name and location of the project or use browse to locate the project.

NOTE: Project files are designated with a *.epj extension.

3 Click Open.

Rapid SQL opens the Project Tab containing the project.

4 On the Project Tab, select a subproject.

5 Right-click the subproject, and then click Properties.

Rapid SQL opens the Subproject Properties dialog box.

6 Complete the Subproject Properties dialog box .

7 Click OK.

For more information, see:

Project Properties

Subproject Properties Dialog Box

S UBPROJECT P ROPERTIES D IALOG B OX

The table below describes the options and functionality of the Subproject Properties dialog box:

Option

Name

Full Specification

Status

Description

Displays the name of the subproject. You can enter or edit the subproject name.

Displays the subproject location.

Displays the subproject status.

For more information, see

Viewing Subproject Properties .

V IEWING F ILE P ROPERTIES

To view file properties, do the following:

1 Click File and then Open Project.

Rapid SQL opens the Open Project dialog box.

2 Type the project name or select the project.

823 RAPID SQL 8.6/XE5 USER GUIDE

PROJECT SUPPORT

3 Click Open.

Rapid SQL opens the project on the Projects Tab.

4 On the Project Tab, select a file.

5 Right-click the file, and then click Properties.

Rapid SQL opens the File Properties dialog box.

6 Complete the File Properties dialog box .

7 Click OK.

For more information, see:

Project Properties

File Properties Dialog Box

F ILE P ROPERTIES D IALOG B OX

The table below describes the options and functionality of the File Properties dialog box:

Option

Name

Full Specification

Description

Include In Build

Last Modified

Size

Status

Object Type

Description

Displays the file name.

Displays the file location.

Displays the file description.

OPTIONAL: Type or edit the file description.

Sets the file to be included in the build.

Displays the date and time of the last modification.

Displays the file size.

Displays the file status.

Displays the file object type. Select an object type if the file is unspecified.

RAPID SQL 8.6/XE5 USER GUIDE 824

PROJECT SUPPORT

825 RAPID SQL 8.6/XE5 USER GUIDE

V

ERSION

C

ONTROL

Version control archives files and tracks changes to files over time. With an integrated version control in Rapid SQL, you can easily track changes to database objects.

Version control addresses the following issues:

• Team Development By controlling access to a file so that only one person at a time can modify, it prevents accidental replacement or loss of another user's changes.

• Version Tracking By archiving and tracking versions of source code files, you can to retrieve them if necessary, thereby effectively creating files so that source code can be reused.

• Safety By adding database object scripts and files, it creates backups in case of loss, thereby ensuring a recovered version of source code.

When you create a project, Rapid SQL lets you place the project immediately into version control. You can also add projects and files to version control later.

To use integrated version control in Rapid SQL, you must have the version control client software installed on the same computer as Rapid SQL. You must also select the appropriate version

control system during installation or after installation on the Version Control Tab of the Option

Editor .

Rapid SQL offers version control integration for the following version control systems:

• Rational ClearCase 5.0 and 6.0

• Merant/Intersolv PVCS Version Manager version 6.0

• Microsoft Visual SourceSafe 5.0 and 6.0

• MKS Source Integrity version 7.3c

For more information, see:

Version Control Integration

Version Control Configuration

Using Version Control

V ERSION C ONTROL I NTEGRATION

Rapid SQL offers version control integration so you can take advantage of the following version control systems:

• Rational ClearCase 5.0 and 6.0

• Merant Version Manager version 6.0 or later

• Microsoft Visual SourceSafe 5.0 and 6.0

• MKS Source Integrity version 7.3c

RAPID SQL 8.6/XE5 USER GUIDE 826

VERSION CONTROL

For more information, see:

Integrating with Merant Version Manager

Integrating with Microsoft Visual Source Safe

Integrating with MKS Source Integrity

I NTEGRATING WITH M ERANT V ERSION M ANAGER

Rapid SQL works with Merant Version Manager version 6.0. or later.

To integrate Merant Version Manager with Rapid SQL, do the following:

1 Install Merant Version Manager (formerly PVCS) 8.0.

2 In the setup option for the client, select IDE Client.

This installs the correct DLLs and registry entries, and "Merant Version Manager" appears in the Version Control Tab of the Options Editor.

NOTE: To use Rapid SQL with an existing Merant project, you must import the individual files into a native Rapid SQL project. Merant does not provide the third party API support for projects that it does for basic version control operations on archived files.

For more information, see

Version Control Integration .

I NTEGRATING WITH M ICROSOFT V ISUAL S OURCE S AFE

Rapid SQL works with Microsoft Visual SourceSafe versions 5.0. and 6.0. Rapid SQL uses your default Visual SourceSafe database unless you override the setting on the Version Control Tab of the Option Editor. This file is always called srcsafe.ini.

Troubleshooting

If you are having trouble configuring Rapid SQL to use Visual SourceSafe, check the system registry to determine that the COM automation portion of Visual SourceSafe has been properly installed. To check the registry, do the following:

1 From the Windows Start button, click Run and then type REGEDIT to view the system registry.

Windows opens the Registry Editor.

2 Click the HKEY_CLASSES_ROOT directory.

3 Click the SourceSafe key.

4 Ensure that the Key contains the subkeys CLSID and CurVer.

5 If either of these keys are missing, reinstall Visual SourceSafe.

827 RAPID SQL 8.6/XE5 USER GUIDE

VERSION CONTROL

For more information, see

Version Control Integration .

I NTEGRATING WITH MKS S OURCE I NTEGRITY

Rapid SQL works with MKS Source Integrity version 7.3c.

1 After installing MKS Source Integrity, install the MKS Source Integrity Extensions.

For more information, see

Version Control Integration .

V ERSION C ONTROL C ONFIGURATION

Rapid SQL lets you configure version control. You can add or remove entire projects or specific files to and from version control. The Version Control Tab of the Option Editor lets you configure version controls to your specific needs.

To use version control functions, you must have a version control system up and running on your system. You can integrate Rapid SQL with:

• Rational ClearCase 5.0 and 6.0

• Merant Version Manager version 6.0 or later

• Microsoft Visual SourceSafe 5.0 and 6.0

• MKS Source Integrity version 7.3c

Configuring Version Control During Installation

1 If you have version control installed on your machine, during the Rapid SQL installation, select the option for your version control system.

NOTE: If you select None, Rapid SQL does not support any version control functions in Rapid

SQL until you select a version control system from the application. See below.

Configuring Version Control After Installation

1 On the File menu, click Options .

Rapid SQL opens the Options Editor.

2 Select Version Control to open the Version Control Tab.

3 Select your version control system.

4 Click OK .

RAPID SQL 8.6/XE5 USER GUIDE 828

VERSION CONTROL

W ORKING WITH P ROJECTS IN V ERSION C ONTROL

Projects can exist independently of version control. You can add an entire project to version control at any point. When you decide to place a project under version control, Rapid SQL creates a project on the underlying version control system that has been specified.

Once a project or file has been added to version control, the features of your version control system are available directly from the Project Tab within Rapid SQL. Any changes you make to a project or file from within Rapid SQL are simultaneously changed in your version control system.

The table below describes the options and functionality on the Add to Version Control dialog box:

Option

Files to be added

Comment

Check out immediately

Store only latest

Remove local copy

Description

Lets you select files to add to Version Control.

OPTIONAL: Lets you add a comment.

Select to add file and keep it checked-out.

Select to add the latest version.

Select to add file and remove the local copy.

For more information, see:

Completing the Add to Version Control Dialog Box

C OMPLETING THE A DD TO V ERSION C ONTROL D IALOG B OX

To add a project to version, do the following:

1 Click File and then Open Project.

Rapid SQL opens the Open Project dialog box.

2 Type the project name or select the project.

3 Click Open.

Rapid SQL opens the project on the Projects Tab.

4 On the Project menu, click Version Control.

OR

On the Project Tab, right-click a project file.

Rapid SQL opens the Add to Version Control dialog box.

5 Click Add to Version Control.

6 Select options.

829 RAPID SQL 8.6/XE5 USER GUIDE

VERSION CONTROL

7 Click OK to add a project, and then click Create .

Rapid SQL adds the project to version control.

NOTE: Rapid SQL dims the project file icon to indicate that the project has been placed under version control.

For information on opening projects, see Working with Projects

.

W ORKING WITH F ILES IN V ERSION C ONTROL

Rapid SQL lets you view and work with files stored in various projects in a version control system without including the files in a Rapid SQL project. The Add Version Control Files dialog box lets you create a list of files in a version control system, select the version control project, and then add it and its files to the VC Files Tab .

The table below describes the options and functionality on the Add Version Control Files dialog box:

Option

Project

Browse

List Files

Description

Lets you type the version control project path.

Click to open Choose project from (version control name) dialog box.

Click to view the project's files in the Version control project files tree.

File Types Click to list the project's available files, filtered by file type.

Version control project files List the project available files.

NOTE: If the VC Files Tab is already open and contains files from the project previously selected in the Add Version Control

Files dialog box, only files not already in the VC Files Tab will be listed.

Add

Add All

Click to add selected file(s) to the Files being added to version control files list box.

Click to add all file(s) to the Files being added to version control files list box.

Displays the files that will appear on the VC Tab.

Files being added to version control files list

Remove

Check Out

Click to remove selected file from the Files being added to version control files list box.

Select to automatically check out the file from version control on the VC Files Tab.

Get Latest Version Select to automatically get latest version of the file from version control on the VC Files Tab.

For more information, see:

RAPID SQL 8.6/XE5 USER GUIDE 830

VERSION CONTROL

Completing the Add Version Control Files Dialog Box

C OMPLETING THE A DD V ERSION C ONTROL F ILES D IALOG B OX

To add files to version control, do the following:

1 Click File and then Open Version Control Files List.

Rapid SQL opens the version control system login dialog box.

2 Type login information.

Rapid SQL opens the Add Version Control Files dialog box.

3 In Project, type the project name, or click Browse to open the Choose project from (version control name) dialog box.

4 Select the project and click OK.

Rapid SQL displays the files in the Version control project files box.

5 Click File Types to list the project's available files, filtered by file type.

6 In List files of type select the type of files to list.

7 In the Version control project files box, select the target files and click Add or Add All to add the files to the version control files list.

8 In Options, select Check Out or Get Latest Version.

9 Click OK.

Rapid SQL opens the Check Out File or Get File dialog box.

10 In Comment, type a comment. If you select multiple files, the comment will apply to all the files.

11 In To, type the directory to place the file(s).

12 For SourceSafe, for advanced options, click Advanced.

13 Click OK.

Rapid SQL adds the files in the Files being added to version control files list box to the VC

Files Tab . If you selected the Check Out option, Rapid SQL opens the Check Out (Files) dialog box. If you selected the Get Latest Version option, Rapid SQL opens the Get from

Version Control dialog box.

U SING V ERSION C ONTROL

Once you add a project or file to version control, most functions found in the underlying version control system are available directly from the Rapid SQL interface, including the VC Files Tab .

Basic version control procedures include:

831 RAPID SQL 8.6/XE5 USER GUIDE

VERSION CONTROL

• Get Latest Version

• Check Out

• Check In

• Undo Check Out

• Open

• Show History

• Show Difference

• Version Control Properties

NOTE: Your Rapid SQL version control functionality depends on your underlying version control system. For more information on version control procedures, consult the documentation included with your version control system.

VC F ILES T AB

The VC Files Tab displays version control files listed in the *.evc (Embarcadero version control file.) The tab displays file icons indicating their current status, for example if they are checked out to the user logged in to the source control system. The files can be opened from this list, as well as operated on to manipulate their version control properties. For example, a file can be checked out or checked into the system from the VC File Tab.

The table below describes the VC Files Tab icons:

Icon

File

File with single red check mark

File with a single black check mark

File with a single red check mark and a red border

File with a single black check mark and a red border

File with two red check marks

File with two black check marks

Description

File is not checked out by anyone.

File is checked out non-exclusively and only by the user logged into source control.

File is checked out non-exclusively only by a one user who is not the user logged into source control.

File is checked out exclusively and only by the user logged in to source control.

File is checked out exclusively and only by a user who is not the user logged in to source control.

File is checked out by multiple users, including the user logged in to source control.

File is checked out by multiple users, not including the user logged in to source control.

For more information, see:

VC Files Tab Available Functionality

RAPID SQL 8.6/XE5 USER GUIDE 832

VERSION CONTROL

Opening the VC Files Tab

Closing the VC Files Tab

VC F ILES T AB A VAILABLE F UNCTIONALITY

Once the files are on the list in the VC Files Tab, you can use the various version control functionalities.

At the VC Files level, Rapid SQL lets you:

• Add Files

• Sort

• Get Latest Version

• Check Out

• Check In

• Undo Checkout

• Remove from Version Control

• Expand All

• Collapse All

• Refresh

• Close Files List

At the Project level, Rapid SQL lets you:

• Add Files

• Delete

• Sort

• Get Latest Version

• Check Out

• Check In

• Undo Checkout

• Remove from Version Control

• Expand All

• Collapse All

• Refresh

833 RAPID SQL 8.6/XE5 USER GUIDE

• Close Files List

At the Directory (file type) level, Rapid SQL lets you:

• Add Files

• Delete

• Sort

• Get Latest Version

• Check Out

• Check In

• Undo Checkout

• Remove from Version Control

• Expand All

• Collapse All

• Refresh

• Close Files List

At the File level, Rapid SQL lets you:

• Open

• Delete

• Get Latest Version

• Check Out

• Check In

• Undo Checkout

• Show History

• Show Differences

• Remove from Version Control

• Version Control Properties

• Refresh

• Close Files List

For more information, see:

Opening the VC Files Tab

Closing the VC Files Tab

RAPID SQL 8.6/XE5 USER GUIDE

VERSION CONTROL

834

VERSION CONTROL

Working with Files in Version Control

O PENING THE VC F ILES T AB

1 Select File, Open Version Control File List.

If you have files on your version control list, Rapid SQL opens the VC Files Tab. If you do not have files on your version control list, Rapid SQL opend the Add Version Control Files dialog box.

For more information, see:

Working with Files in Version Control

Closing the VC Files Tab

C LOSING THE VC F ILES T AB

1 Select File, Close Version Control File List.

Rapid SQL closes the VC Files Tab.

For more information, see:

Working with Files in Version Control

Opening the VC Files Tab

V ERSION C ONTROL F UNCTIONALITY - O PEN

The Open functionality opens the selected file(s) with the application registered for the type(s) of the selected file(s).

For more information, see Working with Files in Version Control .

V ERSION C ONTROL F UNCTIONALITY - D ELETE

The Delete functionality deletes the local copy of the selected item from the tree. To remove a file from version control, see Remove From Version Control .

For more information, see Working with Files in Version Control .

V ERSION C ONTROL F UNCTIONALITY - S ORT

The Sort functionality sorts the tree items alphabetically.

For more information, see Working with Files in Version Control .

835 RAPID SQL 8.6/XE5 USER GUIDE

VERSION CONTROL

V ERSION C ONTROL F UNCTIONALITY - G ET L ATEST V ERSION

The Get Latest Version functionality lets you access the latest version of a file for viewing only.

The Get functionality creates a local copy of the most current version of a project file in your working folder. The file is read-only, so any modifications cannot be saved.

Before working with a project, you should perform a Get on the entire project to ensure that you are working with the latest copy of the project. You should also perform a project-level, recursive

Get at intervals to ensure that you have the latest version of files, in the event that they have been altered by others working on the same project.

The following table describes the option and functionality on the Get from Version Control dialog box:

Option

Files to Get

Advanced

Description

Lets you select file(s) to get latest version of.

Click to open the Advanced Get Options dialog box.

TIP: You can specify the file directory in the Version Control option of the Options Editor.

For details, see Version Control Options

.

Getting Latest Version of a Project

To get the latest version of project, do the following:

1 Click File and then Open Project.

Rapid SQL opens the Open Project dialog box.

2 Type the project name or select the project.

3 Click Open.

Rapid SQL opens the project on the Projects Tab.

4 Click the project or target files.

5 On the Project menu, click Version Control.

OR

On the Project toolbar, click Version Control.

OR

On the Project Tab, right-click a project or file.

Rapid SQL opens the Get From Version Control dialog box.

6 Click Get Latest Version .

Rapid SQL opens the Get From Version Control dialog box.

7 In the Files to Get box, click the project or files.

RAPID SQL 8.6/XE5 USER GUIDE 836

VERSION CONTROL

8 For advanced options, click Advanced.

9 Click OK .

Rapid SQL writes the most current version of the file to your working directory.

Getting Latest Version of a File

To get the latest version of a file, do the following:

1 On the VC Tab, right-click the target file(s) and select Get Latest Version.

Rapid SQL opens the Get From Version Control dialog box.

2 Click Get Latest Version .

Rapid SQL opens the Get From Version Control dialog box.

3 In the Files to Get box, select the file(s).

4 For advanced options, click Advanced.

5 Click OK .

Rapid SQL writes the most current version of the file to the VC Tab.

For more information, see

Using Version Control .

V ERSION C ONTROL F UNCTIONALITY - C HECK O UT

The Check Out functionality retrieves a copy of one or more selected files and creates a writable working file copy in the working directory. You must perform a Check Out to edit any file that has been placed under version control.

You can check out a single file, multiple files at once or an entire project. Rapid SQL displays a red check mark over the file icon to indicate that the file has been checked out and is writable.

This does not prevent other users from performing a Get or a Check Out on the file unless you are using the exclusive Check Out feature found in MKS Source Integrity and Merant/Intersolv

PVCS.

The following table describes the options and functionality on the Check Out File(s) dialog box:

Option

Files to be Checked Out

Advanced

Description

Displays list of files that are eligible for check out. A black mark indicates that another user has the file(s) checked out.

Click to open the Advanced Check Out Options dialog box.

TIP: You can specify the file directory in the Version Control Working Directory option of the

Options Editor. For details, see

Version Control Options .

837 RAPID SQL 8.6/XE5 USER GUIDE

Checking Out a Project

To check-out a project, do the following:

1 Click File and then Open Project.

Rapid SQL opens the Open Project dialog box.

2 Type the project name or select the project.

3 Click Open.

Rapid SQL opens the project on the Projects Tab.

4 Select the target project.

5 On the Project menu, click Version Control.

OR

On the Project toolbar, click Check Out.

OR

On the Project Tab, right-click a project.

6 Select Check Out .

Rapid SQL opens the Check Out dialog box.

7 In the Files to Be Checked Out box select the project.

8 For advanced options, click Advanced.

9 Click OK .

Rapid SQL checks out the project or files from version control and writes the most current version of the file to your working directory.

Check Out a File

To check out a file, do the following:

1 On the VC Tab, right-click the target file(s) and select Check Out.

Rapid SQL opens the Check Out File(s) dialog box.

2 In the Check Out File(s) dialog box select the files.

3 For advanced options, click Advanced.

4 Click OK .

Rapid SQL checks out the file(s) from version control and writes the most current version of the file to the VC Tab.

For more information, see

Using Version Control .

RAPID SQL 8.6/XE5 USER GUIDE 838

VERSION CONTROL

V ERSION C ONTROL F UNCTIONALITY - C HECK I N

After editing your files, you must Check In the revised file in order save the changes you made to the file in a project. The Check In functionality stores the new version of the updated file in the current project. The Check In functionality is only available if you have Checked Out a file. You have the option to Check In an entire project or individual files.

TIP: You can specify the file directory in the Version Control Working Directory option of the

Options Editor. For details, see

Version Control Options .

The table below describes the options and functionality on the Check In dialog box:

Option

Files to be checked in

Keep checked out

Comment

Description

Lets you specify the file(s) to check in.

Adds latest version(s) of file(s) to source control but keeps the file(s) checked out.

OPTIONAL: Lets you type an optional comment.

Checking In a Project

To check-in a project, do the following:

1 Click File and then Open Project.

Rapid SQL opens the Open Project dialog box.

2 Type the project name or select the project.

3 Click Open.

Rapid SQL opens the project on the Projects Tab.

4 On the Project menu, click Version Control, and then Check In.

OR

On the Version Control toolbar, click Check In.

OR

On the Project Tab, right-click a project or file, and then Check In.

Rapid SQL opens the Check In dialog box.

5 In the Files to Be Checked In box click the project or files.

6 To update the version control copy but keep the project or files checked out so that you can continue working, select the Keep Checked Out check box.

7 To remove the file from the working directory and from the *.xml file, and from the VC Files

Tab, select Remove Local Copy.

8 OPTIONAL: In the Comment text box type a description of the changes.

839 RAPID SQL 8.6/XE5 USER GUIDE

VERSION CONTROL

9 Click OK .

Rapid SQL saves the modified project into version control.

Check In a File

To check in a file, do the following:

1 On the VC Tab, right-click the target file(s) and select Check In.

Rapid SQL opens the Check In File(s) dialog box.

2 In the Check In File(s) dialog box select the files.

3 To update the version control copy but keep the files checked out so that you can continue working, select the Keep Checked Out check box.

4 To remove the file from the working directory and from the *.evc file, and from the VC Files

Tab, select Remove Local Copy.

5 OPTIONAL: In the Comment text box type a description of the changes.

6 Click OK .

Rapid SQL saves the modified file(s) into version control.

For more information, see

Using Version Control .

V ERSION C ONTROL F UNCTIONALITY - U NDO C HECK O UT

If you decide that you do not want to save any revisions you have made to a checked out file, you can undo the procedure that releases the lock placed on the project or file. However, you do not have the option of deleting the local copy of the file.

TIP: You can specify the file directory in the Version Control Working Directory option of the

Options Editor. For details, see

Version Control Options .

The table below describes the options and functionality on the Undo Check Out dialog box.

Option

Cancel the checkout for the following files

Advanced

Description

Lets you specify the files to undo checkout.

Opens the Undo Check Out Advanced Options dialog box that lets you leave, replace, or apply the default action to your local copy.

RAPID SQL 8.6/XE5 USER GUIDE 840

VERSION CONTROL

Undoing Checkout for a Project

To undo a checkout, do the following:

1 Click File and then Open Project.

Rapid SQL opens the Open Project dialog box.

2 Type the project name or select the project.

3 Click Open.

Rapid SQL opens the project on the Projects Tab.

4 Click the project.

5 On the Project menu, click Version Control.

OR

On the Project toolbar, click Undo Check Out.

OR

On the Project Tab, right-click a project or file.

6 Click Undo Check Out .

Rapid SQL opens the Undo Check Out dialog box.

7 In the Cancel the check out for the following files box of the Undo Check Out dialog box, click the project.

8 Click OK .

Rapid SQL undoes the check out the project from version control.

NOTE: If you Undo Check Out, you lose any changes you have made to the local copy of your project.

Undoing Checkout for a File

To undo checkout for a file, do the following:

1 On the VC Tab, right-click the target file(s) and select Undo Checkout.

Rapid SQL opens the Undo Checkout dialog box.

2 In the Cancel the check out for the following files box of the Undo Check Out dialog box, click the project.

3 Click OK .

Rapid SQL undoes the check out the file from version control.

NOTE: If you Undo Check Out, you lose any changes you have made to the local copy of your file(s).

841 RAPID SQL 8.6/XE5 USER GUIDE

For more information, see

Using Version Control .

V ERSION C ONTROL F UNCTIONALITY - S HOW H ISTORY

The Show History functionality lets you view the history of version control files.

Showing History for a Project

To show history, do the following:

1 Click File and then Open Project.

Rapid SQL opens the Open Project dialog box.

2 Type the project name or select the project.

3 Click Open.

Rapid SQL opens the project on the Projects Tab.

4 Click the target file.

5 On the Project menu, click Version Control, and then select Show History.

OR

On the Project Tab, right-click the a file, and then select Show History.

Rapid SQL opens the History Options dialog box.

NOTE: The History dialog box depends on your version control system.

Showing History for a File

To show history, do the following:

1 On the VC Tab, right-click the target file(s) and select Show History.

Rapid SQL opens the History Options dialog box.

NOTE: The History dialog box depends on your version control system.

For more information, see

Using Version Control .

VERSION CONTROL

V ERSION C ONTROL F UNCTIONALITY - S HOW D IFFERENCES

The Show Differences functionality lets you view any differences between the current files in your working folder and the master files in the version control database. You cannot make changes to the files from this dialog box because it is used for display purposes only.

RAPID SQL 8.6/XE5 USER GUIDE 842

VERSION CONTROL

Viewing Project Differences

To view project differences, do the following:

1 Click File and then Open Project.

Rapid SQL opens the Open Project dialog box.

2 Type the project name or select the project.

3 Click Open.

Rapid SQL opens the project on the Projects Tab.

4 Click the target file.

5 On the Project menu, click Version Control.

OR

On the Project Tab, right-click a file.

6 Click Show Differences .

Rapid SQL opens the Differences dialog box.

If the file in your working directory is the same as the one in the project, a message tells you they are identical. If there are differences, the Differences dialog box from your version control system opens and displays the two versions of the file side-by-side, highlighting any differences.

7 In the Differences dialog box, you can maneuver through the files by using the Up and Down arrows.

8 To set Diff Options , click the Options button.

NOTE: The Differences dialog box and Options depend on your version control system.

Showing History for a File

To show history, do the following:

1 On the VC Tab, right-click the target file(s) and select Show History.

Rapid SQL opens the Difference Options dialog box.

2 In the Difference Options dialog box, you can maneuver through the files by using the Up and Down arrows.

NOTE: The Difference Options dialog box and options depend on your version control system.

For more information, see

Using Version Control .

843 RAPID SQL 8.6/XE5 USER GUIDE

VERSION CONTROL

V ERSION C ONTROL F UNCTIONALITY - R EMOVE FROM V ERSION C ONTROL

The Remove from Version Control functionality lets you remove entire projects or files from version control.

NOTE: This functionality does not destroy the file permanently from the source control system or remove the local copies of the file(s).

Removing a Project from Version Control

To remove a project from Version Control, do the following:

1 Click File and then Open Project.

Rapid SQL opens the Open Project dialog box.

2 Type the project name or select the project.

3 Click Open.

Rapid SQL opens the project on the Projects Tab.

4 On the Project menu, click Version Control, and then click Remove from Version Control.

OR

On the Project Tab, right-click a project file, and then click Remove from Version Control.

Rapid SQL opens the Remove File(s) dialog box.

5 To permanently destroy the project select the check box, click OK .

Rapid SQL removes the project from version control. The project remains active in Rapid

SQL.

Removing a File from Version Control

The table below describes the options and functionality of the Remove Files dialog box:

Option

Files to be removed

Description

Lets you specify the files to be removed from version control.

NOTE: Does not delete the file(s) in version control.

To remove a file from Version Control, do the following:

1 On the VC Tab, right-click the target file(s) and select Remove from Version Control.

Rapid SQL opens the Remove File(s) dialog box.

2 Specify the file(s).

3 Click OK .

Rapid SQL removes the file(s) from version control. The project remains active in Rapid SQL.

RAPID SQL 8.6/XE5 USER GUIDE 844

VERSION CONTROL

For more information, see Working with Files in Version Control .

V ERSION C ONTROL P ROPERTIES

The Version Control File Properties dialog box displays general information and check out status, links, and paths.

Viewing Version Control Properties for a Project

To view the version control properties, do the following:

1 Click File and then Open Project.

Rapid SQL opens the Open Project dialog box.

2 Type the project name or select the project.

3 Click Open.

Rapid SQL opens the project on the Projects Tab.

4 Click the target file.

5 On the Project menu, click Version Control, and then Version Control Properties.

OR

On the Project Tab, right-click the a file, and then select Version Control Properties.

Rapid SQL opens the Version Control Properties dialog box.

6 Review properties.

7 Click Close.

Viewing Version Control Properties for a File

To view the version control properties, do the following:

1 On the VC Tab, right-click the target file(s) and select Version Control Properties.

Rapid SQL opens the Version Control Properties dialog box.

2 Review properties.

3 Click Close.

For more information, see

Using Version Control .

V ERSION C ONTROL F UNCTIONALITY - E XPAND A LL

The Expand All functionality expands all tree items under the selected item(s).

845 RAPID SQL 8.6/XE5 USER GUIDE

VERSION CONTROL

For more information, see Working with Files in Version Control .

V ERSION C ONTROL F UNCTIONALITY - C OLLAPSE A LL

The Collapse All functionality collapses all tree items under a selected item(s).

For more information, see Working with Files in Version Control .

V ERSION C ONTROL F UNCTIONALITY - R EFRESH

The Refresh functionality obtains the current version control status for the file(s).

For more information, see Working with Files in Version Control .

V ERSION C ONTROL F UNCTIONALITY - C LOSE F ILES L IST

The Close Files List functionality closes the list of files.

For more information, see Working with Files in Version Control .

RAPID SQL 8.6/XE5 USER GUIDE 846

VERSION CONTROL

847 RAPID SQL 8.6/XE5 USER GUIDE

T

OOLS

Rapid SQL incorporates a number of powerful tools to help you create, edit and manage your development environment. You can use Tools to:

• Conduct extensive database searches across multiple databases.

• Execute scripts or files across multiple databases.

• Schedule tasks.

• Identify differences in files or objects.

• Graphically build complex queries.

• Auto-generate complete procedures and packages.

• Code and test basic macros.

• Administer your ODBC data sources.

Tools is divided into sections. The table below describes each section:

Section

Find in Files

Database Search

Script Execution Facility

File Execution Facility

Scheduling

Visual Difference

Query Builder

Description

This section describes the Find in Files dialog box that lets you find a phrase or character in your files.

This section describes the powerful database search utility that helps you to find instances of a string across multiple databases.

This section describes the Rapid SQL Script Execution Facility, a stand-alone utility that establishes multiple threads and database connections letting you simultaneously execute SQL statements against multiple Oracle, Sybase Adaptive Server,

Microsoft SQL Server, and IBM DB2 LUW for Open Systems datasources.

This section describes the Rapid SQL File Execution Facility, a stand-alone utility that establishes multiple threads and database connections that lets you execute parallel queries and ANSI SQL files against multiple, cross-platform datasources.

The Rapid SQL scheduling programs and utilities let you schedule and execute jobs on local datasources anytime.

Rapid SQL lets you compare two files or database objects.

Using the Visual Difference Utility, you can easily synchronize and analyze database objects or files across multiple database platforms.

This section describes Query Builder, a tool that lets you construct, structure, and manipulate up to five different types of queries simultaneously.

RAPID SQL 8.6/XE5 USER GUIDE 848

FIND IN FILES

Section

Data Editor

Code Generation Facility

Import Data

Embarcadero Products

Code Workbench

Description

This section describes the Data Editor to edit your tables in real-time. The Data Editor supports all editable datatypes and is an alternative way to add, edit, or delete data from your tables.

This section describes the Code Generation Facility that offers a quick way to generate DML statements for tables and views.

This section describes the Import Data Wizard that lets you create insert statements based on external files including Excel spreadsheets and text files.

The Tools menu lists all installed Embarcadero Technologies products. This lets you toggle to or start another Embarcadero product.

This section describes the Code Workbench that lets you enable table column look-up and population in the ISQL window, define auto replacement expressions that can be used to quickly insert commonly used blocks of SQL syntax or commands in any open window and to import and export

Code Workbench specific settings for client sharing purposes.

F

IND IN

F

ILES

The Find in Files dialog box lets you find a phrase or character in your files.

Completing the Find in Files Dialog Box

1 On the Tools menu, click Find in Files.

OR

On the Tools toolbar, click Find in Files.

Rapid SQL opens the Find in Files dialog box.

849 RAPID SQL 8.6/XE5 USER GUIDE

DATABASE SEARCH

The table below describes the options and functionality on the Find in Files dialog box.:

Option

Find what

In files/file types

In folder

Match whole word only

Match case

Regular Expression

Look in subfolders

Output to Pane 2

Description

Specifies the character(s) or phrase you want to find. Use the browse arrow button next to the textbox to choose options from a pop-up list.

Specifies the files in which to search for the character(s) or phrase.

Either enter the filename(s) in the drop-down box, or click the arrow to choose a file type.

Specifies the directory where the file(s) is located. Click the browse button to view your Windows Explorer.

Specifies the application to find only the entire phrase.

Specifies the application to find only the specified phrase in the case you have entered.

Tells the application whether the specified character(s) is a regular expression.

Specifies the application to search the file(s) any folders located within the specified folder.

Specifies the application to display the results in another window.

NOTE: You can also use the Find feature to locate a phrase or character in an ISQL window.

D

ATABASE

S

EARCH

The powerful

database search utility helps you to find instances of a string across multiple

databases.

Starting the Database Search Wizard

1 On the Tools menu, click Database Search.

OR

On the Tools toolbar, click Database Search.

Rapid SQL opens the first panel of the Database Search Wizard .

D ATABASE S EARCH W IZARD - P ANEL 1

The first panel of the Database Search Wizard lets you specify the owner.

RAPID SQL 8.6/XE5 USER GUIDE 850

DATABASE SEARCH

The table below describes the options and functionality on the first panel of the Database

Search Wizard:

Option

Select the owner(s) whose objects you would like to search

Description

Lets you expand the nodes, select the target owner, and then click the right arrow button to include the target owner.

1 Click Next.

Rapid SQL opens the next panel of the wizard.

D ATABASE S EARCH W IZARD - P ANEL 2

The second panel of the Database Search Wizard lets you specify the search criteria.

The table below describes the options and functionality on the second panel of the Database

Search Wizard:

Option

Search Database For

Match Case

Search DDL of these

Objects

Description

Lets you enter the search string.

Strings can also be searched for using DB2-standard wildcards.

And for multiple string searches, separate each string with a vertical bar (for example, DEPARTMENTS|wage_cap|status).

When searching for strings that already contain vertical bars, enclose each string in double quotation marks.

Select Yes tot make the search case sensitive.

NOTE: IBM DB2 LUW for OS/390 and Microsoft SQL Server 7.0 or before searches are always case insensitive.

In the grid, select the target object check boxes.

NOTE: Event Monitors are available for IBM DB2 LUW for Linux,

Unix, and Windows only.

1 Click Execute to start the operation.

Rapid SQL displays a progress dialog box while the search runs. When the search completes, Rapid SQL opens the

Database Search Window .

D ATABASE S EARCH R ESULTS

Rapid SQL displays Database Search operation results in a Database Search Window, listing all of the objects containing the search string in the left pane. You can browse instances of the search string by selecting different objects in the tree. The DDL of the objects displays in the right pane and the search string is highlighted.

851 RAPID SQL 8.6/XE5 USER GUIDE

SCRIPT EXECUTION FACILITY

The table below describes the buttons on the Database Search Window toolbar:

Button

Search

Criteria

Open

Extract

Print

Description

Opens the first panel of the

Database Search Wizard .

Opens the Search Criteria dialog box.

Opens the editor for the target object.

Lets you extract the target object.

Lets you print the target object SQL.

S

CRIPT

E

XECUTION

F

ACILITY

Rapid SQL’s Script Execution Facility is a stand-alone utility that establishes multiple threads and database connections letting you simultaneously execute SQL statements against multiple

Oracle, Sybase Adaptive Server, Microsoft SQL Server, and IBM DB2 LUW for Linux, Unix, and

Windows datasources. After completing a scheduled job, Rapid SQL generates a results report that lists errors, verifies script execution, and details the output of the job. The Script Execution

Facility also works in conjunction with Rapid SQL’s scheduling facilities, letting you schedule script execution jobs. When used in conjunction with a scheduler, Rapid SQL can automatically send the results report to any e-mail or network recipients. The Script Execution Facility is a tabbed dialog box where you set the parameters and options for the script execution. In the

Script Execution Facility dialog box you can:

• Type or paste the target SQL script.

• Specify the datasources against which to execute the script.

• Specify the output mode for the results report.

• Open one of the Rapid SQL scheduling programs to schedule the script execution.

• Specify execution notification e-mail and Net Send addresses.

For more information, see

Completing the Script/File Execution Facility .

F

ILE

E

XECUTION

F

ACILITY

Rapid SQL’s File Execution Facility is a stand-alone utility that establishes multiple threads and database connections that lets you execute parallel queries and ANSI SQL files against multiple, cross-platform datasources. The Script Execution Facility also works in conjunction with Rapid

SQL’s scheduling facilities, letting you schedule script execution jobs. After completing a scheduled job, Rapid SQL generates a results report that lists errors, verifies execution, and details the output of the job. When used in conjunction with a scheduler, Rapid SQL can automatically send the results report to any e-mail or network recipients. The File Execution

Facility is a tabbed dialog box where you set the parameters and options for the file execution.

In the File Execution Facility dialog box you can:

RAPID SQL 8.6/XE5 USER GUIDE 852

FILE EXECUTION FACILITY

• Specify the target files or ANSI SQL scripts.

• Specify the datasources against which to execute the files.

• Specify the output mode for the results report.

• Open one of the Rapid SQL scheduling programs to schedule the file execution.

• Specify execution notification e-mail and Net Send addresses.

For more information, see

Completing the Script/File Execution Facility .

C OMPLETING THE S CRIPT /F ILE E XECUTION F ACILITY

Rapid SQL lets you run parallel queries against multiple datasources with the File Execution

Facility.

1 On the Tools menu, click Script Execution Facility or File Execution Facility.

OR

On the Tools toolbar, click Script Execution Facility or File Execution Facility .

Rapid SQL opens the Script or File Execution Facility dialog box.

2 Complete the Script

Tab ( Script Execution Facility

)

3 Complete the Files

Tab ( File Execution Facility )

4 Complete the Target

Tab.

5 Complete the Output Tab.

6 Complete the Notify Tab.

For more information, see:

File Execution Facility

Script Execution Facility

S CRIPT E XECUTION F ACILITY - S CRIPT T AB

The table below describes the options and functionality on the Script Tab of the File/Script

Execution Facility:

Option

Script box

Description

Lets you type or paste a script.

For more information, see:

File Execution Facility

853 RAPID SQL 8.6/XE5 USER GUIDE

FILE EXECUTION FACILITY

Script Execution Facility

Completing the Script/File Execution Facility

F ILE E XECUTION F ACILITY - F ILES T AB

The table below describes the options and functionality on the Files Tab of the File Execution

Facility:

Option

Show Full File Paths

File Name

Add

Remove

View

Up

Down

Description

Select to display the full path. Deselect to display only the file name.

Displays the file names.

Click to open the Select Files dialog box.

Click to remove the selected file.

Opens the View File dialog box.

Click to move the selected file up in the list.

Click to move the selected file down in the list.

For more information, see:

File Execution Facility

Script Execution Facility

Completing the Script/File Execution Facility

F ILE /S CRIPT E XECUTION F ACILITY - T ARGET T AB

The table below describes the options and functionality on the Target Tab of the File/Script

Execution Facility:

Option

Select the Target

Datasource(s) to Execute the Script Against

Datasource grid

Description

Only Connected Datasources - Displays only datasources that are currently connected in the Datasource grid.

All DBMS Types - Displays all DBMS types in the Datasource grid.

Displays the target datasource(s) to execute the script/file against. Select a datasource name. If the datasource has multiple databases, type in a database in the Database box.

For more information, see:

File Execution Facility

Script Execution Facility

RAPID SQL 8.6/XE5 USER GUIDE 854

FILE EXECUTION FACILITY

Completing the Script/File Execution Facility

F ILE /S CRIPT E XECUTION F ACILITY - O UTPUT T AB

The table below describes the options and functionality on the Output Tab of the File/Script

Execution Facility:

Option

Graphical Output

File Output

Description

If selected, specifies a graphical output.

If selected, specifies a file output.

Directory - Type or browse to enter the full path and directory name in which you want to place the output file.

File Type - Specifies a file type.

Include column titles when saving - If selected, lets you save column titles.

Open files with registered applications - If selected, opens files with registered applications.

For more information, see:

File Execution Facility

Script Execution Facility

Completing the Script/File Execution Facility

F ILE /S CRIPT E XECUTION F ACILITY - N OTIFY T AB

The table below describes the options and functionality on the Notify Tab of the File/Script

Execution Facility:

Option

Job Description

E-mail address

Net Send User Names

Description

Lets you enter a job description. This description will be the subject of the notification E-mail.

Lets you enter E-mail addresses. Separate each E-mail address with a semicolon (;).

Lets you enter net send user names. Separate each name with a semicolon (;).

For more information, see:

File Execution Facility

Script Execution Facility

Completing the Script/File Execution Facility

855 RAPID SQL 8.6/XE5 USER GUIDE

SCHEDULING

S

CHEDULING

The Rapid SQL scheduling programs and utilities let database administrators schedule and execute jobs on local datasources 24-hours-a-day, 7-days-a-week.

Rapid SQL offers the following programs and utilities to let you schedule routine tasks and jobs:

• Microsoft Task Scheduler

• ETSQLX Command Line Utility

M ICROSOFT T ASK S CHEDULER

Rapid SQL lets you use the Microsoft Task Scheduler to schedule jobs. The Microsoft Task

Scheduler is included with various Microsoft applications. If you do not have this program on your system, the first time you attempt to schedule a job, Rapid SQL provides you with a link to the Microsoft Web site where you can download the Microsoft Task Scheduler at no cost.

NOTE: Rapid SQL’s ETSQLX command line utility runs a scheduled job even if Rapid SQL is not running. For more information, see

ETSQLX Command Line Utility .

To open the Microsoft Job Scheduler from within Rapid SQL

1 On the Tools menu, click Scheduler .

2 Use the associated online Help for assistance with using this Microsoft utility.

ETSQLX C OMMAND L INE U TILITY

Rapid SQL’s ETSQLX command line utility, is a multi threaded, cross-platform, SQL scripting engine. You can use ETSQLX in conjunction with the Microsoft Task Scheduler to schedule and automate routine jobs. ETSQLX creates batch files (with the extension.cfg) containing commands to execute automated and scheduled jobs. ETSQLX creates a directory, CFG, in which it stores the.cfg files. You can run.cfg files directly from the command line.

NOTE: ETSQLX supports.csv,.tab,.htm, and.html formats for result reports attachments.

RAPID SQL 8.6/XE5 USER GUIDE 856

V ISUAL DIFFERENCE

V

ISUAL

D

IFFERENCE

Rapid SQL lets you compare two files or database objects. Using the Visual Difference dialog box, you can easily synchronize and analyze database objects or files across multiple database platforms. The files are displayed side by side in the Visual Difference dialog box. The Visual

Difference Utility highlights any differences between two files. Viewing differences between objects and files helps you negotiate between the different phases of development as well as providing a visual aid to rapidly changing and evolving production environments.

NOTE: Because contents of the Visual Difference dialog box are read-only, you will not be able to modify your files or objects directly from this dialog box.

The Visual Difference dialog box is composed of two panes; the left pane displays your source object or file and the right pane shows your target object or file. The Visual Difference dialog box also contains its own toolbar which lets you:

• Search

• Navigate differences

• Set options

• Print

Opening the Visual Difference Dialog Box

1 On the Tools menu, click Visual Diff.

OR

On the Tools toolbar, click Visual Diff.

Rapid SQL opens the Visual Difference dialog box.

For more information, see:

Comparing Files

Comparing Database Objects

Navigating in the Visual Difference Dialog Box

Printing a Pane of the Visual Difference Dialog Box

Searching in the Visual Difference Dialog Box

Setting Options in the Visual Difference Dialog Box

C OMPARING F ILES

You can compare two files side-by-side in the Visual Difference dialog box. The file you want to compare is called the Source. The file you want to compare the first file to is the Target.

857 RAPID SQL 8.6/XE5 USER GUIDE

V ISUAL DIFFERENCE

Comparing Items

1 On the Tools menu, click Visual Diff.

OR

On the Tools toolbar, click Visual Diff.

Rapid SQL opens the Visual Difference dialog box.

2 On the Visual Difference toolbar, click the Source icon or click the Down arrow next to the

Source icon and then click File.

Rapid SQL opens the Select the 1st File to Compare dialog box.

3 Click the file that you want to be the Source file.

4 On the Visual Difference toolbar, click the Target icon or click the Down arrow next to the

Target icon and then click File .

Rapid SQL opens the Select the 2nd File to Compare dialog box.

NOTE: The Visual Difference Utility highlights all differences between the two files.

For more information, see

Visual Difference Utility .

C OMPARING D ATABASE O BJECTS

The schema of database objects is automatically extracted so you can view the underlying differences between object and perform a side-by-side comparison in the Visual Difference

Dialog.

Comparing Database Objects

1 On the Tools menu, click Visual Diff.

OR

On the Tools toolbar, click Visual Diff.

Rapid SQL opens the Visual Difference dialog box.

2 On the Visual Difference toolbar, click the Down arrow next to the Source icon and then click

Database Object.

Rapid SQL opens the Select the 1st Database Object to Compare dialog box.

3 Click the datasource and then click OK to connect.

4 Navigate through the datasource tree and double-click the database object that you want to be the Source .

RAPID SQL 8.6/XE5 USER GUIDE 858

V ISUAL DIFFERENCE

5 On the Visual Difference toolbar, click the Down arrow next to the Target icon and then click

Database Object.

Rapid SQL opens the Select the 2nd Database Object to Compare dialog box.

NOTE: The Visual Difference Utility highlights all differences between the two database objects.

For more information, see

Visual Difference Utility .

N AVIGATING IN THE V ISUAL D IFFERENCE D IALOG B OX

You can navigate through the Visual Difference dialog box using the up and down arrow buttons.

You can move back and forth between highlighted differences in your compared files or database objects.

Going To the Next Difference

1 From the Visual Difference dialog box, click down arrow to go to the next difference.

Going To the Previous Difference

1 From the Visual Difference dialog box, click up arrow to go to the next difference.

For more information, see

Visual Difference Utility .

P RINTING A P ANE OF THE V ISUAL D IFFERENCE D IALOG B OX

You can print each pane of the Visual Difference dialog box.

Printing a Pane of the Visual Difference Dialog Box

1 Position your cursor inside the pane you want to print.

2 Click the Print icon on the Visual Difference toolbar.

Rapid SQL opens the Print Setup dialog box.

3 Click OK to print the pane.

NOTE: You can only print one pane of the Visual Difference dialog box at a time.

For more information, see

Visual Difference Utility .

S EARCHING IN THE V ISUAL D IFFERENCE D IALOG B OX

The Visual Difference dialog box lets you search for text in your files or database objects.

859 RAPID SQL 8.6/XE5 USER GUIDE

Searching for Text

1 Place your cursor inside the pane you want to search.

2 Click the Find icon on the Visual Difference toolbar.

Rapid SQL opens the Find dialog box.

3 In the Find What box, enter the search string.

4 To match whole words only, select the Match whole word only check box.

5 To make the search case sensitive, select the Match case check box.

6 Click Find Next to find the next occurrence of your search string. You can also click the Find

Next icon on the Visual Difference toolbar to search for the next occurrence at a later time.

For more information, see

Visual Difference Utility .

S ETTING O PTIONS IN THE V ISUAL D IFFERENCE D IALOG B OX

The Visual Difference dialog box lets you set display and comparison options to help you customize the dialog box to view differences in a comprehensive manner.

Setting Options

1 Click the Options icon on the Visual Difference toolbar.

Rapid SQL opens the Visual Diff Options dialog box.

The following table describes the check box options:

Option

Display Line Numbers

Display Hidden

Characters

Ignore White Space

Description

Indicates that line numbers should appear in the Visual Diff dialog box.

Indicates that hidden characters

(nonprintable) should be displayed.

Indicates that White Space (such as spaces, carriage returns, line feeds, and tabs) should be ignored. If this option is set on, text will be considered equivalent regardless of white space, otherwise the text will be shown as being different.

Default

Off

Off

On

Ignore Hidden Characters Indicates that hidden characters

(nonprintable) should be excluded.

Ignore Case Indicates that case should not be a differentiating factor.

Off

On

2 Click OK .

Rapid SQL accepts the options.

RAPID SQL 8.6/XE5 USER GUIDE 860

QUERY BUILDER

For more information, see

Visual Difference Utility .

Q

UERY

B

UILDER

Query Builder is a database productivity tool that lets you construct, structure, and manipulate up to five different types of queries simultaneously. It includes a separate graphical interface that opens within your current workspace. You can run Query Builder against all Embarcadero

Technologies supported database platforms.

Query Builder displays the interconnections of your queries as you work. The powerful visual components of Query Builder let you see your query grow and change to fit your needs. Query

Builder eases the task of drawing data from tables by automatically creating correct SQL code as you build a statement. You can use Query Builder to create and execute SELECT statements for tables and views. You can also test queries, and easily adjust your information, before you save.

Query Builder does not rely on knowledge of the underlying SQL code.

You can save and reopen queries in Query Builder. Query Builder automatically checks for changes in your tables or columns between the time you save the query and the time you reopen it.

The table below describes the types of queries available in Query Builder:

Query Type

SELECT

INSERT

UPDATE

DELETE

CREATE VIEW

Description

Create, manipulate and execute SELECT Statements for tables and views.

Create and manipulate INSERT Statements for tables.

Create and manipulate UPDATE Statements for tables.

Create and manipulate DELETE Statements for tables.

Create and manipulate CREATE VIEW Statements for tables and views.

NOTE: You can execute SELECT statements directly from Query Builder. INSERT, UPDATE,

DELETE, and CREATE VIEW statements must be moved to an ISQL Editor for execution.

For more information, see:

Query Builder Design

Using Query Builder

861 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

Q UERY B UILDER D ESIGN

Query Builder lets you build DML statements using an intuitive, graphical interface. It offers you a powerful and flexible way to quickly create complex statements without sacrificing time manipulating SQL code. Query Builder lets you add tables or columns, create joins, and change statements within the graphic display without leaving Rapid SQL. It also lets you have multiple sessions working at the same time.

Query Builder includes many different features to assist you in building and manipulating your query:

• Query Builder Statement Properties

• Workspace Windows

• Query Builder Explorer

• Tool Bar

• SQL Diagram Pane

• SQL Statement Pane

For more information, see

Build Query .

W ORKSPACE W INDOWS

The Workspace Windows provide a comprehensive view of your data structure and query. The table below describes the Workspace Windows:

Pane

Query Builder Explorer

Window

SQL Diagram Pane

SQL Statement Pane

Description

Includes two tabs that display selected object details:

Tables/Views

DML

Displays tables or views included in the current query.

Displays the SQL code, and when appropriate, a Results Tab.

For more information, see

Build Query .

Q UERY B UILDER E XPLORER W INDOW

The Query Builder Explorer is a separate tree that exposes all the tables and views in your target database. It also displays your current query structure. The Query Builder Explorer includes two tabs that display information about the selected objects:

• Tables/Views

• DML

RAPID SQL 8.6/XE5 USER GUIDE 862

QUERY BUILDER

Tables/Views Tab

The Tables/View Tab displays information about the selected tables or views. You can use the drop-down lists to change your table or view, and when appropriate, the owner. The table below describes each drop-down list on the Tables/Views Tab:

List

First

Second

Description

Displays all databases for a target Microsoft SQL

Server or Sybase ASE.

Displays all valid owners.

NOTE: To change your current database, select the new database in the Explorer, and then open another Query Builder session. Query Builder prompts you to

save the current

session prior to opening a new session.

DML Tab

The DML Tab displays all the basic elements of a query statement in the SQL Statement Tree.

You can access any element of the current statement display and perform SQL editing from the

SQL Statement Tree.

For more information, see:

Creating a Clause Using the SQL Statement Tree

Build Query

SQL D IAGRAM P ANE

The SQL Diagram Pane displays tables, views, and joins included in the current query. You can manipulate elements of your query, using the mouse functionality, in the SQL Diagram Pane.

From the SQL Diagram Pane you can:

Add and Remove tables and views .

Create and delete joins .

Add and Subtract columns

.

All changes in the SQL diagram reflect in correct SQL code in the SQL Statement Pane.

For more information, see

Build Query .

SQL S TATEMENT P ANE

The SQL Statement Pane displays the current query SQL code. When you run a query, Query

Builder displays results to your query in the SQL Statement Pane. The SQL Statement Pane is divided into two tabs:

• SQL Tab

863 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

• Results Tab

SQL Tab

The SQL Tab displays the query in progress. It displays each element of your query as you build it, and updates as you do edits such as selecting or deselecting columns, adding clauses, and creating joins. Rapid SQL lets you open the current statement directly into an ISQL editor or copy it to the clipboard for later use.

Results Tab

The Results Tab displays the results of your executed query in the Results grid. To edit data, use the

Data Editor application from Query Builder. When you begin building a new query, the tab

title changes to Old Results until you execute the new query.

For more information, see

Build Query .

Q UERY B UILDER T OOL B AR

The Query Builder tool bar lets you access commonly used features.

The table below describes Query Builder tool bar functionality:

Name

Copy

Statement Box

Stop Execution

Execute

New

Edit

Delete

Auto Layout

Auto Join

Statement Check

Edit Data

Close

Function

Copies the current SQL statement to the clipboard.

Displays the type of statement currently on display in the main workspace window.

Stops an executing query.

Executes the current SELECT or CREATE VIEW statement. If the button is not available, the statement is not executable.

Adjusts to the target node in the Query Builder Explorer window.

Displays, on the DML Tab, the ORDER BY or GROUP BY dialog boxes when target node is selected.

Deletes the target object.

Resets the main workspace to the auto layout mode.

Finds and joins, automatically, like items by name.

Checks query syntax.

Opens Data Editor.

Closes the current query.

NOTE: Query Builder adjusts tool availability to match the current query functionality.

For more information, see

Build Query .

RAPID SQL 8.6/XE5 USER GUIDE 864

QUERY BUILDER

T ABLES AND V IEWS S HORTCUT M ENUS

Query Builder includes a shortcut menu that lets you manipulate a table or view. The table below describes the table shortcut options:

Option

Delete

Title Font

Column Font

Background Color

Select Star

Select None

Bring to Front

Properties

Description

Removes the table from the SQL Diagram Pane, and the SQL

Statement.

Specifies the table title font for this diagram.

Specifies the column font for this diagram.

Specifies the table background color for this diagram.

Selects every column in the table.

Deselects every column in the table.

Moves the table to the top layer of the diagram.

Opens the

Table Properties dialog box .

NOTE: Your selection applies to all selected tables and views.

For more information, see

Build Query .

T ABLES AND V IEWS K EYBOARD C OMMANDS

Query Builder provides a number of keyboard shortcuts that let you quickly construct queries.

The table below describes the keyboard commands:

Keyboard Command Location

ESCAPE

F5

SQL Diagram Pane

Query Builder

CTRL A SQL Diagram Pane

F1 Query builder and application

For more information, see

Build Query .

Description

Breaks off a join.

Refreshes screen and runs Schema

Change Detection. In a CREATE

VIEW, this key adds the new view to the Table Tree Pane.

Selects all tables and joins in the current diagram.

Obtains context sensitive Help.

865 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

Q UERY B UILDER D IALOG B OXES

Query Builder includes a number of dialog boxes to assist you in building and customizing your query.

Dialog Box

Statement Properties

Table Properties

Column Properties

Description

Specifies general properties in an individual Query Builder session.

Specifies column selection and alias names for a table or view.

Specifies column functionality within SELECT and CREATE

VIEW statements.

For more information, see

Build Query .

S TATEMENT P ROPERTIES

The Statement Properties dialog box lets you customize properties in an individual Query

Builder session. For example, you can set options to limit the number of rows returned in a query to save execution time, or turn off the auto join function to manually control all joins for an individual query. The table below describes the options and functionality of the Statement

Properties dialog box.

RAPID SQL 8.6/XE5 USER GUIDE 866

QUERY BUILDER

Interface

Element

Code

Generation

Execution

General

Auto Join

Option Description Default

Generate Use

Database statement

Generate owner names

Include Row

Count limits

Max Row Count in Results Set

Adds a line of SQL code indicating which database or instance is used in the statement.

Adds a line of SQL code showing the table owner name as part of the query.

Selected

Selected

Includes the output row limit set in the

Execution settings.

Selected

Sets row count limits to build and check a query without congesting server processes when a query executes.

1000 rows

Show Column

Data types in

Query Diagram

Confirm on Item delete

Lets Query Builder reveal the data type in each column for tables in the

SQL Diagram Pane.

Lets Query Builder open a Confirm

Delete dialog box when an item is deleted.

NOTE: Clearing this function can result in unexpected changes to your query diagram and statement.

Auto populate views

Lets Query Builder automatically populate views.

Require Indexes Joins indexed columns automatically, and requires indexed columns for joins.

Not selected

Selected

Not selected

Selected

Require same data type

Automatically joins columns with the same data type.

Selected

Syntax Checker Automatic Syntax

Check

Lets Query Builder check syntax every time an execute statement, refresh or copy statement begins.

Run

Automatically

Lets Query Builder automatically detect like names and data types and create joins for multiple tables.

Selected

Selected

Display Columns Font Available

Title Font

Lets you set the font, font style, size, and color of column fonts.

Lets you set the font, font style, size, and color of table/view title fonts.

Available

Table Color Lets you set the background color of your tables in the SQL Diagram Pane.

Available

NOTE: If you set options while Query Builder is running, Rapid SQL displays a warning indicating that you are about to change options or properties.

For more information, see Completing the Statement Properties Dialog Box .

867 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

C OMPLETING THE S TATEMENT P ROPERTIES D IALOG B OX

To complete the Statement Properties dialog box, do the following:

1 On the Query Builder menu, click Statement Properties.

OR

In the SQL Diagram Pane, right-click, and then click Statement Properties.

2 Set options.

3 Click OK.

Query Builder saves the options.

For more information, see

Build Query .

T ABLE P ROPERTIES

The Tables Properties dialog box lets you set parameters for tables or views in your SQL

Diagram. The table below describes the options and functionality on the Table Properties dialog box.

Option

Table Alias

Show Datatypes

Displayed Columns

Hidden Columns

Hide All

Display All

Right Arrow

Left Arrow

Description

Creates an alias name for your table.

Shows or hides the datatype for every column in the target table.

Displays columns visible in the SQL Diagram.

Displays columns hidden in the SQL Diagram.

Moves all non selected columns in the table to the Hidden

Columns window.

Moves all columns in the table to the Displayed Columns window.

Moves a target file from Displayed Columns to Hidden

Columns.

Moves a target file from Hidden Columns to Displayed

Columns.

For more information, see Completing the Table Properties Dialog Box .

C OMPLETING THE T ABLE P ROPERTIES D IALOG B OX

To complete the Table Properties dialog box, do the following:

1 Double click the target table or view title bar.

OR

Right-click target table or view, and then click Properties.

RAPID SQL 8.6/XE5 USER GUIDE 868

QUERY BUILDER

2 If you only want to hide or display columns in your table, click the arrow button on the table title bar.

3 You can also edit view properties from the Table Properties dialog box.

4 Click OK.

Query Builder saves the changes.

For more information, see

Build Query .

C OLUMN P ROPERTIES

The Column Properties dialog box lets you set properties for individual columns in your SELECT or CREATE VIEW statements. You can set aggregate functions and create an alias for an individual column.

The Column Properties dialog box is not available for INSERT, UPDATE or DELETE statements.

The table below describes the options and functions Columns Properties dialog box:

Interface Element

Tables/Views

Aggregate

Alias

Available Columns

Selected Columns

Select All

Clear All

Description

Displays all tables and views in the SQL Diagram Pane.

Specifies aggregate options for the target column.

AVG - An average is taken for a column with an int or numeric datatype.

COUNT - Returns the number of rows which contain data for the target column.

MAX - Returns the highest number in a row in the column.

MIN - Returns the lowest number in a row in the column.

SUM - Returns the sum of the target column in all rows which contain data. This function is only operable on int or numeric datatypes.

Displays the alias name for the target column. Lets you type the name of the alias.

NOTE: Query Builder displays the results of an aggregate column without a column name unless you create an alias for that column.

Displays all available columns in the target table or view.

Displays all selected columns in the target table or view. To create an aggregate function or alias for a different column, select target column, select an aggregate function, and then type the name of the alias.

Moves all columns in the Available Columns box to the

Selected Columns box.

Moves all columns in the Selected Columns box to the

Available Columns box.

869 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

Interface Element

Right Arrow

Left Arrow

Select List Statement

Description

Moves target column in the Available Columns box to the

Selected Columns box.

Moves target column in the Selected Columns box to the

Available Columns box.

Displays the current query.

Completing the Column Properties Dialog Box

To complete the Column Properties dialog box, do the following:

1 On the SQL Statement Tree, double-click target column.

2 Select options.

3 Click OK.

For more information, see

Build Query .

J OIN P ROPERTIES

Query Builder lets you edit joins with the Join editor. You can edit join parameters in a SELECT,

UPDATE, DELETE, and CREATE VIEW Statement.

The table below describes the options and functionality on the Join dialog box.

Option

From Table Column

To Table Column

Select the join relation operator

Join Type: Inner

Join Type: Left Outer

Join Type: Right Outer

Description

The primary column in the join.

The secondary column in the join.

Click the target join operator. If it is not equals, the operator displays on the join in the SQL Diagram Pane.

Click to make the join an inner join. Aggregates are only available for inner joins.

Click to make the join a left outer join.

Click to make the join a right outer join.

NOTE: For IBM DB2 LUW for Linux, Unix, and Windows servers, there is an additional join object in the SQL Statement Tree. The Join On node displays join relations between columns in IBM DB2 LUW for Linux, Unix, and Windows tables and views.

RAPID SQL 8.6/XE5 USER GUIDE 870

QUERY BUILDER

Completing the Join Dialog Box

To complete the Join dialog box, do the following:

1 In the SQL Diagram Pane , right-click the target join, and then click Properties.

OR

In the SQL Diagram Pane , double-click the target join.

OR

On the SQL Statement Tree , expand the Where and And nodes, and then double-click the target join.

2 Select options.

3 Click OK.

For more information, see

Build Query .

U SING Q UERY B UILDER

Query Builder provides a visual display of your queries as you construct them. You can run Query

Builder against any registered datasource in Rapid SQL. Query Builder lets you build five separate types of queries simultaneously:

• SELECT

• INSERT

• UPDATE

• DELETE

• CREATE VIEW

You can execute a SELECT statement from Query Builder. To execute an INSERT, UPDATE,

DELETE, and CREATE VIEW statement, copy them to an ISQL Editor. You can also copy the statements to the clipboard for later use in the ISQL Editor. Query Builder also lets you

save a

statement at any time so that you can open them later for editing or execution.

Rapid SQL lets you open Query Builder with multiple tables or views with the same or different

owners. If you open tables or views with different owners, Query Builder displays “All Owners” in the Owner drop-down list. You can start multiple Query Builder sessions from Rapid SQL. You can use different tables and views for each query. You can also toggle back and forth among each of the queries.

You can save and reopen queries in Query Builder. Query Builder automatically checks for changes in your database or instance between the time you save the query and the time you reopen it with the

Schema Change detection component.

Query Builder is integrated with

Data Editor so you can edit data in real time and then continue

to build your query with the new information embedded in the query.

871 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

U SING Q UERY B UILDER

To use Query Builder, do the following:

• Select an instance or database

• Select a statement.

• Select a table(s) or view(s).

• Select a column or columns.

NOTE: You can start Query Builder directly from a table or view which automatically selects the instance or database which contains that table or view.

1 On the Tools menu, click Query Builder.

OR

On the Datasource Explorer, expand the Database or Schema node, click Tables, and then on the Command Menu, click Build Query.

OR

On the Tools tool bar, click Build Query.

OR

On the Explorer, expand Tables, right-click the target table(s), and then click Build Query.

OR

On the Explorer, expand Views, right-click the target view(s), and then click Build Query.

Rapid SQL opens Query Builder.

S ELECTING A D ATABASE

To create an SQL statement, first select an instance or database.

NOTE: You can start Query Builder directly from a table or view which automatically selects the database which contains that table or view.

If you are working with Microsoft SQL Server or Sybase ASE, Query Builder provides two dropdown lists. The first drop-down list displays all available databases for the target server. The second drop-down list displays owners.

If you are working with Oracle or IBM DB2 LUW for Linux, Unix, and Windows the first dropdown list is unavailable.

NOTE: You can start Query Builder directly from a table or view which automatically selects the database which contains that table or view.

1 Start Query Builder.

2 In the database drop-down list, click the target instance or database.

RAPID SQL 8.6/XE5 USER GUIDE 872

QUERY BUILDER

3 In the owners drop-down list, select the appropriate owner.

Query Builder is ready for Statement selection.

4 To select different instances or databases while Query Builder is running, on the Tables/

Views Tab, in the database drop-down list, click the target instance or database.

Rapid SQL clears the current query and displays a warning prompt.

5 To save the current query, click Yes.

Rapid SQL opens the Save As dialog box.

6 To continue without saving, click No.

Rapid SQL clears the SQL Diagram Pane and SQL Statement Pane.

For more information on saving queries in Query Builder, see

Saving and Reopening Queries

.

S ELECTING A S TATEMENT

Query Builder lets you build

SELECT ,

INSERT ,

UPDATE ,

DELETE , and

CREATE VIEW queries

simultaneously.

To select a statement, do the following:

1 On the Query Builder tool bar, click the statement drop-down list, and then click the target statement type.

OR

In the SQL Diagram Pane , right-click, and then click the target statement type.

For more information, see

Using Query Builder .

S ELECTING T ABLES AND V IEWS

To build a query, open one or more tables or views in the SQL Diagram Pane

. You can use different tables or views for each type of query.

TIP: For multiple tables: Press SHIFT+click for adjacent tables or CTRL+click for nonadjacent tables. You can also drag the bounding line with your pointer to select multiple tables.

873 RAPID SQL 8.6/XE5 USER GUIDE

To select a Table or View, do the following:

1 In the Tables/Views Tab, drag the target table or view to the Diagram Pane.

OR

In the Tables/Views Tab, click target table or view and then, on the Query Builder tool bar, click Add.

OR

In the Tables/Views Tab, right-click target table or view, and then click Add.

Query Builder displays the target table(s) and view(s) in the SQL Diagram Pane.

For more information, see

Using Query Builder .

S ELECTING C OLUMNS

You must select at least one column to build a query. Query Builder displays columns in each table in the SQL Diagram window. By default, Query Builder exposes every column in a table.

You can select the columns you want to use for your query. Query Builder orders them, in your statement, in the select order.

Query Builder lets you select columns in the:

SQL Diagram Pane

.

• SQL Statement Tree .

You can select an individual column or all columns. Query Builder orders them, in your statement, in the select order. You can reorder columns after you set them in your diagram or statement.

For more information, see:

Selecting Columns in the SQL Diagram Pane

Selecting Columns in the SQL Statement Tree

Selecting All Columns

S ELECTING C OLUMNS IN THE SQL D IAGRAM P ANE

To select a column in the SQL Diagram Pane, do the following:

1 Select the check box to the left of the target column name.

For more information, see

Using Query Builder .

S ELECTING C OLUMNS IN THE SQL S TATEMENT T REE

Query Builder lets you select and set individual properties using the

Selected Column Properties

Dialog Box

.

For more information, see

Using Query Builder .

RAPID SQL 8.6/XE5 USER GUIDE 874

QUERY BUILDER

S ELECTING A LL C OLUMNS

Query Builder uses columns in statements based on the order of selection. When you select all columns, Query Builder displays the columns in the order they appear in the table.

NOTE: Query Builder lets you select all columns in single or multiple tables.

To select all columns, do the following:

1 On the Query Builder menu, click Select Star.

OR

On the SQL Statement Tree, or in the SQL Diagram, right-click target table, or any of a group of selected tables, and then click Select Star.

For more information, see

Using Query Builder .

B UILDING A Q UERY

Query Builder lets you build five different queries, which you can run separately or simultaneously, depending on your needs. The table below describes these queries:

Query Type

SELECT

INSERT

UPDATE

DELETE

CREATE VIEW

Description

Lets you create, manipulate and execute SELECT Statements for tables and views.

Lets you create and manipulate INSERT Statements for tables.

Lets you create and manipulate UPDATE Statements for tables.

Lets you create and manipulate DELETE Statements for tables.

Lets you create and manipulate CREATE VIEW Statements for tables and views.

To build a Query, do the following:

• Select an instance or database.

Select a Statement .

Select your table(s) or view(s) .

Select your columns

.

NOTE: You can start Query Builder directly from a table or view which automatically selects the database which contains that table or view.

Query Builder lets you build queries that include both

tables and views in the SQL Diagram Pane

for SELECT and

CREATE VIEW statements. For the INSERT, UPDATE, and DELETE statements,

use one or the other object, but you cannot use both.

Once you make your selections, you can edit, restructure, and streamline your query. Query

Builder offers many options for streamlining your queries.

875 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

For more information, see:

Working with Tables and Views in the SQL Diagram Pane

Working with Columns in the SQL Diagram Pane

Joins

Creating a Clause using the SQL Statement Tree

Moving Tables and Columns in the SQL Statement Tree

Subqueries

Aliases

B UILDING A SELECT S TATEMENT

Query Builder lets you construct and execute simple-to-complex SELECT statements using data from any table or view. You can also create and edit

joins for SELECT statements. Query Builder

can check your query and warn you if there are syntax errors with the

Syntax Checker .

To build a SELECT statement, do the following:

1 On the Tools menu, click Query Builder.

OR

On the Datasource Explorer, expand the Database or Schema node, click Tables, and then on the Command menu, click Build Query.

OR

On the Tools tool bar, click Query Builder.

OR

On the Explorer, expand Tables, right-click the target table(s), and then click Build Query.

OR

On the Explorer, expand Views, right-click the target view(s), and then click Build Query.

Rapid SQL opens Query Builder.

2 In the statement drop-down list, click SELECT.

3 In the Table Tree Pane, select target table(s) or view(s) and move them to the SQL Diagram

Pane .

4 In the target table or view, click target column(s), or click Select Star to select every column.

5 To check syntax, click Check.

6 To copy the statement, click Copy.

7 To execute the statement, click Execute.

RAPID SQL 8.6/XE5 USER GUIDE 876

QUERY BUILDER

Copying a SELECT Statement from the SQL Statement Pane

To copy any part of a statement from the SQL Statement Pane, do the following:

1 Open Query Builder, then begin a new SELECT statement.

OR

Open an existing SELECT statement.

2 In the SQL Statement Pane, select all, or the target portion of the statement.

3 On the Query Builder tool bar, click Copy.

OR

In the SQL Statement Pane, right-click, and then click Copy.

Query Builder makes the target statement portion available on the clipboard.

For more information, see Building a Query

.

B UILDING AN INSERT S TATEMENT

Query Builder lets you construct and execute simple-to-complex INSERT statements using data from any table. To execute an INSERT statement, copy it to an ISQL Editor. You can also copy the statement to the clipboard for later use in the ISQL Editor. Query Builder also lets you

save

your statement at any time so that you can open it later for editing or execution.

Building an INSERT Statement

To build an INSERT Statement, do the following:

1 On the Tools menu, click Query Builder.

OR

On the Datasource Explorer, expand the Database or Schema node, click Tables, and then on the Command menu, click Build Query.

OR

On the Tools tool bar, click Query Builder.

OR

On the Explorer, expand Tables, right-click the target table(s), and then click Build Query.

OR

On the Explorer, expand Views, right-click the target view(s), and then click Build Query.

Rapid SQL opens Query Builder.

2 In the statement drop-down list, click INSERT.

3 In the Table Tree Pane, select target table, and move it to the SQL Diagram Pane .

4 In the target table, click target column(s).

877 RAPID SQL 8.6/XE5 USER GUIDE

Copying an INSERT Statement from the SQL Statement Pane

To copy any part of a statement from the SQL Statement Pane, do the following:

1 Open Query Builder, then begin a new INSERT statement.

OR

Open an existing INSERT statement.

2 In the SQL Statement Pane, select all, or the target portion of the statement.

3 On the Query Builder tool bar, click Copy.

OR

In the SQL Statement Pane, right-click, and then click Copy.

Query Builder makes the target statement portion available on the clipboard.

For more information, see Building a Query

.

QUERY BUILDER

B UILDING AN UPDATE S TATEMENT

Query Builder lets you construct and execute simple-to-complex UPDATE statement using data from any table. To execute an UPDATE statement, copy it to an ISQL Editor. You can also copy the statement to the clipboard for later use in the ISQL Editor. Query Builder also lets you

save

your statement at any time so that you can open it later for editing or execution.

Building an UPDATE Statement

To build an UPDATE statement, do the following:

1 On the Tools menu, click Query Builder.

OR

On the Datasource Explorer, expand the Database or Schema node, click Tables, and then on the Command menu, click Build Query.

OR

On the Tools tool bar, click Query Builder.

OR

On the Explorer, expand Tables, right-click the target table(s), and then click Build Query.

OR

On the Explorer, expand Views, right-click the target view(s), and then click Build Query.

Rapid SQL opens Query Builder.

2 In the statement drop-down list, click UPDATE .

3 In the Table Tree Pane, select target table and move it to the SQL Diagram Pane.

4 In the target table, click target column(s).

RAPID SQL 8.6/XE5 USER GUIDE 878

QUERY BUILDER

Copying an UPDATE Statement from the SQL Statement Pane

To copy any part of a statement from the SQL Statement Pane, do the following:

1 Open Query Builder, then begin a new UPDATE statement.

OR

Open an existing UPDATE statement.

2 In the SQL Statement Pane, select all, or the target portion of the statement.

3 On the Query Builder tool bar, click Copy.

OR

In the SQL Statement Pane, right-click, and then click Copy.

Query Builder makes the target statement portion available on the clipboard.

For more information, see Building a Query

.

B UILDING A DELETE S TATEMENT

Query Builder lets you construct DELETE statements using data from any table. Query Builder displays a Confirmation Option Message box when you create a DELETE statement. You can set the

Statement Properties

dialog box to display or hide this message when creating a DELETE statement.

To execute a DELETE statement, copy it to an ISQL Editor. You can also copy the statement to the clipboard for later use in the ISQL Editor. Query Builder also lets you

save

your statement at any time so that you can open it later for editing or execution.

Building a DELETE Statement

To build a DELETE statement, do the following:

1 On the Tools menu, click Query Builder.

OR

On the Datasource Explorer, expand the Database or Schema node, click Tables, and then on the Command menu, click Build Query.

OR

On the Tools tool bar, click Query Builder.

OR

On the Explorer, expand Tables, right-click the target table(s), and then click Build Query.

OR

On the Explorer, expand Views, right-click the target view(s), and then click Build Query.

Rapid SQL opens Query Builder.

2 In the statement drop-down list, click DELETE .

879 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

3 In the Table Tree Pane, select target table, and move it to the SQL Diagram Pane .

Copying a DELETE Statement from the SQL Statement Pane

To copy any part of a statement from the SQL Statement Pane, do the following:

1 Open Query Builder, then begin a new DELETE statement.

OR

Open an existing DELETE statement.

2 In the SQL Statement Pane, select all, or the target portion of the statement.

3 On the Query Builder tool bar, click Copy.

OR

In the SQL Statement Pane, right-click, and then click Copy.

Query Builder makes the target statement portion available on the clipboard.

For more information, see Building a Query

.

B UILDING A CREATE VIEW S TATEMENT

Query Builder lets you construct and execute simple-to-complex CREATE VIEW statements using data from any table or view. You can also copy the statement to the clipboard for later use in the ISQL Editor. Query Builder also lets you

save your statement at any time so that you can

open it later for editing or execution.

To build a CREATE VIEW statement, do the following:

1 On the Tools menu, click Query Builder.

OR

On the Datasource Explorer, expand the Database or Schema node, click Tables, and on the

Command menu, click Build Query.

OR

On the Tools tool bar, click Query Builder.

OR

On the Explorer, expand Tables, right-click the target table(s), and then click Build Query.

OR

On the Explorer, expand Views, right-click the target view(s), and then click Build Query.

Rapid SQL opens Query Builder.

2 In the statement drop-down list, click CREATE VIEW.

3 In the Table Tree Pane, select target table or view and move it to the SQL Diagram Pane .

NOTE: Query Builder supports multiple tables and views in a CREATE VIEW statement.

RAPID SQL 8.6/XE5 USER GUIDE 880

QUERY BUILDER

4 In the target table or view, click the target column(s).

5 To check syntax, click Check.

6 To copy the statement, click Copy.

7 To execute the CREATE VIEW Statement, click the SQL Statement Pane, and then press any key.

Query Builder opens the Edit SQL dialog box.

8 Click OK.

CAUTION: If you have used this method previously, and you selected the Please do not show me this dialog again check box, on the Edit SQL dialog box, Query Builder does not display the Edit SQL dialog box. It pastes your statement directly to the ISQL Editor.

Rapid SQL opens the ISQL Editor.

9 In the ISQL Editor , on the line, CREATE VIEW NAME AS, replace the word NAME with a name for your view.

10 On the tool bar, click Execute.

Rapid SQL executes the CREATE VIEW query.

11 To close the Editor, click Close.

Rapid SQL opens the ISQL Editor save message.

12 Click No.

Rapid SQL returns to Query Builder.

13 To add the view to the table tree, on the Query Builder menu, click Refresh.

OR

Press F5.

Query Builder adds the view to the Table Tree Pane.

Copying a CREATE VIEW Statement from the SQL Statement Pane

To copy any part of a statement from the SQL Statement Pane, do the following:

1 Open Query Builder, then begin a new CREATE VIEW statement.

OR

Open an existing CREATE VIEW statement.

2 In the SQL Statement Pane, select all, or the target portion of the statement.

881 RAPID SQL 8.6/XE5 USER GUIDE

3 On the Query Builder tool bar, click Copy.

OR

In the SQL Statement Pane, right-click, and then click Copy.

Query Builder makes the target statement portion available on the clipboard.

For more information, see Building a Query

.

QUERY BUILDER

W ORKING WITH T ABLES AND V IEWS IN THE SQL D IAGRAM P ANE

Query Builder lets you organize your tables and views in the SQL Diagram Pane. You can also customize appearance, change visual aspects, and adjust layout while continuing to manufacture a query. You can resize or customize a selected table and view, or move them to the front or back of the diagram. The key symbol indicates a column that is indexed or participates in a primary key.

• Selecting and Deselecting Tables and Views

• Moving Tables and Views

• Moving Additional Tables and Views to the SQL Diagram Pane

• Deleting Tables and Views

Query Builder can automatically dictate a layout in the SQL Diagram Pane using the Auto Layout

button.

S ELECTING AND D ESELECTING T ABLES AND V IEWS

You can select tables and views in the SQL Diagram Pane. You can make changes to more than one table or view simultaneously by selecting multiple tables or views.

To select and deselect Tables and Views, do the following:

1 To select a table, click the table title bar.

2 To select more than one table, drag the pointer to enclose all target tables with the bounding line.

Query Builder selects all target tables; none have handles.

3 To select all tables, in the SQL Diagram, right-click, and then click Select All .

4 Click the SQL Diagram workspace to deselect all tables.

For more information, see

Working with Tables and Views .

M OVING T ABLES AND V IEWS

Query Builder lets you move tables and views in the SQL Diagram Pane. It also moves selections and joins with the tables and views.

RAPID SQL 8.6/XE5 USER GUIDE 882

QUERY BUILDER

To move Tables and Views, do the following:

1 To move a table or view, drag the title bar to the target location.

NOTE: If you select more than one table or view, Query Builder moves all selected tables and views and any joins with the pointer.

For more information, see

Working with Tables and Views .

M OVING A DDITIONAL T ABLES AND V IEWS TO THE SQL D IAGRAM P ANE

Query Builder sets tables and views in your statement in the order that you move them to the

SQL Diagram Pane. Tables and views moved into the Diagram Pane appear first in your statement, including all joins connecting that table. To change the order of tables, move them back into the Table Tree and re-select them in the order in which you would like to join them.

Moving Additional Tables or Views

To move additional tables or views, do the following:

1 Click the target table or view and drag it to the Diagram Pane.

For multiple tables or views: Use SHIFT+click for adjacent tables or views or use CTRL+click for nonadjacent tables and views.

OR

Click the target table or view, and then on the Query Builder tool bar, click Add.

OR

Right-click the target table or view, and then click Add .

For multiple tables or views: Use SHIFT+click for adjacent tables or views or use CTRL+click for non-adjacent tables and views.

NOTE: Moving a table or view to the SQL Diagram Pane is not available while a query is executing.

For more information, see

Working with Tables and Views .

883 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

D ELETING A T ABLE OR V IEW

To delete tables from the SQL Diagram Pane, do the following:

1 Right-click the target table or view, and then click Delete.

OR

In the SQL Diagram, click target table or view, and then on the Query Builder tool bar, click

Delete.

OR

In the SQL Diagram, right-click the target table or view, and then click Delete.

Query Builder deletes the table from the SQL Diagram, SQL Statement, and SQL Statement

Tree.

For more information, see

Working with Tables and Views .

W ORKING WITH C OLUMNS IN THE SQL D IAGRAM P ANE

You can customize queries by selecting and deselecting columns in the SQL Diagram Pane. You

can customize columns using the Selected Column Properties dialog box .

S ELECTING AND D ESELECTING C OLUMNS

You can select and deselect columns in the SQL Diagram. Query Builder lets you select and deselect individual columns or all columns. Your results reflect the order of selection. You can change the order of columns after you set them in your diagram or statement.

TIP: You can also select, re-order and deselect columns in the SQL Statement Tree .

Selecting Individual Columns

To select individual columns, do the following:

1 To select a column, in the SQL Diagram, select the check box to the left of the target column name.

Deselecting Individual Columns

To deselect individual columns, do the following:

1 To deselect a column, in the SQL Diagram , select the check box to the left of the target column name.

NOTE: When you clear the columns, Query Builder deletes the columns and any sub clauses from the SQL Statement Pane and SQL Statement Tree.

RAPID SQL 8.6/XE5 USER GUIDE 884

QUERY BUILDER

Selecting All Columns

To select all columns, do the following:

1 On the Query Builder menu, click Select Star.

OR

On the SQL Statement Tree, or in the SQL Diagram, right-click target table, or any of a group of selected tables, and then click Select Star.

NOTE: Query Builder uses columns in statements based on the order of selection. When you select all columns, Query Builder displays the columns as they appear in the table.

Deselecting All Columns

To deselect all columns, do the following:

1 On the Query Builder menu, click Select None .

OR

On the SQL Statement Tree, or in the SQL Diagram, right-click target table, or any of a group of selected tables, and then click Select None.

Query Builder adds or removes selected columns from the SQL Statement Tree and the SQL

Statement Pane.

S ELECTING ALL OR DISTINCT C OLUMNS

Selecting ALL or DISTINCT columns is a way to filter data in your query. Selecting ALL columns means all rows displays results in the grid regardless of duplication in non-primary key columns.

The DISTINCT column function is a query process that limits duplicate data in non-primary key columns to rows with the first iteration of any identical data. For example, if there are two identical addresses for different last names, and the column with a primary key does not participate in the query, only the row with the first instance of the address displays in the results of the query.

To select ALL or DISTINCT columns, do the following:

1 In the Statement Tree pane, right-click the ALL or DISTINCT node, click Properties, and then select the ALL or DISTINCT check box.

OR

In the Statement Tree pane, double click the ALL or DISTINCT node. Query Builder toggles to the opposite function.

NOTE: You can change between ALL or DISTINCT at any time prior to executing or copying a query.

885 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

J OINS

Joins let you distill the information in your database to a usable form. Query Builder lets you create, manipulate, and edit work with joins without requiring knowledge of the underlying SQL code. Query Builder lets you create any type of join for SELECT and CREATE VIEW Statements.

You can create self joins for UPDATE or DELETE Statements. You cannot create joins for INSERT

Statements.

Query Builder includes four types of joins. The table below describes joins and their availability in Query Builder:

Join

Inner Join

Statement Availability

SELECT, CREATE VIEW,

DELETE, UPDATE

Left Outer Join

SELECT, CREATE VIEW

Right Outer

Join

Self Join

SELECT, CREATE VIEW

SELECT, CREATE VIEW

Description

Returns data from the joined tables that match the query’s join criteria and set a relation between tables or views. Inner joins return results where the join condition is true.

Returns all data from the primary table and data from the joined tables that match the query’s join criteria and set a join relation operator from a column in a primary table or view to a column in a secondary table or view.

Returns all data from the primary table and data from the joined tables that match the query’s join criteria and set a join relation operator from a column in a secondary table or view to a column in a primary table or view.

Set a relation between columns in the same table.

In the Query Builder SQL Diagram Pane, you can create, edit, and delete joins. You can edit joins

in the Join dialog box

.

Joins are the way you can filter data in relational databases. Query Builder lets you change the

types of joins

between tables, views and columns. It is important that you have some knowledge of the data in your tables, and the datatypes for each column. This information helps you frame a better query, and filter your data for maximum effect.

For more information, see Joins .

I NNER J OINS

Inner joins are the most common types of joins for SELECT statements. An inner join returns information from two tables where the relation between two target columns is true for both columns.

The join operand determines the relation results, for example, if the join operand is equals, then identical data, in two columns, is the only result. If the join operand is not equals, Query Builder only returns data that is different between two columns.

RAPID SQL 8.6/XE5 USER GUIDE 886

QUERY BUILDER

For example, if you have an inner join matching territory numbers between the table dbo.Managers and dbo.Clients, running the query returns all Managers and Clients with matching territory numbers:

Query Builder displays the following results from this query with an inner join

NOTE: Query Builder displays results of columns in the order of selection. You can reorder columns by deselecting and selecting in the SQL Diagram Pane, the Selected Columns

Properties dialog box, or the SQL Statement Tree.

For more information, see Joins .

L EFT O UTER J OINS

Left outer joins bring back a different data set than inner joins . Left outer joins retrieve all the

data in columns selected from the primary table, and only matching data from the joined or secondary table.

For example, in the same pair of tables, a left inner join from dbo.Managers to dbo.Clients, where the columns Current Territory and Territory are joined, displays different results.

NOTE: There is one additional manager who does not have a client, but because a left outer join includes all data from selected columns in the primary table, the last entry in the illustration is displayed.

For more information, see Joins .

R IGHT O UTER J OINS

Right outer joins return opposite results from a

left outer join . In a right outer join, you are asking

for all the information in the secondary table’s column, and the join operator’s matching information from the primary table.

For example, in the same set of data we used in the left outer join example, a right outer join returns all clients from dbo.Client, and only managers who match territory numbers, in the joined column.

NOTE: The managers are the same as the first, inner join, but a right outer join returns the additional clients without matching managers.

For more information, see Joins .

S ELF J OINS

A self join is a join within a single table. Query Builder lets you return specific information from a single table using a self join.

For example, in our example table, there is a column for the number of clients and another column with the goal client total for a territory.

887 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

A self join can ascertain which managers are reaching their quota. Notice that the join relation operator in the example is greater than or equal to, which shows managers exceeding quota as well.

For more information, see Joins .

A DDING AND D ELETING A J OIN IN THE SQL D IAGRAM P ANE

Query Builder lets you add and delete joins. This method adds a

WHERE

clause in your query.

You can join different

tables and or views in a

SELECT

or CREATE VIEW statement.

Adding a Join

To add a Join, do the following:

1 In the SQL Diagram Pane, drag the target column to the second column.

Query Builder displays both a line joining the two columns in the SQL Diagram Pane and the corresponding SQL code in the SQL Statement Pane.

Removing a Join

Query Builder lets you remove joins from your query. Query Builder automatically deletes joins from the query in the SQL Statement Pane, when you remove them from the SQL Diagram Pane.

To remove a join, do the following:

1 Click the target join, and then on the Query Builder tool bar, click Delete.

OR

Right-click the target join, and then click Delete.

Query Builder deletes the Join.

For more information, see Joins .

E DITING J OINS

Query Builder lets you edit joins with the Join editor. You can edit join parameters in a SELECT,

UPDATE, DELETE, and CREATE VIEW Statement.

The table below describes the options in the Join dialog box:

Option

From Table Column

To Table Column

Select the join relation operator

Join Type: Inner

Description

The primary column in the join.

The secondary column in the join.

Click the target join operator. If it is not equals, the operator displays on the join in the SQL Diagram Pane.

Click to make the join an inner join. Aggregates are only available for inner joins.

RAPID SQL 8.6/XE5 USER GUIDE 888

QUERY BUILDER

Option

Join Type: Left Outer

Join Type: Right Outer

Description

Click to make the join a left outer join.

Click to make the join a right outer join.

Completing the Join Dialog Box

1 In the SQL Diagram Pane , right-click the target join, and then click Properties.

OR

In the SQL Diagram Pane , double-click the target join.

OR

On the SQL Statement Tree , expand the Where and And nodes, and then double-click the target join.

Query Builder opens the Join dialog box.

NOTE: For IBM DB2 LUW for Linux, Unix, and Windows servers, there is an additional join object in the SQL Statement Tree. The Join On node displays join relations between columns in IBM DB2 LUW for Linux, Unix, and Windows tables and views.

Changing a Join Color

Query Builder lets you change the color at a join in the SQL Diagram Pane. Complex statements using many tables and multiple joins can be easier to view if joins have different colors.

To change the color of a join, do the following:

1 Right-click the target join, and then click Color.

Query Builder opens the Color dialog box.

2 In the Basic colors grid, click a target color

OR

Click Define Custom Colors, then create a custom color.

NOTE: Query Builder lets you save custom colors for the current color. Click Add to Custom

Color to have the option of using that color for your queries.

3 Click OK.

For more information, see Joins .

889 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

A UTO L AYOUT

The Auto Layout function displays

tables

and

views

in the

SQL Diagram Pane . It makes the best

use of the available area in the SQL Diagram Pane by placing your tables and views in the most efficient manner. If the

automatic join function is on, Query Builder displays all joins between

columns in your diagram. Query Builder lets you run the automatic layout function any time you have tables or views in the SQL Diagram Pane.

Using Auto Layout

To use Auto Layout, do the following:

1 On the Query Builder menu, click Auto Layout.

OR

On the Query Builder tool bar, click Auto Layout.

OR

In the SQL Diagram Pane, right-click, and then click Auto Layout.

Query Builder organizes your tables in the SQL Diagram Pane.

A UTO J OINS

Query Builder includes an automatic join function that displays joins between selected tables and views in the SQL

Diagram Pane . The Auto Join function seeks columns with the same name

and data type. You can set global automatic join parameters in the Rapid SQL Options Editor.

You can use the

Statement Properties Editor

to set local join parameters for the current Query

Builder session without changing the global parameters.

Using Auto Join

To use Auto Join, do the following:

1 On the Query Builder menu, click Auto Join.

OR

On the Query Builder tool bar, click Auto Join.

OR

In the SQL Diagram Pane, right-click, and then click Auto Join.

Query Builder joins columns in the SQL Diagram Pane.

RAPID SQL 8.6/XE5 USER GUIDE 890

QUERY BUILDER

C REATING A C LAUSE U SING THE SQL S TATEMENT T REE

Query Builder lets you build more detailed WHERE, ORDER BY, GROUP BY, and HAVING clauses using the SQL Statement Tree. Query Builder lets you add clauses to SELECT, UPDATE,

DELETE, and CREATE VIEW statements.

NOTE: Query Builder does not support clauses for INSERT statements.

The table below describes these clauses:

Clause

WHERE

ORDER BY

GROUP BY

HAVING

Description

Limits rows in the query.

Orders the results of the query to a target column.

Groups target columns in the query.

Filters out groups of data.

C REATING A WHERE C LAUSE

Query Builder lets you create a WHERE clause from the SQL Statement Tree which automatically displays in your query.

NOTE: Any additional WHERE clauses are displayed as

HAVING

clauses.

The table below describes the options and functionality on the Where dialog box.

Option

Operand (Left)

Operator

Operand (Right)

Description

Lets you click the target column for the first part of your WHERE clause.

NOTE: Query Builder lists every column in all tables in the SQL Diagram in the Operand lists.

Lets you select the target operator.

Lets you click the target column for the second part of your WHERE clause.

Query Builder automatically writes the query language in the Statement option box.

NOTE: Query Builder does not display clause phrases created from the SQL Statement Tree in the SQL Diagram Pane.

Creating a WHERE Clause

To Create a WHERE clause, do the following:

1 Click the WHERE node, and then on the Query Builder tool bar, click New.

OR

Right-click the WHERE node, and then click New.

891 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

For more information, see

Creating a Clause using the SQL Statement Tree

.

D ELETING A WHERE C LAUSE

To delete a WHERE clause, do the following:

1 Expand the AND node, and then on the Query Builder tool bar, click Delete.

OR

Expand the AND node, right-click target column and then click Delete.

Query Builder deletes the target clause and removes it from the SQL Statement Pane.

For more information, see

Creating a Clause using the SQL Statement Tree

.

C REATING AN AND C LAUSE IN A WHERE C LAUSE

Query Builder lets you add an AND clause from the SQL Statement Tree which automatically displays in your query.

The table below describes the options and functionality on the Where dialog box.

Option

Operand (Left)

Operator

Operand (Right)

New Button

Description

Lets you click the target column for the first part of your WHERE clause.

Lets you select the target operator.

Lets you click the target column for the second part of your WHERE clause.

Query Builder automatically writes the query language in the Statement option box.

Click to clear your selections but remain in the

Where dialog box.

Query Builder adds another AND clause to your query.

To open the Where dialog box, do the following:

1 Click the AND node, and then on the Query Builder tool bar, click New.

OR

Expand the WHERE node, right-click the AND node, and then click New.

For more information, see

Creating a Clause using the SQL Statement Tree

.

RAPID SQL 8.6/XE5 USER GUIDE 892

QUERY BUILDER

D ELETING AN AND C LAUSE

To delete an AND clause, do the following:

1 Expand the AND node, click target column, and then on the Query Builder tool bar, click

Delete.

OR

Expand the AND node, click target column, and then on the keyboard press DELETE.

OR

Expand the AND node, right-click the target column, and then click Delete.

Query Builder deletes the target clause and removes it from the SQL Statement Pane.

For more information, see

Creating a Clause using the SQL Statement Tree

.

I NSERTING AN AND OR OR C LAUSE

Query Builder lets you insert an AND or an OR WHERE clause from the SQL Statement Tree which automatically displays in your query. Query Builder lets you insert AND or OR clauses at any appropriate point in the SQL Statement Tree.

The table below describes the options and functionality on the Where dialog box.

Option

Operand (Left)

Operator

Operand (Right)

New Button

Description

Lets you click the target column for the first part of your WHERE clause.

Lets you select the target operator.

Lets you click the target column for the second part of your WHERE clause.

Query Builder automatically writes the query language in the Statement option box.

Click to clear your selections but remain in the

Where dialog box.

Query Builder adds another AND clause to your query.

To insert an AND or OR Clause, do the following:

1 On the SQL Statement Tree, expand the WHERE node, right-click the target AND node, then click Insert, and then click And or Or.

For more information, see

Creating a Clause using the SQL Statement Tree

.

893 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

D ELETING AN OR C LAUSE

To delete an OR clause, do the following:

1 Expand the OR node, and then on the Query Builder tool bar, click Delete.

OR

Expand the OR node, right-click the target column and then click Delete.

Query Builder deletes the target clause and removes it from the SQL Statement Pane.

For more information, see

Creating a Clause using the SQL Statement Tree

.

C REATING AN ORDER BY C LAUSE

Query Builder lets you create an ORDER BY clause from the SQL Statement Tree which automatically displays in your query.

The table below describes the Order By Columns dialog box.

Option

Available Columns

Order

Description

Select target column(s) and click the right arrow.

Query Builder moves target column from the

Available Columns list to the Order By Columns list.

NOTE: Query Builder sorts query results based on the order that columns are placed in the ORDER

BY clause.

Lets you select the target sort order.

ASC - Ascending

DESC - Descending

Query Builder displays the SQL language in the

Order By Statement box.

To open the Order By Columns dialog box, do the following:

1 On the SQL Statement Tree, click the ORDER BY node, and then on the Query Builder tool bar, click Properties.

OR

On the SQL Statement Tree, right-click the ORDER BY node, and then click Properties.

For more information, see

Creating a Clause using the SQL Statement Tree

.

RAPID SQL 8.6/XE5 USER GUIDE 894

QUERY BUILDER

C HANGING THE S ORT O RDER IN AN ORDER BY C LAUSE

To quickly change the sort order of a column in a query, do the following:

1 On the SQL Statement Tree, expand the ORDER BY node, and then double-click the target column.

OR

On the SQL Statement Tree, expand the ORDER BY node, then right-click the target column, and then click Properties.

Query Builder opens the Order dialog box.

2 Click the target sort order, and then click OK.

Query Builder appends the Order By clause for target column with the appropriate sort order in the SQL Statement Pane.

For more information, see

Creating a Clause using the SQL Statement Tree

.

D ELETING AN ORDER BY C LAUSE

To delete an ORDER BY clause, do the following:

1 Expand the ORDER BY node, and then on the Query Builder tool bar, click Delete.

OR

Expand the ORDER BY node, right-click the target column, and then click Delete.

Query Builder deletes the target clause and removes it from the SQL Statement Pane.

For more information, see

Creating a Clause using the SQL Statement Tree

.

C REATING A GROUP BY C LAUSE

The table below describes the options and functionality on the Group By Columns dialog box.

Option

Selected Columns

Clear All Button

Description

Select target column(s) and click the right arrow.

Or click the Select All button. Query Builder moves target column from the Selected Columns list to the Group By Columns list.

NOTE: Query Builder sorts query results based on the order that columns are placed in the ORDER

BY clause.

Click to move target column from the Group By

Columns list to the Selected Columns list.

Query Builder displays the SQL language in the

Group By Statement window.

895 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

Creating a GROUP BY Clause

To create a GROUP BY clause from the SQL Statement Tree which automatically displays in your query, do the following:

1 On the SQL Statement Tree, double-click the GROUP BY node.

OR

On the SQL Statement Tree, right-click the GROUP BY node, and then click New.

Query Builder adds all the selected columns in your table(s) to the GROUP BY node in the

SQL Statement Tree, and to the appropriate location in the SQL Statement Pane.

2 On the GROUP BY node, double-click any column.

OR

On the GROUP BY node, click any column, then on the Query Builder menu, click New.

OR

On the GROUP BY node, right-click any column, then click Properties.

For more information, see

Creating a Clause using the SQL Statement Tree

.

D ELETING A GROUP BY C LAUSE

To delete a GROUP BY clause, do the following:

1 On the SQL Statement Treeexpand the GROUP BY node, and then on the Query Builder tool bar, click Delete.

OR

On the SQL Statement TreeExpand the GROUP BY node, right-click the target column, and then click Delete.

Query Builder deletes the target clause and removes it from the SQL Statement Pane.

For more information, see

Creating a Clause using the SQL Statement Tree

.

C REATING A HAVING C LAUSE

A HAVING clause is a type of WHERE clause. It filters additional information from your tables.

Query Builder lets you create a HAVING clause from the SQL Statement Tree which automatically displays in your query. Query Builder lists every column in all tables in the SQL

Diagram in the Operand lists. Query Builder displays the datatype of a column in the operand boxes.

The table below describes the options and functionality on the Having dialog box.

RAPID SQL 8.6/XE5 USER GUIDE 896

QUERY BUILDER

Option

Operand (Left)

Operator

Operand (Right)

New Button

Description

Lets you click the target column for the first part of your HAVING clause.

Lets you select the target operator.

Lets you click the target column for the second part of your HAVING clause.

Query Builder automatically writes the query language in the Statement option box.

Click to clear your selections but remain in the

Having dialog box.

Query Builder adds another AND clause to your query.

NOTE: Query Builder does not display clause phrases created from the SQL Statement Tree in the SQL Diagram Pane.

To create a HAVING clause, do the following:

1 On the SQL Statement Tree, expand the HAVING node, and then expand the And node. If there is not a join listed on the And node, double-click And . If there is a join listed, use the shortcut option below.

OR

On the SQL Statement Tree, right-click the HAVING node, and then click New.

For more information, see

Creating a Clause using the SQL Statement Tree

.

D ELETING A HAVING C LAUSE

To delete a HAVING clause, do the following:

1 On the SQL Statement Treeexpand the HAVING node, and then on the Query Builder tool bar, click Delete.

OR

On the SQL Statement Tree expand the HAVING node, right-click the target column, and then click Delete.

Query Builder deletes the target clause and removes it from the SQL Statement Pane.

For more information, see

Creating a Clause using the SQL Statement Tree

.

897 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

C HANGING T ABLES AND C OLUMNS L OCATION IN THE SQL S TATEMENT T REE

Query Builder lets you move tables and columns on the SQL Statement Tree by dragging them to new locations. You can move columns from the AND and OR nodes to an AND or OR node on the WHERE and HAVING clause nodes. Query Builder changes the query in the SQL

Statement Pane to match each move. Query Builder moves tables or columns you are dragging below target table or column.

To move a table or column in the SQL Statement Tree, do the following:

1 Expand target node, then drag the target table or column to a new location.

Query Builder makes the appropriate change in the query in the SQL Statement Pane.

NOTE: Query Builder lets you select multiple tables or columns.

2 To move a table or column to the bottom of a node, drag it to the target node.

Query Builder displays the target table or column at the bottom of target node.

For more information, see

Creating a Clause using the SQL Statement Tree

.

S UBQUERIES

Query Builder lets you build subqueries for SELECT and CREATE VIEW statements in the

WHERE or

HAVING clause. The table below describes the options available for a subquery in

Query Builder:

Operand

EXISTS

NOT

EXISTS

ANY

ALL

SELECT

Location Description

Left operand Specifies data that exists in a column.

Left operand Specifies data that does not exist in a column.

Right operand Specifies data satisfying the operator parameters.

Right operand Specifies data satisfying the operator parameters.

Right operand Specifies data satisfying the operator parameters.

The table below describes the options and functionality on the Where or Having dialog boxes.

Option

Operand (Left)

Operator

Operand (Right)

Subquery

Description

Lets you click the target column for the first part of your clause.

Lets you select the target operator.

Lets you click the target column for the second part of your clause.

Query Builder displays the working subquery in the Statement window.

Paste or type the SUBQUERY statement.

RAPID SQL 8.6/XE5 USER GUIDE 898

QUERY BUILDER

To use the

WHERE and

HAVING dialog boxes to create subqueries, do the following:

1 On the SQL Statement Tree, expand the Where or Having node, and then expand the And node. If there is not a join listed on the And node, double-click And. If there is a join listed, use the shortcut option below.

OR

On the SQL Statement Tree, right-click the Where or Having node, and then click New.

For more information, see

Creating a Clause using the SQL Statement Tree

.

S YNTAX C HECKER

The Syntax Checker scans SQL statements for errors. You can check your syntax at any time while you are fashioning a query, or a Procedure or Function. Query Builder can automatically run a syntax check to validate your query when you are executing or copying a statement.

NOTE: Query Builder lets you continue with your query even if there are errors detected in the syntax.

Using the Syntax Checker

The table below describes the possible syntax errors the Query Builder Syntax Checker tool displays, in order:

Error

Does the query contain duplicate aliases?

Description

Query Builder returns an error message when it detects duplicate aliases.

If the query has a

HAVING

clause, is there a GROUP BY

clause?

Query Builder returns an error message when it detects a HAVING clause without a GROUP BY clause.

If there are aggregates, or a

GROUP BY

clause, are all columns in one or the other?

Query Builder returns an error message when it detects an aggregate, or a GROUP BY clause without all columns in one or the other.

Are there

joins

against nonindexed columns, or columns not participating in a primary key?

Query Builder returns a warning when it detects a join against a non-indexed column, or a column not participating in a primary key.

Are there joins between different datatypes?

Are there cross-products in the query?

Query Builder returns a warning when it detects a join between different datatypes.

Query Builder returns a warning when it detects a cross-product in the query.

899 RAPID SQL 8.6/XE5 USER GUIDE

QUERY BUILDER

S AVING AND R EOPENING Q UERIES

You can save and reopen queries in Query Builder. Saving a query saves the SQL Diagram, SQL

Statement, and Query Builder Explorer view. Query Builder automatically checks for changes in your database or instance between the time you save the query and the time you reopen it.

Query Builder prompts you to save any time you try to close Query Builder, or any time you attempt quitting Rapid SQL.

Query Builder runs Schema Change detection any time you set a query to execute, refresh the data, or open a saved query.

Rapid SQL lets you open multiple saved queries simultaneously.

Saving Queries

To save a query using standard Save and Save As functions, do the following:

1 On the File menu, click Save or Save As.

OR

On the Main tool bar, click Save As.

Rapid SQL opens the Save As dialog box.

2 In the File name box, type the name of the query.

NOTE: By default, the product appends the.qbl extension to Query Builder files. If there is more than one Query Builder session in progress when you save, the file is further appended with an integer, for example.qbl2.

TIP: Rapid SQL lets you save data in text (*.txt) and XML (*.xml) file formats.

3 Click OK.

Rapid SQL saves the file and closes the Save As dialo g box.

Reopening Queries

You can open a query using standard Open functions. Query Builder displays the Query Builder diagram, statement and Query Builder Explorer Pane and it checks the instance or database for schema changes.

The Query Builder Schema Change Detection component checks for:

• Renamed or dropped tables referenced in the query. Renamed tables that have been renamed are considered dropped.

• Renamed or dropped columns referenced in the query. Renamed columns are considered dropped and inserted.

Columns added or reordered in tables referenced in the query.

If Query Builder detects a change, it opens the Schema Change Detected dialog box. The dialog box displays details of changes to your schema.

RAPID SQL 8.6/XE5 USER GUIDE 900

QUERY BUILDER

Query Builder opens an ISQL Editor with the last saved versions of the SQL statement.

U SING D ATA E DITOR WITH Q UERY B UILDER

SELECT statements. Rapid SQL lets you open multiple Data Editor sessions so that you can continue to change your data until you find the best match for your query.

CAUTION: Data Editor is a real-time editor. Changes in your data using Data Editor are permanent.

Opening the Data Editor from Query Builder

To open the Data Editor from Query Builder, do the following:

1 On the Tools menu, click Query Builder.

OR

On the Datasource Explorer, expand the Database or Schema node, click Tables, and then on the Command menu, click Build Query.

OR

On the Tools tool bar, click Query Builder.

OR

On the Explorer, expand Tables, right-click the target table(s), and then click Build Query.

OR

On the Explorer, expand Views, right-click the target view(s), and then click Build Query.

Rapid SQL opens Query Builder.

2 Select a

database

or instance.

3 Select a

table .

4 Select a

column , or columns.

5 On the Query Builder menu, click Edit Data.

OR

On the Query Builder tool bar, click Edit Data.

Rapid SQL opens Data Editor.

For more information on using the Data Editor, see Using Data Editor .

901 RAPID SQL 8.6/XE5 USER GUIDE

DATA EDITOR

D

ATA

E

DITOR

The Edit Data function opens the Data Editor. You can use the Data Editor to edit your tables in real-time. The Data Editor supports all editable datatypes and is an alternative way to add, edit, or delete data from your tables.

NOTE:

You can use Data Editor within Query Builder

to edit data in tables while you create

SELECT statements. You can open multiple Data Editor sessions so that you can continue to change your data until you find the best match query.

The Data Editor includes a

Data Editor Filter

that lets you select the columns in your table that you want to edit. You must select at least one column to use the Data Editor. The Data Editor

Filter is not available for the Query Builder.

For more information, see:

Data Editor Design

Using Data Editor

D ATA E DITOR D ESIGN

The Data Editor includes the following components:

• Edit Window

• ISQL Window

• Tool Bar

• Data Editor Filter

• Date/Time Format Builder

• Using Data Editor

D ATA E DITOR E DIT W INDOW

Data Editor displays all the information in the target table in the Data Editor Edit Window. You can edit data directly in this window.

For more information, see:

ISQL Window

Tool Bar

Data Editor Filter

Date/Time Format Builder

Using Data Editor

RAPID SQL 8.6/XE5 USER GUIDE 902

DATA EDITOR

D ATA E DITOR ISQL W INDOW

The Data Editor ISQL Window displays the active SQL statement, which uses the data from the target table.

When appropriate, Data Editor displays a History Tab. The History Tab displays all SQL

Statements created in the current session. If there is an error, Data Editor displays an Error Tab.

The Error Tab details any errors in data entry encountered during execution.

For more information, see:

Edit Window

Tool Bar

Data Editor Filter

Date/Time Format Builder

Using Data Editor

D ATA E DITOR T OOL B AR

The Data Editor tool bar lets you access commonly used features.

The table below describes the function of each Data Editor tool.

Description

Stop Button.

Function

Stops loading data to the Data Editor. Data Editor displays rows up to the stopping point.

Displays the editing mode for the target table.

List of options for the target table.

Execute SQL button

Insert Record button

Save Current Row button

Remove Data button

Clear SQL Text button

Undo button

Redo button

First Record button

Last Record button

Filter Data button

Refresh button

Executes the current SQL statement for the target table.

Inserts new record for the target table. New records display at the end of the table. For related information, see

Default

Value Handling .

Saves data in the current selected row. Data Editor prompts to save when you attempt to leave a row in Live mode. For

related information, see Default Value Handling .

Removes data in target row. Data Editor displays an optional prompt.

Clears SQL text from the SQL Statement Pane.

Undoes the most recent operation.

Redoes the most recent operation.

Moves to the first record in the target table.

Moves to the final record in the target table.

Filters table using the target cell as the filter parameter.

Reloads data for target table

903 RAPID SQL 8.6/XE5 USER GUIDE

DATA EDITOR

Description

Calendar button

Date/Time Format Builder button

Date/Time Format Undo button.

Date/Time Format Redo button.

Close button

For more information, see:

Edit Window

ISQL Window

Data Editor Filter

Date/Time Format Builder

Using Data Editor

Function

Sets correct format for target date/time cell. Enables the

Calendar window.

Opens the

Date/Time Format Builder dialog box

.

Undoes the last date/time format display.

Redoes the last date/time format display.

Closes and exits Data Editor.

D ATA E DITOR F ILTER

The Data Editor Filter displays the columns of a target table and the corresponding SELECT SQL

Statement. You can select columns from the filter for selective data editing.

For more information, see:

Edit Window

ISQL Window

Tool Bar

Date/Time Format Builder

Using Data Editor

N OTES ON XML T YPES AND U NICODE D ISPLAY IN THE D ATA E DITOR

When working with data in the Data editor, keep the following in mind:

• XML data types are supported for IBM DB2 for Windows, Unix, and Linux, Microsoft SQL

Server, and Oracle. In the Data editor, XML data types are displayed and entered as LOB content.

RAPID SQL 8.6/XE5 USER GUIDE 904

DATA EDITOR

• Support for display of Uincode characters is provided as follows:

• IBM DB2 for Windows, Unix, and Linux: character , clob , varchar , and longvarchar types

• SQL Server: nchar , nvarchar , ntext , and nvarchar(max) types.

• Oracle 9i, and 10g: NCHAR , NVARCHAR2 and NCLOB for non-Unicode UTF8 Character

Set Instances and NCHAR , NVARCHAR2 , CHAR , VARCHAR2 , LONG , NCLOB and CLOB for Unicode UTF8 Character Set Instances

• Sybase ASE 12.5 and 15.2: UNICHAR , UNIVARCHAR and UNITEXT for non-Unicode UTF8

Character Set Instances and UNICHAR , UNIVARCHAR , UNITEXT , NCHAR , NVARCHAR ,

CHAR , VARCHAR and TEXT for Unicode UTF8 Character Set Instances

U SING D ATA E DITOR

Data Editor lets you edit data in your tables with any editable datatype without leaving the parent application. Data Editor lets you use your new data immediately.

CAUTION: Data Editor is a real-time editor. Changes in your data using Data Editor are permanent.

The table below describes the functions and options of the Data Editor:

Option

Live

Batch

Description

Edits data one row at a time. You must execute when you leave the row.

Edits data in multiple rows before executing.

NOTE: You can also use the Data Editor to edit

date and time functions in a table.

NOTE: If you make an incorrect edit in a cell, Data Editor displays the error on the Error Tab of the ISQL Editor. Data Editor does not incorporate this error(s) in data into the table.

Data Editor saves any changes in data prior to the error message.

CAUTION: Data Editor is a real-time editor. Changes in your data using Data Editor are permanent.

For more information, see:

Edit Window

ISQL Window

Tool Bar

Data Editor Filter

Date/Time Format Builder

905 RAPID SQL 8.6/XE5 USER GUIDE

DATA EDITOR

Default Value Handling

E DITING D ATE AND T IME F UNCTIONS

The Data Editor lets you edit date and time functions in a table. Data Editor uses a calendar tool to guarantee accurate input for date and time data. You can also change the display of date and time using the

Date/Time Format Builder .

For more information, see:

Calendar Button

Date/Time Format Builder

D ATE /T IME F ORMAT B UILDER

The Date/Time Format Builder lets you customize your date/time display. The Data Editor

uses this format to display your dates and times. You control how the Data Editor displays the dates and time by using predefined formats, or by customizing a format to fit your needs.

The Data Editor uses the default date/time format of your Operating System. If you do not make any global changes in Rapid SQL, the Date/Time Format Builder displays dates and times using the default formats of your operating system.If you make changes to dates and times in the Data

Editor, Rapid SQL commits the changes in the format used by the database.

NOTE: The changes you make using the Date/Time Format Builder do not affect the way your database stores dates and times.

E DITING THE D ATE /T IME D ISPLAY

You can edit the date/time display on a global, table, or column level. The table below describes the different ways you can edit your date/time format display:

Option

Global

Description

Lets you make global changes to the Data Editor date display.

Access

Options Editor

Grid Lets you make changes to the date display of the entire Data Editor grid for that session only.

Column Lets you make changes to the date display of a single column in the Data Editor for that session only.

Data Editor grid

Data Editor column

NOTE: Date/Time formats changed on a table or column level are valid for that session only.

Editing Date/Time Globally

You can use the Options Editor to make global changes to your date/time display in the

Data

Editor . When you change the date/time format, using the Options Editor, the Data Editor

displays all dates and times in the global manner. To change the date/time display for a particular session, see Editing Grid Date/Time Format or Editing Column Date/Time Format .

RAPID SQL 8.6/XE5 USER GUIDE 906

DATA EDITOR

To edit the date and time globally, do the following:

1 On the File menu, click Options .

OR

On the Main tool bar, click Options.

Rapid SQL opens the Options Editor.

2 On the Options Editor, click the Data Editor Tab.

3 On the Data Editor Tab, click ...

Rapid SQL opens the Date/Time Format Builder dialog box.

4 On the Date/Time Format Builder dialog box, click the Date/Time Format list, and then click the target predefined date/time format.

5 To customize the date/time format to your specifications, click Customize.

Rapid SQL opens the Date/Time Format Builder dialog box.

6 On the Date/Time Format Builder dialog box, select the appropriate Date/Time Format

Options:

Option

Date/Time Format

Day Format

Separator

Month Format

Year Format

Date Order

Hour Format

Minute

Sec Format

AM/PM

Date/Time Order

Format Display

Sample

Description

Displays the predefined Date/Time format.

Lets you choose the day display.

Lets you choose the display separator between the day, month, and year.

Lets you choose the month display.

Lets you choose the year display.

Lets you choose the date order display.

Lets you choose the hour display.

Lets you choose the minute display.

Lets you choose the second display.

Lets you choose the AM/PM display.

Lets you choose the date/time order display.

Displays the current format.

Displays a sample of the current format.

7 When you have finished selecting the Date/Time format options, click OK.

Rapid SQL accepts the date/time format changes and closes the Date/Time Format Builder dialog box.

907 RAPID SQL 8.6/XE5 USER GUIDE

DATA EDITOR

8 On the Options Editor, select the appropriate Default Date/Time Format options:

Option

Use Calendar Control as default

Two-digit year system setting warning

Description

If selected, Rapid SQL uses the Calendar Control window.

If selected, Rapid SQL sends a warning when you use a twodigit year system setting.

9 Click OK.

Rapid SQL accepts the Default Date/Time Format changes and closes the Options Editor.

NOTE: To use a different format for a particular session, change the date/time at the session level.

Editing Grid Date/Time

You can change the date/time display for a particular session when working in the

Data Editor .

The Data Editor does not maintain the format changes once you close your session. To make this display permanent, use the Editing Global Date/Time Format .

To edit the grid date and time, do the following:

1 On the Datasource Explorer, select the target table.

2 Right-click the table, and then click Edit Data.

Rapid SQL opens the Data Editor .

3 On the Data Editor tool bar, click Date/Time Format Builder.

Rapid SQL opens the Date/Time Format Builder.

4 On the Date/Time Format Builder, click the Date/Time Format list, and then click the target predefined date/time format.

5 To customize the date/time format to your specifications, click Customize.

Rapid SQL opens the Date/Time Format Builder dialog box.

6 On the Date/Time Format Builder dialog box, select the appropriate Date/Time Format

Options:

Option

Date/Time Format

Day Format

Separator

Month Format

Year Format

Date Order

Description

Displays the predefined Date/Time format.

Lets you choose the day display.

Lets you choose the display separator between the day, month, and year.

Lets you choose the month display.

Lets you choose the year display.

Lets you choose the date order display.

RAPID SQL 8.6/XE5 USER GUIDE 908

DATA EDITOR

Option

Hour Format

Minute

Sec Format

AM/PM

Date/Time Order

Format Display

Sample

Description

Lets you choose the hour display.

Lets you choose the minute display.

Lets you choose the second display.

Lets you choose the AM/PM display.

Lets you choose the date/time order display.

Displays the current format.

Displays a sample of the current format.

7 When you have finished selecting the Date/Time format options, click OK.

Rapid SQL accepts the date/time format changes and closes the Date/Time Format Builder dialog box.

• To undo changes, on the Data Editor tool bar, click Undo Change.

• To redo changes, on the Data Editor tool bar, click Redo Change.

NOTE: Date/Time formats changed on a table level are valid for that session only.

Editing Column Date/Time

You can change the date/time display for a particular column when working in the

Data Editor .

The Data Editor does not maintain the format changes once you close your session. To change the format for the entire grid, see Editing Grid Date/Time Format . To make this display permanent, Editing Global Date/Time Format .

To edit the column date and time, do the following:

1 On the Datasource Explorer, select the target table.

2 Right-click the table, and click Edit Data.

Rapid SQL opens the Data Editor .

3 On the Data Editor, click the column header to select the column.

4 Right-click the column and click Format.

Rapid SQL opens the Date/Time Format Builder.

5 On the Date/Time Format Builder dialog box, click the Date/Time Format list, and then click the target predefined date/time format.

6 To customize the date/time format to your specifications, click Customize.

Rapid SQL opens the Date/Time Format Builder dialog box.

909 RAPID SQL 8.6/XE5 USER GUIDE

DATA EDITOR

7 On the Date/Time Format Builder dialog box, select the appropriate Date/Time Format

Options:

Option

Date/Time Format

Day Format

Separator

Month Format

Year Format

Date Order

Hour Format

Minute

Sec Format

AM/PM

Date/Time Order

Format Display

Sample

Description

Displays the predefined Date/Time format.

Lets you choose the day display.

Lets you choose the display separator between the day, month, and year.

Lets you choose the month display.

Lets you choose the year display.

Lets you choose the date order display.

Lets you choose the hour display.

Lets you choose the minute display.

Lets you choose the second display.

Lets you choose the AM/PM display.

Lets you choose the date/time order display.

Displays the current format.

Displays a sample of the current format.

8 When you have finished selecting the Date/Time format options, click OK.

Rapid SQL accepts the date/time format changes and closes the Date/Time Format Builder dialog box.

• To undo changes, on the Data Editor tool bar, click Undo Format.

• To redo changes, on the Data Editor tool bar, click Redo Format.

NOTE: Date/Time formats changed on a column level are valid for that session only.

D EFAULT V ALUE H ANDLING

When adding new records, when the transaction committing a row occurs, if no value has been entered for a column defined as having a default value, the default value is used for that column and validation is not required. The default value is not visible in the Data Editor grid until you commit the record and use the Reload Data button to refresh the grid.

In the case of tables with all columns defined as having default values, for example, you can add multiple records by repeatedly clicking the Insert New Record and Save Current Row buttons.

Page Setup

The table below describes the options and functionality on the Page Setup dialog box:

RAPID SQL 8.6/XE5 USER GUIDE 910

CODE GENERATION FACILITY

Option

Margins

Titles and Gridlines

Preview

Page Order

Center on Page

Functionality

Lets you select the size of the left, right, top, and bottom margins.

Lets you select options.

Displays how the table will appear when printed.

Lets you specify when to print columns and rows.

Lets you select how table floats on the page.

C

ODE

G

ENERATION

F

ACILITY

The Rapid SQL Code Generation Facility offers a quick way to generate DML statements for tables and views. The Code Generation Facility provides an efficient way to establish and enforce coding standards within the application by generating code with standardized formatting. The Code Generation Facility also lets you:

• Create packages and procedures for Oracle.

• Create procedures for IBM DB2 LUW, Microsoft SQL Server, and Sybase ASE.

NOTE: The Code Generation Facility can generate procedures for IBM DB2 LUW that are based on tables but not views.

The table below describes the options and functionality on the Embarcadero Code Generator:

Option

Datasource List

Database List

Owner List

Tables Option Button

Description

To change the default datasource, click the list and then click a new datasource.

NOTE: If you are not connected to the target datasource, click the Connect button to establish a connection.

The current datasource, and database and datasource user name where applicable, are preselected when you open Code

Generation Facility.

Lets you click the list and then click a target database.

Lets you click the list and then click the new owner.

Click this option to see a list of the tables in the scroll box. In the scroll box, click the target table to be used as a code generation base.

NOTE: The list of objects corresponds to the selected datasource owner schema. If there are no tables in the target schema, the list will be empty.

911 RAPID SQL 8.6/XE5 USER GUIDE

IMPORT DATA

Option

Views Option Button

Select 1 or More Where

Clause

Select 1 or More Output

Columns

Provide and Output File

Name

Open

Execute Immediately

Generate

Grant Execute to

Description

Click this option to see a list of the views in the scroll box. In the scroll box, click the target view to be used as a code generation base.

NOTE: The list of objects corresponds to the selected datasource owner schema. If there are no views in the target schema, the list will be empty.

In the grid, select the check boxes that correspond to the target where clauses.

NOTE: Columns of primary keys are preselected.

In the grid, select the check boxes that correspond to the target output columns.

NOTE: All existing columns are preselected.

In the box, enter the file name in the File box or click the Browse button to locate the output file.

Select to open the file after the procedure runs.

Select to execute the file immediately.

To generate an SQL statement for tables, click the Object Type list and then click the object type.

NOTE: If you are generating an SQL statement for Views, you only have the Select option.

If you are a DBA or have DBA privileges, select the Users, Roles, and Groups check boxes to grant execute privileges.

Using the Code Generation Facility

1 On the Tools menu, click Code Generation Facility.

OR

On the Tools toolbar, click Code Generation Facility.

Rapid SQL opens the Embarcadero Code Generator dialog box.

I

MPORT

D

ATA

It is often necessary to import data into database tables from an external source. Developers commonly need to bring sample test data into a database to assist with Use Case scenarios.

These scenarios may simulate particular data retrievals where segments of the data are preferred over performing a full data load. Business Analysts often acquire spreadsheets from outside sources. It is helpful to them to load this data into tables to perform more in-depth queries and pull meaningful data to make informed decisions.

RAPID SQL 8.6/XE5 USER GUIDE 912

IMPORT DATA

To leverage the power of Microsoft Excel, database users may prefer to pull data from the database and load it into spreadsheet. Once using manipulations like Average, Aggregate, Row

Count, or simple additions or deletions have been used on the data, the need remains to import this massaged data back into the database. Additionally, once the data is placed back in the database, recurring reporting and documentation are easily accomplished.

Rapid SQL’s Import Data tool eliminates the time-consuming, manual process of working with data. The Import Data Wizard lets you pull data from a text file or a Microsoft Excel spreadsheet.

Important Notes

None

Completing the Import Data Wizard

1 On the Tools menu, click Import Data.

Rapid SQL opens the first panel

of the Import Data Wizard.

2 On the first panel of the Wizard, specify the location of the file and enter the catalogue, schema (owner), and table into which the data will be imported.

3 Click Next.

4 On the second panel of the Wizard, select the character delimited type for the columns in the data file – Tab, Semi colon, Comma, Space, or Other (Custom – Tilde, Ampersand etc.)

5 You can select the option that the first row of the data contains field names.

6 Click Next.

7 On the third panel of the Wizard, you can preview and confirm the data format. You can also use the custom mapping to match columns in the table.

8 If you need to make any changes, click Back to scroll back to the appropriate panels of the wizard to make your corrections.

9 Click Finish.

Rapid SQL generates the Insert statements that can be saved as a *.sql file for re-use across several datasources (versus simply loading the data directly into the database).

I MPORT D ATA W IZARD - P ANEL 1

The table below describes the options and functionality on this panel of the Import Data Wizard:

Option

Specify the file to be used in this data load operation.

Description

Lets you type the file path or browse for the file.

913 RAPID SQL 8.6/XE5 USER GUIDE

IMPORT DATA

Option

Which table do you want to load data into?

Description

Lets you select the catalog, schema, and the table to create the insert statements.

For more information, see

Import Data

.

I MPORT D ATA W IZARD - P ANEL 2 FOR T EXT F ILES

The table below describes the options and functionality on this panel of the Import Data Wizard:

Option

What character delimited the columns in the data file?

First Row Contains Field

Names

Description

Lets you select the character delimited type for the columns in the data file: Tab, Semicolon, Comma, Space, or Other

(Custom – Tilde, Ampersand etc.)

Select for the first row of the data to contain field names.

For more information, see

Import Data

.

I MPORT D ATA W IZARD - P ANEL 3 FOR T EXT F ILES

This panel of the Import Data Wizard lets you assign column names to fields. Column names in red indicate an invalid mandatory column names. Blue columns are already used.

For more information, see

Import Data

.

I MPORT D ATA W IZARD - P ANEL 2 FOR E XCEL F ILES

The table below describes the options and functionality on this panel of the Import Data Wizard:

Option

The spreadsheet you have selected contains more than one worksheet. Which worksheet contains the data you wish to import?

Start Cell

End Cell

First Row Contains Field

Names

Description

Lets you select the worksheet to import.

Lets you type the first cell of data to import.

Lets you type the last cell of data to import.

Select to assign column names to fields in the grid.

RAPID SQL 8.6/XE5 USER GUIDE 914

EMBARCADERO PRODUCTS

For more information, see

Import Data

.

E

MBARCADERO

P

RODUCTS

The Tools menu lists all installed Embarcadero Technologies products. This lets you toggle to or start another Embarcadero product.

To open the Performance Center web client, do the following:

C

ODE

W

ORKBENCH

The Code Workbench is a multi-tabbed dialog that lets you enable and configure the following, time-saving ISQL editor features:

• Code templates - common, multi-line blocks of code you can add to a script with a couple of keystrokes and modify to the purpose of the script. For information on using this feature,

see Using Code Templates .

• Auto replace - commonly used SQL syntax or commands that can be added to a script using a shortcut, replacement expression. For information on using this feature, see

Using

Auto Replace Expressions .

The Code Workbench lets you modify, add, and delete Code Template and Auto Replace resources. In addition, you can save your Code Workbench settings for the purpose of usersharing or customization. The following topics provide detailed instructions and information on setting up these features:

Enabling the Code Templates and Auto Replace Features

Maintaining Code Template Definitions

Maintaining Auto Replace Expressions

Loading and Saving Custom Code Workbench Settings

E NABLING THE C ODE T EMPLATES AND A UTO R EPLACE F EATURES

In order to use the Code Templates or Auto Replace features, they must be enabled.

915 RAPID SQL 8.6/XE5 USER GUIDE

CODE WORKBENCH

To enable the Code Templates or Auto Replace features

1 From the Tools menu, select Code Workbench . The Code Workbench dialog opens.

2 Use the following table as a guide to using the controls on the Settings panel:

Group

Auto Replace

Code Templates

Settings and descriptions

Enable Auto Replace

Replace substrings

Select this checkbox to use this feature in the ISQL editor.

If unselected, only blank-delimited occurrences of auto replace expressions are replaced when an activation event occurs. If selected, all occurrences of auto replace expressions are replaced.

For example, consider an Auto Replace expression of BEG that is to be replaced with Begin . With Replace substrings enabled,

BEGBEG would be replaced with BeginBegin when an activation event occurs. With Replace substrings disabled, no replacement would occur.

Enable Code Templates Select this check box to use this feature in the ISQL editor.

3 Either click OK to dismiss the dialog or use the other tabs to configure the code templates and auto replace features.

For information on configuring the Code Template and Auto Replace features, see Maintaining

Code Template Definitions

and Maintaining Auto Replace Expressions

.

See also:

Using Code Templates

Using Auto Replace Expressions

M AINTAINING C ODE T EMPLATE D EFINITIONS

Rapid SQL loads a default set of code templates automatically on startup. The Code Workbench lets you add templates to the currently loaded templates, edit any existing templates, or delete templates.

To modify the currently loaded code templates

1 From the Tools menu, select Code Workbench .

2 Select the Code Templates tab.

RAPID SQL 8.6/XE5 USER GUIDE 916

CODE WORKBENCH

3 Use the following table as a guide to performing the template maintenance tasks offered on this tab:

Task

To add a new template

To edit a template

To delete a template

Steps

Click Add to open the Edit Code Template expression dialog and provide the following information:

Shortcut - used to identify the template when the Code Assist menu is open.

Description - displayed in the Code Templates tab listing for this template.

Platform - Select a specific DBMS platform or select ALL. The template will be available in ISQL editor windows with connections to the specified platform or all platforms, accordingly.

Template - Type the code block that will be added at the cursor when this template is selected.

Select a template from the list, click Edit to open the Edit Code Template expression dialog, and edit the template values as per the descriptions above.

Select a template from the list, click Delete and when prompted to confirm, click Yes .

NOTE: You can also save the currently loaded code templates and other Code Workbench settings to an XML file for subsequent loading. This lets you share settings among users and tailor Code Template and Auto Replace settings to particular environments or projects. For details, see

Loading and Saving Custom Code Workbench Settings .

M AINTAINING A UTO R EPLACE E XPRESSIONS

Rapid SQL is packaged with a set of default Auto Replace definitions, stored in the registry and loaded automatically on startup. The Code Workbench lets you add new definitions, edit any existing definitions, or delete definitions from the currently loaded set.

To modify the currently loaded expressions

1 From the Tools menu, select Code Workbench .

2 Select the Auto Replace tab.

917 RAPID SQL 8.6/XE5 USER GUIDE

CODE WORKBENCH

3 Use the following table as a guide to performing the template maintenance tasks offered on this tab:

Task Steps

To add a new expression Click Add to open the Edit Auto Replace Expression dialog and provide the following information:

Expression - the shortcut that will be replaced.

Activation - Type one or more individual keys that are to trigger replacement in the

ISQL editor. Valid activation keystrokes are SPACE, TAB, and RETURN. As you type, the following representations are shown in the Activation box: \s represents SPACE,

\t represents TAB, and \n represents RETURN (newline).

Replace With - Type the command or SQL syntax that will be replaced when one of the activation events occurs.

To edit an expression Select an expression from the list, click Edit to open the Edit Auto Replace Expression dialog, and edit the expression values as per the descriptions above.

To create an expression based on an existing expression

Select an expression from the list, click

Expression

Clone to open the Edit Auto Replace

dialog, prepopulated with values of the existing expression. Edit the expression values as per the descriptions above.

To delete an expression Select an expression from the list, click Delete and when prompted to confirm, click Yes .

NOTE: You can also save the currently loaded Auto Replace expressions and other Code

Workbench settings to an XML file and subsequently load those settings. This lets you share settings among users and tailor Auto Replace and Code Template settings to particular environments or projects. For details, see

Loading and Saving Custom Code

Workbench Settings .

L OADING AND S AVING C USTOM C ODE W ORKBENCH S ETTINGS

At each startup, Rapid SQL loads a default set of code templates and auto replace definitions stored in the registry. The enabled/disabled status of the two features is retained on shutdown.

After changing the enabled/disabled status of the Code Templates or Auto Replace features, or modifying the associated templates or replacement expressions, you can save the status and currently loaded resources to an XML file. The ability to save, load, and restore settings means you can:

• Share Code Workbench settings among users

• Create custom Code Workbench settings tailored to DBMS platforms or coding projects

RAPID SQL 8.6/XE5 USER GUIDE 918

CODE ANALYST

To make use of Code Workbench fie options

1 From the Tools menu, select Code Workbench .

2 Use the following table as a guide to performing the Code Workbench file option tasks:

Task

To save the current Code Workbench settings to an XML file:

To replace the currently loaded Code

Workbench settings with a set of saved settings:

To restore the default Code Workbench settings from the registry:

Steps

Click Export Settings and use the Save As dialog to select a location and provide a name for the exported file.

Click Import Settings and use the Open dialog to locate and select the settings file to be loaded.

Click Restore Settings .

See also:

Maintaining Code Template Definitions

Maintaining Auto Replace Expressions

C

ODE

A

NALYST

The Code Analyst is a tool to identify time-consuming lines of code. Code Analyst lets you:

• Perform detailed response time analysis on the execution of procedures and foreign keys.

• Benchmark the execution of one or more procedures or functions to determine exactly what code objects and lines of code are taking the longest to run.

• Save response time metrics and perform intelligent compares against current execution times so you can determine deviations from previous acceptable response times.

TIP: You can set Code Analyst options in the

Code Analyst Options

.

NOTE: Availability of this feature depends on your Rapid SQL licensing. For more information, see

Licensing .

Important Notes

• For DB2, before profiling with Code Analyst, Compile all procedures with the debugging

option selected.

• For Oracle, when using the Oracle Debugger, Compile

all procedures with the debugging option selected before profiling with Code Analyst.

Common Tasks

Creating a Code Analyst Session

919 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

Identifying and Fixing Bottlenecks Using Code Analyst

Comparing Code Analyst Sessions

Cloning a Code Analyst Session

Deleting a Code Analyst Session

Stopping a Code Analyst Session Execution

Executing a Code Analyst Session

Scheduling a Code Analyst Session

Unscheduling a Code Analyst Session

Refreshing a Code Analyst Session

Saving Results in Code Analyst

Printing Results in Code Analyst

Viewing Run Details in Code Analyst

Viewing Unit Summary Information in Code Analyst

Viewing Unit Details in Code Analyst

Setting View Options for the Unit Detail Tab in Code Analyst

Extracting SQL Text in Code Analyst

Executing SQL in Code Analyst

C ODE A NALYST DBMS N OTES

Code Analyst is available for:

• Microsoft SQL Server

• Oracle

• IBM DB2 LUW

• Sybase ASE

Rapid SQL utilizes debugger technology to capture the data for each line of executed code. For

Oracle, you can use the debugger or using Oracle's supplied DBMS_Profiler package.

TIP: For Oracle, you can specify to use the debugger or the DBMS_Profiler package on the

Code Analyst Options .

The Code Analyst will step through each line of code, stopping to record data for those lines of code onto which a breakpoint can be issued. Some debuggers cannot capture time metrics for all lines of a stored procedure or function.

RAPID SQL 8.6/XE5 USER GUIDE 920

CODE ANALYST

Procedures and functions that contain looping constructs will require more time to run. The additional amount of time needed to run is proportional to the number of iterations in the loop.

For more information, see:

IBM DB2 LUW Data Captured by Code Analyst

Microsoft SQL Server Data Captured by Code Analyst

Oracle Data Captured by Code Analyst

Sybase ASE Data Captured by Code Analyst

IBM DB2 LUW D ATA C APTURED BY C ODE A NALYST

Code Analyst utilizes the IBM Debugger when capturing time data.

The debugger is verified to run on IBM DB2 LUW version 7.2 and up. There is a known issue running version 7.2 with Fixpack 9.

DB2 has documented limitations on lines of code can be profiled.

921 RAPID SQL 8.6/XE5 USER GUIDE

The following are SQL statements that are NOT valid break point lines:

BEGIN

BEGIN

BEGIN NOT ATOMIC

BEGIN ATOMIC

CLOSE CURSOR

DECLARE cursor WITH RETURN FOR <sql statement>

DECLARE , var without default

DECLARE CONDITION (CONDITION) FOR SQLSTATE (VALUE) "..."

DECLARE CONTINUE HANDLER

DECLARE CURSOR

DECLARE EXIT HANDLER

DECLARE RESULT_SET_LOCATOR [VARYING]

DECLARE SQLSTATE

DECLARE SQLCODE (unless there is a default)

DECLARE UNDO HANDLER (unless they are entered)

DO

ELSE

END

END CASE

END IF

END FOR

END REPEAT

END WHILE

ITERATE

LEAVE

LOOP

OPEN CURSOR

REPEAT (as a keyword alone)

RESIGNAL

RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

922

CODE ANALYST

SIGNAL

THEN labels, e.g. P1:

NOTE: Code containing these statements will not have times associated with them.

For more information, see

Code Analyst DBMS Notes .

M ICROSOFT SQL S ERVER D ATA C APTURED BY C ODE A NALYST

In order to execute a Code Analyst session against a Microsoft SQL Server database, the SQL

Server debugger must be installed and functioning properly. Please refer to

Embarcadero SQL

Debugger for Microsoft SQL Server for details concerning set up.

Related Information

Code Analyst DBMS Notes

O RACLE D ATA C APTURED BY C ODE A NALYST

When using the PL/SQL Profiler, Oracle has documented an issue regarding extremely large times being returned by the profiler. The times are sometimes hundred times larger than the actual run time of the stored procedure or function. Oracle documents that this is a vendor/os problem rather than an Oracle problem, because the RDTSC instruction is reporting wrong time stamp counter. They indicate that they have seen this problem on some INTEL Pentium processors.

Related Information

Code Analyst DBMS Notes

S YBASE ASE D ATA C APTURED BY C ODE A NALYST

Sybase ASE has documented a problem with their debugger API. The problem involves reporting the wrong line number through the debugger. Because of this bug, Code Analyst may report back data for blank lines or lines that contain comments. Sybase has fixed this problem release 12.5.2 of the database. All procedures affected must be dropped and recreated in order to correct the problem.

Related Information

Code Analyst DBMS Notes

923 RAPID SQL 8.6/XE5 USER GUIDE

C ODE A NALYST R EQUIREMENTS

Debuggers

The Code Analyst uses fully configured Embarcadero SQL Debuggers to profile, and therefore availability of this feature depends on your Rapid SQL licensing. For more information, see the following topics:

Licensing

• Rapid SQL Add-On Tools

Using Code Analyst with the Oracle Profiler

Oracle users have the option of either using the Oracle Debugger or the Oracle Profiler with

Code Analyst to capture statistics. To use Code Analyst with the profiler option, Oracle’s profiler package must be installed. The install is user specific, so it must be installed by each user

wishing to use Code Analyst. To install the package, users can invoke the Rapid SQL PL/SQL

Profiler .

TIP:

You can set profiler options in the Code Analyst Options . You can specify that Code

Analyst display the actual run time on the database, and does not include the time it takes to get to the server.

Privileges

For Oracle, SYS privileges are required to install the Code Analyst tables. If you do not have SYS privileges, ask your Server Administrator to log into the Oracle datasource as SYSDBA, and then open Code Analyst to install the tables.

During install, the following privileges are set for the Code Analyst tables.

• DB2 – Permissions are granted to the Public Group

• Oracle – Permissions are granted to the Public group.

• Microsoft SQL Server – Permissions are granted to the Public role.

• Sybase ASE – Permissions are granted to the Public group.

All users can use the Code Analyst but each user will only see their own run ids. Users need to belong to the public group.

TIP: You can check this/modify privileges in the Users Editor.

I NSTALLING C ODE A NALYST

To install Code Analyst, do the following:

1 On the Tools menu, select Code Analyst .

2 In Select the database you would like to install the tables on, select a database.

RAPID SQL 8.6/XE5 USER GUIDE 924

CODE ANALYST

3 For IBM DB2 LUW for Open Systems, in select the tablespace you would like to install the tables on, select a tablespace.

4 For IBM DB2 LUW for Open Systems, in select the schema you would like to install the tables on, select a schema. The default is EMBTCA schema.

5 In Select the filegroup you would like to install the tables to, select a filegroup.

Code Analyst installs the following repository tables in the repository:

• EMBT_CODE_ANA_RUNS - Holds all the code analyst sessions created by users.

• EMBT_CODE_ANA_UNITS - Holds all the objects to be run for all.

• EMBT_CODE_ANA_PARAMS - Contains all the parameters for the objects that were run.

• EMBT_CODE_ANA_DATA - Contains the run data and is used to populate all the charts and statistics.

• EMBT_CODE_ANA_VERSION - Contains the version number of code analyst.

Code Analyst opens to the Run Summary tab.

6 Create a session using the Creating a Code Analyst Session .

U NINSTALLING C ODE A NALYST

The Uninstall functionality lets you uninstall Code Analyst from the server.

NOTE: To uninstall a repository table, you need create table and grant privileges. Generally, you need sysadmin privileges.

1 On the Tools menu, select Code Analyst .

2 Select a session or object, and then select Uninstall.

Code Analyst removes the repository tables in the repository:

• EMBT_CODE_ANA_RUNS - Holds all the code analyst sessions created by users.

• EMBT_CODE_ANA_UNITS - Holds all the objects to be run for all.

• EMBT_CODE_ANA_PARAMS - Contains all the parameters for the objects that were run.

• EMBT_CODE_ANA_DATA - Contains the run data and is used to populate all the charts and statistics.

• EMBT_CODE_ANA_VERSION - Contains the version number of code analyst.

925 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

C ODE A NALYST P RODUCT D ESIGN

Code Analyst performs detailed response time analysis. Code Analyst steps through each line of code and profiles those lines of code that the debugger or profiler can capture time metrics for.

NOTE: Some debuggers do not capture time metrics for all lines of a procedure or function.

For more information, see

Code Analyst DBMS Notes .

After capturing the time metrics, Code Analyst displays the data in an easy-to-read format on the tabs.

The Code Analyst is comprised of the following tabs:

Tab Option

Run Summary Session

Session

Run ID

Run Date

Total Profile Time (ms)

Total Analysis Time

Run Detail

Scheduler

Session

Run

Unit Type

Unit Owner

Unit Database

Time Unit

Unit Owner

Unit Name

Unit Type

Comparison

Unit Database

Total Profiled Time

% of Profiled Time

Base Run

Description

Lets you select the run session(s).

Displays the name of the session as created by the user.

Displays the run ID for the run(s). This number is system generated.

Displays the time and date of the session.

Displays the total time taken for the profiled code to execute.

This time is limited to the lines of code that are profiled.

Overhead is not included in this calculation.

Displays the total time taken for the session to complete, including all overhead time needed to analyze the procedure or function.

Displays the scheduler used to schedule the session. This information displays until the scheduled job has been run.

Lets you select the object execution session.

Lets you select the object execution.

Lets you select the object type for the object execution.

Lets you select the object owner for the object execution.

Lets you select the object database for the object execution.

Lets you specify the time unit for the Unit Execution graph.

Displays the owner of the procedure or function.

Displays the name of the procedure or function.

Displays the types of captured objects, including Anonymous

Block, Function, Package Body, and Procedure for Oracle databases. Also displays SQL Statement and Procedure for the other platforms.

Displays the database on which the object is stored.

Displays the total time taken for the profiled code to execute.

Displays the percentage of the Total Profiled Time for the run that this unit accounts for.

Lets you select the earlier object execution.

RAPID SQL 8.6/XE5 USER GUIDE 926

CODE ANALYST

Tab Option

New Run

Unit Owner

Unit Name

Unit Type

Unit Database

Time Diff

New Profiled Time

Base Profiled Time

Unit Summary Unit Owner

Unit Name

Unit Database

Number of Top Runs

Session

Run ID

Run Date

Total Analysis Time

Unit Detail

Total Profiled Time

Unit Profiled Time

% of Profiled Time

% of Run Time

Session

Run

Unit Name

Number of Top Lines

Percentage Calculation

Calls

Total Time

% of Total Profiled

Description

Lets you select the later object execution.

Displays the owner of the procedure or function.

Displays the name of the procedure or function.

Displays the types of captured objects, including Anonymous

Block, Function, Package Body, and Procedure for Oracle databases. Also displays SQL Statement and Procedure for the other platforms.

Displays the object database for the object execution.

Displays the time difference in milliseconds between the base run and the new run.

Displays the profiled time of the new run.

Displays the profiled time of the base run.

Lets you select the object owner for the session(s).

Lets you select the object name for the session(s).

Lets you select the object database for the session(s).

Lets you specify the number of top object executions to display in the Top 5 Runs graph and select the unit of time for the Unit

Time graph.

Displays the name of the session as created by the user.

Displays the unique id for the Run. This number is system generated.

Displays the time and date of the session.

Displays the total time taken for the session to complete, including all overhead time needed to analyze the procedure or function.

Displays the total time taken for the profiled code to execute.

Displays the unit time for the session(s).

Displays the percentage of the Total Profiled Time for the run that this unit accounts for.

Displays the percentage of object execution time for the session(s).

Lets you select the session.

Lets you select the object execution.

Lets you select the object name for the session.

Lets you specify the number of top lines in the Top 5 Lines

Execution Time graph and select the total time units.

Lets you specify total object execution time or object run time.

Displays the number of times the line was executed.

Displays the total time the line was executed.

Displays the percentage of the Total Profiled Time that this line of code was responsible for.

927 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

Tab Option

Avg Time

Min Time

Max Time

Dependency

Source

Description

Displays the average profiled time for this line.

Displays the minimum recorded time for execution of this line.

Displays the maximum recorded time for execution of this line.

Displays the UNIT_NUMBER of the dependency object that was called by that line. Lets you right-click and quickly go to that UNIT_NUMBER to see its Unit detail information.

Displays the object’s SQL source code.

Common Tasks

Creating a Code Analyst Session

Identifying and Fixing Bottlenecks Using Code Analyst

Comparing Code Analyst Sessions

Cloning a Code Analyst Session

Deleting a Code Analyst Session

Stopping a Code Analyst Session Execution

Executing a Code Analyst Session

Scheduling a Code Analyst Session

Unscheduling a Code Analyst Session

Refreshing a Code Analyst Session

Saving Results in Code Analyst

Printing Results in Code Analyst

Viewing Run Details in Code Analyst

Viewing Unit Summary Information in Code Analyst

Viewing Unit Details in Code Analyst

Setting View Options for the Unit Detail Tab in Code Analyst

Extracting SQL Text in Code Analyst

Executing SQL in Code Analyst

C ODE A NALYST T UTORIAL

The following tutorial guides you through the process of using the Code Analyst.

RAPID SQL 8.6/XE5 USER GUIDE 928

CODE ANALYST

Creating a Code Analyst Session

1 On the Tools menu, select Code Analyst.

Initially, Code Analyst installs the repository tables. For more information, see Installing

Code Analyst . Then Rapid SQL opens the Code Analyst to the Run Summary tab.

2 On the Code Analyst Tools toolbar, click the Create New Collection button.

Rapid SQL opens the first panel of the Code Analyst Wizard.

3 Select the individual object or group of objects to analyze. In this example, an individual stored procedure (CREATE_ADMISSION2) is selected.

TIP: Code Analyst does not let you select objects that do not have stored procedures.

4 Click Next.

If the object(s) selected to be analyzed requires parameters, the second panel of the wizard prompts you to enter the parameters.

5 Double-click the object to set the parameters.

6 For IBM DB2 LUW for Open Systems and Oracle, the Compile button opens the Confirm

Compile dialog box that lets you compile the objects to ensure that the Code Analyst can capture the time metrics.

7 Click Finish.

Code Analyst displays a message that the Code Analyst will run longer than the actual code.

Then Code Analyst analyzes the objects, using the Embarcadero SQL Debugger to profile and then opens the Run Detail tab.

TIP: You can select the "Please do not show me this dialog again" option in the dialog box

or set the option on the Code Analyst Options

.

929 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

Identifying and Fixing Bottlenecks Using Code Analyst

The Run Detail tab displays the total time for the objects being analyzed. The tab information may be enough to identify the potential bottleneck.

1 To view more detailed information, double-click the Unit Name.

Code Analyst opens to the Unit Detail tab.

RAPID SQL 8.6/XE5 USER GUIDE 930

CODE ANALYST

The Unit Detail Tab displays the object code and other information related to the individual lines of code. You can determine which line of code is taking too long and why. The Unit Detail Tab is where you troubleshoot, and then resolve the problem in the

Modifying objects using editors .

2 In Rapid SQL, open the object editor, and then modify the code on the Definition tab.

3 Click Alter.

4 In Code Analyst, on the Unit Detail Tab, click Execute.

931 RAPID SQL 8.6/XE5 USER GUIDE

Comparing Code Analyst Sessions

1 Click the Comparison tab.

CODE ANALYST

Code Analyst has a Comparison facility to allow quick compares of two object executions, showing the base time and the new time, as well as the time differences. The Comparison tab lets you compare which of the two procedures or functions ran faster.

2 Examine the Time Diff which indicates improvement to code.

3 If necessary, continue to modify the code on the Definition tab of the object editor, and then press Alter.

4 In Code Analyst, on the Unit Detail Tab, click Execute.

5 Examine the Time Diff until the bottleneck is solved.

Common Tasks

Creating a Code Analyst Session

Identifying and Fixing Bottlenecks Using Code Analyst

Comparing Code Analyst Sessions

Cloning a Code Analyst Session

RAPID SQL 8.6/XE5 USER GUIDE 932

CODE ANALYST

Deleting a Code Analyst Session

Stopping a Code Analyst Session Execution

Executing a Code Analyst Session

Scheduling a Code Analyst Session

Unscheduling a Code Analyst Session

Refreshing a Code Analyst Session

Saving Results in Code Analyst

Printing Results in Code Analyst

Viewing Run Details in Code Analyst

Viewing Unit Summary Information in Code Analyst

Viewing Unit Details in Code Analyst

Setting View Options for the Unit Detail Tab in Code Analyst

Extracting SQL Text in Code Analyst

Executing SQL in Code Analyst

U SING THE C ODE A NALYST

When working with database code stored in database objects, it is sometimes difficult to pinpoint bottlenecks within the code. When situations like this arise, Code Analyst can assist in identifying the trouble spots. Code Analyst can be used to analyze one object or a group of objects. You select one or multiple objects, execute them, view the results, and save those results for later viewing or comparing.

Common Tasks

Creating a Code Analyst Session

Identifying and Fixing Bottlenecks Using Code Analyst

Comparing Code Analyst Sessions

Cloning a Code Analyst Session

Deleting a Code Analyst Session

Stopping a Code Analyst Session Execution

Executing a Code Analyst Session

Scheduling a Code Analyst Session

Unscheduling a Code Analyst Session

933 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

Refreshing a Code Analyst Session

Saving Results in Code Analyst

Printing Results in Code Analyst

Viewing Run Details in Code Analyst

Viewing Unit Summary Information in Code Analyst

Viewing Unit Details in Code Analyst

Setting View Options for the Unit Detail Tab in Code Analyst

Extracting SQL Text in Code Analyst

Executing SQL in Code Analyst

C REATING A C ODE A NALYST S ESSION

The Code Analyst Wizard creates a new Code Analysis session that creates data for the Code

Analyst tabs:

1 On the Tools menu, select Code Analyst.

2 On the Code Analyst Tools toolbar, click Create New Collection.

Rapid SQL opens the first panel of the Code Analyst Wizard.

3 Select the individual object or group of objects to analyze.

4 Click Next.

If the object(s) selected to be analyzed requires parameters, the second panel of the wizard prompts you to enter the parameters.

5 Double-click the object to set the parameters.

6 For IBM DB2 LUW for Open Systems and Oracle, the Compile button opens the Confirm

Compile dialog box that lets you compile the objects to ensure that the Code Analyst can capture the time metrics.

7 Click Finish.

Code Analyst displays a message that the Code Analyst will run longer than the actual code.

Then Code Analyst analyzes the objects, using the Embarcadero SQL Debugger to profile and then opens the Run Detail tab.

TIP: You can also select the "Please do not show me this dialog again" option in the dialog box or set the option on the

Code Analyst Options .

For more information, see

Code Analyst Wizard .

RAPID SQL 8.6/XE5 USER GUIDE 934

CODE ANALYST

C ODE A NALYST W IZARD

The table below describes the options and functionality of the Code Analyst Wizard:

Option

Session Name

Select by Owner

Select by Object

Object Name

Compile

Schedule

Description

Lets you type a name.

Code Analyst Wizard queries the database to get the list of procedures and functions and lets you select objects to retrieve

Codes for. Select to display available objects by owner, and then select the database(s).

Code Analyst Wizard queries the database to get the list of procedures and functions and lets you select objects to retrieve

Codes for. Select to display available objects by object, and then select the object(s).

Double-click each object to specify the input parameters.

Specify which object executes first by clicking the Up and

Down buttons.

IBM DB2 LUW FOR OPEN SYSTEMS AND ORACLE ONLY:

Opens the Confirm Compile dialog box that lets you compile the objects to ensure that the Code Analyst can capture the time metrics.

Opens the Select Scheduler dialog box or opens scheduling application.

Code Analyst analyzes the code.

Finish

For more information, see: Creating a Code Analyst Session .

I DENTIFYING AND F IXING B OTTLENECKS U SING C ODE A NALYST

The Unit Detail Tab displays the object code and other information related to the individual lines of code. You can identify time-consuming lines of code in the Unit Detail Tab. The Unit Detail

Tab is where you troubleshoot, and then resolve the problem in the Modifying objects using editors

.

1 On the Tools menu, select Code Analyst.

2 Click the Unit Detail Tab.

Percent of Run Time displays the percentage of object execution time for the session(s).

3 Identify an object that contains time-consuming code.

4 In Rapid SQL, open the object editor, and then modify the code on the Definition tab.

5 Click Alter.

6 In Code Analyst, on the Unit Detail Tab, click Execute.

7 Click the Comparison tab.

935 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

The Comparison Tab lets you compare times of the objects in two different object executions to determine which run was more efficient. The Comparison Tab displays the base time and the new time, as well as the time differences. The Comparison tab lets you compare which of the two procedures or functions ran faster.

8 Examine the Time Diff which indicates improvement to code.

9 If necessary, continue to modify the code on the Definition tab of the object editor, and then press Alter.

10 Create new Code Analyst sessions and examine the Time Diff until the bottleneck is solved.

For more information, see:

Code Analyst Product Design

Using the Code Analyst

C OMPARING C ODE A NALYST S ESSIONS

The Comparison Tab lets you compare times of the objects in two different object executions to determine which run was more efficient. The Comparison Tab displays the base time and the new time, as well as the time differences. The Comparison tab lets you compare which of the two procedures or functions ran faster.

1 On the Tools menu, select Code Analyst.

2 On the Run Summary tab, right-click the sessions, and then select Compare.

3 Examine the Time Diff which indicates improvement to code.

For more information, see:

Code Analyst Product Design

Using the Code Analyst

C LONING A C ODE A NALYST S ESSION

The Clone Collection functionality lets you clone an existing Code Analyst session using the

Code Analyst Wizard. Clone lets you reset the parameters or the order of the objects in the session without creating a new session.

1 On the Tools menu, select Code Analyst.

2 On the Run Summary tab, select the session to clone.

3 On the Code Analyst Tools toolbar, click Clone Collection.

Rapid SQL opens the first panel of the Code Analyst Wizard .

For more information, see:

RAPID SQL 8.6/XE5 USER GUIDE 936

CODE ANALYST

Code Analyst Product Design

Using the Code Analyst

D ELETING A C ODE A NALYST S ESSION

The Delete Collection functionality lets you delete the selected Code Analyst session.

1 On the Tools menu, select Code Analyst.

2 On the Run Summary tab, select the session to delete.

3 On the Code Analyst Tools toolbar, click Delete Collection.

Code Analyst deletes the session.

For more information, see:

Code Analyst Product Design

Using the Code Analyst

S TOPPING A C ODE A NALYST S ESSION E XECUTION

The Stop Execution kills the execution of the selected collection.

1 On the Tools menu, select Code Analyst.

2 On the Run Summary tab, select the session to kill.

3 On the Code Analyst Tools toolbar, click Stop Execution.

Code Analyst kills the execution.

For more information, see:

Code Analyst Product Design

Using the Code Analyst

E XECUTING A C ODE A NALYST S ESSION

The Execute Collection functionality extracts the SQL text and then executes the code.

1 On the Tools menu, select Code Analyst.

2 On the Run Summary tab, select the session to execute.

3 On the Code Analyst Tools toolbar, click Execute Collection.

Code analyst extracts and executes the SQL.

For more information, see:

937 RAPID SQL 8.6/XE5 USER GUIDE

Code Analyst Product Design

Using the Code Analyst

S CHEDULING A C ODE A NALYST S ESSION

The Schedule Session functionality lets you schedule the session for a future run.

1 On the Tools menu, select Code Analyst.

2 On the Run Summary tab, select the session to schedule.

3 On the Code Analyst Tools toolbar, click Schedule Session.

Code Analyst opens the default scheduler.

For more information, see:

Scheduling

Code Analyst Product Design

Using the Code Analyst

U NSCHEDULING A C ODE A NALYST S ESSION

The Delete Session functionality lets you remove the session from a schedule.

1 On the Tools menu, select Code Analyst.

2 On the Run Summary tab, select the session to unschedule.

3 On the Code Analyst Tools toolbar, click Delete Session.

For more information, see:

Scheduling

Code Analyst Product Design

Using the Code Analyst

CODE ANALYST

R EFRESHING A C ODE A NALYST S ESSION

The Refresh Data functionality refreshes the data.

1 On the Tools menu, select Code Analyst.

2 On the tab, on the Code Analyst Tools toolbar, click Refresh Data.

For more information, see:

Code Analyst Product Design

RAPID SQL 8.6/XE5 USER GUIDE 938

CODE ANALYST

Using the Code Analyst

S AVING R ESULTS IN C ODE A NALYST

The Save functionality lets you save results for later viewing or comparing.

1 On the Tools menu, select Code Analyst.

2 On the tab, right-click the session or unit, and then select Save.

Code Analyst opens the Save Results dialog box.

For more information, see:

Code Analyst Product Design

Using the Code Analyst

P RINTING R ESULTS IN C ODE A NALYST

The Print functionality lets you print results for later viewing or comparing.

1 On the Tools menu, select Code Analyst.

2 On the tab, right-click the session or unit, and then select Print.

Code Analyst opens the Print Results dialog box.

For more information, see:

Code Analyst Product Design

Using the Code Analyst

V IEWING R UN D ETAILS IN C ODE A NALYST

The Run Detail tab displays the total time for the objects being analyzed. The tab information may be enough to identify the potential bottleneck.

To open the Run Details Tab in Code Analyst, do the following:

1 On the Tools menu, select Code Analyst.

2 On the Run Summary tab, right-click the session, and then select Run Detail.

OR

3 On the Unit Summary tab, right-click the session, and then select Run Detail.

For more information, see:

Code Analyst Product Design

939 RAPID SQL 8.6/XE5 USER GUIDE

Using the Code Analyst

V IEWING U NIT S UMMARY I NFORMATION IN C ODE A NALYST

The Unit Summary Tab in Code Analyst displays the individual runs for a session.

To open the Unit Summary Tab in Code Analyst, do the following:

1 On the Tools menu, select Code Analyst.

2 On the Comparison tab, right-click the session, and then select Unit Summary.

For more information, see:

Code Analyst Product Design

Using the Code Analyst

CODE ANALYST

V IEWING U NIT D ETAILS IN C ODE A NALYST

The Unit Detail Tab displays the object code and other information related to the individual lines of code. You can identify time-consuming lines of code in the Unit Detail Tab. The Unit Detail

Tab is where you troubleshoot, and then resolve the problem in the Modifying objects using editors

.

To open the Unit Details tab in Code Analyst, do the following:

1 On the Tools menu, select Code Analyst.

2 On the Unit Summary tab, right-click the session, and then select Unit Detail.

For more information, see:

Code Analyst Product Design

Using the Code Analyst

S ETTING V IEW O PTIONS FOR THE U NIT D ETAIL T AB IN C ODE A NALYST

The table below describes the options on the shortcut menu for the Unit Details Tab in Code

Analyst:

Option

Dependency Details

Show Only Hit Lines

Show Only Missed Lines

Show All Lines

Description

Displays dependency details.

Displays only those lines with time metrics.

Displays only those lines without time metrics.

Resets the view to show all lines.

RAPID SQL 8.6/XE5 USER GUIDE 940

CODE ANALYST

Option

Advanced View

Normal View

Description

Displays the default view.

Displays a limited number of data columns.

E XTRACTING SQL T EXT IN C ODE A NALYST

The Extract SQL Text functionality extracts SQL text to an ISQL window.

1 On the Tools menu, select Code Analyst.

2 On the Unit Detail tab, right-click the session, and then select Extract SQL Text.

Code analyst extracts the SQL text to an ISQL window.

For more information, see:

Extract

Code Analyst Product Design

Using the Code Analyst

E XECUTING SQL IN C ODE A NALYST

The Execute SQL functionality extracts SQL text to an ISQL window, and then executes the code.

1 On the Tools menu, select Code Analyst.

2 On the Unit Detail tab, right-click the session, and then select Execute SQL.

Code analyst extracts the SQL text to an ISQL window and executes the code.

For more information, see:

Execute

Code Analyst Product Design

Using the Code Analyst

941 RAPID SQL 8.6/XE5 USER GUIDE

R

APID

SQL A

DD

-O

N

T

OOLS

Rapid SQL includes the following add-on tools:

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows

Embarcadero SQL Debugger for Microsoft SQL Server

Embarcadero SQL Debugger for Oracle

Embarcadero SQL Debugger for Sybase ASE

Rapid SQL PL/SQL Profiler

Code Analyst

E

MBARCADERO

SQL D

EBUGGER FOR

IBM DB2 LUW

FOR

L

INUX

, U

NIX

,

AND

W

INDOWS

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows lets you locate and fix bugs in procedures and triggers for IBM DB2 LUW for Linux, Unix, and Windows version 7.2 or later. Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows lets you debug triggers by debugging the procedures that call them.

NOTE: Availability of this feature depends on your Rapid SQL licensing. For more information, see

Licensing .

TIP: For Rapid SQL,

Code Analyst is a tool to identify time-consuming lines of code. Code

Analyst lets you perform detailed response time analysis on the execution of

Procedures and Functions.

The table below describes the sections of this chapter:

Section

Embarcadero SQL

Debugger for IBM DB2

LUW for Linux, Unix, and

Windows Features

Embarcadero SQL

Debugger for IBM DB2

LUW for Linux, Unix, and

Windows Interface

Embarcadero SQL

Debugger for IBM DB2

LUW for Linux, Unix, and

Windows Functionality

Description

This section describes how Embarcadero SQL Debugger for

IBM DB2 LUW for Linux, Unix, and Windows lets you identify problems within your code.

This section describes the Embarcadero SQL Debugger for

IBM DB2 LUW for Linux, Unix, and Windows graphical interface that includes an editor window and four debug view windows.

This section describes the functionality on the Embarcadero

SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows.

RAPID SQL 8.6/XE5 USER GUIDE 942

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

Section Description

Using the Embarcadero

SQL Debugger for IBM DB2

LUW for Linux, Unix, and

Windows

This section describes how to run a debug session.

E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR L INUX , U NIX ,

AND W INDOWS F EATURES

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows lets you identify problems within your code. The Embarcadero SQL Debugger for IBM DB2 LUW for

Linux, Unix, and Windows lets you:

• Interactively step through the flow of script execution.

• Examine the value of variables.

• Solve logical problems with your script design.

NOTE: The Debugger is available on the Rapid SQL main menu, the Procedures window, the

DDL Editor and ISQL windows.

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows offers fundamental debugging features and options to fine tune debugging. The table below describes these features:

Debugging Feature

Step Into

Step Out

Step Over

Breakpoints

Description

Lets you execute each instruction step-by-step and step inside a stored object.

Lets you stop stepping through the current object and execute the remainder of the script. This option is only active when the pointer indicates a child dependent instruction.

Lets you execute the current instruction without stepping into any child dependents.

Lets you specify positions in a program where the debugger stops execution.

To set specific Debugger values on Rapid SQL’s Options Editor, see Debugger Options .

E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR L INUX , U NIX , AND

W INDOWS R EQUIREMENTS

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows requires proper configuration of the server and client.

For more information, see:

943 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

Prerequisites for Adding and Compiling Procedures

Configuring the IBM DB2 LUW for Linux, Unix, and Windows Server for Procedures

Prerequisites for Debugging Procedures

P REREQUISITES FOR A DDING AND C OMPILING S TORED P ROCEDURES

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows requires the following products and components.

Client

• IBM DB2 LUW for Linux, Unix, and Windows 7.2 or later

• DB2 Application Development Client

• DB2 Administration Client

• Communications Protocols

• Stored Procedure Builder

• Applications Development Interfaces

• System Bind Files

• DB2 Connect Server Support

• Documentation

• Base DB2 LUW for Windows/Unix Support

• Administration and Configuration Tools

Server

• IBM DB2 LUW for Linux, Unix, and Windows 7.2 or later

• DB2 Enterprise Edition

• Communications Protocols

• Stored Procedure Builder

• Applications Development Interfaces

• System Bind Files

• DB2 Connect Server Support

• Documentation

• Base DB2 LUW for Windows/Unix Support

• Administration and Configuration Tools

RAPID SQL 8.6/XE5 USER GUIDE 944

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

• Microsoft Visual Studio, Visual C++

NOTE: The server must have a local directory structure and file C:\program files\sqllib\function\routine\sr_cpath.bat. This file is installed with IBM DB2 LUW 7.2 and includes the C compiler options needed to compile the procedure on the server.

If it is not found, install the IBM DB2 LUW 7.2 Administration and Configuration Tools option on the server.

C ONFIGURING THE IBM DB2 LUW FOR L INUX , U NIX , AND W INDOWS S ERVER FOR P ROCEDURES

Rapid SQL lets you create procedures on the targeted server using Rapid SQL.

To create or run any procedure, set up the configuration environment and enable the C compiler options on the server.

To configure your server, do the following:

1 Open a DB2 Command Window, and then type:

DB2set DB2_SQLROUTINE_COMPILER_PATH="C:\program files\sqllib\function\routine\sr_cpath.bat"

DB2 sets the DB2_SQLROUTINE_COMPILER_PATH DB2 registry variable to call the required initialization script for the C compiler on the server.

To enable the C compiler options on your server:

1 Open the file C:\program files\sqllib\function\routine\sr_cpath.bat.

2 Remove the REM (remarks) prefix on the lines that match the version of Visual Studio that is installed on the server. VCV6 = version 6.0 and VCV5 = version 5.0.

NOTE: Only remove the REM prefix on the lines that apply to your installation of Visual Studio

3 Restart the DB2 services on the server.

P REREQUISITES FOR D EBUGGING P ROCEDURES

To enable debugging on the server, do the following:

1 Open a DB2 Command window and type:

Db2set DB2ROUTINE_DEBUG=ON

NOTE: Client must have a licensed or evaluation copy of the Embarcadero LUW SQL

Debugger.

E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR L INUX , U NIX , AND

W INDOWS O PTIONS

You can specify debugger options from the Debug Tab of Rapid SQL’s Options editor. The

Debug Tab of the Options Editor lets you set the duration of your debug initialization and debug session, enable DBMS output, and refresh dependencies.

945 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

Setting Debugger Options

To set debugger options, do the following:

1 On the File menu, click Options.

OR

On the Main toolbar, click Options.

Rapid SQL opens the Options Editor.

2 Specify debugger options. The table below describes the options available:

Option

Initialization

Timeout (seconds)

Description

Specifies the number of seconds Rapid SQL tries to initialize the debugger. If it cannot initialize the debugger in the specified time, a message displays in the Debug Output window.

Specifies, in seconds, the length of your debug session.

Default

60

7200 Debug Session

Timeout (seconds)

Enable DBMS

Output

Refresh

Dependencies for each run

Toggles the print output. Enable this option if you use dbms_output.put_line calls in your procedures and you want these lines displayed.

Refreshes dependencies for each run. This potentially timeconsuming process is useful if the target procedure has rapidly varying dependencies that can require updating during the debugging process.

Selected

Cleared

3 Click Close.

Rapid SQL closes the Options Editor.

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Features .

E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR L INUX , U NIX ,

AND W INDOWS I NTERFACE

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows includes an editor window and four debug view windows .

When you open a debug session , Rapid SQL extracts the code for the object into a DDL Editor and opens four debug view windows at the bottom of the screen .

The four debug view windows are optional, dockable windows designed to let you debug your script .

TIP: All Embarcadero debuggers display Performance Metrics that let you measure the execution time of each statement in the debug session.

RAPID SQL 8.6/XE5 USER GUIDE 946

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows’s includes five windows:

1 DDL Editor window

2 Watch window

3 Variables window

4 Call Stack window

5 Dependency Tree window

Working with T-SQL Debugger Windows

Rapid SQL lets you resize, move, dock and float the following windows:

• Watch window

• Variables window

• Call Stack window

• Dependency Tree window

1 To resize the target window, click its frame and drag it.

Rapid SQL resizes the window.

2 To move and dock the target window, click its grab bar and drag it.

Rapid SQL moves the window to its new location and docks it with surrounding windows.

3 To float the target window, press Shift, then click its grab bar and drag it.

Rapid SQL frames the window in its own floating frame and moves the window to its new location.

DDL E DITOR W INDOW FOR E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW

FOR L INUX , U NIX , AND W INDOWS

The DDL Editor displays your code in read-only format. When you start debugging, the SQL

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows extracts your code into a DDL Editor. The DDL Editor uses the default Rapid SQL syntax coloring.

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Interface

.

W ATCH W INDOW FOR E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR

947 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

L INUX , U NIX , AND W INDOWS

The Watch window displays the watch variables for the database object you are debugging. The

Watch window also lets you specify variables you want to evaluate or modify while debugging your program.

For example, to check what happens when a variable (x) has a value of 100, you can double-click the variable in the DDL Editor, drag it into the Watch Window, and change the value to 100.

When you execute the script, the Debugger uses the value x =100. This window is only visible when the T-SQL Debugger is active.

NOTE: Until you step at least once into a script, variables are not defined. Therefore, step at least once before dragging or typing a local variable in the Watch Window.

NOTE: When you exit a debug session and reenter it, the Embarcadero SQL Debugger for IBM

DB2 LUW for Linux, Unix, and Windows retains any watch variables or breakpoints you have set.

Opening and Closing the Watch Window

To open and close the Watch Window, do the following:

1 On the Debug Menu, on the Debug Views sub-menu, select or clear Watch.

OR

Press ALT+3.

Setting a Watch Variable

To set a Watch Variable, do the following:

1 In the DDL Editor, double-click the target variable and drag it to the Watch window .

2 In the Watch window, change the value of the variable.

3 On the DDL Editor , click Debug.

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows executes the script using the new variable.

Removing a Watch Variable

To remove a Watch variable, do the following:

1 In the Watch window , click the target variable and press DELETE .

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Interface

.

V ARIABLES W INDOW FOR E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR

RAPID SQL 8.6/XE5 USER GUIDE 948

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

L INUX , U NIX , AND W INDOWS

The Variables window displays the local variables and their current values during script execution.

NOTE: You cannot edit the variables in the Variables window.

If the DDL Editor displays an external database object, and that object is a dependent of the object you are debugging, then the Variables Window automatically refreshes and displays the variables for that particular object. The Variables Window is only visible when the Debugger is active.

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows also lets you monitor your variables while debugging.

Opening and Closing the Variables Window

To open and close the Variables Window, do the following:

1 On the Debug Menu, on the Debug Views sub-menu, select or clear Variable.

OR

Press ALT+4.

Monitoring Variables

To monitor the values of your variables while debugging, do the following:

1 In the SQL Editor, hold the pointer over the target variable.

Rapid SQL opens a ScreenTip displaying the current value of that variable.

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Interface

.

C ALL S TACK W INDOW FOR E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW

FOR L INUX , U NIX , AND W INDOWS

The Call Stack window displays the stack of currently active calls. The Call Stack Window is only visible when the Debugger is active.

Opening and Closing the Call Stack Window

To open and close the Call Stack Window, do the following:

1 On the Debug Menu, on the Debug Views sub-menu, select or clear Call Stack.

OR

Press ALT+5.

949 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

Using the Call Stack Window

To display a line of code that references the call in the DDL Editor, do the following:

1 In the Call Stack window, double-click the target line.

In the DDL Editor, Rapid SQL displays a green arrow on the line of the referenced call.

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Interface

.

D EPENDENCY T REE W INDOW FOR E MBARCADERO SQL D EBUGGER FOR IBM DB2

LUW FOR L INUX , U NIX , AND W INDOWS

The Dependency Tree window displays any external database objects the script accesses. Rapid

SQL displays these database objects in a hierarchical tree, with the child objects as database objects accessed by the parent objects. You can use this window to display the code for a dependent database object in the DDL Editor window. This window is only visible when the

Debugger is active.

Opening and Closing the Dependency Tree Window

To open and close the Dependency Tree Window, do the following:

1 On the Debug Menu, on the Debug Views sub-menu, select or clear Dependencies.

OR

Press ALT+6.

Displaying Dependencies

To display the code for a dependent database object in the DDL Editor window, do the following:

1 In the Dependency Tree window, double-click the target object.

Rapid SQL displays the SQL of the target object in the DDL Editor window.

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Interface

.

E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR L INUX , U NIX ,

AND W INDOWS F UNCTIONALITY

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows offers the following functionality:

• Input Parameters

• Step Into

RAPID SQL 8.6/XE5 USER GUIDE 950

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

• Step Out

• Step Over

• Run to Cursor

• Insert or Remove a Breakpoint

• Toggle Breakpoint

• Go

• Stop

• Restart

• Break

• Close

To use these functionalities, first open a debugging session .

I NPUT P ARAMETERS FOR E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR

L INUX , U NIX , AND W INDOWS

I nput parameters are set when you first create an object. If the object you want to debug requires input parameters, Rapid SQL opens a Procedure Execution dialog box and prompts you for the input parameters when you open a debugging session .

The Procedure Execution dialog box also lets you:

• Save input parameters as *.prm files to preserve specific input parameter configurations.

• Open *.prm files to save the effort of reentering specific input parameters.

• Reset parameters to their default setting.

The table below describes the options and functionality on Procedure Execution dialog box:

The following table describes the options available in this dialog box:

Dialog box component

Owner drop-down list

Procedure drop-down list

Parameter window

Open button

Description

Displays the current procedure’s owner

Displays the name of the current procedure.

Specify the required input parameters in this window. If input parameters are not required for the execution of the target procedure, a message appears in this window, stating that the procedure “has no input parameters. Press execute to run it.”

Click to open an Open dialog box, from which you can open an existing *.prm file. The saved parameters immediately populate the dialog box upon opening.

951 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

Dialog box component

Save button

Reset button

Execute button

Description

Click to save the values of your input parameters as a *.prm file.

You can reopen a saved *.prm file from this dialog box at any time.

Click to reset the parameters in the Parameter window to their default values.

Click to execute the procedure once you have entered values for all required parameters in the Parameter window.

Option

Owner

Procedure

Parameter

Open

Save

Reset

Continue

Description

Displays the current procedure’s owner.

Displays the name of the current procedure.

Specify the required input parameters in this window. If input parameters are not required for the execution of the target procedure, a message displays in this window, stating that the procedure

“has no input parameters. Press execute to run it.”

Click to open an existing *.prm file. The saved parameters immediately populate the dialog box upon opening.

Click to save the values of your input parameters as a *.prm file. You can reopen a saved *.prm file from this dialog box at any time.

Click to reset the parameters in the Parameter window to their default values.

Click to execute the procedure once you have entered values for all required parameters in the

Parameter window.

NOTE: You cannot debug a script that requires input parameters until you provide input parameters.

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Functionality .

S TEP I NTO FOR E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR L INUX ,

U NIX , AND W INDOWS

After you open a debugging session , Step Into lets you execute the current instruction. If the current instruction makes a call to a stored SQL object, the Embarcadero SQL Debugger for IBM

DB2 LUW for Linux, Unix, and Windows steps inside the nested child object.

RAPID SQL 8.6/XE5 USER GUIDE 952

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

To use the Step Into facility, do the following:

1 On the Debug menu, click Step Into.

OR

On the DDL Editor toolbar, click Step Into.

OR

In the DDL Editor window, right-click, and then click Step Into.

OR

Press F11.

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows moves the arrow to execute the current instruction.

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Functionality .

S TEP O UT FOR E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR L INUX ,

U NIX , AND W INDOWS

After you open a debugging session , Step Out lets you execute the remainder of the dependent child object and resumes line-by-line, step-debugging in the parent object.

NOTE: Step Out is only active when the pointer indicates a child dependent instruction.

To use the Step Out facility, do the following:

1 On the Debug menu, click Step Out.

OR

On the DDL Editor toolbar, click Step Out.

OR

In the DDL Editor window, right-click, and then click Step Out.

OR

Press SHIFT+F11.

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows stops stepping through the current object and executes the remainder of the script.

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Functionality .

S TEP O VER FOR E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR L INUX ,

953 RAPID SQL 8.6/XE5 USER GUIDE

U NIX , AND W INDOWS

After you open a debugging session , Step Over lets you execute the current instruction without stepping into a nested child object if the instruction makes a call to a dependent object.

To use the Step Over, do the following:

1 On the Debug menu, click Step Over.

OR

On the DDL Editor toolbar, click Step Over.

OR

In the DDL Editor window, right-click, and then click Step Over.

OR

Press F10.

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows executes the current instruction.

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Functionality .

R UN TO C URSOR FOR E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR

L INUX , U NIX , AND W INDOWS

After you open a debugging session , Run to Cursor lets you execute all instructions between the yellow arrow and the cursor.

To use the Run to Cursor facility, do the following:

1 Scroll down from the yellow arrow to the target line.

2 Click the target line.

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows places the cursor on the target line.

3 On the Debug menu, click Run to Cursor.

OR

On the DDL Editor toolbar, click Run to Cursor .

OR

In the DDL Editor window, right-click, and then click Run to Cursor.

OR

Press CTRL+F10.

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows executes all instructions between the pointer and the cursor.

RAPID SQL 8.6/XE5 USER GUIDE 954

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Functionality .

I NSERT OR R EMOVE B REAKPOINT FOR E MBARCADERO SQL D EBUGGER FOR IBM

DB2 LUW FOR L INUX , U NIX , AND W INDOWS

A breakpoint is a position in a program where a debugger stops execution. When you start debugging, Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows opens the script in a DDL Editor. A yellow arrow pointer indicates which line the Embarcadero SQL

Debugger for IBM DB2 LUW for Linux, Unix, and Windows executes next.

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows executes all lines of code between the yellow arrow and the first breakpoint. If no breakpoints are present,

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows debugs the entire script.

While debugging you can set one or more breakpoints in the currently executing object or in any object in the program call stack. You can toggle , temporarily disable or enable breakpoints without having to add or remove breakpoints.

Rapid SQL’s Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows displays each enabled breakpoint as a red dot in the left margin of the DDL Editor Window, and each disabled breakpoint as a red circle.

Rapid SQL stores all breakpoints you set so that when you debug the same script on separate occasions, you can reuse the same breakpoints. After you open a debugging session , you can insert a breakpoint on the line where your cursor is located, and you can remove a breakpoint on the line where your cursor is located.

NOTE: Script execution stops at the first breakpoint.

To insert and remove breakpoints, do the following:

1 In the DDL Editor window, click the target line of SQL.

2 On the Debug menu, click Breakpoint.

OR

On the DDL Editor toolbar, click Breakpoint.

OR

In the DDL Editor window, right-click, and then click Breakpoint.

OR

Press F9.

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows inserts a new breakpoint or removes an existing breakpoint on the target line of code.

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Functionality .

955 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

T OGGLE B REAKPOINT FOR E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW

FOR L INUX , U NIX , AND W INDOWS

After you open a debugging session and insert a breakpoint , Toggle Breakpoint lets you enable or disable that breakpoint. Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows displays each enabled breakpoint as a red dot in the left margin of the DDL Editor

Window, and each disabled breakpoint as a red circle.

You can toggle any breakpoint in the DDL Editor window. When you exit a debugging session and reenter it, the Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows retains any breakpoints you set.

To use the Toggle Breakpoint facility, do the following:

1 In the DDL Editor window, click the line of the target breakpoint.

2 On the Debug menu, click Enable/Disable Breakpoint.

OR

On the DDL Editor toolbar, click Enable/Disable Breakpoit .

OR

In the DDL Editor window, right-click, and then click Enable/Disable Breakpoint.

OR

Press CTRL+F9.

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows toggles the breakpoint indicated by the pointer.

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Functionality .

G O FOR E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR L INUX , U NIX ,

AND W INDOWS

After you open a debugging session , Go lets you execute all instructions stopping only when when it encounters a breakpoint or when the program is complete.

RAPID SQL 8.6/XE5 USER GUIDE 956

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

To use the Go facility, do the following:

1 On the Debug menu, click Go.

OR

On the DDL Editor toolbar, click Go.

OR

In the DDL Editor window, right-click, and then click Go.

OR

Press F5.

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows executes all instructions.

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Functionality .

S TOP FOR E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR L INUX , U NIX ,

AND W INDOWS

After you open a debugging session , Stop lets you halt the script execution and terminate the session.

To use the Stop facility, do the following:

1 On the Debug menu, click Stop Debugging.

OR

On the DDL Editor toolbar, click Stop Debugging .

OR

In the DDL Editor window, right-click, and then click Stop Debugging.

OR

Press SHIFT+F5.

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows stops the script execution and terminates the session.

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Functionality .

R ESTART FOR E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR L INUX ,

957 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

U NIX , AND W INDOWS

After you open a debugging session , Restart lets you terminate the current debug session and open a new one. When the new session opens, Rapid SQL prompts you for new input parameters.

To use the Restart facility, do the following:

1 On the Debug menu, click Restart.

OR

On the DDL Editor toolbar, click Restart.

OR

In the DDL Editor window, right-click, and then click Restart.

OR

Press CTRL+SHIFT+F5.

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows restarts the debug session.

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Functionality .

B REAK FOR E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR L INUX , U NIX ,

AND W INDOWS

After you open a debugging session , Break lets you pause the debug session.

To use the Break facility, do the following:

1 On the Debug menu, click Break.

OR

On the DDL Editor toolbar, click Break.

OR

In the DDL Editor window, right-click, and then click Break.

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows suspends the debug session.

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Functionality .

C LOSE FOR E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR L INUX , U NIX ,

RAPID SQL 8.6/XE5 USER GUIDE 958

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

AND W INDOWS

After you open a debugging session , Close lets you close the DDL Editor and the Embarcadero

SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows.

To use the Close facility, do the following:

1 On the DDL Editor toolbar, click Close.

OR

In the upper right corner of the window, click Close.

OR

In the DDL Editor window, right-click, and then click Close.

The Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows closes the debug session.

For more information, see

Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows Functionality .

U SING THE E MBARCADERO SQL D EBUGGER FOR IBM DB2 LUW FOR

L INUX , U NIX , AND W INDOWS

This section offers a general overview of how to use Embarcadero SQL Debugger for IBM DB2

LUW for Linux, Unix, and Windows’s full range of debugging

functionality . After you

open a debugging session for any procedure or trigger, you can begin debugging .

O PENING A D EBUGGING S ESSION IN IBM DB2 LUW FOR L INUX , U NIX , AND

W INDOWS

When you open a debugging session, Rapid SQL opens the five windows of the Embarcadero

SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows interface. If the target script requires input parameters, Rapid SQL opens a Procedure Execution dialog box and prompts you for the necessary input parameters before displaying the target code in the SQL Editor window.

When Rapid SQL displays the target script in the SQL Editor window, you can begin debugging .

NOTE: Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows only lets you debug the SQL script of procedures or triggers.

To debug triggers by debugging the procedures that call them, do the following:

1 On the Explorer Tab, click the node of the target trigger or procedure. The node expands and displays the Code object.

2 Double-click Code. The DDL Editor opens and displays the code of the target object.

959 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR IBM DB2 LUW FOR LINUX, UNIX, AND W INDOWS

3 On the Debug menu, click Start Debugging.

OR

On the SQL Editor toolbar, click Debug.

OR

In the DDL Editor window, right-click, and then click Debug.

OR

Press CTRL+F5.

4 On the toolbar, click Debug.

OR

In the DDL Editor window, right-click, and then click Debug.

If the script requests input parameters, Rapid SQL opens a Procedure Execution dialog box.

If the script does not require input parameters, Rapid SQL displays the script in the DDL

Editor window for you to begin debugging .

NOTE: You cannot use the Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and

Windows until it has fully initialized.

5 In the Procedure Execution dialog box, specify the appropriate parameters, and then click

Continue .

Rapid SQL displays the script in the DDL Editor window for you to begin debugging .

D EBUGGING AN SQL S CRIPT WITH E MBARCADERO SQL D EBUGGER FOR IBM DB2

LUW FOR L INUX , U NIX , AND W INDOWS

After you open a debugging session and enter any required input parameters, you can begin working with your script in the Embarcadero SQL Debugger for IBM DB2 LUW for Linux, Unix, and Windows.

Debugging an SQL Script

To debug a SQL Script, do the following:

1 On the Debug menu, click one of the T-SQL Debugger options ( Step Into , Step Over , and so forth) or click Go .

OR

On the DDL Editor toolbar, click one of the T-SQL Debugger options ( Step Into , Step Over , and so on) or click Go.

NOTE: You can monitor the progress of your debug session in the Variables window.

RAPID SQL 8.6/XE5 USER GUIDE 960

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

2 On the Debug menu, click Breakpoint .

OR

On the DDL Editor toolbar, click Breakpoint.

OR

Press F9.

NOTE: When you set a breakpoint, the Call Stack window shows what was called before the breakpoint.

NOTE: You can use the Run to Cursor option to test the lines of code between a breakpoint and your cursor (indicated by the yellow arrow in the DDL Editor).

3 To check your variables:

1) In the DDL Editor , click a variable in your script and drag it to the Watch window.

2) In the Watch window, change the value of the watch variable, and then click Go to run your script and see the results of the new value.

4 To check a record in stored objects:

1) Drag the record to the Watch window.

2) In the Watch window, change the value of the record, then click Go to run your script and see the results of the new value.

5 To check the dependencies:

1) In the Dependency Tree window double-click the target dependent object to extract the code into a new

DDL Editor .

2) Step through the script while monitoring the Dependency Tree window.

6 When you finish debugging the script, click Close.

Rapid SQL closes the T-SQL Debugger DDL Editor.

NOTE: When you exit a debug session and reenter it, the Embarcadero SQL Debugger for

MSSQL retains any watch variables or breakpoints you have set.

E

MBARCADERO

SQL D

EBUGGER FOR

M

ICROSOFT

SQL S

ERVER

Embarcadero SQL Debugger for Microsoft is a programming tool that helps you locate and fix bugs in Microsoft SQL Server procedures and triggers for Microsoft SQL Server version 7.0 or later.

NOTE: Availability of this feature depends on your Rapid SQL licensing. For more information, see

Licensing .

Objects

You can use Embarcadero SQL Debugger for Microsoft to debug the following objects:

961 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

• Procedures

• Triggers

You can only debug triggers by debugging the procedures that call them.

TIP: The

‘Code Analyst

is a tool to identify time-consuming lines of code. Code Analyst lets you perform detailed response time analysis on the execution of Procedures and

Functions.

The table below describes the sections of this chapter:

Section

Embarcadero SQL

Debugger for Microsoft

Features

Embarcadero SQL

Debugger for Microsoft

Interface

Embarcadero SQL

Debugger for Microsoft

Functionality

Using the Embarcadero

SQL Debugger for

Microsoft

Description

This section describes how Embarcadero SQL Debugger for

Microsoft helps you identify problems within your code.

This section describes the Embarcadero SQL Debugger for

Microsoft graphical interface that includes an editor window and four debug view windows.

This section describes the way in which Embarcadero SQL

Debugger for Microsoft functions.

This section describes how to run a debug session.

E MBARCADERO SQL D EBUGGER FOR M ICROSOFT F EATURES

The Embarcadero SQL Debugger for Microsoft helps you identify problems within your code.

The Embarcadero SQL Debugger for Microsoft lets you:

• Interactively step through the flow of script execution.

• Examine the value of variables.

• Solve logical problems with your script design.

The Embarcadero SQL Debugger for Microsoft offers fundamental debugging features and several options to help fine tune debugging, as listed in the table below:

Debugging Feature

Step Into

Step Out

Step Over

Description

Lets you execute each instruction step-by-step and step inside a stored object.

Lets you stop stepping through the current object and execute the remainder of the script. This option is only active when the pointer indicates a child dependent instruction.

Lets you execute the current instruction without stepping into any child dependents.

RAPID SQL 8.6/XE5 USER GUIDE 962

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

Debugging Feature

Breakpoints

Description

A position in a program where the debugger stops execution.

To set specific Debugger values on Rapid SQL’s Options Editor, see Debugger Options .

E MBARCADERO SQL D EBUGGER FOR M ICROSOFT R EQUIREMENTS

To use the Embarcadero SQL Debugger for Microsoft, you must properly configure the server and client. For more information, see:

Server Requirements

Client Requirements

S ERVER R EQUIREMENTS

To use the Embarcadero SQL Debugger for Microsoft you must be running Windows 2000 or

Windows NT 4.0 or later, and your Microsoft SQL Server version must be 7.0 or later.

Setting Up the Server

There are three parts to setting up the server:

• Installing the Microsoft SQL Debugger Interface subcomponent.

• Configuring the Service.

• Configuring DCOM on the server

Enabling SQL Debugger for Microsoft on SQL Server SP3

SQL Debugging is disabled by default in SQL Server SP3 and greater. Please refer to Microsoft

Support for information regarding enabling the SQL Debugger for Microsoft on SQL Server SP3.

I NSTALLING THE M ICROSOFT SQL D EBUGGER I NTERFACE S UBCOMPONENT

The Microsoft server must have the Development Tools, Debugger Interface subcomponent of

Microsoft SQL Server 7.0. To determine if the Debugger Interface subcomponent is installed, locate the following files in the \Program Files\Common Files\Microsoft Shared\SQL Debugging directory:

• SQLDBREG.exe

• SQLDBG.dll

If these files are not in the \Program Files\Common Files\Microsoft Shared\SQL Debugging directory, you must install them before running the Embarcadero SQL Debugger for Microsoft.

963 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

Installing the Microsoft SQL Debugger Interface on the Server

To install the Debugger Interface subcomponent on the server after the initial installation, do the following:

1 Start Microsoft Visual Studio, Enterprise Edition Setup.

OR

Start Microsoft SQL Server 7.0 Setup.

2 Select Custom Install.

Microsoft SQL Server opens the Select Components dialog box:

3 In the Components box, select the Development Tools check box.

4 In the Sub-components box, select the Debugger Interface check box.

5 Click Next.

Microsoft SQL Server proceeds through the Microsoft SQL Server wizard to install the components.

C ONFIGURING THE S ERVICE

Configuring the service is an operating-system-dependent operation. See the instructions below for your server operating system.

• WIndows 2000

• Windows NT 4.0

Windows 2000

1 On the Windows taskbar, click the Start button, click Settings, and then click Control Panel.

2 Double-click Administrative Tools, and then click Services.

Windows opens the Services explorer.

3 In the right pane of the Services explorer, right click MSSQLServer, and then click Properties.

Windows opens the Net Logon Properties dialog box.

4 Click the Logon Tab.

5 Select the This Account option button.

6 In the This Account box, type (or browse to locate) the logon user account (including domain name, if necessary) of the person using the Embarcadero SQL Debugger for Microsoft.

NOTE: This person must have admin permissions on the server.

7 In the Password and Confirm Password boxes, type the password.

8 Click Apply.

RAPID SQL 8.6/XE5 USER GUIDE 964

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

9 Click the General Tab.

10 Click Start.

Windows starts the server and applies the changes.

Important Notes about Microsoft SQL Server 2000 Service Pack 3 (SP3)

By default, after you install Microsoft SQL Server 2000 Service Pack 3 (SP3), you cannot use the

Embarcadero SQL Debugger for Microsoft. You may receive the following error message:

“Server: Msg 514, Level 16, State 1, Procedure sp_sdidebug, Line 1 [Microsoft][ODBC SQL

Server Driver][SQL Server]Unable to communicate with debugger on [SQL Server Name]

(Error = 0x80070005). Debugging disabled for connection 53.”

Microsoft made this change for security reasons. To enable debugging, a member of the sysadmins server role, such as sa, must explicitly enable debugging by running the following code:

Exec sp_sdidebug 'legacy_on'

You must repeat this procedure whenever you restart the server.

Windows NT 4.0

1 On the Windows taskbar, click the Start button, select Settings and then click Control Panel.

2 Double-click Services.

Windows opens the Services dialog box.

3 In the Service list, select MSSQLServer and then click Startup.

4 In the Log On As: box, select the This Account option button.

5 In the This Account box, type the logon user account (including domain name, if necessary) of the person using the Embarcadero SQL Debugger for Microsoft.

NOTE: This person must have admin permissions on the server.

6 In the Password and Confirm Password boxes, type the password.

7 Click OK.

Windows returns to the Services dialog box.

8 Click Start.

Windows starts the server and applies the changes.

965 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

C ONFIGURING DCOM ON THE S ERVER

To configure DCOM, do the following:

1 After the server restarts, on the Windows taskbar, click the Start button, and then click Run.

2 In the Open box, type dcomcnfg.exe.

3 Click OK.

Windows opens the Distributed COM Configuration Properties dialog box.

4 Click the Default Security Tab.

5 In the Default Access Permissions box, click Edit Default.

Windows opens the Registry Value Permissions dialog box.

6 Click Add.

Windows opens the Add Users and Groups dialog box.

7 In the Names box, select SYSTEM, and then click Add.

8 Click the Type of Access list and then click Allow Access.

9 To let any user use the Embarcadero SQL Debugger for Microsoft, you must grant them remote access on the server. To grant remote access, you must configure their DCOM permissions on the server. In the Names box, click the target users and then click Add.

NOTE: You can add individual users or groups.

10 Click the Type of Access list and then click Allow Access.

11 Click OK.

12 Restart the server to apply the changes.

C LIENT R EQUIREMENTS

There are three categories of client requirements for the Embarcadero SQL Debugger for

Microsoft:

• Operating System

• Microsoft SQL Server 7.0, Client Connectivity Component

• Microsoft SQL Server 7.0, Development Tools - Debugger Interface Subcomponent

Operating System

The client must be running one of the following operating systems:

• Microsoft Windows 95

• Microsoft Windows 98

RAPID SQL 8.6/XE5 USER GUIDE 966

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

• Microsoft Windows NT 4.0 or later

Important Notes about Microsoft SQL Server 2000 Service Pack 3 (SP3)

By default, after you install Microsoft SQL Server 2000 Service Pack 3 (SP3), you cannot use the

Embarcadero SQL Debugger for Microsoft. You may receive the following error message:

“Server: Msg 514, Level 16, State 1, Procedure sp_sdidebug, Line 1 [Microsoft][ODBC SQL

Server Driver][SQL Server]Unable to communicate with debugger on [SQL Server Name]

(Error = 0x80070005). Debugging disabled for connection 53.”

Microsoft made this change for security reasons. To enable debugging, a member of the sysadmins server role, such as sa, must explicitly enable debugging by running the following code:

Exec sp_sdidebug 'legacy_on'

You must repeat this procedure whenever you restart the server.

Client Connectivity

The client must have the Client Connectivity component of Microsoft SQL Server 7.0 or later.

Microsoft Debugger Interface

The client must have the Development Tools, Debugger Interface subcomponent of Microsoft

SQL Server 7.0 or later. To determine if the Debugger Interface subcomponent is installed, locate the following files in the \Program Files\Common Files\Microsoft Shared\SQL Debugging directory:

• SQLDBREG.exe

• SQLDBG.dll

If these files are not in the \Program Files\Common Files\Microsoft Shared\SQL Debugging directory, you must install them before running the Embarcadero SQL Debugger for Microsoft.

Installing the Microsoft SQL Debugger Interface on the Client

To install the Debugger Interface subcomponent on the client:

1 Start the Microsoft SQL Server Setup program.

2 Select Custom Install.

Microsoft SQL Server opens the Select Components dialog box.

3 In the Components box, select the Development Tools check box.

4 In the Sub-Components box, select the Debugger Interface check box.

967 RAPID SQL 8.6/XE5 USER GUIDE

5 Click Next.

Microsoft SQL Server proceeds through the Microsoft SQL Server Wizard to install the components.

E MBARCADERO SQL D EBUGGER FOR M ICROSOFT O PTIONS

You can specify T-SQL Debugger options from the Debug Tab of Rapid SQL’s Options editor.

The Debug Tab of the Options Editor lets you set the duration of your debug initialization and debug session, enable DBMS output, and refresh dependencies.

Setting Debugger Options

To set debugger options, do the following:

1 On the File menu, click Options.

OR

On the Main toolbar, click Options.

Rapid SQL opens the Options Editor.

2 Specify debugger options. The table below describes the options available:

Option

Initialization

Timeout (seconds)

Description

Specifies the number of seconds Rapid SQL tries to initialize the debugger. If it cannot initialize the debugger in the specified time, a message displays in the Debug Output window.

Specifies, in seconds, the length of your debug session.

Default

60

7200 Debug Session

Timeout (seconds)

Enable DBMS

Output

Refresh

Dependencies for each run

Toggles the print output. Enable this option if you use dbms_output.put_line calls in your procedures and you want these lines displayed.

Refreshes dependencies for each run. This potentially timeconsuming process is useful if the target procedure has rapidly varying dependencies that can require updating during the debugging process.

Selected

Cleared

3 Click Close.

Rapid SQL closes the Options Editor.

RAPID SQL 8.6/XE5 USER GUIDE 968

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

E MBARCADERO SQL D EBUGGER FOR M ICROSOFT I NTERFACE

The Embarcadero SQL Debugger for Microsoft has a graphical interface that includes an editor window and four debug view windows .

When you open a debug session , Rapid SQL extracts the code for the object into a DDL Editor and opens four debug view windows at the bottom of the screen .

The four debug view windows are optional, dockable windows designed to help you debug your script .

TIP: All Embarcadero debuggers display Performance Metrics that let you measure the execution time of each statement in the debug session.

Embarcadero SQL Debugger for Microsoft’s five windows are:

1 DDL Editor window

2 Watch window

3 Variables window

4 Call Stack window

5 Dependency Tree window

Working with T-SQL Debugger Windows

Rapid SQL lets you resize, move, dock and float the following T-SQL Debugger windows:

• Watch

• Variables

• Call Stack

• Dependency Tree

To work with the above windows, do the following:

1 To resize the target window, click its frame and drag it

Rapid SQL resizes the window.

2 To move and dock the target window, click its grab bar and drag it.

Rapid SQL moves the window to its new location and docks it with surrounding windows.

3 To float the target window, press Shift, then click its grab bar and drag it.

Rapid SQL frames the window in its own floating frame and moves the window to its new location.

969 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

DDL E DITOR W INDOW

The Embarcadero SQL Debugger for Microsoft provides a DDL Editor that displays your code in read-only format. When you start debugging, the SQL Embarcadero SQL Debugger for

Microsoft extracts your code into a DDL Editor. The DDL Editor uses the default Rapid SQL syntax coloring.

W ATCH W INDOW

The Rapid SQL Embarcadero SQL Debugger for Microsoft provides a watch window that displays the watch variables for the database object you are debugging and lets you specify variables you want to evaluate or modify while debugging your program. For example, to check what happens when a variable (x) has a value of 100, you can double-click the variable in the DDL

Editor, drag it into the Watch Window, and change the value to 100. When you execute the script, the Debugger uses the value x =100. This window is only visible when the T-SQL

Debugger is active.

NOTE: Until you step at least once into a script, variables are not defined. Therefore, you must step at least once before dragging or typing a local variable in the Watch Window.

NOTE: When you exit a debug session and reenter it, the Embarcadero SQL Debugger for

Microsoft retains any watch variables or breakpoints you have set.

Opening and Closing the Watch Window

To open and close the Watch Window, do the following:

1 On the Debug Menu, on the Debug Views sub-menu, select or clear Watch.

OR

Press ALT+3.

Setting a Watch Variable

To set a Watch Variable, do the following:

1 In the DDL Editor, double-click the target variable and drag it to the Watch window .

NOTE: Microsoft SQL Server requires that local variables begin with @. You must drag the @ to the Watch Window.

2 In the Watch window, change the value of the variable.

3 On the DDL Editor , click Go.

The Embarcadero SQL Debugger for Microsoft executes the script using the new variable.

RAPID SQL 8.6/XE5 USER GUIDE 970

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

Removing a Watch Variable

To remove a Watch Variable, do the following:

1 In the Watch window , click the target variable and press DELETE .

V ARIABLES W INDOW

The Embarcadero SQL Debugger for Microsoft provides a variables window that displays the local variables and their current values during script execution. You cannot edit the variables in the Variables window. If the DDL Editor displays an external database object, and that object is a dependent of the object you are debugging, then the Variables Window automatically refreshes and displays the variables for that particular object. The Variables Window is only visible when the Debugger is active.

The Embarcadero SQL Debugger for Microsoft also lets you monitor your variables while debugging.

Opening and Closing the Variables Window

To open and close the Variables Window, do the following:

1 On the Debug Menu, on the Debug Views sub-menu, select or clear Variable.

OR

Press ALT+4.

Monitoring Variables

To monitor the values of your variables while debugging, do the following:

1 In the SQL Editor, hold the pointer over the target variable.

Rapid SQL opens a ScreenTip displaying the current value of that variable.

C ALL S TACK W INDOW

The Embarcadero SQL Debugger for Microsoft provides a call stack window that displays the stack of currently active calls. The Call Stack Window is only visible when the Debugger is active.

Opening and Closing the Call Stack Window

To open and close the Call Stack Window, do the following:

1 On the Debug Menu, on the Debug Views sub-menu, select or clear Call Stack.

OR

Press ALT+5.

971 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

Using the Call Stack Window

To display a line of code that references the call in the DDL Editor, do the following:

1 In the Call Stack window, double-click the target line.

In the DDL Editor, Rapid SQL displays a green arrow on the line of the referenced call.

D EPENDENCY T REE W INDOW

The Embarcadero SQL Debugger for Microsoft provides a dependency tree window that displays any external database objects the script accesses. Rapid SQL displays these database objects in a hierarchical tree, with the child objects as database objects accessed by the parent objects. You can use this window to display the code for a dependent database object in the

DDL Editor window. This window is only visible when the Debugger is active.

Opening and Closing the Dependency Tree Window

To open and close the Dependency Tree Window, do the following:

1 On the Debug Menu, on the Debug Views sub-menu, select or clear Dependencies.

OR

Press ALT+6.

Displaying Dependencies

To display the code for a dependent database object in the DDL Editor window, do the following:

1 In the Dependency Tree window, double-click the target object.

Rapid SQL displays the SQL of the target object in the DDL Editor window.

E MBARCADERO SQL D EBUGGER FOR M ICROSOFT F UNCTIONALITY

The Embarcadero SQL Debugger for Microsoft offers the following functionality:

• Input Parameters

• Step Into

• Step Out

• Step Over

• Run to Cursor

• Insert or Remove a Breakpoint

• Toggle Breakpoint

RAPID SQL 8.6/XE5 USER GUIDE 972

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

• Go

• Stop

• Restart

• Break

• Close

To make use of the above functionality, you must first open a debugging session .

I NPUT P ARAMETERS

I nput parameters are set when you first create an object. If the object you want to debug requires input parameters, Rapid SQL opens a Procedure or Trigger Execution dialog box and prompts you for the input parameters when you open a debugging session .

This dialog box also lets you:

• Save input parameters as *.prm files to preserve specific input parameter configurations.

• Open *.prm files to save the effort of reentering specific input parameters.

• Reset parameters to their default setting.

The table below describes the options and functionality on Procedure Execution dialog box:

The following table describes the options available in this dialog box:

Dialog box component

Owner drop-down list

Procedure drop-down list

Parameter window

Open button

Save button

Reset button

Execute button

Description

Displays the current procedure’s owner

Displays the name of the current procedure.

Specify the required input parameters in this window. If input parameters are not required for the execution of the target procedure, a message appears in this window, stating that the procedure “has no input parameters. Press execute to run it.”

Click to open an Open dialog box, from which you can open an existing *.prm file. The saved parameters immediately populate the dialog box upon opening.

Click to save the values of your input parameters as a *.prm file.

You can reopen a saved *.prm file from this dialog box at any time.

Click to reset the parameters in the Parameter window to their default values.

Click to execute the procedure once you have entered values for all required parameters in the Parameter window.

973 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

Option

Owner

Procedure

Parameter

Open

Save

Reset

Continue

Description

Displays the current procedure’s owner.

Displays the name of the current procedure.

Specify the required input parameters in this window. If input parameters are not required for the execution of the target procedure, a message displays in this window, stating that the procedure

“has no input parameters. Press execute to run it.”

Click to open an existing *.prm file. The saved parameters immediately populate the dialog box upon opening.

Click to save the values of your input parameters as a *.prm file. You can reopen a saved *.prm file from this dialog box at any time.

Click to reset the parameters in the Parameter window to their default values.

Click to execute the procedure once you have entered values for all required parameters in the

Parameter window.

NOTE: You cannot debug a script that requires input parameters until you provide input parameters.

S TEP I NTO

After you open a debugging session , Step Into lets you execute the current instruction. If the current instruction makes a call to a stored SQL object, the Embarcadero SQL Debugger for

Microsoft steps inside the nested child object.

Step Into

To use the Step Into facility, do the following:

1 On the Debug menu, click Step Into.

OR

On the DDL Editor toolbar, click Step Into.

OR

In the DDL Editor window, right-click and then click Step Into.

OR

Press F11.

The Embarcadero SQL Debugger for Microsoft moves the arrow to execute the current instruction.

RAPID SQL 8.6/XE5 USER GUIDE 974

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

S TEP O UT

After you open a debugging session , Step Out lets you execute the remainder of the dependent child object and resumes line-by-line, step-debugging in the parent object.

NOTE: Step Out is only active when the pointer indicates a child dependent instruction.

Step Out

To use the Step Out facility, do the following:

1 On the Debug menu, click Step Out.

OR

On the DDL Editor toolbar, click Step Out.

OR

In the DDL Editor window, right-click and then click Step Out.

OR

Press SHIFT+F11.

The Embarcadero SQL Debugger for Microsoft stops stepping through the current object and executes the remainder of the script.

S TEP O VER

After you open a debugging session , Step Over lets you execute the current instruction without stepping into a nested child object if the instruction makes a call to a dependent object.

Step Over

To use the Step Over facility, do the following:

1 On the Debug menu, click Step Over.

OR

On the DDL Editor toolbar, click Step Over.

OR

In the DDL Editor window, right-click and then click Step Over.

OR

Press F10.

The Embarcadero SQL Debugger for Microsoft executes the current instruction.

975 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

R UN TO C URSOR

After you open a debugging session , Run to Cursor lets you execute all instructions between the yellow arrow and the cursor.

Run to Cursor

To use the Run to Cursor facility, do the following:

1 Scroll down from the yellow arrow to the target line.

2 Click the target line.

Embarcadero SQL Debugger for Microsoft places the cursor on the target line.

3 On the Debug menu, click Run to Cursor.

OR

On the DDL Editor toolbar, click Run to Cursor.

OR

In the DDL Editor window, right-click and then click Run to Cursor.

OR

Press CTRL+F10.

The Embarcadero SQL Debugger for Microsoft executes all instructions between the pointer and the cursor.

I NSERT OR R EMOVE B REAKPOINT

A breakpoint is a position in a program where a debugger stops execution. When you start debugging, Embarcadero SQL Debugger for Microsoft opens the script in a DDL Editor. A yellow arrow pointer indicates which line the Embarcadero SQL Debugger for Microsoft executes next. The Embarcadero SQL Debugger for Microsoft executes all lines of code between the yellow arrow and the first breakpoint. If no breakpoints are present, Embarcadero

SQL Debugger for Microsoft debugs the entire script.

While debugging you can set one or more breakpoints in the currently executing object or in any object in the program call stack. Breakpoints can be toggled , temporarily disabled, or enabled, without having to add or remove them. Rapid SQL Embarcadero SQL Debugger for

Microsoft displays each enabled breakpoint as a red dot in the left margin of the DDL Editor

Window, and each disabled breakpoint as a red circle.

Rapid SQL stores all breakpoints you set so that when you debug the same script on separate occasions, you can reuse the same breakpoints. After you open a debugging session , Insert

Break lets you insert a breakpoint on the line where your cursor it located, and Remove Break lets you remove a breakpoint on the line where your cursor is located.

NOTE: Script execution stops at the first breakpoint.

RAPID SQL 8.6/XE5 USER GUIDE 976

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

Inserting or Removing a Breakpoint

To insert of remove a breakpoint, do the following:

1 In the DDL Editor window, click the target line of SQL.

2 On the Debug menu, click Breakpoint.

OR

On the DDL Editor toolbar, click Breakpoint.

OR

In the DDL Editor window, right-click and then click Breakpoint.

OR

Press F9.

The Embarcadero SQL Debugger for Microsoft inserts a new breakpoint or removes an existing breakpoint on the target line of code.

T OGGLE B REAKPOINT

After you open a debugging session and insert a breakpoint , Toggle Breakpoint lets you enable or disable that breakpoint. Embarcadero SQL Debugger for Microsoft displays each enabled breakpoint as a red dot in the left margin of the DDL Editor Window, and each disabled breakpoint as a red circle. You can toggle any breakpoint in the DDL Editor window. When you exit a debugging session and reenter it, the Embarcadero SQL Debugger for Microsoft retains any breakpoints you set.

Toggling a Breakpoint

To toggle a breakpoint, do the following:

1 In the DDL Editor window, click the line of the target breakpoint.

2 On the Debug menu, click Enable/Disable Breakpoint.

OR

On the DDL Editor toolbar, click Enable/Disable Breakpoint .

OR

In the DDL Editor window, right-click and then click Enable/Disable Breakpoint.

OR

Press CTRL+F9.

The Embarcadero SQL Debugger for Microsoft toggles the breakpoint indicated by the pointer.

977 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

G O

After you open a debugging session , Go lets you execute all instructions stopping only when when it encounters a breakpoint or when the program is complete.

Go

To use the Go facility, do the following:

1 On the Debug menu, click Go.

OR

On the DDL Editor toolbar, click Go.

OR

In the DDL Editor window, right-click and then click Go.

OR

Press F5.

The Embarcadero SQL Debugger for Microsoft executes all instructions.

S TOP

After you open a debugging session , Stop lets you halt the script execution and terminate the session.

Stop

To stop the debugger, do the following:

1 On the Debug menu, click Stop Debugging.

OR

On the DDL Editor toolbar, click Stop Debugging.

OR

In the DDL Editor window, right-click and then click Stop Debugging.

OR

Press SHIFT+F5.

The Embarcadero SQL Debugger for Microsoft stops the script execution and terminates the session.

RAPID SQL 8.6/XE5 USER GUIDE 978

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

R ESTART

After you open a debugging session , Restart lets you terminate the current debug session and open a new one. When the new session opens, Rapid SQL prompts you for new input parameters.

Restart

To restart the debugger, do the following:

1 On the Debug menu, click Restart.

OR

On the DDL Editor toolbar, click Restart .

OR

In the DDL Editor window, right-click and then click Restart.

OR

Press CTRL+SHIFT+F5.

The Embarcadero SQL Debugger for Microsoft restarts the debug session.

B REAK

After you open a debugging session , Break lets you pause the debug session.

Break

To pause the debugger, do the following:

1 On the Debug menu, click Break.

OR

On the DDL Editor toolbar, click Break.

OR

In the DDL Editor window, right-click and then click Break.

The Embarcadero SQL Debugger for Microsoft suspends the debug session.

C LOSE

After you open a debugging session , Close lets you close the DDL Editor and the Embarcadero

SQL Debugger for Microsoft.

979 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

Close

1 On the DDL Editor toolbar, click Close.

OR

In the upper right corner of the window, click Close.

OR

In the DDL Editor window, right-click and then click Close.

The Embarcadero SQL Debugger for Microsoft closes the debug session.

U SING THE E MBARCADERO SQL D EBUGGER FOR M ICROSOFT

This section offers a general overview of how to use Embarcadero SQL Debugger for Microsoft’s full range of debugging

functionality . After you

open a debugging session for any procedure or trigger, you can begin debugging .

For more detailed information, see Debugging a Sample Script .

O PENING A D EBUGGING S ESSION

When you open a debugging session, Rapid SQL opens the five windows of the Embarcadero

SQL Debugger for Microsoft interface. If the target script requires input parameters, Rapid SQL opens a Procedure Execution dialog box and prompts you for the necessary input parameters before displaying the target code in the SQL Editor window. When Rapid SQL displays the target script in the SQL Editor window, you can begin debugging .

NOTE: Rapid SQL Embarcadero SQL Debugger for Microsoft only lets you debug the SQL script of procedures or triggers.

Opening a Debugging Session

To debug a trigger or procedure, do the following:

1 On the Explorer Tab, click the node of the target procedure.

Rapid SQL opens the node and displays two items: Code and Privileges.

2 Under the target object node, double-click Code.

Rapid SQL opens a DDL Editor displaying the code of the target object .

RAPID SQL 8.6/XE5 USER GUIDE 980

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

3 On the Debug menu, click Start Debugging.

OR

On the SQL Editor toolbar, click Debug.

OR

In the DDL Editor window, right-click and then click Debug.

OR

Press CTRL+F5.

If the script requests input parameters, Rapid SQL opens a Procedure Execution dialog box.

If the script does not require input parameters, Rapid SQL displays the script in the DDL

Editor window for you to begin debugging .

NOTE: You cannot use the Embarcadero SQL Debugger for Microsoft until it has fully initialized.

4 In the Procedure Execution dialog box, specify the appropriate parameters, and then click

Continue .

Rapid SQL displays the script in the DDL Editor window for you to begin debugging .

D EBUGGING AN SQL S CRIPT

After you open a debugging session and enter any required input parameters, you can begin working with your script in the Embarcadero SQL Debugger for Microsoft.

Debugging an SQL Script

To debug a SQL script, do the following:

1 On the Debug menu, click one of the Embarcadero SQL Debugger for MSSQL Server options ( Step Into , Step Over , and so forth) or click Go .

OR

On the DDL Editor toolbar, click one of the Embarcadero SQL Debugger for MSSQL Server options ( Step Into , Step Over , and so on) or click Go.

NOTE: You can monitor the progress of your debug session in the Variables window.

981 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

2 On the Debug menu, click Breakpoint .

OR

On the DDL Editor toolbar, click Breakpoint.

OR

Press F9.

NOTE: When you set a breakpoint, the Call Stack window shows what was called before the breakpoint.

NOTE: You can use the Run to Cursor option to test the lines of code between a breakpoint and your cursor (indicated by the yellow arrow in the DDL Editor).

3 To check your variables, do the following:

1) In the DDL Editor , click a variable in your script and drag it to the Watch window.

2) In the Watch window, change the value of the watch variable and then click Go to run your script and see the results of the new value.

4 To check a record in stored objects, do the following:

1) Drag the record to the Watch window.

2) In the Watch window, change the value of the record, then click Go to run your script and see the results of the new value.

5 To check the dependencies, do the following:

1) In the Dependency Tree window double-click the target dependent object to extract the code into a new

DDL Editor .

2) Step through the script while monitoring the Dependency Tree window.

6 When you finish debugging the script, click Close.

Rapid SQL closes the T-SQL Debugger DDL Editor.

NOTE: When you exit a debug session and reenter it, the Embarcadero SQL Debugger for

MSSQL retains any watch variables or breakpoints you have set.

D EBUGGING A S AMPLE S CRIPT

This walk-through demonstrates basic debugging functionality. During the course of this walkthrough you debug two procedures using the Embarcadero SQL Debugger for Microsoft.

This section is divided into the following seven sections, each designed to familiarize you with basic debugging features and functionality:

• Getting Started

• Testing a Procedure

• Starting the Debugging Session

RAPID SQL 8.6/XE5 USER GUIDE 982

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

• Breakpoints

• Step Into

• Step Out

• Correcting the Script

G ETTING S TARTED

This part of Debugging the Sample Script explains how to create the following two procedures to be used for debugging:

• check_modulo

• calculate_sum_with_overflow_bug

NOTE: The procedure calculate_sum_with_overflow_bug intentionally includes a bug which prevents it from executing successfully. You use the Embarcadero SQL Debugger for

Microsoft to identify this bug.

Overview

The Getting Started section guides you through:

• Creating procedure 1.

• Creating procedure 2.

• Confirming the creation of the procedures.

C REATING P ROCEDURE 1

Procedure 1, check_modulo, calculates the modulo of any two user-specified numbers. The user passes the numbers into the procedure as input parameters. The procedure returns the result as an output parameter. If the modulo equals zero, procedure execution returns the output “YES”.

If the modulo is not zero, procedure execution returns the output “NO”. This procedure is nested in the second procedure, calculate_sum_with_overflow_bug.

To create this procedure, you must open Rapid SQL, connect to a MSSQL datasource, open a new SQL editor and, in the SQL editor, type or copy and paste the following code:

CREATE PROCEDURE username.

@p_dividend_in INT,

@p_divisor_in INT,

@result VARCHAR(3)OUTPUT check_modulo

AS

IF @p_dividend_in % @p_divisor_in = 0

SELECT @result = 'YES'

ELSE

SELECT @result = 'NO' go

NOTE: For the purposes of this walk-through, this procedure was created under the user name

Spence. Before executing the DDL above, substitute your user name for the word

“username”.

983 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

Creating Procedure 1

To create Procedure 1, do the following:

1 Start Rapid SQL.

2 Connect to a Microsoft SQL Server 7.0 datasource.

3 On the Datasource menu, click the database node and then click the target database.

NOTE: For this walk-through, we recommend that you select a non-production database.

4 On the Main toolbar, click New.

OR

On the File menu, click New, and then click SQL.

OR

Press CTRL+N.

Rapid SQL opens an SQL Editor in the current workspace.

5 In the SQL Editor, type the DDL for procedure check_modulo.

NOTE: You must substitute your user name once in the DDL for this procedure.

6 On the SQL Editor toolbar, click Execute.

Rapid SQL executes the script and creates Procedure 1, then opens the SQL Editor Results

Tab with the results of the script execution. If you were not able to create the procedure, check the error messages to determine the problem.

C REATING P ROCEDURE 2

Procedure 2, calculate_sum_with_overflow_bug, requires two user-specified numbers as input parameters. Upon execution, the procedure calculates the sum of the all numbers divisible by five between the two user-specified numbers. This procedure calls sample procedure 1

(check_modulo) to calculate the modulo of the user-specified numbers.

NOTE: The procedure calculate_sum_with_overflow_bug intentionally includes a bug which prevents it from executing successfully. You use the Embarcadero SQL Debugger for

Microsoft to identify this bug.

CAUTION: When inputting parameters, you must enter the smaller number in the

@p_num1_in int box.

RAPID SQL 8.6/XE5 USER GUIDE 984

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

To create this procedure, you must open Rapid SQL, connect to a MSSQL datasource, open a new SQL editor and, in the SQL editor, type or copy and paste the following code:

CREATE PROCEDURE

@p_num1_in INT, username.

@p_num2_in INT,

@result TINYINT OUTPUT calculate_sum_with_overflow_bug

/*INT-Integer (whole number) data from -2^31 (-2,147,483,648)

through 2^31 - 1 (2,147,483,647).

TINYINT-Integer data from 0 through 255.*/

AS

DECLARE @temp INT

DECLARE @temp_1 INT

DECLARE @v_divisor INT

DECLARE @v_condition VARCHAR(3)

SET @temp = @p_num1_in

SET @temp_1 = 0

SET @v_divisor = 5

SET @v_condition = 'NO'

WHILE 1=1

BEGIN

SELECT @temp = @temp + 1 /*Increase temp starting from p_num1*/

IF @temp = @p_num2_in /*Check if we reached p_num2*/

/*If yes, leave the LOOP*/

BREAK

/*Call Procedure 2 to check if number is divisable by 5*/

EXEC username.

check_modulo @temp,@v_divisor,@result=@v_condition output

IF @v_condition = 'YES'

SELECT @temp_1 = @temp_1 + @temp

END /*WHILE LOOP*/

SELECT @result = @temp_1

RETURN go

NOTE: For the purposes of this walk-through, this procedure was created under the user name

Spence. Before executing the DDL above, substitute your user name for the word

“username”.

Creating Procedure 2

To create Procedure 2, do the following:

1 Start Rapid SQL.

2 Connect to a Microsoft SQL Server 7.0 datasource.

3 On the Datasource menu, click the database node and then click the target database.

NOTE: For this walk-through, we recommend that you select a non-production database.

985 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

4 On the Main toolbar, click New.

OR

On the File menu, click New, and then click SQL.

OR

Press CTRL+N.

Rapid SQL opens an SQL Editor in the current workspace.

5 In the SQL Editor, type the DDL for procedure calculate_sum_with_overflow_bug.

NOTE: You must substitute your user name twice in the DDL for this procedure.

6 On the SQL Editor toolbar, click Execute.

Rapid SQL executes the script and creates Procedure 2, then opens the SQL Editor Results

Tab with the results of the script execution. If you were not able to create the procedure, check the error messages to determine the problem.

C ONFIRMING THE C REATION OF THE P ROCEDURES

After you create Procedure 1 and Procedure 2 , you can confirm their creation in Rapid SQL’s

Database Explorer.

Confirming the Creation of the Procedures

To confirm creation of the procedures, do the following:

1 On the Explorer Tab, click the Explorer list, and then click Organize By Owner.

The Explorer Tab refreshes with the new display configuration.

2 On the Explorer Tab, double-click the Databases node, and then double-click the target database node.

Rapid SQL displays the list of object owners.

3 Double-click your user name to display a list of your objects.

4 Double-click Procedures to display a list of procedures and confirm the creation of check_modulo and calculate_sum_with_overflow_bug.

You are now ready to begin testing a procedure .

RAPID SQL 8.6/XE5 USER GUIDE 986

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

T ESTING A P ROCEDURE

After you confirm the creation of the procedures , you must execute the procedure calculate_sum_with_overflow_bug (which includes a bug) to view its error message. This procedure requires two integer input parameters: @p_num1_in int and @p_num2_in int. For all integers between these two integers, this procedure identifies those divisible by 5, and then returns their sum.

CAUTION: When inputting parameters, you must enter the smaller number in the

@p_num1_in int box.

Testing a Procedure

To test a procedure, do the following:

1 On the Explorer Tab, right-click calculate_sum_with_overflow_bug, and then click Execute.

Rapid SQL opens the Procedure Execution window.

2 In the Value column of the @p_num1_in row, type 1.

3 In the Value column of the @p_num2_in row, type 11.

4 Click Execute.

Rapid SQL compiles the procedure and opens a Results Tab, displaying the sum 15. There are two numbers between 1 and 11 that are divisible by 5: 5, and 10. The sum of these two numbers is 15.

5 On the Explorer Tab, right-click calculate_sum_with_overflow_bug, and then click Execute.

Rapid SQL again opens the Procedure Execution window.

6 In the Value column of the @p_num1_in row, type 100.

7 In the Value column of the @p_num2_in row, type 121.

8 On the Procedure Execution window toolbar, click Execute.

Rapid SQL returns an error stating “Arithmetic overflow occurred”. You are now ready to

Start the Debugging Session .

S TARTING THE D EBUGGING S ESSION

After you test the procedure , you must open the procedure in Embarcadero SQL Debugger for

Microsoft and enter input parameters before debugging. To start a session, do the following:

1 On the Explorer Tab, right-click the procedure, calculate_sum_with_overflow_bug, and then click Debug to start the debug session.

Rapid SQL extracts the DDL for the procedure into a DDL Editor and opens the Procedure

Execution dialog box.

2 In the Value column of the @p_num1_in row, type 100.

987 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

3 In the Value column of the @p_num2_in row, type 121.

4 Click Continue.

Rapid SQL closes the dialog box and opens the Embarcadero SQL Debugger interface, which includes the following five windows:

• DDL Editor

• Watch Window

• Variables Window

• Call Stack Window

• Dependency Tree Window

You are now ready to insert breakpoints .

B REAKPOINTS

After you start the debugging session , you must insert a breakpoint into the code of the procedure calculate_sum_with_overflow_bug. Then you must run to the breakpoint. After you run to the breakpoint, Embarcadero SQL Debugger displays a yellow arrow on the red breakpoint icon and populates the Variables Window with values for the following variables:

Variable

@temp

@p_num2_in

@p_num1_in

@temp_1

@result

@v_condition

@v_divisor

Value

Current number

Second input parameter

First input parameter

Sum of the numbers, between the input parameters, divisible by 5

Condition of the output parameter

Output parameter

Divisor

Breakpoints

To insert a breakpoint, do the following:

1 In the DDL Editor, scroll to and click the following line:

EXEC username .

check_modulo @temp,@v_divisor,@result=@v_condition output

NOTE: This line is located near the end of the procedure’s code.

RAPID SQL 8.6/XE5 USER GUIDE 988

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

2 On the Debug menu, click Breakpoint.

OR

On the DDL Editor toolbar, click Breakpoint.

OR

In the DDL Editor window, right-click and then click Breakpoint.

OR

Press F9.

Rapid SQL inserts a breakpoint (indicated by dot) next to the number of the target line.

3 On the Debug menu, click Go.

OR

On the DDL Editor toolbar, click Go.

OR

In the DDL Editor window, right-click and then click Go.

OR

Press F5.

Rapid SQL Embarcadero SQL Debugger for Microsoft displays the value of the variables before the breakpoint in the Variables Window.

You are now ready to Step Into the code.

S TEP I NTO

After setting the breakpoint , you must step into the dependent procedure, check_modulo.To step into the dependent procedure, do the following:

1 On the Debug menu, click Step Into.

OR

On the DDL Editor toolbar, click Step Into.

OR

In the DDL Editor window, right-click and then click Step Into.

OR

Press F11.

Rapid SQL extracts the DDL for the dependent, nested procedure into the DDL Editor.

989 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

2 Step Into again.

Rapid SQL executes the next part of the code and displays the values for the variables in the

Variables Window.

The Call Stack Window displays calls to the procedures.

You are now ready to Step Out of the code.

S TEP O UT

After you Step Into the modulo_check (nested procedure) code, you must step back out and return to the calculate_sum_with_overflow_bug (outside procedure) code. To step back out and return, do the following:

1 On the Debug menu, click Step Out.

OR

On the DDL Editor toolbar, click Step Out.

OR

In the DDL Editor window, right-click and then click Step Out.

OR

Press SHIFT+F11.

Rapid SQL opens the DDL Editor containing the code for calculate_sum_with_overflow_bug.

2 On the Debug menu, click Go.

OR

On the DDL Editor toolbar, click Go.

OR

In the DDL Editor window, right-click and then click Go.

OR

Press F5.

When the value of the variable, @temp is equal to the value of the variable, @p_num2_in, the WHILE LOOP is complete and the Embarcadero SQL Debugger for Microsoft continues to the next executable statement in the code.

3 While monitoring the value of the variables in the Variables Window, continue to click Go to cycle through the WHILE LOOP.

After executing the SELECT and RETURN statements, Rapid SQL closes the Debugger and opens a DDL Editor to the Results Tab.

Now you are ready to correct the script .

RAPID SQL 8.6/XE5 USER GUIDE 990

EMBARCADERO SQL DEBUGGER FOR MICROSOFT SQL SERVER

C ORRECTING THE S CRIPT

When you finished Stepping Out of the nested code and encounter the error, you must do the following to fully fix the bug:

• Locate the source of the error

• Scroll to the line in the script displaying the error

• Analyze the code

• Correct the error

• Compile the corrected script

When you first executed the procedure, Rapid SQL displayed the error message “Arithmetic overflow error for data type tinyint, value = 450”. According to Microsoft SQL Server Books

Online: “This error occurs when an attempt is made to convert a float or real data type value into a data type that cannot store the result. This error prevents the operation from being completed.”

The data type used in this procedure (TINYINT) stores values from 0 to 255. The sum of the four numbers between 100 and 121 that are divisible by 5 (105, 110, 115, and 120) is 450. But because the TINYINT variable @result can only accept a maximum value of 255, Rapid SQL returns the error message and the procedure fails.

Correcting the Script

To correct the script, do the following:

1 On the Explorer Tab, right-click calculate_sum_with_overflow_bug, and then click Extract.

Rapid SQL extracts the DDL for the procedure into a DDL Editor.

2 On the Edit toolbar, click Find.

Rapid SQL opens the Find dialog box.

3 In the Find What box, type TINYINT.

4 Click Find Next.

Rapid SQL selects the first occurrence of TINYINT.

5 Change the data type for @result from TINYINT to INT.

6 On the DDL Editor toolbar, click Execute to execute the modified script.

Rapid SQL executes the script and opens the Results Tab.

7 On the Explorer Tab, right-click calculate_sum_with_overflow_bug, and then click Execute.

Rapid SQL opens the Procedure Execution dialog box.

8 In the Value column of the @p_num1_in row, type 100.

9 In the Value column of the @p_num2_in row, type 121.

991 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR ORACLE

10 Click Execute.

Rapid SQL executes the procedure with the new data type and opens the Results Tab, returning the value 450. You successfully corrected the script and debugged the procedure.

E

MBARCADERO

SQL D

EBUGGER FOR

O

RACLE

Embarcadero SQL Debugger for Oracle is a programming tool that lets you debug functions, procedures and triggers for Oracle versions 7.3.3 or later.

Objects

Using Embarcadero SQL Debugger for Oracle, you can debug the following objects:

• Functions

• Procedures

• Triggers

You can only debug triggers by debugging the functions or procedures that call them. You cannot debug packages, but you can debug the functions and procedures within packages.

NOTE: You cannot debug any objects contained in the Exclusion List.

NOTE: Availability of this feature depends on your Rapid SQL licensing. For more information, see

Licensing .

TIP:

The Code Analyst

is a tool to identify time-consuming lines of code. Code Analyst lets you perform detailed response time analysis on the execution of Procedures and

Functions.

The table below describes the sections of this chapter:

Section

Features

Interface

Functionality

Using Embarcadero

Debugger for Oracle

Description

This section describes how the Embarcadero SQL Debugger for Oracle helps you identify problems within your code.

This section describes the Embarcadero SQL Debugger for

Oracle graphical interface that includes an editor window and four debug view windows.

This section describes the functions of the Embarcadero SQL

Debugger for Oracle.

This section describes how to run a debug session.

RAPID SQL 8.6/XE5 USER GUIDE 992

EMBARCADERO SQL DEBUGGER FOR ORACLE

D EBUGGING F EATURES

Embarcadero SQL Debugger for Oracle is designed to help identify problems within your code.

Embarcadero SQL Debugger for Oracle lets you:

• Interactively step through the flow of script execution.

• Examine the value of variables.

• Solve logical problems with your script design.

Embarcadero SQL Debugger for Oracle offers fundamental debugging features, an Oracle

Exclusion List and several options to help fine tune debugging, as listed in the table below:

Debugging Feature

Step Into

Step Out

Step Over

Breakpoints

Description

Lets you execute each instruction step-by-step and step inside a stored object if the object is not on the Exclusion

List .

Lets you stop stepping through the current object and execute the remainder of the script. This option is only active when the pointer indicates a child-dependent instruction.

Lets you execute the current instruction without stepping into any child dependents.

A position in a program where the debugger stops execution.

To set specific Debugger values on the Options Editor, see Debugger Options .

E XCLUSION L IST

Upon installation, Rapid SQL sets up an Exclusion List on your computer which includes packages that the application cannot debug. The Exclusion List is located in the Rapid SQL directory, at the default installation location C:\Program

Files\Embarcadero\Nov2001Shared\deborcex.etd. You can add or remove packages from this file by editing the Exclusion List.

Editing the Exclusion List

To Edit the Exclusion List, do the following:

1 Open the Exclusion List, deborcex.etd, in a text editor, such as Notepad or WordPad.

2 To add a package, enter the name of the package at the end of the list. Use the following format: OWNER.OBJECT_NAME.

NOTE: There must be a carriage return after each item on the list.

993 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR ORACLE

3 To remove a package from the Exclusion List, delete the package from the list.

NOTE: Embarcadero SQL Debugger for Oracle does debug a package procedure listed on the Exclusion List.

4 Save the changes to deborcex.etd.

E MBARCADERO SQL D EBUGGER FOR O RACLE O PTIONS

You can specify PL/SQL Debugger options from the Debug Tab of Rapid SQL’s Options editor.

The Debug Tab of the Options Editor lets you set the duration of your debug initialization and debug session, enable DBMS output, and refresh dependencies.

Setting Debugger Options

To set debugger options, do the following:

1 On the File menu, click Options.

OR

On the Main toolbar, click Options.

Rapid SQL opens the Options Editor.

2 On the Debug Tab, specify debugger options. The table below describes the options available:

Option

Initialization

Timeout (seconds)

Description

Specifies the number of seconds Rapid SQL tries to initialize the debugger. If it cannot initialize the debugger in the specified time, a message displays in the Debug Output window.

Specifies, in seconds, the length of your debug session.

Default

60

7200 Debug Session

Timeout (seconds)

Enable DBMS

Output

Refresh

Dependencies for each run

Toggles the print output. Enable this option if you use dbms_output.put_line calls in your procedures and you want these lines displayed.

Refreshes dependencies for each run. This potentially timeconsuming process is useful if the target procedure has rapidly varying dependencies that can require updating during the debugging process.

Selected

Cleared

3 Click Close.

Rapid SQL closes the Options Editor.

RAPID SQL 8.6/XE5 USER GUIDE 994

EMBARCADERO SQL DEBUGGER FOR ORACLE

E MBARCADERO SQL D EBUGGER FOR O RACLE I NTERFACE

Embarcadero SQL Debugger for Oracle has a graphical interface that includes an editor window and four debug view windows. When you open a debug session, Rapid SQL extracts the code for the object into an SQL Editor and opens four debug view windows at the bottom of the screen.

TIP: All Embarcadero debuggers display Performance Metrics that let you measure the execution time of each statement in the debug session.

The four debug view windows are optional, dockable, floatable windows designed to help debug your script. Embarcadero SQL Debugger for Oracle’s five windows are:

• SQL Editor window

• Watch window

• Variables window

• Call Stack window

• Dependency Tree window

Working with Embarcadero SQL Debugger Windows

Rapid SQL lets you resize, move, dock and float the following Debugger windows:

• Watch

• Variables

• Call Stack

• Dependency Tree

To work with the above windows, do the following:

1 To resize the target window, click its frame and drag it

Rapid SQL resizes the window.

2 To move and dock the target window, click its grab bar and drag it.

Rapid SQL moves the window to its new location and docks it with surrounding windows.

3 To float the target window, press Shift, then click its grab bar and drag it.

Rapid SQL frames the window in its own floating frame and moves the window to its new location.

995 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR ORACLE

SQL E DITOR W INDOW

Embarcadero SQL Debugger for Oracle provides an SQL Editor window that displays your code in Read-Only format. When you start debugging, Embarcadero SQL Debugger for Oracle extracts your code into an SQL Editor window, making it editable. The SQL Editor uses the default Rapid SQL syntax coloring.

NOTE: Rapid SQL displays LOB datatypes, and REF CURSOR variables, in the Results Tab.

W ATCH W INDOW

Embarcadero SQL Debugger for Oracle provides a Watch window that displays the watch variables for the database object you are debugging and lets you specify variables you want to evaluate or modify while debugging your program. For example, to check what happens when a variable (x) has a value of 100, you can double-click that variable in the SQL Editor, drag it into the Watch window, and change the value to 100. When you execute the script, the debugger uses the value x=100. This window is only visible when the PL/SQL Debugger is active.

NOTE: You can type a fully qualified record variable into the Watch window.

NOTE: When you exit a debug session and reenter it, the Embarcadero SQL Debugger for

Oracle retains any watch variables or breakpoints you have set.

Opening and Closing the Watch Window

To open and close the Watch Window, do the following:

1 On the Debug Menu, on the Debug Views sub-menu, select or clear Watch.

OR

Press ALT+3.

Setting a Watch Variable

To set a Watch Variable, do the following:

1 In the SQL Editor, double-click the target variable and drag it to the Watch window.

2 In the Watch window, change the value of the variable.

3 On the SQL Editor toolbar, click Go.

Rapid SQL executes the script using the new value of the variable.

RAPID SQL 8.6/XE5 USER GUIDE 996

EMBARCADERO SQL DEBUGGER FOR ORACLE

Removing a Watch Variable

1 In the Watch window , click the target variable and press DELETE .

V ARIABLES W INDOW

Embarcadero SQL Debugger for Oracle provides a Variables window that displays the local variables and their current values during script execution. You cannot edit variables in the

Variables window. This window is only visible when the Debugger is active. If the SQL Editor displays an external database object, and that object is a dependent of the object you are debugging, then the Variables window automatically refreshes and displays the variables for that particular object.

The Embarcadero SQL Debugger for Oracle also lets you monitor the value of your variables while debugging.

Opening and Closing the Variables Window

To open and close the Variables Window, do the following:

1 On the Debug Menu, on the Debug Views sub-menu, select or clear Variable.

OR

Press ALT+4.

Monitoring Variables

To monitor the values of your variables while debugging, do the following:

1 In the SQL Editor, hold the pointer over the target variable.

Rapid SQL opens a ScreenTip displaying the current value of that variable.

C ALL S TACK W INDOW

Embarcadero SQL Debugger for Oracle provides a Call Stack window that displays the stack of currently active function calls. The Call Stack window is only visible when the PL/SQL Debugger is active.

Opening and Closing the Call Stack Window

To open and close the Call Stack Window, do the following:

1 On the Debug Menu, on the Debug Views sub-menu, select or clear Call Stack.

OR

Press ALT+5.

997 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR ORACLE

Using the Call Stack Window

To display a line of code that references the call in the SQL Editor , do the following:

1 In the Call Stack window , double-click the target line.

In the SQL Editor, Rapid SQL displays a green arrow on the line of the referenced call.

D EPENDENCY T REE W INDOW

Embarcadero SQL Debugger for Oracle provides a Dependency Tree window that displays any external database objects the script accesses. Rapid SQL displays these database objects in a hierarchical tree, with the child objects as database objects accessed by the parent objects. You can use this window to display the code for a dependent database object in the SQL Editor window. This window is only visible when the Debugger is active.

Opening and Closing the Dependency Tree Window

To open and close the Dependency Tree Window, do the following:

1 On the Debug Menu, on the Debug Views sub-menu, select or clear Dependencies.

OR

Press ALT+6.

Displaying Dependencies

To display the code for a dependent database object in the SQL Editor window, do the following:

1 In the Dependency Tree window, double-click the target object.

Rapid SQL displays the SQL of the target object in the SQL Editor window.

E MBARCADERO SQL D EBUGGER FOR O RACLE F UNCTIONALITY

Embarcadero SQL Debugger for Oracle offers you the following functionality:

• Input Parameters

• Step Into

• Step Out

• Step Over

• Run to Cursor

• Insert or Remove Breakpoint

• Toggle Breakpoint

RAPID SQL 8.6/XE5 USER GUIDE 998

EMBARCADERO SQL DEBUGGER FOR ORACLE

• Go

• Stop

• Restart

• Break .

• Close

To make use of the above functionality, you must first open a debugging session .

I NPUT P ARAMETERS

Input parameters are set when you first create an object. If the object you want to debug requires input parameters, Rapid SQL opens a Function, Procedure, or Trigger Execution dialog box and prompts you for the input parameters when you open a debugging session .

This dialog box also lets you:

• Save input parameters as *.prm files to preserve specific input parameter configurations.

• Open *.prm files to save the effort of reentering specific input parameters.

• Reset parameters to their default setting.

The table below describes the options and functionality on Procedure Execution dialog box:

The following table describes the options available in this dialog box:

Dialog box component

Owner drop-down list

Procedure drop-down list

Parameter window

Open button

Save button

Reset button

Execute button

Description

Displays the current procedure’s owner

Displays the name of the current procedure.

Specify the required input parameters in this window. If input parameters are not required for the execution of the target procedure, a message appears in this window, stating that the procedure “has no input parameters. Press execute to run it.”

Click to open an Open dialog box, from which you can open an existing *.prm file. The saved parameters immediately populate the dialog box upon opening.

Click to save the values of your input parameters as a *.prm file.

You can reopen a saved *.prm file from this dialog box at any time.

Click to reset the parameters in the Parameter window to their default values.

Click to execute the procedure once you have entered values for all required parameters in the Parameter window.

999 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR ORACLE

Option

Owner

Procedure

Parameter

Open

Save

Reset

Continue

Description

Displays the current procedure’s owner.

Displays the name of the current procedure.

Specify the required input parameters in this window. If input parameters are not required for the execution of the target procedure, a message displays in this window, stating that the procedure

“has no input parameters. Press execute to run it.”

Click to open an existing *.prm file. The saved parameters immediately populate the dialog box upon opening.

Click to save the values of your input parameters as a *.prm file. You can reopen a saved *.prm file from this dialog box at any time.

Click to reset the parameters in the Parameter window to their default values.

Click to execute the procedure once you have entered values for all required parameters in the

Parameter window.

NOTE: You cannot debug a script that requires input parameters until you provide input parameters.

S TEP I NTO

After you open a debugging session , Step Into lets you execute the current instruction. If the current instruction makes a call to a stored Oracle object, Embarcadero SQL Debugger for

Oracle steps inside the nested child object.

NOTE: Oracle 7.3 has problems running the debugger on an object with cursors.

RAPID SQL 8.6/XE5 USER GUIDE 1000

EMBARCADERO SQL DEBUGGER FOR ORACLE

Step Into

To use the Step Into facility, do the following:

1 On the Debug menu, click Step Into.

OR

On the SQL Editor toolbar, click Step Into.

OR

In the SQL Editor window, right-click and then click Step Into.

OR

Press F11.

Embarcadero SQL Debugger for Oracle moves the arrow to execute the current instruction.

S TEP O UT

After you open a debugging session , Step Out lets you execute the remainder of the dependent child object and resumes line-by-line, step-debugging in the parent object.

NOTE: Step Out is only active when the pointer indicates a child-dependent instruction.

NOTE: Oracle 7.3 has problems running the debugger on an object with cursors.

Step Out

To use the Step Out facility, do the following:

1 On the Debug menu, click Step Out.

OR

On the SQL Editor toolbar, click Step Out.

OR

In the SQL Editor window, right-click and then click Step Out.

OR

Press SHIFT+F11.

Embarcadero SQL Debugger for Oracle stops stepping through the current object and executes the remainder of the script.

S TEP O VER

After you open a debugging session , Step Over lets you execute the current instruction without stepping into a nested child object if the instruction makes a call to a dependent object.

NOTE: Oracle 7.3 has problems running the debugger on an object with cursors.

1001 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR ORACLE

Step Over

To use the Step Over facility, do the following:

1 On the Debug menu, click Step Over.

OR

On the SQL Editor toolbar, click Step Over.

OR

In the SQL Editor window, right-click and then click Step Over.

OR

Press F10.

Embarcadero SQL Debugger for Oracle executes the current instruction.

R UN TO C URSOR

After you open a debugging session , Run to Cursor lets you execute all instructions between the yellow arrow and your cursor.

Run to Cursor

To use the Run to Cursor facility, do the following:

1 Scroll down from the yellow arrow to the target line.

2 Click the target line.

Embarcadero SQL Debugger for Oracle places the cursor on the target line.

3 On the Debug menu, click Run to Cursor.

OR

On the SQL Editor toolbar, click Run to Cursor.

OR

In the SQL Editor window, right-click and then click Run to Cursor.

OR

Press CTRL+F10.

Embarcadero SQL Debugger for Oracle executes all instructions between the pointer and your cursor.

RAPID SQL 8.6/XE5 USER GUIDE 1002

EMBARCADERO SQL DEBUGGER FOR ORACLE

I NSERT OR R EMOVE A B REAKPOINT

A breakpoint is a position in a program where a debugger stops execution. When you start debugging, Embarcadero SQL Debugger for Oracle opens the script in an SQL Editor window.

A yellow pointer indicates which line the Debugger executes next. Embarcadero SQL Debugger for Oracle executes all lines of code between the pointer and the first breakpoint. If no breakpoints are present, Embarcadero SQL Debugger for Oracle debugs the entire script.

While debugging, you can set one or more breakpoints in the currently executing object or in any object in the program call stack. Breakpoints can be toggled , temporarily disabled, or enabled, without having to add or remove them. Embarcadero SQL Debugger for Oracle displays each enabled breakpoint as a red dot in the left margin of the SQL Editor Window, and each disabled breakpoint as a red circle.

Rapid SQL stores all breakpoints you set, so that when you debug the same script on separate occasions, you can reuse the same breakpoints.

After you open a debugging session , you can insert a breakpoint on the line where your cursor is located, and you can remove a breakpoint on the line where your cursor is located.

NOTE: Script execution stops at the first breakpoint.

Inserting or Removing a Breakpoint

To insert and remove a breakpoint, do the following:

1 In the SQL Editor window, click the target line of SQL.

2 On the Debug menu, click Breakpoint.

OR

On the SQL Editor toolbar, click Breakpoint.

OR

In the SQL Editor window, right-click and then click Breakpoint.

OR

Press F9.

Embarcadero SQL Debugger for Oracle inserts a new breakpoint or removes an existing breakpoint on the target line of code.

T OGGLE B REAKPOINT

After you open a debugging session and insert a breakpoint , Toggle Breakpoint lets you enable or disable that breakpoint. Embarcadero SQL Debugger for Oracle displays each enabled breakpoint as a red dot in the left margin of the SQL Editor Window, and each disabled breakpoint as a red circle. You can toggle any breakpoint in the SQL Editor window. When you exit a debugging session and reenter it, the Embarcadero SQL Debugger for Oracle retains any breakpoints you set.

1003 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR ORACLE

Toggling a Breakpoint

To toggle a breakpoint, do the following:

1 In the SQL Editor window, click the line of the target breakpoint.

2 On the Debug menu, click Enable/Disable Breakpoint.

OR

On the SQL Editor toolbar, click Enable/Disable Breakpoint .

OR

In the SQL Editor window, right-click and then click Enable/Disable Breakpoint.

OR

Press CTRL+F9.

Embarcadero SQL Debugger for Oracle toggles the breakpoint indicated by the pointer.

G O

After you open a debugging session , Go lets you execute all instructions, stopping only when it encounters a breakpoint or when the program is complete.

Go

Go use the Go facility, do the following:

1 On the Debug menu, click Go.

OR

On the SQL Editor toolbar, click Go.

OR

In the SQL Editor window, right-click and then click Go.

OR

Press F5.

Embarcadero SQL Debugger for Oracle executes all instructions.

S TOP

After you open a debugging session , Stop lets you halt the script execution and terminate the session.

RAPID SQL 8.6/XE5 USER GUIDE 1004

EMBARCADERO SQL DEBUGGER FOR ORACLE

Stop

To stop the debugger, do the following:

1 On the Debug menu, click Stop Debugging.

OR

On the SQL Editor toolbar, click Stop Debugging.

OR

In the SQL Editor window, right-click and then click Stop Debugging.

OR

Press SHIFT+F5.

Embarcadero SQL Debugger for Oracle stops the script execution and terminates the session.

R ESTART

After you open a debugging session , Restart lets you terminate the current debug session and open a new one. When the new session opens, Rapid SQL prompts you for new input parameters.

Restart

To restart the debugger, do the following:

1 On the Debug menu, click Restart.

OR

On the SQL Editor toolbar, click Restart.

OR

In the SQL Editor window, right-click and then click Restart.

OR

Press CTRL+SHIFT+F5.

Embarcadero SQL Debugger for Oracle restarts the debug session.

B REAK

After you open a debugging session , Break lets you pause the debug session.

1005 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR ORACLE

Break

To pause the session, do the following:

1 On the Debug menu, click Break.

OR

On the SQL Editor toolbar, click Break.

OR

In the SQL Editor window, right-click and then click Break.

Embarcadero SQL Debugger for Oracle suspends the debug session.

C LOSE

After you open a debugging session , Close lets you close the SQL Editor and the Embarcadero

SQL Debugger for Oracle.

Close

To close the SQL Editor and the debugger, do the following:

1 On the SQL Editor toolbar, click Close.

OR

In the upper right corner of the window, click Close.

OR

In the SQL Editor window, right-click and then click Close.

Embarcadero SQL Debugger for Oracle closes the debug session.

U SING THE E MBARCADERO SQL D EBUGGER FOR O RACLE

This section offers a general overview of how to use Embarcadero SQL Debugger for Oracle’s full range of debugging

functionality . After you

open a debugging session for any Oracle procedure or function, you can begin debugging .

For more detailed information, see Debugging a Sample Script .

RAPID SQL 8.6/XE5 USER GUIDE 1006

EMBARCADERO SQL DEBUGGER FOR ORACLE

O PENING A D EBUGGING S ESSION

When you open a debugging session, Rapid SQL opens the five windows of the Embarcadero

SQL Debugger for Oracle interface. If the target script requires input parameters, Rapid SQL opens a Procedure or Function Execution dialog box and prompts you for the necessary input parameters before displaying the target code in the SQL Editor window. When Rapid SQL displays the target script in the SQL Editor window, you can begin debugging .

NOTE: Embarcadero SQL Debugger for Oracle only lets you debug the SQL script of functions, triggers and procedures.

Opening a Debugging Session

To debug a function, trigger or procedure, do the following:

1 On the Explorer Tab, click the node of the target function, trigger, or procedure.

Rapid SQL opens the node and displays two items: Code and Privileges.

2 Under the target object node, double-click Code.

Rapid SQL opens an SQL editor displaying the code of the target object.

3 On the Debug menu, click Start Debugging.

OR

On the SQL Editor toolbar, click Debug.

OR

In the SQL Editor window, right-click and then click Debug.

OR

Press CTRL+F5.

If the script requests input parameters, Rapid SQL opens the Procedure or Function

Execution dialog box. If the script does not require input parameters, Rapid SQL displays the script in the SQL Editor window for you to begin debugging .

NOTE: You cannot use the Embarcadero SQL Debugger for Oracle until it has fully initialized.

4 In the Procedure or Function Execution dialog box, specify the appropriate parameters, and then click Continue.

Rapid SQL displays the script in the SQL Editor window for you to begin debugging .

NOTE: If the script requires Oracle types (tables, records, or Booleans) as input parameters, the PL/SQL Debugger generates an anonymous block.

D EBUGGING AN SQL S CRIPT

After you open a debugging session and enter any required input parameters, you can begin working with your script in the Debugger.

1007 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR ORACLE

Debugging an SQL Script

To debug an SQL script, do the following:

1 On the Debug menu, click one of the PL/SQL Debugger options ( Step Into , Step Over , and so forth) or click Go .

OR

On the SQL Editor toolbar, click one of the PL/SQL Debugger options ( Step Into , Step Over , and so on) or click Go.

NOTE: You can monitor the progress of your debug session in the Variables window.

2 On the Debug menu, click Breakpoint .

OR

On the SQL Editor toolbar, click Breakpoint.

OR

Press F9.

NOTE: When you set a breakpoint, the Call Stack window shows what was called before the breakpoint.

NOTE: You can use the Run to Cursor option to test the lines of code between a breakpoint and your cursor (indicated by the yellow arrow in the SQL Editor).

3 To check your variables, do the following:

1) In the SQL Editor , click a variable in your script and drag it to the Watch window.

2) In the Watch window, change the value of the watch variable and then click Go to run your script and see the results of the new value.

4 To check record in stored objects, do the following:

1) Drag the record to the Watch window.

2) In the Watch window, change the value of the record, then click Go to run your script and see the results of the new value.

5 To check the dependencies, do the following:

1) In the Dependency Tree window double-click the target dependent object to extract the code into a new

SQL Editor .

2) Step through the script while monitoring the Dependency Tree window.

6 When you finish debugging the script, click Close.

Rapid SQL closes the PL/SQL Debugger SQL Editor.

NOTE: When you exit a debug session and reenter it, the Embarcadero SQL Debugger for

Oracle retains any watch variables or breakpoints you have set.

RAPID SQL 8.6/XE5 USER GUIDE 1008

EMBARCADERO SQL DEBUGGER FOR ORACLE

D EBUGGING A S AMPLE S CRIPT

The Rapid SQL installation includes a sample script intended to walk you through basic debugging functionality. The sample script creates a package that includes functions and procedures that you debug.

NOTE: To create the sample package, you must have CREATE privileges.

Overview

Debugging a Sample Script is divided into three sections that will familiarize you with basic debugging features and functionality. These sections are:

• Getting Started, which guides you through creating the package you will use in Debugging

Sample Script 1 and Debugging Sample Script 2.

• Debugging Sample Script 1, which guides you through debugging functionality and demonstrates the Embarcadero SQL Debugger for Oracle interface features.

• Debugging Sample Script 2, which guides you through debugging functionality and error correction.

NOTE: For the purposes of this walk-through we have created this package under the user name DEMO_SPENCE.

G ETTING S TARTED

The Rapid SQL installation includes a sample script that you execute to create a package containing functions and procedures. These functions and procedures demonstrate basic debugging features available in the Embarcadero SQL Debugger for Oracle

NOTE: To create the sample package, you must have CREATE privileges.

If you create the package included with the Rapid SQL installation, you can delete it and its objects from your system when you finish working with them. The objects to delete are as follows:

• The package COUNT_TIME_INTERVAL

• The package function WEEKEND_DAYS_( )

• The package function WORKING_DAYS_( )

• The package function YEARS_ELAPSED_BETWEEN_( )

• The procedure YEARS_ELAPSED

• The procedure YEARS_ELAPSED_Y2K

Overview

The Getting Started section guides you through:

1009 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR ORACLE

• Opening the sample debug script.

• Executing the sample debug script.

• Changing the Explorer Tab display.

• Confirming the creation of the package, including its functions and procedures.

Getting Started

1 Start Rapid SQL.

2 On the File menu, click Open . Rapid SQL opens the Open File(s) dialog box.

NOTE: The sample file used in this example, DEBUGGER_DEMO.sql, is stored in the configured user SQL scripts folder. For details, see

Directories Options .

3 In the Open File(s) dialog box, navigate to the user SQL scripts folder and open the

DEBUGGER_DEMO.sql

file.

Rapid SQL opens the What type of file dialog box.

4 On the What type of file dialog box, click The file includes the DDL to create a database object, and then click OK.

Rapid SQL opens the target script in an SQL Editor.

5 On the SQL Editor toolbar, click Execute to execute the script and create the package.

Rapid SQL executes the target script and opens the SQL Editor Results Tab, displaying the results of the script execution. If you were not able to create the package, check the error messages to determine the problem.

6 On the Explorer Tab list, click Organize by Owner.

Rapid SQL displays a list of owners in the Database Explorer.

7 On the Explorer Tab, double-click your owner name.

Rapid SQL displays a list of your schema objects.

8 Under your owner node, double-click the Packages node.

Rapid SQL displays COUNT_TIME_INTERVAL , confirming the package’s creation. You are now ready to begin debugging Sample Script 1 and Sample Script 2.

D EBUGGING S AMPLE S CRIPT 1

Sample Script 1 demonstrates Embarcadero SQL Debugger for Oracle’s basic features and functionality with the function WORKING_DAYS( ), which counts the number of business days between two dates.

RAPID SQL 8.6/XE5 USER GUIDE 1010

EMBARCADERO SQL DEBUGGER FOR ORACLE

Overview

Debugging Sample Script 1 is divided into five parts:

• Starting the Debug Session

• Entering Input Parameters

• Inserting Breakpoints

• Stepping Into

• Viewing Debug Session Results

S AMPLE S CRIPT 1 - S TARTING THE D EBUG S ESSION

After you open and execute DEBUGGER_DEMO.sql, you can begin debugging Sample Script 1.

To begin debugging the function WORKING_DAYS( ), you must start a debug session.

Starting the Debug Session

To start the debug session, do the following:

1 On the Explorer Tab, under the Packages node, double-click the COUNT_TIME_INTERVAL node.

Rapid SQL opens the COUNT_TIME_INTERVAL node and displays the following items:

2 Under the COUNT_TIME_INTERVAL node, double-click Functions .

Rapid SQL opens the Functions node and displays the following items:

3 Under the Functions node, right-click WORKING_DAYS ( ) , and then click Debug to start the debug session.

Rapid SQL opens the Function Execution dialog box with the current date in the boxes. You are now ready to begin working with input parameters .

S AMPLE S CRIPT 1 - E NTERING I NPUT P ARAMETERS

After you start a debugging session , you can enter input parameters. You cannot debug a script that requires input parameters until you input those parameters in the Function Execution dialog box.

Input Parameters

To input parameters, do the following:

4 At the end of the P_START_DATE DATE row, click the drop-down arrow.

Rapid SQL opens a calendar.

5 On the calendar, click left arrow to set the month to November 1999.

1011 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR ORACLE

6 Click 1 .

Rapid SQL displays 11/01/1999 in the Value column of P_START_DATE.

7 Click the P_END_DATE DATE box, and then click the drop-down arrow.

Rapid SQL opens a new calendar.

8 On the calendar, click left arrow to set the month to November 1999.

9 Click 8 .

Rapid SQL displays 11/08/1999 in the Value column of P_END_DATE.

10 Click Continue.

Rapid SQL closes the Function Execution dialog box, and then opens the following five

Embarcadero SQL Debugger for Oracle interface windows:

• SQL Editor , which displays the SQL code for the function.

• Watch window.

• Variables window.

• Call Stack window.

• Dependency Tree window , which displays the dependent objects.

You are now ready to begin inserting breakpoints .

S AMPLE S CRIPT 1- I NSERTING B REAKPOINTS

After you input parameters in the Input Parameters dialog box, you can begin inserting breakpoints. In this example, the breakpoints must be inserted in the extracted dependent object code. After you extract this code, you must locate the target breakpoint lines by searching for the text DBMS_OUTPUT.

Breakpoints

To insert breakpoints, do the following:

1 In the Dependency Tree window , double-click the COUNT_TIME_INTERVAL package body.

Rapid SQL displays the SQL code for the package body in the SQL Editor window.

2 On the Edit toolbar, click Find.

Rapid SQL opens the Find dialog box.

3 On the Find dialog box, in the Find What box, type DBMS_OUTPUT.

4 Click Find Next .

In the SQL Editor, Rapid SQL highlights the first occurrence of DBMS_OUTPUT, on line 22.

RAPID SQL 8.6/XE5 USER GUIDE 1012

EMBARCADERO SQL DEBUGGER FOR ORACLE

5 On the SQL Editor toolbar, click Breakpoint.

Rapid SQL inserts a breakpoint next to the target line number.

6 On the Find dialog box , click Find Next.

Rapid SQL highlights the next occurrence of DBMS_OUTPUT .

7 Click Find Next a third time.

Rapid SQL highlights the next occurrence of DBMS_OUTPUT , on line 35.

8 On the Find dialog box, click Cancel.

Rapid SQL closes the Find dialog box.

9 On the SQL Editor toolbar, click Breakpoint to insert a second breakpoint.

You should now have breakpoints set at lines 22 and 35. You are now ready to begin stepping into the code.

S AMPLE S CRIPT 1- S TEPPING I NTO

After you insert breakpoints , you can step into the function code.

Step Into

To Step Into the code, do the following:

1 On the SQL Editor toolbar, click Go.

Embarcadero SQL Debugger for Oracle begins debugging and runs to the first breakpoint, placing the yellow arrow on line 22.

2 On the SQL Editor toolbar, click Step Into .

Embarcadero SQL Debugger for Oracle moves the yellow arrow to the next line of the code.

3 Click Step Into again to enter the LOOP block.

Embarcadero SQL Debugger for Oracle displays the value of the variables in the Variables window.

4 Click Step Into again to start moving through the LOOP block.

In the Variables window, Embarcadero SQL Debugger for Oracle updates the value of variable v_currdate from 01-NOV-1999 to 02-NOV-1999.

1013 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR ORACLE

5 Click Step Into two more times.

In the Variables window, Embarcadero SQL Debugger for Oracle updates the value of v_theday from NULL to Tuesday.

NOTE: If you continued stepping through the LOOP block, the Embarcadero SQL Debugger for Oracle would continue to update v_currdate and v_theday until v_currdate is greater than p_end_date.

6 On the SQL Editor toolbar, click Go.

Embarcadero SQL Debugger for Oracle runs to the next breakpoint.

7 On the SQL Editor toolbar, click Go once more.

Rapid SQL PL/SQL concludes the debug session and displays the Debug Session Results box .

S AMPLE S CRIPT 1 - V IEWING D EBUG S ESSION R ESULTS

After Stepping Into and running to the end of the code, Embarcadero SQL Debugger for Oracle displays a Debug Session Results box containing the following information:

• Variable output

• DBMS_OUTPUT

NOTE: In this example, the Embarcadero SQL Debugger for Oracle displays a Debug Session

Results box because the sample program includes DBMS_OUTPUT.

Debug Session Results

1 Click OK .

Rapid SQL closes the Debug Session Results box and terminates your debug session.

D EBUGGING S AMPLE S CRIPT 2

Sample Script 2 demonstrates Embarcadero SQL Debugger for Oracle’s functionality when used on a function containing a bug which prevents it from executing successfully. The buggy function, WEEKEND_DAYS( ), requires input parameters and counts the number of weekend days between two dates. In this section you must use Embarcadero SQL Debugger for Oracle to identify the bug, and then correct the script so that it can execute successfully.

Overview

Debugging Sample Script 2 is divided into six parts:

• Executing the Function

• Starting the Debug Session

RAPID SQL 8.6/XE5 USER GUIDE 1014

EMBARCADERO SQL DEBUGGER FOR ORACLE

• Entering Input Parameters

• Inserting Breakpoints

• Stepping Into

• Correcting the Function

S AMPLE S CRIPT 2 - E XECUTING THE F UNCTION

After you open and execute DEBUGGER_DEMO.sql, you can begin debugging Sample Script 2.

To begin debugging the function WEEKEND_DAYS ( ), you must first execute the function to discover the type of error it returns when it fails to execute.

Executing the Function

To execute the function, do the following:

1 On the Explorer Tab, under the Packages node, double-click the COUNT_TIME_INTERVAL node.

Rapid SQL opens the COUNT_TIME_INTERVAL node and displays the following items:

2 Double-click the Functions node.

Rapid SQL opens the Functions node and displays the following items:

3 Click WEEKEND_DAYS ( ) , then right-click it and click Execute .

Rapid SQL opens the Function Execution dialog box.

4 In the Value column of the P_START_DATE row, type 11/01/1999 .

5 In the Value column of the P_END_DATE row, type 11/30/1999.

6 Click Execute.

Rapid SQL attempts to execute the function but returns an error indicating that the character string buffer is too small.

You are now ready to start the debug session .

S AMPLE S CRIPT 2 - S TARTING THE D EBUG S ESSION

After you unsuccessfully execute the function WEEKEND_DAYS( ) and Rapid SQL displays the nature of its execution error, you can start a debugging session to determine the actual cause of the error.

1015 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR ORACLE

Starting the Debugging Session

To start the debugging session, do the following:

1 On the Explorer Tab, under the COUNT_TIME_INTERVAL node, under the Functions node, right-click WEEKEND_DAYS ( ) , and then click Debug to start the debug session.

Rapid SQL opens the Function Execution dialog box.

You are now ready to begin entering input parameters .

S AMPLE S CRIPT 2 - E NTERING I NPUT P ARAMETERS

After you start the debug session , you can enter input parameters in the Function Execution dialog box.

Entering Input Parameters

To enter the input parameters, do the following:

1 At the end of the P_START_DATE row, click the drop-down arrow.

Rapid SQL opens a calendar.

2 On the calendar, click left arrow to set the month to November 1999.

3 Click 1 .

Rapid SQL displays 11/01/1999 in the Value column of the P_START_DATE row.

4 At the end of the P_END_DATE row, click the drop-down arrow.

Rapid SQL opens a new calendar.

5 On the calendar, click left arrow to set the month to November 1999.

6 Click 30 .

Rapid SQL displays 11/08/1999 in the Value column of the P_END_DATE row.

7 Click Continue.

Rapid SQL closes the Function Execution dialog box, and then opens the following five

Embarcadero SQL Debugger for Oracle interface windows:

• SQL Editor , which displays the SQL code for the function.

• Watch window.

• Variables window.

• Call Stack window.

• Dependency Tree window , which displays the dependent objects.

You are now ready to begin inserting breakpoints .

RAPID SQL 8.6/XE5 USER GUIDE 1016

EMBARCADERO SQL DEBUGGER FOR ORACLE

S AMPLE S CRIPT 2- I NSERTING B REAKPOINTS

After you enter input parameters , you can begin inserting breakpoints. In this example, the breakpoints must be inserted in the extracted dependent object code. After you extract this code, you must locate the target breakpoint lines by searching for a particular line of code.

Breakpoints

To insert breakpoints, do the following:

1 In the Dependency Tree window , double-click the COUNT_TIME_INTERVAL package body.

Rapid SQL displays the SQL code for the package body in the SQL Editor window.

2 On the Edit toolbar, click Find.

Rapid SQL opens the Find dialog box.

3 On the Find dialog box, in the Find What box, type Function weekend_days, and then click

Find Next.

Embarcadero SQL Debugger for Oracle highlights the first occurrence of Function weekend_days.

4 On the Find dialog box, click Cancel.

Rapid SQL closes the Find dialog box.

5 Click line 60, the first line of executable code:

6 On the SQL Editor toolbar, click Breakpoint.

Rapid SQL inserts a breakpoint next to the line number.

7 Click Go to start debugging and run to the breakpoint.

Embarcadero SQL Debugger for Oracle places the yellow arrow on line 60 and populates the Variables window with the first set of variables in the function code.

Embarcadero SQL Debugger for Oracle also populates the Call Stack window with everything called before the breakpoint.

You are now ready to begin stepping into the function.

S AMPLE S CRIPT 2- S TEPPING I NTO

After you set and run to the breakpoint , you can step into the function to locate the cause of the error. To locate the cause of the error, you must monitor the Variables window. As you step through the code, the Variables window updates with the value of the variables.

1017 RAPID SQL 8.6/XE5 USER GUIDE

Step Into

To step into the function, do the following:

1 On the SQL Editor toolbar, click Step Into.

Rapid SQL moves the yellow arrow to the next line of the code, line 64.

2 On the SQL Editor toolbar, click Step Into.

Embarcadero SQL Debugger for Oracle’s Variables window updates the value of v_currdate to 02-NOV-1999.

3 On the SQL Editor toolbar, click Step Into.

Rapid SQL moves the yellow arrow to the next line of the code, line 66.

4 On the SQL Editor toolbar, click Step Into.

Rapid SQL moves the yellow arrow to the next line of the code, line 67, and, in the Variables window, updates the value of v_theday to Tuesday.

5 On the SQL Editor toolbar, click Step Into.

Rapid SQL moves the yellow arrow back to line 64 to repeat the loop.

6 On the SQL Editor toolbar, click Step Into.

Embarcadero SQL Debugger for Oracle’s Variables window updates the value of v_currdate to 03-NOV-1999.

7 On the SQL Editor toolbar, click Step Into.

Rapid SQL moves the yellow arrow to the next line of the code, line 66.

8 On the SQL Editor toolbar, click Step Into.

The Embarcadero SQL Debugger for Oracle locates the error. The application terminates the debug session, returns an error indicating that the numeric or value character string buffer is too small, extracts the COUNT_TIME_INTERVAL package code into an SQL Editor, and returns an error indicating the line on which the code failed. You are now ready to correct the script .

S AMPLE S CRIPT 2 - C ORRECTING THE S CRIPT

After you step through the SQL code and locate the error , you can correct the bug in Sample

Script 2. When Embarcadero SQL Debugger for Oracle locates an error, it extracts the target package body into an SQL Editor. To correct this script, you must do the following:

• Scroll to the incorrect line in the script

• Analyze the code

• Correct the error

• Execute the corrected SQL script

RAPID SQL 8.6/XE5 USER GUIDE 1018

EMBARCADERO SQL DEBUGGER FOR SYBASE ASE

• Execute the WEEKEND_DAYS ( ) function

The code in Sample Script 2 fails on line 66, returning an error when the variable v_theday increments from the value Tuesday to the value Wednesday. The cause of this error is found in the declarations section of the function script, where the width of the VARCHAR2 variable v_theday is set to 8. Because “Wednesday” includes nine characters, the value of the variable v_theday fails when it attempts to place a nine-character value in an eight-character variable. To correct this error, you must increase the width of the variable v_theday to accommodate nine characters.

Correcting the Script

To correct the script, do the following:

1 On the Explorer Tab, under the Packages node, under the COUNT_TIME_INTERVAL. node, r ight-click Package Body , and then click Extract.

Rapid SQL extracts the package body into an SQL Editor.

2 In the SQL Editor , scroll to line 57, the line defining the variable v_theday.

3 On line 57, change the value of the width from 8 to 9.

4 On the SQL Editor toolbar, click Execute to execute the script.

Rapid SQL successfully executes the script.

5 On the Explorer Tab, under the COUNT_TIME_INTERVAL package node, under the

Functions node, click WEEKEND_DAYS ( ) .

6 Right-click WEEKEND_DAYS ( ) , and then click Execute.

Rapid SQL opens the Function Execution dialog box.

7 In the Value column of the P_START_DATE row, type 11/01/1999 .

8 In the Value column of the P_END_DATE row, type 11/30/1999.

9 Click Execute.

Rapid SQL successfully executes the corrected function.

E

MBARCADERO

SQL D

EBUGGER FOR

S

YBASE

ASE

Embarcadero SQL Debugger for Sybase is a programming tool that lets you debug Sybase objects in the following Sybase versions:

• 12

• 12.0 (special version)

• 12.5

1019 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR SYBASE ASE

Objects

Using Embarcadero SQL Debugger for Sybase, you can debug the following objects:

• Procedures

• Triggers

You can only debug triggers by debugging the procedures that call them.

NOTE: Availability of this feature depends on your Rapid SQL licensing. For more information, see

Licensing .

TIP:

The Code Analyst

is a tool to identify time-consuming lines of code. Code Analyst lets you perform detailed response time analysis on the execution of Procedures and

Functions.

The table below describes the sections of this chapter:

Section

Features

Interface

Functionality

Using Embarcadero SQL

Debugger for Sybase ASE

Description

This section describes how Embarcadero SQL Debugger for

Sybase ASE helps you identify problems within your code.

This section describes Embarcadero SQL Debugger for Sybase

ASE’s graphical interface, which includes an editor window and four debug view windows.

This section describes the way in which Embarcadero SQL

Debugger for Sybase ASE functions.

This section describes how to run a debug session.

E MBARCADERO SQL D EBUGGER FOR S YBASE ASE F EATURES

Embarcadero SQL Debugger for Sybase ASE is designed to help identify problems within your code. Embarcadero SQL Debugger for Sybase ASE lets you:

• Interactively step through the flow of script execution.

• Examine the value of variables.

• Solve logical problems with your script design.

Embarcadero SQL Debugger for Sybase ASE offers fundamental debugging features and several options to help fine tune debugging, as listed in the table below:

Debugging Feature

Step Into

Description

Lets you execute each instruction step-by-step and step inside a stored object.

RAPID SQL 8.6/XE5 USER GUIDE 1020

EMBARCADERO SQL DEBUGGER FOR SYBASE ASE

Debugging Feature

Step Out

Step Over

Breakpoints

Description

Lets you stop stepping through the current object and execute the remainder of the script. This option is only active when the pointer indicates a child-dependent instruction.

Lets you execute the current instruction without stepping into any child dependents.

A position in a program where the debugger stops execution.

To set specific Debugger values on Rapid SQL’s Options Editor, see Debugger Options .

E MBARCADERO SQL D EBUGGER FOR S YBASE ASE O PTIONS

You can specify Debugger options from the Debug Tab of Rapid SQL’s Options editor. The

Debug Tab of the Options Editor lets you set the duration of your debug initialization and debug session, enable DBMS output, and refresh dependencies.

Setting Debugger Options

To set debugger options, do the following:

1 On the File menu, click Options.

OR

On the Main toolbar, click Options.

Rapid SQL opens the Options Editor.

2 On the Debug Tab, specify debugger options. The table below describes the options available:

Option

Initialization

Timeout (seconds)

Description

Specifies the number of seconds Rapid SQL tries to initialize the debugger. If it cannot initialize the debugger in the specified time, a message displays in the Debug Output window.

Specifies, in seconds, the length of your debug session.

Default

60

7200 Debug Session

Timeout (seconds)

Enable DBMS

Output

Refresh

Dependencies for each run

Toggles the print output. Enable this option if you use dbms_output.put_line calls in your procedures and you want these lines displayed.

Selected

Refreshes dependencies for each run. This potentially timeconsuming process is useful if the target procedure has rapidly varying dependencies that can require updating during the debugging process.

Cleared

1021 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR SYBASE ASE

3 Click Close.

Rapid SQL closes the Options Editor.

E MBARCADERO SQL D EBUGGER FOR S YBASE ASE I NTERFACE

Embarcadero SQL Debugger for Sybase ASE has a graphical interface that includes an editor window and four debug view windows. When you open a debug session, Rapid SQL extracts the code for the object into a DDL Editor and opens four debug view windows at the bottom of the screen.

TIP: All Embarcadero debuggers display Performance Metrics that let you measure the execution time of each statement in the debug session.

The four debug view windows are optional, dockable windows designed to help debug your script. Embarcadero SQL Debugger for Sybase ASE’s five windows are:

• DDL Editor window

• Watch window

• Variables window

• Call Stack window

• Dependency Tree window

Working with Debugger Windows

Rapid SQL lets you resize, move, dock and float the following Debugger windows:

• Watch

• Variables

• Call Stack

• Dependency Tree

To work with the above windows, do the following:

1 To resize the target window, click its frame and drag it.

Rapid SQL resizes the window.

2 To move and dock the target window, click its grab bar and drag it.

Rapid SQL moves the window to its new location and docks it with surrounding windows.

3 To float the target window, press Shift, then click its grab bar and drag it.

Rapid SQL frames the window in its own floating frame and moves the window to its new location.

RAPID SQL 8.6/XE5 USER GUIDE 1022

EMBARCADERO SQL DEBUGGER FOR SYBASE ASE

DDL E DITOR W INDOW

Embarcadero SQL Debugger for Sybase ASE provides a DDL Editor window that displays your code in read-only format. When you start debugging, Embarcadero SQL Debugger for Sybase

ASE extracts your code into a DDL Editor window, making it editable. The DDL Editor uses the default Rapid SQL syntax coloring.

W ATCH W INDOW

Embarcadero SQL Debugger for Sybase ASE provides a Watch window that displays the watch variables for the database object you are debugging and lets you specify variables you want to evaluate or modify while debugging your program. For example, to check what happens when a variable (x) has a value of 100, you can double-click that variable in the DDL Editor and drag it into the Watch window. In the Watch window, change the value to 100. When you execute the script, the debugger uses the value x=100. This window is only visible when Embarcadero SQL

Debugger for Sybase ASE is active.

NOTE: You can type a fully qualified record variable into the Watch window.

NOTE: When you exit a debug session and reenter it, Embarcadero SQL Debugger for Sybase

ASE retains any watch variables or breakpoints you have set.

Opening and Closing the Watch Window

To open and close the Watch Window, do the following:

1 On the Debug Menu, on the Debug Views sub-menu, select or clear Watch.

OR

Press ALT+3.

Setting a Watch Variable

To set a Watch Variable, do the following:

1 In the DDL Editor, double-click the target variable and drag it to the Watch window.

2 In the Watch window, in the Value column, change the value of the variable.

3 On the DDL Editor toolbar, click Go to execute the script using the new value of the variable.

Rapid SQL executes the script using the new value of the variable.

1023 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR SYBASE ASE

Removing a Watch Variable

To remove a Watch Variable, do the following:

1 In the Watch window , delete the variable.

V ARIABLES W INDOW

Embarcadero SQL Debugger for Sybase ASE provides a Variables window that displays the local variables and their current values during script execution. You cannot edit variables in the

Variables window. This window is only visible when the Debugger is active. If the DDL Editor displays an external database object, and that object is a dependent of the object you are debugging, then the Variables window automatically refreshes and displays the variables for that external object.

Embarcadero SQL Debugger for Sybase ASE also lets you monitor the value of your variables while debugging.

Opening and Closing the Variables Window

To open and close the Variables Window, do the following:

1 On the Debug Menu, on the Debug Views sub-menu, select or clear Variable.

OR

Press ALT+4.

Monitoring Variables

To monitor the values of your variables while debugging, do the following:

1 In the DDL Editor, hold the pointer over the target variable.

Rapid SQL opens a ScreenTip displaying the current value of that variable.

C ALL S TACK W INDOW

Embarcadero SQL Debugger for Sybase ASE provides a Call Stack window that displays the stack of currently active calls. The Call Stack window is only visible when the Debugger is active.

Opening and Closing the Call Stack Window

To open and close the Call Stack Window, do the following:

1 On the Debug Menu, on the Debug Views sub-menu, select or clear Call Stack.

OR

Press ALT+5.

RAPID SQL 8.6/XE5 USER GUIDE 1024

EMBARCADERO SQL DEBUGGER FOR SYBASE ASE

Using the Call Stack Window

To display a line of code that references the call in the DDL Editor , do the following:

1 In the Call Stack window , double-click the target line.

In the DDL Editor, Rapid SQL displays a green arrow on the line of the the referenced call.

D EPENDENCY T REE W INDOW

Embarcadero SQL Debugger for Sybase ASE provides a Dependency Tree window that displays any external database objects accessed by the script. Rapid SQL displays these database objects in a hierarchical tree, with the child objects as database objects accessed by the parent objects. You can use this window to display the code for a dependent database object in the

DDL Editor window. This window is only visible when the Debugger is active.

Opening and Closing the Dependency Tree Window

To open and close the Dependency Tree Window, do the following:

1 On the Debug Menu, on the Debug Views sub-menu, select or clear Dependencies.

OR

Press ALT+6.

Displaying Dependencies

To display the code for a dependent database object in the DDL Editor window, do the following:

1 In the Dependency Tree window, double-click the target object.

Rapid SQL displays the SQL of the target object in the DDL Editor window.

E MBARCADERO SQL D EBUGGER FOR S YBASE ASE F UNCTIONALITY

Embarcadero SQL Debugger for Sybase ASE offers you the following functionality:

• Input parameters

• Step Into

• Step Out

• Step Over

• Run to Cursor

• Insert or Remove Breakpoint

• Toggle Breakpoint

1025 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR SYBASE ASE

• Go

• Stop

• Restart

• Break

• Close

To make use of the above functionality, you must first open a debugging session .

I NPUT P ARAMETERS

I nput parameters are set when you first create an object. If the object you want to debug requires input parameters, Rapid SQL opens a Procedure Execution dialog box and prompts you for the input parameters when you open a debugging session .

This dialog box also lets you:

• Save input parameters as *.prm files to preserve specific input parameter configurations.

• Open *.prm files to save the effort of reentering specific input parameters.

• Reset parameters to their default setting.

The table below describes the options and functionality on Procedure Execution dialog box:

The following table describes the options available in this dialog box:

Dialog box component

Owner drop-down list

Procedure drop-down list

Parameter window

Open button

Save button

Reset button

Execute button

Description

Displays the current procedure’s owner

Displays the name of the current procedure.

Specify the required input parameters in this window. If input parameters are not required for the execution of the target procedure, a message appears in this window, stating that the procedure “has no input parameters. Press execute to run it.”

Click to open an Open dialog box, from which you can open an existing *.prm file. The saved parameters immediately populate the dialog box upon opening.

Click to save the values of your input parameters as a *.prm file.

You can reopen a saved *.prm file from this dialog box at any time.

Click to reset the parameters in the Parameter window to their default values.

Click to execute the procedure once you have entered values for all required parameters in the Parameter window.

RAPID SQL 8.6/XE5 USER GUIDE 1026

EMBARCADERO SQL DEBUGGER FOR SYBASE ASE

Option

Owner

Procedure

Parameter

Open

Save

Reset

Continue

Description

Displays the current procedure’s owner.

Displays the name of the current procedure.

Specify the required input parameters in this window. If input parameters are not required for the execution of the target procedure, a message displays in this window, stating that the procedure

“has no input parameters. Press execute to run it.”

Click to open an existing *.prm file. The saved parameters immediately populate the dialog box upon opening.

Click to save the values of your input parameters as a *.prm file. You can reopen a saved *.prm file from this dialog box at any time.

Click to reset the parameters in the Parameter window to their default values.

Click to execute the procedure once you have entered values for all required parameters in the

Parameter window.

NOTE: You cannot debug a script that requires input parameters until you provide input parameters.

S TEP I NTO

After you open a debugging session , Step Into lets you execute the current instruction. If the current instruction makes a call to a stored Sybase ASE object, Embarcadero SQL Debugger for

Sybase ASE steps inside the nested child object.

Step Into

To use the Step Into facility, do the following:

1 On the Debug menu, click Step Into.

OR

On the DDL Editor toolbar, click Step Into.

OR

In the DDL Editor window, right-click and then click Step Into.

OR

Press F11.

Embarcadero SQL Debugger for Sybase ASE moves the arrow to execute the current instruction.

1027 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR SYBASE ASE

S TEP O UT

After you open a debugging session , Step Out lets you execute the remainder of the dependent child object and resumes line-by-line, step-debugging in the parent object.

NOTE: Step Out is only active when the pointer indicates a child-dependent instruction.

Step Out

To use the Step Out facility, do the following:

1 On the Debug menu, click Step Out.

OR

On the DDL Editor toolbar, click Step Out.

OR

In the DDL Editor window, right-click and then click Step Out.

OR

Press SHIFT+F11.

Embarcadero SQL Debugger for Sybase ASE stops stepping through the current object and executes the remainder of the script.

S TEP O VER

After you open a debugging session , Step Over lets you execute the current instruction without stepping into a nested child object if the instruction makes a call to a dependent object.

Step Over

To use the Step Over facility, do the following:

1 On the Debug menu, click Step Over.

OR

On the DDL Editor toolbar, click Step Over.

OR

In the DDL Editor window, right-click and then click Step Over.

OR

Press F10.

Embarcadero SQL Debugger for Sybase ASE executes the current instruction.

RAPID SQL 8.6/XE5 USER GUIDE 1028

EMBARCADERO SQL DEBUGGER FOR SYBASE ASE

R UN TO C URSOR

After you open a debugging session , Run to Cursor lets you execute all instructions between the yellow arrow and your cursor.

Run to Cursor

To use the Run to Cursor facility, do the following:

1 Scroll down from the yellow arrow to the target line.

2 Click the target line.

Embarcadero SQL Debugger for Sybase ASE places the cursor on the target line.

3 On the Debug menu, click Run to Cursor.

OR

On the DDL Editor toolbar, click Run to Cursor.

OR

In the DDL Editor window, right-click and then click Run to Cursor.

OR

Press CTRL+F10.

Embarcadero SQL Debugger for Sybase ASE executes all instructions between the yellow arrow and your cursor.

I NSERT OR R EMOVE A B REAKPOINT

A breakpoint is a position in a program where a debugger stops execution. When you start debugging, Embarcadero SQL Debugger for Sybase ASE opens the script in a DDL Editor window. A yellow pointer indicates which line the Debugger executes next. Embarcadero SQL

Debugger for Sybase ASE executes all lines of code between the pointer and the first breakpoint. If no breakpoints are present, Embarcadero SQL Debugger for Sybase ASE debugs the entire script.

While debugging, you can set one or more breakpoints in the currently executing object or in any object in the program call stack. Breakpoints can be toggled (temporarily disabled or enabled) without having to remove or reinsert them. Embarcadero SQL Debugger for Sybase

ASE displays each enabled breakpoint as a red dot in the left margin of the DDL Editor Window, and each disabled breakpoint as a red circle.

Rapid SQL stores all breakpoints you set so that when you debug the same script on separate occasions, you can reuse the same breakpoints each time.

After you open a debugging session , you can insert a breakpoint on the line where your cursor it located, and you can remove a breakpoint on the line where your cursor is located.

NOTE: Script execution stops at the first breakpoint.

1029 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR SYBASE ASE

Inserting or Removing a Breakpoint

To insert or remove a breakpoint, do the following:

1 In the DDL Editor window, click the target line of SQL.

2 On the Debug menu, click Breakpoint.

OR

On the DDL Editor toolbar, click Breakpoint.

OR

In the DDL Editor window, right-click and then click Breakpoint.

OR

Press F9.

Embarcadero SQL Debugger for Sybase ASE inserts a new breakpoint or removes an existing breakpoint on the target line of code.

T OGGLE B REAKPOINT

After you open a debugging session and insert a breakpoint , Toggle Breakpoint lets you enable or disable that breakpoint. Embarcadero SQL Debugger for Sybase ASE displays each enabled breakpoint as a red dot in the left margin of the DDL Editor Window, and each disabled breakpoint as a red circle. You can toggle any breakpoint in the DDL Editor window. When you exit a debugging session and reenter it, the Embarcadero SQL Debugger for Sybase ASE retains any breakpoints you set.

Toggling a Breakpoint

To toggle a breakpoint, do the following:

1 In the DDL Editor window, click the line of the target breakpoint.

2 On the Debug menu, click Enable/Disable Breakpoint.

OR

On the DDL Editor toolbar, click Enable/Disable Breakpoint.

OR

In the DDL Editor window, right-click and then click Enable/Disable Breakpoint.

OR

Press CTRL+F9.

Embarcadero SQL Debugger for Sybase ASE toggles the breakpoint indicated by the pointer.

RAPID SQL 8.6/XE5 USER GUIDE 1030

EMBARCADERO SQL DEBUGGER FOR SYBASE ASE

G O

After you open a debugging session , Go lets you execute all instructions, stopping only when it encounters a breakpoint or when the program is complete.

Go

To use the Go facility, do the following:

1 On the Debug menu, click Go.

OR

On the DDL Editor toolbar, click Go.

OR

In the DDL Editor window, right-click and then click Go.

OR

Press F5.

Embarcadero SQL Debugger for Sybase ASE executes all instructions.

S TOP

After you open a debugging session , Stop lets you halt the script execution and terminate the session.

Stop

To stop the debugger, do the following:

1 On the Debug menu, click Stop Debugging.

OR

On the DDL Editor toolbar, click Stop Debugging.

OR

In the DDL Editor window, right-click and then click Stop Debugging.

OR

Press SHIFT+F5.

Embarcadero SQL Debugger for Sybase ASE stops the script execution and terminates the session.

1031 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR SYBASE ASE

R ESTART

After you open a debugging session , Restart lets you terminate the current debug session and open a new one. When the new session opens, Rapid SQL prompts you for new input parameters.

Restart

To restart the debugger, do the following:

1 On the Debug menu, click Restart.

OR

On the DDL Editor toolbar, click Restart.

OR

In the DDL Editor window, right-click and then click Restart.

OR

Press CTRL+SHIFT+F5.

Embarcadero SQL Debugger for Sybase ASE restarts the debug session.

B REAK

After you open a debugging session , Break lets you pause the debug session.

Break

To pause the debugger, do the following:

1 On the Debug menu, click Break.

OR

On the DDL Editor toolbar, click Break.

OR

In the DDL Editor window, right-click and then click Break.

Embarcadero SQL Debugger for Sybase ASE suspends the debug session.

C LOSE

After you open a debugging session , Close lets you close the DDL Editor and Embarcadero SQL

Debugger for Sybase ASE.

RAPID SQL 8.6/XE5 USER GUIDE 1032

EMBARCADERO SQL DEBUGGER FOR SYBASE ASE

Close

To close the DDL Editor and debugger, do the following:

1 On the DDL Editor toolbar, click Close.

OR

In the upper right corner of the window, click Close.

OR

In the DDL Editor window, right-click and then click Close.

Embarcadero SQL Debugger for Sybase ASE closes the debug session.

U SING E MBARCADERO SQL D EBUGGER FOR S YBASE ASE

This section offers a general overview of how to use Embarcadero SQL Debugger for Sybase

ASE’s full range of debugging functionality . After you

open a debugging session for any Sybase

ASE procedure or trigger, you can begin debugging .

O PENING A D EBUGGING S ESSION

When you open a debugging session, Rapid SQL opens the five windows of the Embarcadero

SQL Debugger for Sybase ASE interface. If the target script requires input parameters, Rapid

SQL opens a Procedure Execution dialog box and prompts you for the necessary input parameters before displaying the target code in the DDL Editor window. When Rapid SQL displays the target script in the DDL Editor window, you can begin debugging .

NOTE: Embarcadero SQL Debugger for Sybase ASE only lets you debug the SQL script of triggers and procedures.

Opening a Debugging Session

To debug a trigger or procedure, do the following:

1 On the Explorer Tab, click the node of the target procedure.

Rapid SQL opens the node and displays two items: Code and Privileges.

2 Under the target object node, double-click Code.

Rapid SQL opens an DDL Editor displaying the code of the target object.

1033 RAPID SQL 8.6/XE5 USER GUIDE

EMBARCADERO SQL DEBUGGER FOR SYBASE ASE

3 On the Debug menu, click Start Debugging.

OR

On the DDL Editor toolbar, click Debug.

OR

In the DDL Editor window, right-click and then click Debug.

OR

Press CTRL+F5.

If the script requests input parameters, Rapid SQL opens a Procedure Execution dialog box.

If the script does not require input parameters, Rapid SQL displays the script in the DDL

Editor window for you to begin debugging .

NOTE: You cannot use Embarcadero SQL Debugger for Sybase ASE until it has fully initialized.

4 In the Procedure Execution dialog box, type the parameters, and then click OK .

Rapid SQL displays the script in the DDL Editor window for you to begin debugging .

NOTE: If the script requires Sybase ASE types (tables, records, or Booleans) as input parameters, Embarcadero SQL Debugger for Sybase ASE generates an anonymous block.

D EBUGGING AN SQL S CRIPT

After you open a debugging session and enter any required input parameters, you can begin working with your script in Embarcadero SQL Debugger for Sybase ASE.

Debugging an SQL Script

To debug a SQL script, do the following:

1 On the Debug menu, click an Embarcadero SQL Debugger for Sybase ASE option ( Step

Into , Step Over , and so forth) or click Go .

OR

On the DDL Editor toolbar, click an Embarcadero SQL Debugger for Sybase ASE option

( Step Into , Step Over , and so on) or click Go.

NOTE: You can monitor the progress of your debug session in the Variables window.

RAPID SQL 8.6/XE5 USER GUIDE 1034

RAPID SQL PL/SQL PROFILER

2 On the Debug menu, click Breakpoint .

OR

On the DDL Editor toolbar, click Breakpoint.

NOTE: When you set a breakpoint, the Call Stack window shows what was called before the breakpoint.

NOTE: You can use the Run to Cursor option to test the lines of code between a breakpoint and your cursor (indicated by the yellow arrow in the DDL Editor).

3 To check your variables, do the following:

1) In the DDL Editor , click a variable in your script and drag it to the Watch window.

2) In the Watch window, change the value of the watch variable and then click Go to run your script and see the results of the new value.

4 To check record in stored objects, do the following:

1) Drag the record to the Watch window.

2) In the Watch window, change the value of the record, then click Go to run your script and see the results of the new value.

5 To check the dependencies, do the following:

1) In the Dependency Tree window double-click the target dependent object to extract the code into a new

DDL Editor .

2) Step through the script while monitoring the Dependency Tree window.

6 When you finish debugging the script, click Close.

Rapid SQL closes an Embarcadero SQL Debugger for Sybase ASE’s DDL Editor.

NOTE: When you exit a debug session and reenter it, Embarcadero SQL Debugger for Sybase

ASE retains any watch variables or breakpoints you have set.

R

APID

SQL PL/SQL P

ROFILER

The Rapid SQL PL/SQL Profiler module lets you capture metrics of various PL/SQL programmable objects as they are executed in the database. Developers can use data collected in profile sessions to improve performance of PL/SQL code execution. Rapid SQL PL/SQL

Profiler collects and stores data in database tables and helps identify and isolate performance problems, and provide code coverage information. The Rapid SQL PL/SQL Profiler lets you:

• Graphically browse PL/SQL profiling data within the Explorer Tab

• View profiling data in the right pane of the application, which is populated as you navigate the Explorer Tab

• Start and stop PL/SQL profiling sessions with a single click

• Graphically analyze time spent in each programmable object (unit)

1035 RAPID SQL 8.6/XE5 USER GUIDE

RAPID SQL PL/SQL PROFILER

• Graphically analyze time spent in each source code line of a unit

The table below describes the sections of this chapter:

Section

Setting Up the Profiler

Profiler Functionality

Using the Profiler

Description

This section describes the process of setting up Rapid SQL PL/

SQL Profiler.

This section describes the functionary of Rapid SQL PL/SQL

Profiler.

This section describes how to run a profile session.

NOTE: Availability of this feature depends on your Rapid SQL licensing. For more information, see

Licensing .

For more information, see:

• Setting Up Rapid SQL PL/SQL Profiler

• Rapid SQL PL/SQL Profiler Explorer

• Rapid SQL PL/SQL Profiler Functionality

• Using Rapid SQL PL/SQL Profiler

S ETTING U P R APID SQL PL/SQL P ROFILER

The profiling tables must be on the server before using the Rapid SQL PL/SQL Profiler. The first time you open the PL/SQL Profiler, Rapid SQL checks the server for the profiling tables. If the profiling tables are not on the server, Rapid SQL automatically installs profiling tables on the server.

R APID SQL PL/SQL P ROFILER E XPLORER

The Rapid SQL PL/SQL Profiler displays profiling data in the right pane of the application, which is populated as you navigate the Explorer Tab.

The table below describes the nodes of the Rapid SQL PL/SQL Profiler Explorer and the corresponding information in the right pane of the application:

Node

PL/SQL Code Profiling

Label\Comment level

Right pane information

Contain all Comment, Run ID and Run Date\time data that is current stored in the Profiling tables.

Contains all Run ID and Run Date\time data for the specific

Label\Comment.

RAPID SQL 8.6/XE5 USER GUIDE 1036

RAPID SQL PL/SQL PROFILER

Node

Run level

Right pane information

Contains all Unit, Unit Name, Unit Type, Run Date\time data for the specific Run ID.

R APID SQL PL/SQL P ROFILER F UNCTIONALITY

Rapid SQL PL/SQL Profiler offers you the following functionality:

• Start

• Flush

• Run Summary

• Run Detail

• Unit Summary

• Unit Detail

• Clear Profile Table

• Stop

S TART

Rapid SQL PL/SQL Profiler lets you begin a new profiling session or open a previous profiling session with the Start command.

Starting a New Profile Session

To start a new Profiler session, do the following:

1 On the Tools menu, click PL/SQL Profiler and then click Start.

OR

On the PL/SQL Profiler toolbar, click Execute.

OR

On the Explorer Tab , right-click the PL/SQL Code Profiling node, and then click Start.

Rapid SQL opens the PL/SQL Profiler - Start dialog box.

2 In the Profile Label box, type the name of the new profile.

NOTE: Each user can own one or more Profiles.

3 Click OK to begin profiling.

1037 RAPID SQL 8.6/XE5 USER GUIDE

RAPID SQL PL/SQL PROFILER

Starting an Existing Profile Session

To start an existing Profiler session, do the following:

1 On the Explorer Tab, expand the PL/SQL Code Profiling node.

Rapid SQL displays the list of existing Profiles.

2 On the Tools menu, click PL/SQL Profiler, and then click Start.

OR

On the PL/SQL Profiler toolbar, click Execute.

OR

On the Explorer Tab, right-click the PL/SQL Profiler node, and then click Start.

OR

On the Explorer Tab, right-click the target Profile, and then click Start .

Rapid SQL opens the PL/SQL Profiler - Start dialog box.

3 Click the Profile Label list and then click the existing profile.

4 Click OK to begin profiling.

F LUSH

Rapid SQL PL/SQL Profiler lets you move the data from the dynamic tables into Analysis tables with the Flush command.

Flushing a Profile

To flush a Profile, do the following:

1 On the Tools menu, click PL/SQL Profiler and then click Flush.

OR

On the PL/SQL Profiler toolbar click Flush.

OR

On the Explorer Tab , right-click the PL/SQL Code Profiling node, and then click Flush.

Rapid SQL opens the PL/SQL Profiler - Flush dialog box.

2 In the PL/SQL Profiler - Flush dialog box:

• Click Flush to delete the data in a running profile.

• Click Flush & Analyze to open the PL/SQL Profiler Run Detail window.

• Click Cancel to abort the flush and continue the profiling session.

NOTE: You can only Flush a running Profile.

RAPID SQL 8.6/XE5 USER GUIDE 1038

RAPID SQL PL/SQL PROFILER

R UN S UMMARY

The Rapid SQL PL/SQL Profiler Run Summary window lets you view the following information for each of your profiles:

• Run ID

• Run Date

• Total Time

Opening the Run Summary Window

To open the Run Summary Window, do the following:

1 On the Explorer Tab, expand the PL/SQL Code Profiling node.

Rapid SQL displays the list of existing Profiles.

2 On the Tools menu, click PL/SQL Profiler, and then click Run Summary.

On the PL/SQL Profiler toolbar click Run Summary.

On the Explorer Tab, right-click the PL/SQL Profiler node, and then click Run Summary.

On the Explorer Tab, right-click the target Profile, and then click Run Summary .

3

Rapid SQL opens the PL/SQL Profiler - Run Summary window.

4 Click the Profile Label list, and then click the target profile.

R UN D ETAIL

The Rapid SQL PL/SQL Profiler Run Detail window lets you view the following information for each of your profiles:

• Run Number

• Run Date

• Run Time

The Rapid SQL PL/SQL Profiler lets you view the information for all runs or you can view profile information based on the unit type or unit owner.

The Rapid SQL PL/SQL Profiler Run Detail window lets you view results in milliseconds, seconds and minutes. The Run Detail window also contains graphical displays of the profiling data that you can go to the specific unit within the summary portion of the window.

1039 RAPID SQL 8.6/XE5 USER GUIDE

RAPID SQL PL/SQL PROFILER

Opening the Run Detail Window

To open the Run Detail Window, do the following:

1 On the Explorer Tab, expand the PL/SQL Code Profiling node.

Rapid SQL displays the list of existing Profiles.

2 On the Tools menu, click PL/SQL Profiler and then click Run Detail .

OR

On the PL/SQL Profiler toolbar click Run Detail.

OR

On the Explorer Tab , right-click the PL/SQL Code Profiling node and then click Run Detail .

OR

Right-click the target run and then click Run Detail.

OR

In a PL/SQL Profiler - Run Summary window right-click and then click Detail.

OR

In a PL/SQL Profiler - Unit Summary window right-click and then click Detail.

Rapid SQL opens the PL/SQL Profiler - Run Detail window.

3 In the PL/SQL Profiler - Run Detail window:

• Click the Label list box and then click the target profile.

• Click the Run list and then click the target run.

• Click the Unit Type list and then click the target unit type(s).

• Click the Unit Owner list and then click the target unit owner(s) to populate the table.

U NIT S UMMARY

The Rapid SQL PL/SQL Profiler Unit Summary window lets you view the following information for each of your profiles:

• Run ID

• Run Date

• Run Time

• Unit Time

• Percentage of Run Time

RAPID SQL 8.6/XE5 USER GUIDE 1040

RAPID SQL PL/SQL PROFILER

The Rapid SQL PL/SQL Profiler Unit Summary window lets you view results in milliseconds, seconds and minutes. The Unit Summary window also displays graphs of execution statistics for the top N runs and associated units. You can use the graphical displays to go to the specific run within summary portion of the window.

Opening the Unit Summary Window

To open the Unit Summary Window, do the following:

1 On the Tools menu, click PL/SQL Profiler, and then click Unit Summary .

OR

On the PL/SQL Profiler toolbar click Unit Summary.

OR

On the Explorer Tab, right-click the PL/SQL Code Profiling node, and then click Unit

Summary .

Rapid SQL opens the PL/SQL Profiler - Unit Summary window.

2 In the PL/SQL Profiler - Unit Summary window:

• Click the Unit Owner list and then click the target unit owner.

• Click the Unit Name list and then click the target unit name to populate the table.

C LEAR P ROFILE T ABLE

Rapid SQL PL/SQL Profiler lets you delete data from the user's profile tables with the command

Clear Profile Table.

Clearing a Profile Table

To clear a profile table, do the following:

1 On the Tools menu, click PL/SQL Profiler, and then click Clear Profile Table.

OR

On the PL/SQL Profiler toolbar, click Clear Profile Table.

OR

On the Explorer Tab , right-click the PL/SQL Code Profiling node, and then click Clear Profile

Table .

Rapid SQL clears the profile table.

2 In the dialog box, if you are sure that you want to clear out the profiler tables, click Yes.

1041 RAPID SQL 8.6/XE5 USER GUIDE

RAPID SQL PL/SQL PROFILER

U NIT D ETAIL

The Rapid SQL PL/SQL Profiler Unit Detail window lets you view the following information for each of your profiles:

• Average Time

• Source

• PL/SQL Script

The Rapid SQL PL/SQL Profiler Unit Detail window lets you view results in milliseconds, seconds and minutes. The Unit Detail window also provides two calculation options for viewing unit execution time as a percentage of total execution time (total run vs unit run). The Rapid SQL PL/

SQL Profiler Unit Detail window also displays graphs of execution statistics for the top N run. You can use the graphical displays to go to the specific line within source code portion of the window.The graphical display portion of the window contains options for viewing advanced statistics.

The Advanced View of the Rapid SQL PL/SQL Profiler Unit Detail window, lets you view the following information for each of your profiles:

• Hit Lines

• Missed Lines

• Line Number

• Calls

• Total Time

• Percentage of the Total Time

• Average Time

• Minimum Time

• Maximum Time

Opening the Unit Detail Window

To open the Unit Detail Window, do the following:

1 On the Explorer Tab, expand the PL/SQL Code Profiling node.

Rapid SQL displays the list of existing Profiles.

RAPID SQL 8.6/XE5 USER GUIDE 1042

RAPID SQL PL/SQL PROFILER

2 On the Tools menu, click PL/SQL Profiler and then click Unit Detail .

OR

On the PL/SQL Profiler toolbar click Unit Detail.

OR

On the Explorer Tab , right-click the PL/SQL Code Profiling node and then click Unit Detail .

OR

Right-click the target run and then click Unit Detail.

OR

In a PL/SQL Profiler - Run Summary window right-click and then click Unit Detail.

OR

In a PL/SQL Profiler - Unit Summary window right-click and then click Unit Detail.

Rapid SQL opens the PL/SQL Profiler - Unit Detail window.

3 In the PL/SQL Profiler - Unit Detail window, do any of the following:

• Click the Label list and then click the target profile.

• Click the Run list and then click the target run.

• Click the Unit list and then click the target unit to populate the table.

• Right-click and then click Show Only Hit Lines to populate the table with the Average

Time and Source for hit lines.

• Right-click and then click Show Only Missed Lines to populate the table with the Average

Time and Source for missed lines.

Opening the Unit Detail Window Advanced View

To open the Unit Detail Window Advanced View, do the following:

1 In the Unit Detail table, right-click and then click Advanced View to populate the table with advanced view information.

S TOP

Rapid SQL PL/SQL Profiler command Stop pauses the data gathering operation. Stop & Analyze populates the summary tables so you can view the Unit Detail and Run Summary windows

1043 RAPID SQL 8.6/XE5 USER GUIDE

RAPID SQL PL/SQL PROFILER

Stopping a Profiling Session

To stop a Profiling session, do the following:

1 On the Tools menu, click PL/SQL Profiler and then click Stop.

OR

On the PL/SQL Profiler toolbar click Stop.

OR

On the Explorer Tab , right-click the PL/SQL Code Profiling node, and then click Stop .

Rapid SQL opens the PL/SQL Profiler - Stop dialog box.

2 In the PL/SQL Profiler - Stop dialog box:

• Click Stop to stop the profiling session.

• Click Stop & Analyze to open the PL/SQL Profiler Run Detail window.

• Click Cancel to continue the profiling session.

U SING R APID SQL PL/SQL P ROFILER

The steps below provide a high level overview of running a profiling session:

• Starting the Session

• Executing the Sample Script

• Stopping and Analyzing the Session

For more information, see Sample Profiling Session .

Using the Rapid SQL PL/SQL Profiler

NOTE: The first execution of a PL/SQL unit can take more time to execute because the code is loading into memory; subsequent runs take less time.

To use the Profiler, do the following:

1 On the Tools menu, click PL/SQL Profiler and then click Start.

OR

On the PL/SQL Profiler toolbar, click Start.

Rapid SQL opens the PL/SQL Profiler - Start dialog box.

2 In the Profile Label box, enter the name of the new profile.

NOTE: Each user can own one or more Profiles.

RAPID SQL 8.6/XE5 USER GUIDE 1044

RAPID SQL PL/SQL PROFILER

3 Click OK .

Rapid SQL begins profiling.

4 In the Explorer Tab, execute one of the following PL/SQL database objects:

• Procedure

• Function

• Package Procedure

• Package Function

Profiler displays profiling data in the right pane of the application.

5 On the Tools menu, click PL/SQL Profiler and then click Stop .

Rapid SQL opens the PL/SQL Profiler - Stop dialog box.

6 In the PL/SQL Profiler - Stop dialog box, do any of the following:

• Click Stop to stop the profiling session.

• Click Stop & Analyze to open the PL/SQL Profiler Run Detail window.

• Click Cancel to continue the profiling session.

7 If you clicked Stop & Analyze do the following:

• Click the Label list and then click the target profile.

• Click the Run list and then click the target run.

• Click the Unit Type list and then click the target unit type(s).

• Click the Unit Owner list and then click the target unit owner(s) to populate the table.

8 Use the Tools menu to open any of the following PL/SQL Profiler windows:

• PL/SQL Profiler Run Summary

• PL/SQL Profiler Unit Summary

• PL/SQL Profiler Unit Detail

S AMPLE P ROFILING S ESSION

The Rapid SQL installation includes two scripts for the sample profiling session:

• PROFILER_BUILD_DEMO.SQL

• PROFILER_DEMO.SQL

The PROFILER_BUILD_DEMO.SQL creates the objects that you will profile in the walk-through, and the PROFILER_DEMO.SQL is what you will profile during the walk-through.

NOTE: To create the objects in the PROFILER_BUILD_DEMO.SQL script, you must have

CREATE privileges.

1045 RAPID SQL 8.6/XE5 USER GUIDE

RAPID SQL PL/SQL PROFILER

The sample script demonstrates the following features of the Rapid SQL PL/SQL Profiler:

• Unit Detail

• Run Detail

• Show Only Hit Lines

• Advanced View

During the installation, Rapid SQL places the scripts in the configured, default user SQL scripts

folder. For details, see Directories Options

.

Overview

Sample Profiling Session is divided into six parts:

• Getting Started

• Starting the Session

• Executing the Sample Script

• Stopping the Session

• Rerunning & Reexecuting the Session

• Stopping & Analyzing

S AMPLE P ROFILING S ESSION - G ETTING S TARTED

In this step of Sample Profiling Session, you create the objects that you will profile in the walkthrough.

Overview

The Getting Started section guides you through:

• Opening PROFILER_BUILD_DEMO.SQL

• Changing the Explorer tab Display

• Confirming the Creation of the Package

Getting Started

1 Start Rapid SQL.

2 On the File menu, click Open . Rapid SQL opens the Open Files dialog box.

NOTE: The sample file used in this example, PROFILER_BUILD_DEMO.SQL, is stored in the configured user SQL scripts folder. For details, see

Directories Options .

RAPID SQL 8.6/XE5 USER GUIDE 1046

RAPID SQL PL/SQL PROFILER

3 In the Open File(s) dialog box, navigate to the user SQL scripts folder and open the

PROFILER_BUILD_DEMO.SQL

file.

Rapid SQL opens the PROFILER_BUILD_DEMO.SQL script in an SQL Editor window

4 On the SQL Editor window, click Execute.

Rapid SQL executes the script and creates the package.

5 On the Explorer Tab list, click Organize by Owner.

6 On the Explorer Tab, click the node of your owner name.

Rapid SQL displays your schema objects.

7 Double-click the Packages node to display PF_COUNT_TIME_INTERVAL and confirm its creation.

NOTE: If you were not able to create the package, check the error messages to determine the problem.

S AMPLE P ROFILING S ESSION - S TARTING THE S ESSION

In this step of Sample Profiling Session, you start the profiling session.

Sample Profiling Session - Starting the Session

To start the session, do the following:

1 On the File Menu, click Open to open the Open Files dialog box.

2 In the Open Files dialog box, type the path to the UsrScrpt directory, press ENTER and then double-click PROFILER_DEMO.SQL

to open the script in an SQL Editor.

Rapid SQL opens the PROFILER_DEMO.SQL script in an SQL Editor.

3 On the Tools menu, click PL/SQL Profiler and then click Start .

Rapid SQL opens the PL/SQL Profiler - Start dialog box.

4 In the Profile Label list, type DemoProfile.

5 Click OK to begin the profiling session.

Rapid SQL begins the profiling session.

If this is the first time you start the Rapid SQL PL/SQL Profiler, Rapid SQL displays a message that user profiling tables need to be installed.

6 Click Yes.

Rapid SQL opens SQL*Plus to create the tables. You will need to start the profiling session again (see Step 3).

1047 RAPID SQL 8.6/XE5 USER GUIDE

S AMPLE P ROFILING S ESSION - E XECUTING THE S AMPLE S CRIPT

In this step of Sample Profiling Session, you execute the DEMO script.

Sample Profiling Session - Executing the Sample Script

To execute the sample script, do the following:

1 On the SQL Editor window toolbar, click Execute.

Rapid SQL executes the script and opens a Results Tab.

RAPID SQL PL/SQL PROFILER

S AMPLE P ROFILING S ESSION - S TOPPING THE S ESSION

In this step of Sample Profiling Session, you stop the profiling run.

Sample Profiling Session - Stopping the Session

To stop the session, do the following:

1 On the Tools menu, click PL/SQL Profiler and then click Stop.

Rapid SQL opens the PL/SQL Profiler - Stop dialog box.

2 Click Stop .

S AMPLE P ROFILING S ESSION - R ERUNNING & R EEXECUTING THE S ESSION

In this step of Sample Profiling Session, you run the same profile session and execute the DEMO script again.

Sample Profiling Session - Rerunning & Reexecuting the Session

To rerun and reexecute the session, do the following:

1 In the SQL Editor , click the Query Tab.

2 On the Tools menu, click PL/SQL Profiler and then click Start .

Rapid SQL opens the PL/SQL Profiler - Start dialog box again.

3 Click the down arrow on the Profile Comment list and then click DemoProfile.

4 Click OK to begin the profiling session.

5 On the SQL Editor toolbar, click Execute.

Rapid SQL executes the script again and opens the Results Tab.

S AMPLE P ROFILING S ESSION - S TOPPING & A NALYZING

In this step of Sample Profiling Session, you stop profiling and analyze the runs.

RAPID SQL 8.6/XE5 USER GUIDE 1048

RAPID SQL PL/SQL PROFILER

Sample Profiling Session - Stopping & Analyzing

To stop and analyze, do the following:

1 On the Tools menu, click PL/SQL Profiler and then click Stop.

Rapid SQL opens the PL/SQL Profiler - Stop dialog box again.

2 Click Stop & Analyze .

Rapid SQL opens the PL/SQL Profiler - Run Detail window.

3 Click the Run list and then click Run#x .

NOTE: Rapid SQL assigns a number to each profiling session. These numbers increase incrementally each time you run a profiling session. x= the number that was assigned to your first run.

Rapid SQL PL/SQL Profiler populates the grid with information on the procedure, package body, and package specification.

NOTE: For the purposes of this walk-though we have created this package under the account

SCOTT.

4 Click the Run list again and then click the Run# for your second run.

Notice this time there is no information on the package specification. It was created in the first run.

5 Right-click and then click Detail.

Rapid SQL PL/SQL Profiler opens the PL/SQL Profiler - Unit Detail window and populates the grid with the average time to execute each unit and the source code. Notice the time to execute SELECT object_name, in the example is 126 ms.

6 In the PL/SQL Profiler - Unit Detail window, click the Run list and then click Run#x for your first run.

7 Click the Unit list and then click user name.PF_COUNT_SYSTEM_OBJECTS

.

Notice the time to execute SELECT object_name is considerably greater: in the example it is 24476 ms.

8 Right-click and then click Show Only Hit Lines .

T H E R A P I D S Q L P L / S Q L P R O F I L E R S H O W S O N L Y T H E L I N E S O F C O D E T H A T E X E C U T E D .

9 Right-click and then click Advanced View .

The Rapid SQL PL/SQL Profiler opens the Advanced View window.

10 Continue clicking the Run and Unit lists to compare the performance of each run and each session.

This concludes the Sample Profiling Session. You can now delete the objects created during the

Sample Profiling Session. They are:

• Check Constraints, PLSQL_PROFILER_UNITS, PLSQL_PROFILER_DATA

1049 RAPID SQL 8.6/XE5 USER GUIDE

RAPID SQL PL/SQL PROFILER

• Foreign Keys, PLSQL_PROFILER_UNITS, PLSQL_PROFILER_DATA

• Package, PF_COUNT_TIME_INTERVAL

• Package functions, WEEKEND_DAYS_( ), WORKING_DAYS_( ), YEAR

• S_ELAPSED_BETWEEN_ ()

• PL/SQL code Profiles, DemoProfile

• Primary Keys, PLSQL_PROFILER_RUNS, PLSQL_PROFILER_UNITS, PLSQL_PROFILER_DATA

• Procedure, PF_COUNT_SYSTEM_OBJECTS

• Sequence, PLSQL_PROFILER_RUNNUMBER

• Tables, PLSQL_PROFILER_RUNS, PLSQL_PROFILER_UNITS, PLSQL_PROFILER_DATA

RAPID SQL 8.6/XE5 USER GUIDE 1050

RAPID SQL PL/SQL PROFILER

1051 RAPID SQL 8.6/XE5 USER GUIDE

C

ODE

A

NALYST

The Code Analyst is a tool to identify time-consuming lines of code. Code Analyst lets you:

• Perform detailed response time analysis on the execution of Procedures and

External

Functions .

• Benchmark the execution of one or more procedures or functions to determine exactly what code objects and lines of code are taking the longest to run.

• Save response time metrics and perform intelligent compares against current execution times so you can determine deviations from previous acceptable response times.

TIP: You can set Code Analyst options in the

Code Analyst Options

.

NOTE: Availability of this feature depends on your Rapid SQL licensing. For more information, see

Licensing .

Important Notes

• For DB2, before profiling with Code Analyst, Compile all procedures with the debugging

option selected.

• For Oracle, when using the Oracle Debugger, Compile

all procedures with the debugging option selected before profiling with Code Analyst.

Common Tasks

Creating a Code Analyst Session

Identifying and Fixing Bottlenecks Using Code Analyst

Comparing Code Analyst Sessions

Cloning a Code Analyst Session

Deleting a Code Analyst Session

Stopping a Code Analyst Session Execution

Executing a Code Analyst Session

Scheduling a Code Analyst Session

Unscheduling a Code Analyst Session

Refreshing a Code Analyst Session

Saving Results in Code Analyst

Printing Results in Code Analyst

Viewing Run Details in Code Analyst

Viewing Unit Summary Information in Code Analyst

RAPID SQL 8.6/XE5 USER GUIDE 1052

CODE ANALYST

Viewing Unit Details in Code Analyst

Setting View Options for the Unit Detail Tab in Code Analyst

Extracting SQL Text in Code Analyst

Executing SQL in Code Analyst

C ODE A NALYST DBMS N OTES

Code Analyst is available for:

• Microsoft SQL Server

• Oracle 7

• IBM DB2 LUW

• Sybase ASE 12.0.0.3 or later

Rapid SQL utilizes debugger technology to capture the data for each line of executed code. For

Oracle, you can use the debugger or using Oracle's supplied DBMS_Profiler package.

TIP: For Oracle, you can specify to use the debugger or the DBMS_Profiler package on the

Code Analyst Options .

The Code Analyst will step through each line of code, stopping to record data for those lines of code onto which a breakpoint can be issued. Some debuggers cannot capture time metrics for all lines of a stored procedure or function.

Procedures and functions that contain looping constructs will require more time to run. The additional amount of time needed to run is proportional to the number of iterations in the loop.

For more information, see:

IBM DB2 LUW Data Captured by Code Analyst

Microsoft SQL Server Data Captured by Code Analyst

Oracle Data Captured by Code Analyst

Sybase ASE Data Captured by Code Analyst

IBM DB2 LUW D ATA C APTURED BY C ODE A NALYST

Code Analyst utilizes the IBM Debugger when capturing time data.

The debugger is verified to run on IBM DB2 LUW version 7.2 and up. There is a known issue running version 7.2 with Fixpack 9.

DB2 has documented limitations on lines of code can be profiled.

1053 RAPID SQL 8.6/XE5 USER GUIDE

The following are SQL statements that are NOT valid break point lines:

BEGIN

BEGIN

BEGIN NOT ATOMIC

BEGIN ATOMIC

CLOSE CURSOR

DECLARE cursor WITH RETURN FOR <sql statement>

DECLARE , var without default

DECLARE CONDITION (CONDITION) FOR SQLSTATE (VALUE) "..."

DECLARE CONTINUE HANDLER

DECLARE CURSOR

DECLARE EXIT HANDLER

DECLARE RESULT_SET_LOCATOR [VARYING]

DECLARE SQLSTATE

DECLARE SQLCODE (unless there is a default)

DECLARE UNDO HANDLER (unless they are entered)

DO

ELSE

END

END CASE

END IF

END FOR

END REPEAT

END WHILE

ITERATE

LEAVE

LOOP

OPEN CURSOR

REPEAT (as a keyword alone)

RESIGNAL

RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

1054

CODE ANALYST

SIGNAL

THEN labels, e.g. P1:

NOTE: Code containing these statements will not have times associated with them.

For more information, see

Code Analyst DBMS Notes .

M ICROSOFT SQL S ERVER D ATA C APTURED BY C ODE A NALYST

In order to execute a Code Analyst session against a Microsoft SQL Server database, the SQL

Server debugger must be installed and functioning properly. Please refer to

Embarcadero SQL

Debugger for Microsoft SQL Server for details concerning set up.

Related Information

Code Analyst DBMS Notes

O RACLE D ATA C APTURED BY C ODE A NALYST

When using the PL/SQL Profiler, Oracle has documented an issue regarding extremely large times being returned by the profiler. The times are sometimes hundred times larger than the actual run time of the stored procedure or function. Oracle documents that this is a vendor/os problem rather than an Oracle problem, because the RDTSC instruction is reporting wrong time stamp counter. They indicate that they have seen this problem on some INTEL Pentium processors.

Related Information

Code Analyst DBMS Notes

S YBASE ASE D ATA C APTURED BY C ODE A NALYST

Sybase has documented a problem with their debugger API. The problem involves reporting the wrong line number through the debugger. Because of this bug, Code Analyst may report back data for blank lines or lines that contain comments. Sybase has fixed this problem release 12.5.2 of the database. All procedures affected must be dropped and recreated in order to correct the problem.

Related Information

Code Analyst DBMS Notes

1055 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

C ODE A NALYST R EQUIREMENTS

Debuggers

The Code Analyst uses fully configured Embarcadero SQL Debuggers to profile, and therefore availability of this feature depends on your Rapid SQL licensing. For more information, see the following topics:

Licensing

• Rapid SQL Add-On Tools

Using Code Analyst with the Oracle Profiler

Oracle users have the option of either using the Oracle Debugger or the Oracle Profiler with

Code Analyst to capture statistics. To use Code Analyst with the profiler option, Oracle’s profiler package must be installed. The install is user specific, so it must be installed by each user

wishing to use Code Analyst. To install the package, users can invoke the Rapid SQL PL/SQL

Profiler .

TIP:

You can set profiler options in the Code Analyst Options . You can specify that Code

Analyst display the actual run time on the database, and does not include the time it takes to get to the server.

Privileges

For Oracle, SYS privileges are required to install the Code Analyst tables. If you do not have SYS privileges, ask your Server Administrator to log into the Oracle datasource as SYSDBA, and then open Code Analyst to install the tables.

During install, the following privileges are set for the Code Analyst tables.

• DB2 – Permissions are granted to the Public Group

• Oracle – Permissions are granted to the Public group.

• Microsoft SQL Server – Permissions are granted to the Public role.

• Sybase ASE – Permissions are granted to the Public group.

All users can use the Code Analyst but each user will only see their own run ids. Users need to belong to the public group.

TIP: You can check this/modify privileges in the Users Editor.

I NSTALLING C ODE A NALYST

To install Code Analyst, do the following:

1 On the Tools menu, select Code Analyst .

2 In Select the database you would like to install the tables on, select a database.

RAPID SQL 8.6/XE5 USER GUIDE 1056

CODE ANALYST

3 For IBM DB2 LUW for Open Systems, in select the tablespace you would like to install the tables on, select a tablespace.

4 For IBM DB2 LUW for Open Systems, in select the schema you would like to install the tables on, select a schema. The default is EMBTCA schema.

5 In Select the filegroup you would like to install the tables to, select a filegroup.

Code Analyst installs the following repository tables in the repository:

• EMBT_CODE_ANA_RUNS - Holds all the code analyst sessions created by users.

• EMBT_CODE_ANA_UNITS - Holds all the objects to be run for all.

• EMBT_CODE_ANA_PARAMS - Contains all the parameters for the objects that were run.

• EMBT_CODE_ANA_DATA - Contains the run data and is used to populate all the charts and statistics.

• EMBT_CODE_ANA_VERSION - Contains the version number of code analyst.

Code Analyst opens to the Run Summary tab.

6 Create a session using the Creating a Code Analyst Session .

U NINSTALLING C ODE A NALYST

The Uninstall functionality lets you uninstall Code Analyst from the server.

NOTE: To uninstall a repository table, you need create table and grant privileges. Generally, you need sysadmin privileges.

1 On the Tools menu, select Code Analyst .

2 Select a session or object, and then select Uninstall.

Code Analyst removes the repository tables in the repository:

• EMBT_CODE_ANA_RUNS - Holds all the code analyst sessions created by users.

• EMBT_CODE_ANA_UNITS - Holds all the objects to be run for all.

• EMBT_CODE_ANA_PARAMS - Contains all the parameters for the objects that were run.

• EMBT_CODE_ANA_DATA - Contains the run data and is used to populate all the charts and statistics.

• EMBT_CODE_ANA_VERSION - Contains the version number of code analyst.

1057 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

C ODE A NALYST P RODUCT D ESIGN

Code Analyst performs detailed response time analysis. Code Analyst steps through each line of code and profiles those lines of code that the debugger or profiler can capture time metrics for.

NOTE: Some debuggers do not capture time metrics for all lines of a procedure or function.

For more information, see

Code Analyst DBMS Notes .

After capturing the time metrics, Code Analyst displays the data in an easy-to-read format on the tabs.

The Code Analyst is comprised of the following tabs:

Tab Option

Run Summary Session

Session

Run ID

Run Date

Total Profile Time (ms)

Total Analysis Time

Run Detail

Scheduler

Session

Run

Unit Type

Unit Owner

Unit Database

Time Unit

Unit Owner

Unit Name

Unit Type

Comparison

Unit Database

Total Profiled Time

% of Profiled Time

Base Run

Description

Lets you select the run session(s).

Displays the name of the session as created by the user.

Displays the run ID for the run(s). This number is system generated.

Displays the time and date of the session.

Displays the total time taken for the profiled code to execute.

This time is limited to the lines of code that are profiled.

Overhead is not included in this calculation.

Displays the total time taken for the session to complete, including all overhead time needed to analyze the procedure or function.

Displays the scheduler used to schedule the session. This information displays until the scheduled job has been run.

Lets you select the object execution session.

Lets you select the object execution.

Lets you select the object type for the object execution.

Lets you select the object owner for the object execution.

Lets you select the object database for the object execution.

Lets you specify the time unit for the Unit Execution graph.

Displays the owner of the procedure or function.

Displays the name of the procedure or function.

Displays the types of captured objects, including Anonymous

Block, Function, Package Body, and Procedure for Oracle databases. Also displays SQL Statement and Procedure for the other platforms.

Displays the database on which the object is stored.

Displays the total time taken for the profiled code to execute.

Displays the percentage of the Total Profiled Time for the run that this unit accounts for.

Lets you select the earlier object execution.

RAPID SQL 8.6/XE5 USER GUIDE 1058

CODE ANALYST

Tab Option

New Run

Unit Owner

Unit Name

Unit Type

Unit Database

Time Diff

New Profiled Time

Base Profiled Time

Unit Summary Unit Owner

Unit Name

Unit Database

Number of Top Runs

Session

Run ID

Run Date

Total Analysis Time

Unit Detail

Total Profiled Time

Unit Profiled Time

% of Profiled Time

% of Run Time

Session

Run

Unit Name

Number of Top Lines

Percentage Calculation

Calls

Total Time

% of Total Profiled

Description

Lets you select the later object execution.

Displays the owner of the procedure or function.

Displays the name of the procedure or function.

Displays the types of captured objects, including Anonymous

Block, Function, Package Body, and Procedure for Oracle databases. Also displays SQL Statement and Procedure for the other platforms.

Displays the object database for the object execution.

Displays the time difference in milliseconds between the base run and the new run.

Displays the profiled time of the new run.

Displays the profiled time of the base run.

Lets you select the object owner for the session(s).

Lets you select the object name for the session(s).

Lets you select the object database for the session(s).

Lets you specify the number of top object executions to display in the Top 5 Runs graph and select the unit of time for the Unit

Time graph.

Displays the name of the session as created by the user.

Displays the unique id for the Run. This number is system generated.

Displays the time and date of the session.

Displays the total time taken for the session to complete, including all overhead time needed to analyze the procedure or function.

Displays the total time taken for the profiled code to execute.

Displays the unit time for the session(s).

Displays the percentage of the Total Profiled Time for the run that this unit accounts for.

Displays the percentage of object execution time for the session(s).

Lets you select the session.

Lets you select the object execution.

Lets you select the object name for the session.

Lets you specify the number of top lines in the Top 5 Lines

Execution Time graph and select the total time units.

Lets you specify total object execution time or object run time.

Displays the number of times the line was executed.

Displays the total time the line was executed.

Displays the percentage of the Total Profiled Time that this line of code was responsible for.

1059 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

Tab Option

Avg Time

Min Time

Max Time

Dependency

Source

Description

Displays the average profiled time for this line.

Displays the minimum recorded time for execution of this line.

Displays the maximum recorded time for execution of this line.

Displays the UNIT_NUMBER of the dependency object that was called by that line. Lets you right-click and quickly go to that UNIT_NUMBER to see its Unit detail information.

Displays the object’s SQL source code.

Common Tasks

Creating a Code Analyst Session

Identifying and Fixing Bottlenecks Using Code Analyst

Comparing Code Analyst Sessions

Cloning a Code Analyst Session

Deleting a Code Analyst Session

Stopping a Code Analyst Session Execution

Executing a Code Analyst Session

Scheduling a Code Analyst Session

Unscheduling a Code Analyst Session

Refreshing a Code Analyst Session

Saving Results in Code Analyst

Printing Results in Code Analyst

Viewing Run Details in Code Analyst

Viewing Unit Summary Information in Code Analyst

Viewing Unit Details in Code Analyst

Setting View Options for the Unit Detail Tab in Code Analyst

Extracting SQL Text in Code Analyst

Executing SQL in Code Analyst

C ODE A NALYST T UTORIAL

The following tutorial guides you through the process of using the Code Analyst.

RAPID SQL 8.6/XE5 USER GUIDE 1060

CODE ANALYST

Creating a Code Analyst Session

1 On the Tools menu, select Code Analyst.

Initially, Code Analyst installs the repository tables. For more information, see Installing

Code Analyst . Then Rapid SQL opens the Code Analyst to the Run Summary tab.

2 On the Code Analyst Tools toolbar, click the Create New Collection button.

Rapid SQL opens the first panel of the Code Analyst Wizard.

3 Select the individual object or group of objects to analyze. In this example, an individual stored procedure (CREATE_ADMISSION2) is selected.

TIP: Code Analyst does not let you select objects that do not have stored procedures.

4 Click Next.

If the object(s) selected to be analyzed requires parameters, the second panel of the wizard prompts you to enter the parameters.

5 Double-click the object to set the parameters.

6 For IBM DB2 LUW for Open Systems and Oracle, the Compile button opens the Confirm

Compile dialog box that lets you compile the objects to ensure that the Code Analyst can capture the time metrics.

7 Click Finish.

Code Analyst displays a message that the Code Analyst will run longer than the actual code.

Then Code Analyst analyzes the objects, using the Embarcadero SQL Debugger to profile and then opens the Run Detail tab.

TIP: You can select the "Please do not show me this dialog again" option in the dialog box

or set the option on the Code Analyst Options

.

1061 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

Identifying and Fixing Bottlenecks Using Code Analyst

The Run Detail tab displays the total time for the objects being analyzed. The tab information may be enough to identify the potential bottleneck.

1 To view more detailed information, double-click the Unit Name.

Code Analyst opens to the Unit Detail tab.

RAPID SQL 8.6/XE5 USER GUIDE 1062

CODE ANALYST

The Unit Detail Tab displays the object code and other information related to the individual lines of code. You can determine which line of code is taking too long and why. The Unit Detail Tab is where you troubleshoot, and then resolve the problem in the

Modifying objects using editors .

2 In Rapid SQL, open the object editor, and then modify the code on the Definition tab.

3 Click Alter.

4 In Code Analyst, on the Unit Detail Tab, click Execute.

1063 RAPID SQL 8.6/XE5 USER GUIDE

Comparing Code Analyst Sessions

1 Click the Comparison tab.

Code Analyst has a Comparison facility to allow quick compares of two object executions, showing the base time and the new time, as well as the time differences. The Comparison tab lets you compare which of the two procedures or functions ran faster.

2 Examine the Time Diff which indicates improvement to code.

3 If necessary, continue to modify the code on the Definition tab of the object editor, and then press Alter.

4 In Code Analyst, on the Unit Detail Tab, click Execute.

5 Examine the Time Diff until the bottleneck is solved.

Common Tasks

Creating a Code Analyst Session

Identifying and Fixing Bottlenecks Using Code Analyst

Comparing Code Analyst Sessions

Cloning a Code Analyst Session

RAPID SQL 8.6/XE5 USER GUIDE 1064

CODE ANALYST

Deleting a Code Analyst Session

Stopping a Code Analyst Session Execution

Executing a Code Analyst Session

Scheduling a Code Analyst Session

Unscheduling a Code Analyst Session

Refreshing a Code Analyst Session

Saving Results in Code Analyst

Printing Results in Code Analyst

Viewing Run Details in Code Analyst

Viewing Unit Summary Information in Code Analyst

Viewing Unit Details in Code Analyst

Setting View Options for the Unit Detail Tab in Code Analyst

Extracting SQL Text in Code Analyst

Executing SQL in Code Analyst

U SING THE C ODE A NALYST

When working with database code stored in database objects, it is sometimes difficult to pinpoint bottlenecks within the code. When situations like this arise, Code Analyst can assist in identifying the trouble spots. Code Analyst can be used to analyze one object or a group of objects. You select one or multiple objects, execute them, view the results, and save those results for later viewing or comparing.

Common Tasks

Creating a Code Analyst Session

Identifying and Fixing Bottlenecks Using Code Analyst

Comparing Code Analyst Sessions

Cloning a Code Analyst Session

Deleting a Code Analyst Session

Stopping a Code Analyst Session Execution

Executing a Code Analyst Session

Scheduling a Code Analyst Session

Unscheduling a Code Analyst Session

1065 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

Refreshing a Code Analyst Session

Saving Results in Code Analyst

Printing Results in Code Analyst

Viewing Run Details in Code Analyst

Viewing Unit Summary Information in Code Analyst

Viewing Unit Details in Code Analyst

Setting View Options for the Unit Detail Tab in Code Analyst

Extracting SQL Text in Code Analyst

Executing SQL in Code Analyst

C REATING A C ODE A NALYST S ESSION

The Code Analyst Wizard creates a new Code Analysis session that creates data for the Code

Analyst tabs:

1 On the Tools menu, select Code Analyst.

2 On the Code Analyst Tools toolbar, click Create New Collection.

Rapid SQL opens the first panel of the Code Analyst Wizard.

3 Select the individual object or group of objects to analyze.

4 Click Next.

If the object(s) selected to be analyzed requires parameters, the second panel of the wizard prompts you to enter the parameters.

5 Double-click the object to set the parameters.

6 For IBM DB2 LUW for Open Systems and Oracle, the Compile button opens the Confirm

Compile dialog box that lets you compile the objects to ensure that the Code Analyst can capture the time metrics.

7 Click Finish.

Code Analyst displays a message that the Code Analyst will run longer than the actual code.

Then Code Analyst analyzes the objects, using the Embarcadero SQL Debugger to profile and then opens the Run Detail tab.

TIP: You can also select the "Please do not show me this dialog again" option in the dialog box or set the option on the

Code Analyst Options .

For more information, see

Code Analyst Wizard .

RAPID SQL 8.6/XE5 USER GUIDE 1066

CODE ANALYST

C ODE A NALYST W IZARD

The table below describes the options and functionality of the Code Analyst Wizard:

Option

Session Name

Select by Owner

Select by Object

Object Name

Compile

Schedule

Description

Lets you type a name.

Code Analyst Wizard queries the database to get the list of procedures and functions and lets you select objects to retrieve

Codes for. Select to display available objects by owner, and then select the database(s).

Code Analyst Wizard queries the database to get the list of procedures and functions and lets you select objects to retrieve

Codes for. Select to display available objects by object, and then select the object(s).

Double-click each object to specify the input parameters.

Specify which object executes first by clicking the Up and

Down buttons.

IBM DB2 LUW FOR OPEN SYSTEMS AND ORACLE ONLY:

Opens the Confirm Compile dialog box that lets you compile the objects to ensure that the Code Analyst can capture the time metrics.

Opens the Select Scheduler dialog box or opens scheduling application.

Code Analyst analyzes the code.

Finish

For more information, see: Creating a Code Analyst Session .

I DENTIFYING AND F IXING B OTTLENECKS U SING C ODE A NALYST

The Unit Detail Tab displays the object code and other information related to the individual lines of code. You can identify time-consuming lines of code in the Unit Detail Tab. The Unit Detail

Tab is where you troubleshoot, and then resolve the problem in the Modifying objects using editors

.

1 On the Tools menu, select Code Analyst.

2 Click the Unit Detail Tab.

Percent of Run Time displays the percentage of object execution time for the session(s).

3 Identify an object that contains time-consuming code.

4 In Rapid SQL, open the object editor, and then modify the code on the Definition tab.

5 Click Alter.

6 In Code Analyst, on the Unit Detail Tab, click Execute.

7 Click the Comparison tab.

1067 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

The Comparison Tab lets you compare times of the objects in two different object executions to determine which run was more efficient. The Comparison Tab displays the base time and the new time, as well as the time differences. The Comparison tab lets you compare which of the two procedures or functions ran faster.

8 Examine the Time Diff which indicates improvement to code.

9 If necessary, continue to modify the code on the Definition tab of the object editor, and then press Alter.

10 Create new Code Analyst sessions and examine the Time Diff until the bottleneck is solved.

For more information, see:

Code Analyst Product Design

Using the Code Analyst

C OMPARING C ODE A NALYST S ESSIONS

The Comparison Tab lets you compare times of the objects in two different object executions to determine which run was more efficient. The Comparison Tab displays the base time and the new time, as well as the time differences. The Comparison tab lets you compare which of the two procedures or functions ran faster.

1 On the Tools menu, select Code Analyst.

2 On the Run Summary tab, right-click the sessions, and then select Compare.

3 Examine the Time Diff which indicates improvement to code.

For more information, see:

Code Analyst Product Design

Using the Code Analyst

C LONING A C ODE A NALYST S ESSION

The Clone Collection functionality lets you clone an existing Code Analyst session using the

Code Analyst Wizard. Clone lets you reset the parameters or the order of the objects in the session without creating a new session.

1 On the Tools menu, select Code Analyst.

2 On the Run Summary tab, select the session to clone.

3 On the Code Analyst Tools toolbar, click Clone Collection.

Rapid SQL opens the first panel of the Code Analyst Wizard .

For more information, see:

RAPID SQL 8.6/XE5 USER GUIDE 1068

CODE ANALYST

Code Analyst Product Design

Using the Code Analyst

D ELETING A C ODE A NALYST S ESSION

The Delete Collection functionality lets you delete the selected Code Analyst session.

1 On the Tools menu, select Code Analyst.

2 On the Run Summary tab, select the session to delete.

3 On the Code Analyst Tools toolbar, click Delete Collection.

Code Analyst deletes the session.

For more information, see:

Code Analyst Product Design

Using the Code Analyst

S TOPPING A C ODE A NALYST S ESSION E XECUTION

The Stop Execution kills the execution of the selected collection.

1 On the Tools menu, select Code Analyst.

2 On the Run Summary tab, select the session to kill.

3 On the Code Analyst Tools toolbar, click Stop Execution.

Code Analyst kills the execution.

For more information, see:

Code Analyst Product Design

Using the Code Analyst

E XECUTING A C ODE A NALYST S ESSION

The Execute Collection functionality extracts the SQL text and then executes the code.

1 On the Tools menu, select Code Analyst.

2 On the Run Summary tab, select the session to execute.

3 On the Code Analyst Tools toolbar, click Execute Collection.

Code analyst extracts and executes the SQL.

For more information, see:

1069 RAPID SQL 8.6/XE5 USER GUIDE

Code Analyst Product Design

Using the Code Analyst

S CHEDULING A C ODE A NALYST S ESSION

The Schedule Session functionality lets you schedule the session for a future run.

1 On the Tools menu, select Code Analyst.

2 On the Run Summary tab, select the session to schedule.

3 On the Code Analyst Tools toolbar, click Schedule Session.

Code Analyst opens the default scheduler.

For more information, see:

Scheduling

Code Analyst Product Design

Using the Code Analyst

U NSCHEDULING A C ODE A NALYST S ESSION

The Delete Session functionality lets you remove the session from a schedule.

1 On the Tools menu, select Code Analyst.

2 On the Run Summary tab, select the session to unschedule.

3 On the Code Analyst Tools toolbar, click Delete Session.

For more information, see:

Scheduling

Code Analyst Product Design

Using the Code Analyst

CODE ANALYST

R EFRESHING A C ODE A NALYST S ESSION

The Refresh Data functionality refreshes the data.

1 On the Tools menu, select Code Analyst.

2 On the tab, on the Code Analyst Tools toolbar, click Refresh Data.

For more information, see:

Code Analyst Product Design

RAPID SQL 8.6/XE5 USER GUIDE 1070

CODE ANALYST

Using the Code Analyst

S AVING R ESULTS IN C ODE A NALYST

The Save functionality lets you save results for later viewing or comparing.

1 On the Tools menu, select Code Analyst.

2 On the tab, right-click the session or unit, and then select Save.

Code Analyst opens the Save Results dialog box.

For more information, see:

Code Analyst Product Design

Using the Code Analyst

P RINTING R ESULTS IN C ODE A NALYST

The Print functionality lets you print results for later viewing or comparing.

1 On the Tools menu, select Code Analyst.

2 On the tab, right-click the session or unit, and then select Print.

Code Analyst opens the Print Results dialog box.

For more information, see:

Code Analyst Product Design

Using the Code Analyst

V IEWING R UN D ETAILS IN C ODE A NALYST

The Run Detail tab displays the total time for the objects being analyzed. The tab information may be enough to identify the potential bottleneck.

To open the Run Details Tab in Code Analyst, do the following:

1 On the Tools menu, select Code Analyst.

2 On the Run Summary tab, right-click the session, and then select Run Detail.

OR

3 On the Unit Summary tab, right-click the session, and then select Run Detail.

For more information, see:

Code Analyst Product Design

1071 RAPID SQL 8.6/XE5 USER GUIDE

Using the Code Analyst

V IEWING U NIT S UMMARY I NFORMATION IN C ODE A NALYST

The Unit Summary Tab in Code Analyst displays the individual runs for a session.

To open the Unit Summary Tab in Code Analyst, do the following:

1 On the Tools menu, select Code Analyst.

2 On the Comparison tab, right-click the session, and then select Unit Summary.

For more information, see:

Code Analyst Product Design

Using the Code Analyst

CODE ANALYST

V IEWING U NIT D ETAILS IN C ODE A NALYST

The Unit Detail Tab displays the object code and other information related to the individual lines of code. You can identify time-consuming lines of code in the Unit Detail Tab. The Unit Detail

Tab is where you troubleshoot, and then resolve the problem in the Modifying objects using editors

.

To open the Unit Details tab in Code Analyst, do the following:

1 On the Tools menu, select Code Analyst.

2 On the Unit Summary tab, right-click the session, and then select Unit Detail.

For more information, see:

Code Analyst Product Design

Using the Code Analyst

S ETTING V IEW O PTIONS FOR THE U NIT D ETAIL T AB IN C ODE A NALYST

The table below describes the options on the shortcut menu for the Unit Details Tab in Code

Analyst:

Option

Dependency Details

Show Only Hit Lines

Show Only Missed Lines

Show All Lines

Description

Displays dependency details.

Displays only those lines with time metrics.

Displays only those lines without time metrics.

Resets the view to show all lines.

RAPID SQL 8.6/XE5 USER GUIDE 1072

CODE ANALYST

Option

Advanced View

Normal View

Description

Displays the default view.

Displays a limited number of data columns.

E XTRACTING SQL T EXT IN C ODE A NALYST

The Extract SQL Text functionality extracts SQL text to an ISQL window.

1 On the Tools menu, select Code Analyst.

2 On the Unit Detail tab, right-click the session, and then select Extract SQL Text.

Code analyst extracts the SQL text to an ISQL window.

For more information, see:

Extract

Code Analyst Product Design

Using the Code Analyst

E XECUTING SQL IN C ODE A NALYST

The Execute SQL functionality extracts SQL text to an ISQL window, and then executes the code.

1 On the Tools menu, select Code Analyst.

2 On the Unit Detail tab, right-click the session, and then select Execute SQL.

Code analyst extracts the SQL text to an ISQL window and executes the code.

For more information, see:

Execute

Code Analyst Product Design

Using the Code Analyst

1073 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1074

CODE ANALYST

1075 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1076

CODE ANALYST

1077 RAPID SQL 8.6/XE5 USER GUIDE

RAPID SQL 8.6/XE5 USER GUIDE 1078

CODE ANALYST

1079 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1080

CODE ANALYST

1081 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1082

CODE ANALYST

1083 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1084

CODE ANALYST

1085 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1086

CODE ANALYST

1087 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1088

CODE ANALYST

1089 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1090

CODE ANALYST

1091 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1092

CODE ANALYST

1093 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1094

CODE ANALYST

1095 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1096

CODE ANALYST

1097 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1098

CODE ANALYST

1099 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1100

CODE ANALYST

1101 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1102

CODE ANALYST

1103 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1104

CODE ANALYST

1105 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1106

CODE ANALYST

1107 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1108

CODE ANALYST

1109 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1110

CODE ANALYST

1111 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1112

CODE ANALYST

1113 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1114

CODE ANALYST

1115 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1116

CODE ANALYST

1117 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1118

CODE ANALYST

1119 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1120

CODE ANALYST

1121 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1122

CODE ANALYST

1123 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1124

CODE ANALYST

1125 RAPID SQL 8.6/XE5 USER GUIDE

CODE ANALYST

RAPID SQL 8.6/XE5 USER GUIDE 1126

CODE ANALYST

1127 RAPID SQL 8.6/XE5 USER GUIDE

RAPID SQL 8.6/XE5 USER GUIDE 1128

CODE ANALYST

1129 RAPID SQL 8.6/XE5 USER GUIDE

Index

Symbols

.mdf/.ndf/.ldf files

512

@@thresh_hysteresis

574

#define

718

#include

718

default file location

100

Numerics

3D Rounded Docking Tabs.

47

A

ACCENT_SENSITIVITY

341

account, user

563

accounting, logins

572

accounts/accounting setting lock time

550

activating roles

694

active transactions, rollback segments

552

ACTIVE FOR BEGIN_DIALOG option

334

Add Cluster Column

379

Add Database Object Files(s) to Project Wizard

Panel 1

814

Panel 2

815

Panel 3

815

Panel 4 for All Objects

816

Panel 4 for Selected Objects

816

Panel 5

817

Panel 6

817

add/modify login trigger object action

592

Additional resources

11

admin_move_table

658

AES... algortihms

413

AFTER trigger timing

526

AFTER triigers options

422

specifying

421

AFTER UPDATE OF options

422

aggregate, MySQL functions

371

alarms/thresholds code analyst

92

algorithms encryption, Oracle columns

413

aliases cration shortcut

616

creating, DB2 LUW

259

creating, Sybase

429

editor, DB@ LUW

461

editor, DB2 Z/OS

480

editor, Sybase

566

see also objects, database

support for

182

Alignment index partition setting

541 ,

548 ,

562 ,

571

ALL views

104

allocate extent object action

593

RAPID SQL 8.6/XE5 USER GUIDE

Allow Bit Data setting

477

Allow Duplicate Rows index setting

571

allow nulls domains

315

allow nulls setting by default, databsaes

431

Oracle columns

412

tables

491

user datatype

579

allow parallel option

472

Allow Parallel setting

264 ,

463

Allow Reverse Scans index setting

465

ALLOW_NULLS_BY_DEFAULT

777

ALLPAGES

576

ALTER trigger event

422

ALTER SYSTEM SET "_recyclebin"=

640

ALTER_REBUILD

601

alter, rename style

104

ANALYZE trigger event

422

Analyze Code

722

analyze tables object action

596

ANSI null default

335 ,

512

ANSI nulls

335 ,

512

ANSI padding

335

,

512

ANSI warnings

335 ,

512

ANSINULL option

777

Append Data setting

473

Append, materialized query tables

466

applications bind to database

567

archive databases

430

arithabort

512

array dimension, domains

315

AS DEFAULT

341

AS FILETABLE argument

359

as locator

464

As Locator function setting

483

As Locator option

472

Asc Sort, indexes

540

Ascending option indexes, InterBase

320

ASSOCIATE_STATISTICS trigger event

422

asymmetric keys creating, SQL Server

332

editor, SQL Server

510

SQL Server logins

346

AT SHUTDOWN durability option

431

AT(COMMIT) clause

704

attach database object action

596

AUDIT trigger event

422

Audit table setting

491

1130

INDEX authentication

OS-based for datasource

140

authorization owner, full-text catalogs

341

auto close

335 ,

512

Auto Commit Status

723

auto create statistics

335

,

512

auto format options, ISQL

113

auto format, DDL extract options

97

auto identity

431

Auto Replace feature enabling/configuring

915

auto shrink

335

,

512

auto update statistics

335 ,

512

autoconnect restricting

126

auto-increment, MySQL tables

373

auto-reload files, ISQL Editor

111

auto-reload, options

110

111

Auto-Save

ISQL editor

111

auto-save, files

110 –

111

Average Size package setting

485

B backup certificate object action

597

backup devices

see also objects, database

batch delimiter

776

batch files

Java drop/load

96

Batch Mode execution

93

BEFORE triigers options

422

specifying

421

BEFORE UPDATE OF options

422

Begin Transaction ON/OFF

723

BerkeleyDB storage engine

373

bind options

601

bind package object action

598

bind size

120

Bind Time package setting

485

bind to temporary database action

600

bind variables

724

Binder package setting

467

binding application/login to database

567

default/rule

529

user datatype default binding

579

binding logins to

600

bit data, user datatypes

477

bitmap index type

540

blob filters creating using wizard

313

editing

497

support for

183

1131 body function

482

packages

546

type bodies

560

Bookmarks

44 ,

758

Clearing

759

Goto

758

Moving

758

bookmarks, Explorer

160

boundary values, partition functions

348

broken job

387

Browser

Options

91

browser column filtering

39

object type appearance

102

Browsers

Copying

38

Displaying Dependencies

40

Extracting DDL

40

Main Menu

40

Object Types

35

Opening

34

Printing

38

Refreshing

41

Searching

38

Shortcut Menu

40

Sorting

39

Toolbar

34

,

40

buffer pools tablespace specification

305

Buffered Inset package setting

467

bufferpools indexes

484

,

494

primary key setting

488

see also objects, database

tablespace default

475

build procedure object action

601

Building a Query

Statements

UPDATE

878

BY PASSWORD

357

C

C method type, DB2 LUW

472

cache clusters

536

flushing, packages

649

materialized view logs option

544

545

property, tables

555

sequence setting

469

,

553

CACHE argument

355

calendaring syntax

388 ,

407

called on NULL input option

472

Called on Null Input setting

264

CANCEL, ADMIN_MOVE TABLE

658

carriage return

111

RAPID SQL 8.6/XE5 USER GUIDE

CASCADE delete rule

539

update/delete rule

515

cascade set integrity options

698

shrink option

703

unique key setting

561

CASCADE delete rule

463

CASCADE, MySQL foreign key

370

Cascading Permissions

798

case object identifiers

103

CAST FROM

472

catalog, datasource

129

specifying storage method

95

categories dropping outlines by

633

stored outlines

546

categories, datasource assigning

143

customizing

170

introduced

168

user interface element treatment

95

categories, reassigning

666

categories, stored outline

602

CCSID database setting

481

table setting

473

user datatype setting

495

certificate

SQL Server logins

346

Certificate setting

Asymetric Key setting

528

certificates backing up

597

creating, SQL Server

334

editing

510

editor, SQL Server

510

chains support summary

185

,

227

change category object action

602

change status action

DDL triggers

604

full-text indexes

605

triggers

604

change status object action

603

changed option, check tables

608

CHANGGE TRACKING, full-text indexes

342

CHAR unicode support, Data editor

905

unicode support, Results editor

797

character set

MySQL

369

character set, client

88

character strings. See strings

character type unicode support, Data editor

905

unicode support, Results editor

797

RAPID SQL 8.6/XE5 USER GUIDE

INDEX check constraints creating for IBM DB2

591

creating for IBM DB2 for OS/390 and z/OS

591

creating for Microsoft SQL Server

591

creating for Oracle

591

creating for Sybase ASE

591

editor, DB2 LUW

461

editor, DB2 Z/OS

480

editor, Oracle

536

editor, SQL Server

511

editor, Sybase

566

hiding source text

652

modifying for IBM DB2

591

see also objects, database

support for

185

table, DB2 LUW

474 ,

506

Check Flag table setting

491

check pending states

698

check policy/expiration

346

check tables object action

608

Checking Syntax

722

checkpoint

609

checksum tables object action

609

CHECKTABLE DBCC option

624

CLEANUP, ADMIN_MOVE TABLE

658

clients trouble-shooting

155

clipboard, line end options

111

CLOB unicode support, Data editor

905

unicode support, Results editor

797

xmltype display

106

clone dropping, table

633

exchanging data

643

Close index setting

484

,

494

Close primary key setting

488

Cluster Factor setting

465

,

468 ,

477

,

484 ,

488 ,

495

,

541 ,

562

Cluster Factor, primary keys

548

Cluster Ration setting

465 ,

468

,

477 ,

484 ,

488 ,

495

CLUSTER, ADMIN_MOVE TABLE

658

clustered indexes, SQL Server

517

clustered setting

579

indexes

465

primary keys

520

,

527

clusters

537

allocating extents to

593

and materialized views

544

creating, Oracle

377

deallocating unused space

627

editor, Oracle

536

see also objects, database

support for

186

truncating

707

coalescing tablespaces

610

1132

INDEX

Code Analyst

919

,

1052

Clone

936

,

1068

Cloning Sessions

936

,

1068

Common Tasks

919

,

1052

Comparing Sessions

936

,

1068

Creating a Session

934 ,

1066

DBMS Support

920 ,

1053

Debuggers

924 ,

1056

Deleting a Session

937 ,

1069

Execute

937 ,

1069

Executing a Session

937 ,

1069

Executing SQL

941 ,

1073

Extracting SQL

941

,

1073

IBM DB2 UDB Data

921

,

1053

Identifying and Fixing Bottlenecks

935

,

1067

Identifying Time-consuming Lines of Code

935 ,

1067

Installing

924

,

1056

Killing a Session Execution

937 ,

1069

Microsoft SQL Server Data

923

,

1055

Oracle Data

923 ,

1055

Oracle Profiler

924

,

1056

Printing Results

939

,

1071

Privileges

924 ,

1056

Product Design

926

,

1058

Refresh

938

,

1070

Refreshing a Session

938 ,

1070

Requirements

924

,

1056

Saving Results

939 ,

1071

Schedule

938 ,

1070

Scheduling a Session

938 ,

1070

Setting View Options for the Unit Detail Tab

940

,

1072

Stopping a Session Execution

937 ,

1069

Sybase ASE

923 ,

1055

Tabs

926 ,

1058

Tutorial

928 ,

1060

Uninstalling

925

,

1057

Unschedule

938 ,

1070

Unscheduling a Session

938 ,

1070

Using

933 ,

1065

Viewing Run Details

939 ,

1071

Viewing Unit Details

940 ,

1072

Viewing Unit Summary Information

940 ,

1072

Wizard

934

,

1066

code analyst options/preferences

92

Code Formatting

722

Code Page package setting

467

Code Size setting

539 ,

549

packages

547

Code Templates

916

Code Templates feature enabling/configuring

915

Code Workbench

915

Creating Code Templates

916

Modifying Code Templates

916

collation

MySQL databases

369

Collecting sample statistics

711

colors

Query Builder options

121

colors/fonts color, editors

112

column filtering browser

39

columns cluster

536

deleting statistics

628

dimension

473

distinct values in

491

distribution key

473

dropping unused

636

filtering for materialized view logs

545

foreign key mapping, Sybase

569

full-text indexes

342

indexes, Oracle

540

managing, DB2 LUW indexes

465

managing, DB2 Z/OS indexes

484

MySQL foreign keys

370

MySQL tables

373

return, DB2 functions

464

summary, tables/views

696

tables, DB2 LUW

473 ,

491

,

505

triggers, oracle

422

unique keys editor, Sybase

578

updating statistics, Sybase

713

view statistics

712

views, SQL Server

530

command line startup

27

COMMENT trigger event

422

COMMENT attribute

407

commit, stop database option

704

compact shrink option

703

Compatible Level setting

512

compile options

601

compiled objects, hiding text

652

compiler directives

718

composite limit

550

COMPOUND triigers specifying

421

Compress setting

473

COMPRESSED row format

373

compressed rows percentage of

491

compression indexes

267

concat null yields null

335 ,

512

concurrent licenses checkout, offline usage

20

selecting at startup

20

1133 RAPID SQL 8.6/XE5 USER GUIDE

conditions check constraint

566

check constraints, SQL Server

511

check contraints, DB2 LUW

461

check contraints, Oracle

536

configuration parameters, DB2 LUW

462

confirmation dialogs data editor options

94

Connect Navigator

149

connect string, database links

538

connect time

550

Connect, Embarcadero

Connect Navigator usage

149

datasource operations

149

feature lockdown

126

introduced

147

logging in

149

connections options/preferences

88

packages

486

connections, troubleshooting

155

constraints enabling/disabling on a filegroup

638

table, DB2 LUW

474

,

506

tables, Sybase

577

consumers

713

containers mangaing for tablespace

475

rebalancing

667

containers, tablespace, reducing

656

CONTAINS SQL function setting

468

CONVERSION_ERROR

777

convert tables object action

614

copy end of line options

111

Copy index setting

484

,

494

copy operations object names

615

objects, based on existing

618

schema

615

Copy primary key setting

488

COPY_USE_LOAD, ADMIN_MOVE TABLE

658

COPY_WITH_INDEXES, ADMIN_MOVE TABLE

658

COPY, ADMIN_MOVE TABLE

658

CPU per call profile setting

550

per session profile setting

550

CREATE trigger event

422

create alias object action

616

CREATE FUNCTION

434

Create Like

618

CREATE LOGIN call

437

CREATE OR REPLACE TRIGGER

421

CREATE SYMMETRIC KEY

355

CREATE_JOB AUTO_DROP attribute

388

CREATE_NEW

333

Created setting packages

547

Creating INSERT Statements

912

Creating Objects

254

CREATION_DISPOSITION

333 ,

356

CURRENT_TIMESTAMP pseudocolumn

413

CurrentData package setting

485

Cursor Blocking package setting

467

cursor close on commit

335

,

512

CYCLE argument

355

cycle numbers, IBM LUW sequences

469

cycle numbers, sequences

469

Cycle When Reach Max/Min setting

469 ,

553

D

DASD storage

491

data extracting as xml

646

selecting all from a table

696

Data Blks/Key indexes

541

primary keys

548

unique keys

562

data block storage clusters

536 –

537

materialized view logs

545

materialized views

544

unique keys

562

data cache

see also objects, database

DATA CAPTURE NONE/CHANGES

491

data capture option

466

Data Dictionary role usage

104

data dictionary viewing usage permission

103

Data Editor

Calendar

906

Data Editor Filter

904

Date Functions

906

Date/Time Format Builder

906

Edit Window

902

Editing Date and Time Functions

906

Editing Date/Time

906

Modifying Criteria

904

SQL Window

903

Time Functions

906

Toolbar

903

Data editor execution mode

93

options/preferences

86

type support

904

data editor default column value handling

910

Data Editor Filter

904

data files attaching

596

detaching

628

Data Pages setting

517 ,

520

,

528 ,

571 ,

573 ,

579

INDEX

RAPID SQL 8.6/XE5 USER GUIDE 1134

INDEX database devices default path, datasources

141

moving transaction logs

657

see also objects, database

specifying in segments

442

database links creating, Oracle

380

editor, Oracle

538

see also objects, database

support for

187

Database partition Group table setting

473

Database Search

Results

851

Database Search Wizard

850

Panel 1

850

Panel 2

851

database triggers creating, SQL Server

336

editing, SQL Server

513

enabling

513

enabling/disabling

604

FOR/AFTER argument

337

support summary

188

supported events

337

databasemanager configuration file parameters

462

databases archive

430

associated triggers

421

checkpoint

609

creating, DB2 LUW

259

creating, DB2 z/OS

287

creating, MySQL

368

creating, SQL Server

335

creating, Sybase

429

detaching

628

editor, DB2 LUW

462

editor, IBM DB2 Z/OS

481

editor, MySQL

531

editor, SQL Server

512

editor, Sybase

567

hiding source text

652

mvings logs between devices’transaction logs changing database devices

657

quiescing

665

resynchronizing

694

see also objects, database

setting online/offline

699

shrinking

701

starting

704

stopping

704

support for

189

temporary, Sybase

430

unquiescing

709

updating statistics

710

DATALINK integrity

698

DATAPAGES

576

Datasource Explorer options/preferences

86 ,

100

1135 datasource groups changing

165

removing/adding/renaming

166

datasource index configuring

116

Datasource Management

31

Datasource Organizer

31

datasources auto-discovering

143

basic viewing/organization options

163

catalog option

129

categories

168

connecting (explicit)

153

connecting to

155

discovering automatically

144

dropping storage paths

632

editing

130

export/import

145

filtering objects/nodes view

170

groups

164

indexing

114

modifying

694

options/preferences

86

registering like an existing

130

registering manually

130

repository preferences

87

specifying catalog storage

95

trouble-shooting connections

155

unregistering

153

viewing properties

152

datatype sequences, SQL Server

355

datatypes domain

314

editor

579

function parameters

483

methods, DB2 LUW

472

procedure parameters

489

sequence

469

,

553

user-defined DB@ LUW

477

date formats data editor

93

Date Time Format package setting

467

date/time results, ISQL

123

db chaining

335 ,

512

DB Protocol package setting

485

DB2 version/connectivity support

14

DB2 for Linux, Unix, and Windows trouble-shooting connectivity

157

DB2 for z/OS trouble-shooting connectivity

157

db2... .exe locations

96

DB2GENERAL parameter style

472

DBA views

104

DBAs data dictionary view pemission

103

DBID table setting

491

RAPID SQL 8.6/XE5 USER GUIDE

DBINFO option

472

DBInfo parameter

463

,

468

DBINFO setting

264

dbms platforms, restricting

126

DBMS_JAVA

96

DBMS_JAVA package

96

DBMS_JOB.BROKEN

387

DBMS_JOB.SUBMIT

387

DBMS_SCHEDULER.CREATE_JOB

388

DBMS_SCHEDULER.CREATE_PROGRAM

403

DBMS_SCHEDULER.CREATE_SCHEDULE

406

DBMS_SCHEDULER.DEFINE_PROGRAM_ARGUMENT

403

DBMS_SCHEDULER.ENABLE/DISABLE

637

DBMS_SCHEDULER.RUN_JOB

695

DBMS_SCHEDULER.SET_ATTRIBUTE

388

DBMS_SCHEDULER.STOP_JOB

705

dbo use only

335

,

431 ,

512

DBRMs

see also objects, database

DBSpaces support summary

191

DDL creating temporary objects

202

,

226

extraction options

97

object extraction

645

DDL Editors

735

Opening

735

ddl in tran

431

DDL triggers database

336

deactivating roles

694

deallocate unused space

627

debugger, SQL options/preferencess

86

Dec31 package setting

485

Decimal Point package setting

485

decryption certificate

334

symmetric keys

357

DECRYPTION BY...

356

DEFAULT row format

373

default binding

529

default location, proxy databases

430

default to local cursor

335 ,

512

Default Value setting

491

defaults creating, SQL Server

337

creating, Sybase

431

data editor handling

910

editor, SQL Server

513

editor, Sybase

568

full-text catalog

341

hiding source text

652

Oracle columns

413

package schema

467

see also objects, database

segment

579

segment name

576

support for

192

tablespace

697

Defer Prepare package setting

485

DEFER(PREPARE)

600

Deferable primary key setting

547

Deferrable/Deferred unique key setting

561

Deferred primary key setting

547

define directive

718

Definer package setting

467

degee of parallellism

344

,

350 ,

364

Degree package setting

467 ,

485

degree, bind packages

599

degree, binding packages

600

Degrees settting

544

545

delete rule

515 ,

539

delete rule CASCADE delete rule

482

delete rule, update rule

463 ,

500

DELETE statements triggers, Oracle

422

delete statistics object operation

628

DELETEs trigger firing on

526

delimited identifiers

88

Density setting

465 ,

468 ,

477

,

484 ,

488

,

495

DES... algorithms

413

Descending option indexes, InterBase

320

DESTROY

601

detach database object action

628

deterministic option

472

Deterministic setting

264

,

463 ,

468

DEV category

168

Developer Network

18

device container type files container type

475

device fragments

567

Dialog Box

Grant Privileges To

799

Revoke Privileges From

800

Dialog Boxes

43

dimensions, columns

473

INDEX

RAPID SQL 8.6/XE5 USER GUIDE 1136

INDEX directories creating, Oracle

381

editor, Oracle

538

ETSQLX files

100

Oracle utilities

120

oracle utilities

94

see also objects, database

support for

193

disable

SQL Server indexes

629

DISABLE clause

421

disable job object action

630

disable keys object action

630

DISABLE TRIGGER

604

Disable Triggers

631

DISABLE_RI_CHECK

777

disabled environments

600

DISASSOCIATE_STATISTICS trigger event

422

Discover Datasources setting up for

144

Discussion Groups

11

Display

Customizing

Output Window

32

Distinct Keys setting

541

,

562

indexes

465

,

468 ,

484

primary keys

488

,

495

unique keys

477

distinct values, column

491

distribution key columns

473

distribution statistics

712

DIVIDE_BY_ZERO_ERROR

777

docking tab colors

47

Documentation

11

domains aceess, SQL Server users

140

creation wizard

314

editing

498

SQL Server logins

346

support for

194 –

195

drivers native, support

14

DROP trigger event

422

drop by category object action

633

drop clone, object action

633

drop java object action configuring

96

using

634

drop login trigger object action

635

DROP PENDING state

667

DROP statements extract/migrate defaults

97

DROP STORAGE clause

709

drop unused columns object action

636

drop Unused object action

636

drop, Java

96

drop, object action

631

dump utility, MySQL

119

dupicate keys

517

durability, Sybase databases

431

DYNAMIC row format

373

Dynamic Rules package setting

485

Dynamic setting

543

Dynamic Sizing settings

552

dynamic SQL, flushing

649

E

EARLY_PREDICATE_EXECUTION

777

Editing Result Sets

786

Adding a Column

790

Adding a Row

789

Columns

788

Copying

787

Cutting

786

Deleting a Column

791

Deleting a Row

790

Formatting Result Sets

792

Inserting a Column

790

Inserting a Row

789

Pasting

787

Resizing Columns

791

Resizing Rows

791

Rows

787

Sorting Data

792

Editing SQL Scripts

749

Changing Case

755

Commenting Code

754

Copying and Pasting a Column

756

Copying and Pasting Text

756

Cutting and Pasting a Column

757

Cutting and Pasting Text

756

Pasting SQL Statements

751

Pasting SQL Syntax

749

Selecting a Block of Text

753

Selecting Text

753

Setting Bookmarks

758

Uncommenting Code

755

editor, IBM DB2 LUW

476

1137 RAPID SQL 8.6/XE5 USER GUIDE

editors aliases, DB@ LUW

461

aliases, DB2 Z/OS

480

aliases, Sybase

566

asymmetric keys, SQL Server

510

blob filters

497

certificates, SQL Server

510

check constraints, DB2 LUW

461

check constraints, DB2 Z/OS

480

check constraints, Oracle

536

check constraints, SQL Server

511

check constraints, Sybase

566

clusters, Oracle

536

database links, Oracle

538

databases, DB2 LUW

462

databases, IBM DB2 Z/OS

481

databases, MySQL

531

databases, Sybase

512

datbases, Sybase

567

defaults, SQL Server

513

defaults, Sybase

568

directories, Oracle

538

domains

498

encryption keys

498

exceptions

499

500

extended procedures, Sybase

568

foreign key, Sybase

569

foreign keys, DB2 LUW

463

foreign keys, IBM DB2 Z/OS

481

foreign keys, InterBase

500

foreign keys, MySQL

532

foreign keys, Oracle

539

foreign keys, SQL Server

514

functions, DB2 LUW

463

functions, DB2 Z/OS

482

functions, Oracle

539

functions, SQL Server

516

functions, Sybase

570

generators

501

groups, Sybase

570

indexes, DB2 z/OS

483

indexes, IBM LUW

464

indexes, InterBase

502

indexes, MySQL

532 –

533

indexes, Oracle

540

indexes, SQL Server

516

indexes, Sybase

502

,

571

job queues, Oracle

542

libraries, Oracle

543

logins, Sybase

517

,

572

materialized query tables

466

materialized view logs, Oracle

545

options/preferences

110

111

outline, Oracle

546

packages, IBM DB2 Z/OS

485

packages, IBM LUW

467

packages, Oracle

546

plans, IBM DB2 Z/OS

486

primary keys, IBM LUW

467

RAPID SQL 8.6/XE5 USER GUIDE primary keys, MySQL

532 –

533

primary keys, Oracle

547

primary keys, SQL Server

519

primary keys, Sybase

572

primary keys, z/OS

487

procedures, IBM DB2 Z/OS

488

procedures, IBM LUW

468 ,

503

procedures, Oracle

549

procedures, SQL Server

521

procedures, Sybase

573

profiles, Oracle

549 ,

551

roles, SQL Server

504

rollbacksegments, Oracle

552

rules, SQL Server

522

segments, Sybase

574

sequences, IBM LUW

469

sequences, Oracle

553

shadowss, InterBase

505

stogroups, IBM DB2 Z/OS

489

structured types, IBM LUW

470

synonyms, DB2 Z/OS

490

synonyms, Oracle

554

tables, DB2 LUW

472

tables, DB2 Z/OS

490

tables, InterBase

505 ,

507

tables, MySQL

533

tables, Sybase

575

tablespaces, DB2 LUW

475

tablespaces, DB2 Z/OS

492

tablespaces, Oracle

557

triggers, DB2 Z/OS

493

triggers, IBM DB2 LUW

476

triggers, Oracle

559

triggers, SQL Server

526

triggers, Sybase

578

type bodies, Oracle

560

types, Oracle

561

unique keys, DB2 z/OS

494

unique keys, IBM DB2 LUW

476

unique keys, InterBase

507

unique keys, MySQL

532 –

533

unique keys, Oracle

561

unique keys, SQL Server

527

unique keys, Sybase

578

user datatypes, DB2 LUW

477

user datatypes, IBM DB2 Z/OS

495

user datatypes, SQL Server

529

user messages, SQL Server

529

users, DB2 Z/OS

495

users, IBM DB2 LUW

478

users, MySQL

534

users, SQL Server

528

users, Sybase

581

views, DB2 LUW

478

views, DB2 Z/OS

496

views, Oracle

564

views, SQL Server

530

views, Sybase

581

EditProcedure table setting

491

INDEX

1138

INDEX

email. See also SMTP

Embarcadero Connect. See also Connect, Embarcadero

Embarcadero SQL Debugger for IBM DB2 UDB

942

Embarcadero SQL Debugger for IBM DB2 UDB for

Windows/Unix

Basics

Interface

946

DDL Editor

947

Features

946

Functionality

950 ,

952

Break

958

Breakpoints

955

956

Close

958

Go

956

Input Parameters

951

Restart

957

Run to Cursor

954

Step Into

952

Step Out

953

Step Over

953

Stop

957

Interface

Call Stack Window

949

Dependency Tree Window

950

Variables Window

948

Watch Window

947

Options

945

Requirements

943

Using

959

Debugging an SQL Script

960

Opening a Debugging Session

959

Embarcadero SQL Debugger for Microsoft

961

Basics

Requirements

Client

966

Server

963

Break

979

Call Stack Window

971

DDL Editor

970

Debugging an SQL Script

981

Dependency Tree Window

972

Features

962

Functionality

972

Breakpoints

976 –

977

Close

979

Go

978

Input Parameters

973

Run to Cursor

976

Step Out

975

Step Over

975

Interface

969

Variables Window

971

Opening a Debugging Session

980

Options

968

Requirements

963

Restart

979

Step Into

974

Stop

978

Using

980

Debugging a Sample Script

982

Watch Window

970

Embarcadero SQL Debugger for Oracle

992

Breakpoints

Insert

1003

Debugging a Sample Script

1009

Getting Started

1009

Sample Script 1

1010

Sample Script 2

1014

Debugging a SQL Script

1007

Debugging Sample Script 2

1014

Exclusion List

993

Features

993

Functionality

998

Breakpoint

1003

Breakpoints

Remove

1003

Restart

1005

1139 RAPID SQL 8.6/XE5 USER GUIDE

INDEX

Toggle

1003

Close

1006

Go

1004

Input Parameters

999

Pause

1005

Run to Cursor

1002

Step Into

1000

Step Out

1001

Step Over

1001

Stop

1004

Interface

995

Call Stack Window

997

Dependency Tree Window

998

Watch Window

996

Objects

992

Options

994

SQL Editor Window

996

Using

1006

Opening a Debugging Session

1007

Variables Window

997

Embarcadero SQL Debugger for Sybase

1019

Features

1020

Functionality

1025

Breakpoint

1029

Breakpoints

Insert

1029

Remove

1029

Restart

1032

Toggle

1030

Close

1032

Go

1031

Input Parameters

1026

Pause

1032

Run to Cursor

1029

Step Into

1027

Step Out

1028

Step Over

1028

Stop

1031

Interface

1022

Call Stack Window

1024

DDL Editor Window

1023

Dependency Tree Window

1025

Variables Window

1024

Watch Window

1023

Objects

1020

Options

1021

Using

1033

Debugging an SQL Script

1034

Opening a Debugging Session

1033

enable job object action

639

enable keys object action

640

Enable Query Rewrite materialized view setting

543

ENABLE TRIGGER

604

Enable Triggers

631

Enable/Disable Filetable(s) action

638

Enable/Disable object action jobs enabling/disabling

637

enabled environments

600

Enabled primary key setting

547

Enabled setting

526

EnableQueryOptimization setting

479

enabling/disabling check constraints

511

materialized query tables

466

unique keys

561

encoding bind packages

600

Encoding package setting

485

Encoding Scheme database setting

481

encoding, Java

96

Encrypted setting

526

encryption certificate

334

database DDL triggers

337

Oracle columns

413

rules

522

encryption algorithm

413

ENCRYPTION BY PASSWORD

333

ENCRYPTION BY...

356

encryption keys editing

498

support for

194

END_DATE attribute

407

end-of-line options

111

enforced foreign key

463

Enforcing Index settings

547

ENGINE= option

614

entry point, blob filters

314

entry points external functions

317

environments adding to packages

598

environments, disabled/enabled

600

environments, packages

485

environments, plans

487

ER/Studio Portal options/preferences

87

Erase primary key setting

488

error messages

SQL Server

365

Error Size setting

539

,

549

packages

547

ERROR, check tables results

608

ERROR, repair tables results

691

errors maximum before abort, ISQL

105

Errors materialized view setting

543

estmate size, object action

641

ETSQLX files, directory

100

ETStart/ETEnd tags

202 ,

226

event monitors

see also objects, database

RAPID SQL 8.6/XE5 USER GUIDE 1140

INDEX events dataabse triggers

337

Sybase IQ support description

195

trigger

476 ,

494

Excel 2000

785

Excel Spreadsheets

Importing

912

exceptions creation wizard

315 –

316

editing

499 –

500

support for

195

exchange data, object action

643

Executing Procedures

723

Executing Scripts

759

Cancelling a Query

762

Compilation Error Tab

762

Executing from Command History

762

Executing Partial Scripts

760

Plan Facility

765

Script Execution Facility

760

Step Execution Facility

763

Token Matching Capability

779

EXEMPT INACTIVE LOCK parameter

437

EXISTING KEYS option

334

Expected Row Size setting

576

expired password

427

expiry date certificate

334

Explain Level/Snapshot/Mode setting

467

Explain package setting

485

explain plans bind packages

600

table creation

107

Explicit Bind Time package setting

467

Explicit Permissions

798

Explorer basic viewing/organization options

163

Favorites tab

162

filtering tree view

170

groups options

164

Project/Version Control tabs

162

export datasources

145

default directory

94

utility directory

120

expression check constraint

566

expressions check constraint

480

check constraints, SQL Server

511

extended option, check tables

608 –

609

extended option, repair tables action

691

extended procedures creating, SQL Server

338

creating, Sybase

432

editor, Sybase

568

hiding source text

652

library name

569

see also objects, database

support for

196

EXTENDED_JOIN_SYNTAX

777

extending a container

475

Extends setting

552

Extent Size tablespace setting

473

extents

537

allocating

593

allocating to tables/indexes/clusters allocating extents

593

assigned to clusters

536

clusters

537

free/save on truncate

707

LOB column usage

556

materialized view logs

545

materialized views

544

primary key settings

548

unique keys

562

external action option

472

External Action setting

264

,

463 ,

468

external applications

47

external functions creation wizard

317

support for

197

External Name setting

463 ,

468

Externally setting

551

extract, object action

645

extraction

DDL options

97

F failed login attempts

550

FAILED RUNS attribute

388

FAQs

11

fast option, check tables

608

Favorites tab

162

feature lockdown

126

fenced option

472

Fenced setting

264 ,

463 ,

468

File Factor setting

520

,

527

File Group setting

517 ,

520

,

527

File Growth Rate setting

512

filegroups and SQL Server tables

359

enabling/disabling constraints

638

full-text catalogs

341

full-text indexes

342

next used

659

partitions, SQL Server

349

,

359

1141 RAPID SQL 8.6/XE5 USER GUIDE

files auto-saving

110 –

111

data editor types

93

datasource stroage

95

mdf, ndf, ldf

512

SQL logging optionsLogging, SQL truncating

118

tracking

110 –

111

tracking, ISQL Editor

111

FILESTREAM_ON argument

359

FILETABLE_... arguments

359

FILETABLE_NAMESPACE

638

Fill Factor setting

517 ,

573

filtering character-based, on-the-fly

171

introduced

170

Final Cal setting

264

final call option

472

Final Call setting

463

Fire On Delete/Update/Insert setting, rule

522

Fire On Insert/UpdateDelete

526

First Key index setting

465 ,

468 ,

484

First Key primary key setting

488 ,

495

First n Keys setting

477

FIXED row format

373

flag, binding packages

600

flashback recycle bin entry action

647

flashback table object action

648

flush cache object action

649

flush tables object action

650

fonts data editor options

93

editor options

112

Qurey Builder options

121

FOR clause

422

For Data setting

491

For Data table setting

495

FOR EACH ROW

421

FOR LOAD

430

FOR PROXY_UPDATE

430 ,

694

FOR UPDATE OF options

422

FOR VALUES arguments

348

FOR/AFTER argument, database ddl triggers

337

FORCE attribute

705

FORCE GENERATED set integrity option

699

FORCE, ADMIN_MOVE TABLE

658

force, start database option

704

INDEX foreign keys and set integrity

698

creating, DB2 LUW

261

creating, DB2 z/OS

288

creating, MySQL

369

creating, Oracle

382

creating, SQL Server

339

creating, Sybase

433

editor

569

editor, DB2 LUW

463

editor, IBM DB2 Z/OS

481

editor, InterBase

500

editor, MySQL

532

editor, Oracle

539

editor, SQL Server

514

MySQL tables

374

see also objects, database

support for

197

table, DB2 LUW

474 ,

506

Format

723

formatting

ISQL

113

Formatting Code

722

Formatting Result Sets

792

Changing Display Properties

795

Display Properties

794

Setting Alignment Properties

793

Setting Border Properties

794

Setting Colors

796

Setting Fonts

795

Forums

11

fragments

567

free packages object action

650

Free Page primary key setting

488

free space threshold, segments

442

freelists cluster

536

clusters

537

in indexes

540 ,

556

in unique keys

562

primary key settings

548

FROM ASSEMBLY/EXECUTABLE FILE/FILE

334

FROM FILE/ASSEMBLY/ASSEMBLY/PROVIDER

333

FROM PROVIDER

356

FULL ACCESS set integrity option

698

FULL durability option

431

Full Keys index setting

465

,

468 ,

484

primary key setting

488

,

495

unique keys setting

477

Full Screen Mode

53

Activating

53

Dismissing

53

Toolbar

53

RAPID SQL 8.6/XE5 USER GUIDE 1142

INDEX full-text catalogs assocaited indexes

342

basic properties

341

editing

515

rebuilding

668

reorganizing

679

support summary

199

200

full-text indexes basic properties

342

column specification

342

creating

341

editing

515

enabling/disabling

605

population status

662

fully qualiied names synonyms, SQL Server

358

function path

132 ,

134

Function Path package setting

467

Function-Based index setting

540

functions alarms/thresholds, time comsumption

93

creating synonyms to

620

creating, DB2 LUW

263

creating, DB2 z/OS

289

creating, MySQL

370

creating, Oracle

383

creating, SQL Server

342

editor, DB2 LUW

463

editor, DB2 Z/OS

482

editor, Oracle

539

editor, SQL Server

516

editor, Sybase

570

extract options

202

,

226

hiding source text

652

password verification

550

see also objects, database

support for

200

triggers, path

476

,

494

wizard, Sybase

434

G

GBP Cache primary key setting

488

GENERATE NEW KEYS option

334

Generate Numbers in Order setting

469 ,

553

Generate Package

651

Generate Procedure

651

Generate Select Statement

651

Generate Statements

651

GENERATED ALWAYS... options

277 ,

302

generated column, set integrity

699

generators creation wizard

319

editing

501

support for

202

Gets setting

552

Globally setting

551

grace period, password

550

GRANT trigger event

422

1143 grid properties, results window

104

Group Member database setting

481

Group Menber package setting

485

groups assigning users

581

assigning users to

581

creating, Sybase

434

editor, Sybase

570

quiescing database to

665

quiescing instance to

665

see also objects, database

support for

203

groups, datasource adding/deleting/renaming

166

changing the hierarchy

167

introduced

164

moving datasources

165

grow by parametere, segments

442

H hash cluster type

536

partitions, Sybase tables

577

hash composite

571

header type bodies

560

headers packages

546

heap size

JDBC option

117

heap size, initial/max

117

heap size, JDBC

117

HEAP storage engine

373

hide text object operation

652

high water mark lowering

656

high watermarks rollback segment setting

552

highlighting. See style

historgram steps

713

history table

279

host

MySQL users

376

HTML reports, default directories

99

template directory

100

hyperlinks, object action feature and Code Assist features

114

enabling/configuring

116

introduced

731

hysteresis segments

574

I

I/O tablespace settings

475

IDENTIFIED BY clause

413

identity user datatype

579

RAPID SQL 8.6/XE5 USER GUIDE

INDEX

Identity Column setting

491

Identity Gap setting

576

identity in nonunique index

431

IDENTITY_VALUE

356

idle time

550

IGNORE DELETE TRIGGERS clause

709

Ignore Duplicate Key setting

517

,

520 ,

527

Ignore Duplicate Rows index setting

436 ,

571

immedaite offline mode

607

IMMEDIATE CHECKED set integrity option

698

IMMEDIATE clause

709

import datasourcs

145

default directory

94

utility directory

120

utility, MySQL

119

Import Data Wizard

912

IN PATH

341

include columns

465

include directive

718

Include Longvar Columns setting

466

INCREMENT BY argument

355

incremental refresh

673

index cluster type

536

Index Buffer Pool database setting

481

Index Level setting

465 ,

468

,

477 ,

484

,

488 ,

495

,

541 ,

562

Index Level, primary keys

548

Index Page Ratio setting

571

,

573 ,

579

Index Tablespace setting

466

Index Type index setting

465

INDEX_ADVISOR... options

777

index, datasource

114

Indexes

204

Partitions

207

Rebuilding

669

indexes allocating extents to

593

compressing

267

creating, DB2 LUW

266

creating, DB2 z/OS

291

creating, InterBase

319

creating, MySQL

371

creating, Oracle

384

creating, SQL Server

343

creating, Sybase

435

deallocating unused space

627

default segment warning

125

disabling, SQL Server

629

editor, DB2 z/OS

483

editor, IBM LUW

464

editor, MySQL

532

533

editor, Oracle

540

editor, SQL Server

516

editor, Sybase

502

,

571

estimating size

641

MySQL tables

374

purging, recycle bin

664

rebuilding, InterBase

671

rebuilding, SQL Server

671

recreating, missing

640

reorganizing, SQL Server

677

same tablespace indexes warning

125

see also objects, database

segment placing

661

set statistics action

700

shrinking

703

table, DB2 LUW

473 ,

506

tables, Sybase

576

updating statistics

710

INFER_SUBQUERY_PREDICATES

777

INFO, check tables results

608

INFO, repair tables results

691

Inherit Special Registers setting

264 ,

463 ,

468

INIT, ADMIN_MOVE TABLE

658

initial extent clusters setting

537

index setting

540

materialized view log setting

545

materialized view setting

544

primary key settings

548

rollback segment setting

552

table setting

556

unique key setting

562

initial heap size

117

initial heap size, JDBC option

117

Initial Transactions cluster setting

537

index setting

540

materialized view log setting

545

materialized view setting

544

primary key settings

548

table setting

556

unique key setting

562

RAPID SQL 8.6/XE5 USER GUIDE 1144

INDEX

INMEMORY database specification

430

InnoDB storage engine

373

input parameters

489

INSERT statements triggers, Oracle

422

INSERT statments generating from table data

617

INSERTs trigger firing on

526

INSTANCE_STICKINESS attribute

388

instances materialized view log settting

544 –

545

quiescing

665

support for

208

unquiescing

709

INSTEAD OF trigger timing

526

Interbase version/connectivity support

14

Intra-partition package setting

467

invisible indexes, Oracle

384

IP addresses

Performance Center

120

ISAM storage engine

373

isolation level

107

Isolation Level package setting

467

isolation, bind packages

599

ISQL editor results options

122

ISQL WIndow

Code Templates

916

ISQL window setting query options

766

ISQL Window Status Bar

723

IsValid index setting

540

J

JAVA method type, DB2 LUW

472

Java load/drop options

96

options/preferences

86

virtual machine options

117

Java Classes

209

java classes dropping

634

java load object action using

654

Java Resources

209

Java Sources

210

jConnect

117

JDBC options/preferences

87 ,

117

JDBC support

14

job config files directory

100

Job Queues

211

1145 job queues creating

387

disabling

630

editing

542

editor, Oracle

542

enabling

639

procedure associated

387

ru8nning jobs

695

schedule

387

see also objects, database

JOB_ACTION attribute

389

JOB_PRIORITY attribute

388

JOB_WEIGHT attribute

388

jobs creating

388

editing

542

support summary

210

join indexes support summary

212

JOIN_OPTIMIZATION

777

joins type/index Query Builder restrictions

121

JVM options

117

K

Katakana Charset package setting

485

Keep Dynamic package setting

485

KEEP, ADMIN_MOVE TABLE

658

Kerberos authentication

140

key columns, cluster

536

KEY INDEX

342

key size, clusters

536

KEY_SOURCE

356

Keyboard Commands

50

Keyboard Emulation Mode

723

keyboard preferences

47

keys disabling

630

enabling

640

Knowledge Base

11

L

Label table setting

491

language package setting

485

user messages

529

user messages, Sybase

449

Language Level package setting

467

LARGE_DOUBLES_ACCUMULATOR

777

Last Bind Time package setting

467

Last Modified setting

539

packages

547

Last Runstats setting

491

layout, query plans

106

LDAP registering DB2 datasources from

132

registering Oracle datasources from

134

server/authentication configuration

118

Leaf Blks/Key setting

541 ,

562

RAPID SQL 8.6/XE5 USER GUIDE

INDEX

Leaf Blks/Key, primary keys

548

Leaf Blocks setting

541 ,

562

Leaf Blocks, primary keys

548

Leaf Pages setting

465 ,

468

,

477 ,

484

,

488 ,

495

LEFT, partitojn function range

348

libraries creating, Oracle

389

dynamic/status settings

543

editor, Oracle

543

extended procedure

568

modify path/file name

543

see also objects, database

support for

212

library

MySQL functions

371

library name, extended procedures

569

licensing

18

offline/online, concurrent

20

selecting at startup

20

lifetime, password

550

Lightweight Directory Access Protoco. See also LDAP

line feed

111

line numbers

112

link options

601

linked servers

see also objects, database

list composite

571

list partitions

577

literals parameterized

724

Live Mode execution

93

load data default directory

94

Load Java

96

load java object action configuring

96

LOAD_MSGPATH, ADMIN_MOVE TABLE

658

range-

305

locale

122

localhost, MySQL users

376

Locality index partition setting

541 ,

548 ,

562

,

571

locator, as

464

lock connections default settings

106

Lock Isolation package setting

485

Lock Scheme setting

576

Lock Size setting

473

lock table object action

655

lock time, account

550

lockdown, feature

126

locking rows/pages

345 ,

517

Locksize, materialized query tables

466

log files attaching

596

detaching

628

logfile materialized view logs

545

Logged Initially setting

466

RAPID SQL 8.6/XE5 USER GUIDE logging database files

512

index setting

540

materialized query table options

466

materialized view logs

544 –

545

primary key index constraints

547

table setting

555

unique keys

561

logging,

SQL options

118

logging, SQL options/preferences

87

logical reads

550

LOGIN PROFILE parameter

437

login triggers adding/modifying

592

configured for login

572

dropping

635

LogIndexBuild setting

473

Logins

213

logins accounting details

572

activating/deactivating roles

694

adding to server roles

347

adding user accounts to database

347

adding/modifying login triggers

592

associating with users

581

bind to database

567

binding to temporary databases

600

changing password

602

copying from existing

618

creating, SQL Server

345

creating, Sybase

436

dropping login triggers

635

editing, SQL Server

517

editor, Sybase

517

,

572

extracting with user

97

lock exemption

437

login trigger configured

572

profile assignment

551

profile limits

550

see also objects, database

unbinding from temporary databases

709

LOGON trigger event

422

LOGSEGMENT

579

logsegment

661

LONG unicode support, Data editor

905

unicode support, Results editor

797

Long Tablespace setting

466

longvarchar types

797

,

905

lower high water mark operation

656

M macros support summary

215

Mailing Result Sets

783

1146

INDEX

Make Unique setting

465 ,

468

,

477 ,

484 ,

488 ,

495

MAPI file format (emailed files)

102

mapping foreign keys, Sybase

569

MySQL foreign keys

370

master database object creation warning

125

Master View materialized view setting

543

Match Full setting

569

Materialized Query Tables

215

materialized query tables alias creation shortcut

616

and set integrity

698

copying from existing

618

creating, DB2 LUW

267

editor

466

reloading/refreshing

673

see also objects, database

materialized query tabless creating synonyms to

620

Materialized View Logs

217

creating, Oracle

395

materialized view logs editor, Oracle

545

see also objects, database

materialized views creating synonyms to

620

creating, Oracle

390

see also objects, database

support for

216

mathc full

569

max errors before aborting

776

Max Extents index setting

540

materialized view log setting

545

primary key settings

548

rollback segment setting

552

table setting

556

unique key setting

562

Max Row Size setting

528

Max Size of Non-Leaf Index Row setting

528

Max Transactions index setting

540

materialized view log setting

545

primary key settings

548

table setting

556

unique key setting

562

MAX_FAILURES attribute

388

MAX_RUNS attribute

388

MAXDOP

344 ,

350

,

364

Maximum errors before abort, ISQL

105

maximum extents

537

maximum extentsmaterialized views

544

Maximum Rows Per Page setting

573 ,

576 ,

579

maximum transactions, clusters

537 ,

544

MAXVALUE argument

355

1147

MDI Tab Swapping

47

medium option, check tables

608

MEMORY storage engine

373

Menu Contents

47

menu preferences

47

Menus

43

Main Menu

44

Shortcut Menus

45

merge publish

335 ,

512

MERGE tables, MySQL

375

messages

SQL Server

365

messages, language

529

methods adding/editing,structured types

471

Microsoft SQL Server version/connectivity support

14

MINIMIZE_STORAGE

777

Minimum Extents index setting

540

materilized view log setting

545

primary key settings

548

rollback segment setting

552

table setting

556

unique key setting

562

minimum extents cluster setting

537

materialized views setting

544

MINVALUE argument

355

missing indexes, recreating

640

Mixed Character Set package setting

485

Mode materialized view setting

543

MODIFIED SQL DATA functionn settting

468

Modify Cluster Column

379

module blob filters

314

external functions

317

move table object action

658

MOVE, ADMIN_MOVE TABLE

658

MRG_MyISAM storage engine

373

MRU Replacement Strategy setting

436 ,

571

,

576

Msg_text , check tables results

608

Msg_text , repair tables results

691

Msg_type , check tables results

608

Msg_type, repair tables results

691

Multi-node Bound package setting

467

multi-part names synonyms, SQL Server

358

MyISAM storage engine

373

MySQL utilities options/preferences

87

utility options/preferences

119

mysqldump

119

mysqlimport

119

N n

88

named variables

724

RAPID SQL 8.6/XE5 USER GUIDE

INDEX

Navigator opening/hiding

159

toolbar/right-click options

161

NCHAR unicode support, Data editor

905

unicode support, Results editor

797

nchar unicode support, Data editor

905

unicode support, Results editor

797

NCLOB unicode support, Data editor

905

unicode support, Results editor

797

New Project Reverse Engineering Wizard

Panel 2

806

Panel 3

806

Panel 4

807

Panel 4 for Selected Objects

807

Panel 5

808

Next Extent primary key settings

548

Next Extent setting

540 ,

545

,

552 ,

556

,

562

next extent, clusters

537

next extent, materialized views

544

next used filegroup action

659

NEXT VALUE FOR function

523

NO ACTION delete rule

482

NO ACTION delete/update rule

463

NO ACTION, MySQL foreign key

370

NO CACHE argument

355

no chkpt on recovery

431

NO CYCLE argument

355

no free space acctg

431

NO RECOVERY durability option

431

No Sort index setting

540

No Sort unique key setting

561

NO SQL function setting

468

NO_STATS, ADMIN_MOVE TABLE

658

NO_TARGET_LOCKSIZE, ADMIN_MOVE TABLE

658

NOAUDIT trigger event

422

NODEFER(PREPARE)

600

nodegroups creating, DB2 LUW

270

see also objects, database

tablespace default

475

nodes filtering

170

NOEXEC

777

NON_ANSI_NULL_VARCHAR

777

NON_CLUSTER, ADMIN_MOVE TABLE

658

non-clustered index, same segment warning

125

NONE update/delete rule

515

nonuniique

465

nonunique index type

540

nonunique indexes stopping updates

630

Norely primary key setting

547

normal offline mode

607

NOT ENFORCED option

463

Not For Replication setting

515

NoValidate index constraint status

547

ntext unicode support, Data editor

905

unicode support, Results editor

797

num_freqvalues

712

num_quantiles

712

Number of Extents unique key setting

562

number, user message

449

numeric roundabout

335

,

512

NVARCHAR unicode support, Data editor

905

unicode support, Results editor

797

nvarchar unicode support, Data editor

905

unicode support, Results editor

797

nvarchar(max) unicode support, Data editor

905

unicode support, Results editor

797

NVARCHAR2 unicode support, Data editor

905

unicode support, Results editor

797

O

OAM Page Ratio setting

571 ,

573 ,

579

OBID table setting

491

object editors max per open operation

103

object operations invoking from SQL editor

731

object properties action

660

Object Status trigger setting

476 ,

494

object types creating, Oracle

423

objects, database associated with users

581

copying names

615

creating

254

dropping

631

editors

460

extracting DDL

645

filtering from tree view

170

included in datasource index

116

owning user, DB2 Z/OS

496

segments, associated

574

tablespace-associated

476

transferring ownership

706

user dependencies

478

viewing/organization options

163

ODBC support

14

offline database setting

335

,

512

license usage

20

tablespace status

607

offline, setting databases

699

OLE methods

472

ON DATABASE argument

336

ON DELETE

MySQL foreign key

370

RAPID SQL 8.6/XE5 USER GUIDE 1148

INDEX

ON FILEGROUP

341

ON UPDATE

MySQL foreign key

370

ON_CHARSET_CONVERSION_FAILURE

777

OneNote style tabs

47

online setting databases

699

tablespace status

607

Op, check tables results

608

Op, repair tables results

691

OPEN SYMMETRIC KEY

357

open the key object action

357

OPEN_EXISTING

333

Operative package setting

485

Optimal Size setting

552

Optimization Hint package setting

485

optimization hints, bind packages

600

optimization, view queries

478

optimize tables object action

660

Options

Browser

91

Version Control

124

options code analyst

92

options (application)

86

options/preferences

Datasource Explorer

100

datasource indexing

114

Java

96

JDBC

117

logging

118

Performance Center

120

results (ISQL)

122

results window grid

104

semantic validation

115

SMTP

124

Oracle

Data Dictionary usage

104

trouble-shooting connectivity

156

utilities options/preferences

87

version/connectivity support

14

Oracle job queue

542

oracle job queues creating

387

outlines creating, Oracle

397

editor, Oracle

546

reassigning categories

666

see also objects, database

support for

218

outln_pkg.drop_by_cat

633

outln_pkg.drop_unused

636

output parameters

489

Output Window maximum entries

103

Overflow Rows setting

466

Overhead setting

475

1149 owners browser display

102

ownership (objects), transferring

706

P pack keys

373

package bodies creating synonyms to

620

see also objects, database

suppport for

220

Package Size package setting

485

Package Source package setting

485

packages alarms/thresholds, time comsumption

93

associated plans

486

binding

598

cache, flushing

649

connections

486

creating synonyms to

620

creating, Oracle

397

editor, IBM DB2 Z/OS

485

editor, IBM LUW

467

editor, Oracle

546

freeing

650

rebinding

667

see also objects, database

suuport for

218

packet size

88

Pad Index setting

517 ,

520 ,

527

Page Fetch Pairs setting

465 ,

468

,

484 ,

488 ,

495

page settings tablespaces

475

Page Size tablespace setting

473

Page Writes package setting

485

pages locking

345

,

517

number of, table

491

Pages Reserved setting

528

paralellism, maximum degree of

344

,

350 ,

364

Parallel Degree setting

555

Parallel Execution index settings

540

Parallel Instances setting

555

Parallel Query Option materialized view logs

544 –

545

parallel query option

536

Parameter CCSID setting

264

Parameter Style setting

264

,

463

parameterized literals

724

parameters configuration DB2 LUW databases

462

external functions

317

318

functions, DB2

464

methods, DB2 LUW

472

procedures, DB2 Z/OS

489

procedures, IBM LUW

468 ,

504

style option

472

parent_path_locator

359

Parsed Size setting

539 ,

549

packages

547

RAPID SQL 8.6/XE5 USER GUIDE

partition functions creating, SQL Server

347

object support summary

220

referencing scheme

349

,

359

partition scheme referencing index

345 ,

360

partition schemes creating, SQL Server

348

next used filegroup

659

object support summary

221

Partition Type index setting

541

,

548 ,

562

,

571

range-

305

Partitioning

415

Composite

415

Hash

415

List

415

Range

415

partitions editing in DB2 Z/OS tables

491

for materialized query tables

466

indexes

SQL Server

345 ,

360

indexes, Oracle

541

primary keys, Oracle

548

tables, DB2 LUW

473

tables, Sybase

577

tablespace

305

truncate operation

708

unique keys, Oracle

562

password

Oracle columns

413

password, Developer Network

18

passwords changing

602

database links, associated

538

expired

427

profile limits

550

user, Oracle

563

paster end of line options

111

path, database device default

141

paths full-text catalogs

341

Oracle directory object

538

trigger functions

476

,

494

PDS Name package setting

485

Percent Free primary key setting

488

Percent Free setting

540 ,

556 ,

562

percent free, extents

537 ,

544

Percent Free,/Used setting

545

Percent Increase setting

540

,

545 ,

556

,

562

percent increase, extents

537

percent increase, materialized views extents

544

percent used, extents

537 ,

544

INDEX

Performance Center client option

120

connectivity options

120

identifiers

120

options/preferences

87 ,

120

PERIOD... clauses

279

permanent generation size

117

Permissions

Cascading

798

Explicit

798

Using Roles to Grant

799

Using Roles to Revoke

799

permissions

DBA/data dictionary

103

Permissions Management

798

PH1

600

Piece Size index setting

484 ,

494

Piece Size primary key setting

488

PL/SQL Profiler

1035

Functionality

1037

Clear Profile Table

1041

Flush

1038

Run Detail

1039

Run Summary

1039

Start

1037

Stop

1043

Unit Detail

1042

Advanced View

1043

Unit Summary

1040

Requirements

1036 –

1037

Using

1044

Sample Session

1045

placement, databases

567

plans editor, IBM DB2 Z/OS

486

rebinding

668

see also objects, database

platforms restricting

126

population status object action

662

port numbers

Performance Center

120

precision function parameters

483

parameters, DB2 functions

464

precision, function parameters

483

Precompile Timestamp package setting

485

precomplie options

601

preferences code analyst

92

preferences (application)

86

Prefetch Size setting

475

Prefetch Strategy setting

436

,

571 ,

576

prelink options

601

prepare batch query option

768 –

771

,

773 ,

776

,

778

prepared statements

724

RAPID SQL 8.6/XE5 USER GUIDE 1150

INDEX primary keys creating, DB2 z/OS

296

creating, InterBase

321

creating, MySQL

371

creating, Oracle

398

creating, Sybase

439

deallocating unused space

627

editor, IBM LUW

467

editor, InterBase

502

editor, MySQL

532

533

editor, Oracle

547

editor, SQL Server

519

editor, Sybase

572

editor, z/OS

487

see also objects, database

support for

222

table, DB2 LUW

474

,

506

Primary Space Allocation

488

prinmary keys creating, DB2 LUW

270

private key, certificate

334

private SGA

550

Privileges

Deny Privileges From

801

Grant Privileges

799

Revoke Privileges To

800

Procedures

224

procedures alarms/thresholds, time comsumption

93

building

601

creating for Oracle

400

creating synonyms to

620

creating, DB2 LUW

271

creating, DB2 z/OS

298

creating, InterBase

322

creating, Oracle

400

creating, SQL Server

350

creating, Sybase

440

editor, IBM DB2 Z/OS

488

editor, IBM LUW

468 ,

503

editor, Oracle

549

editor, SQL Server

521

editor, Sybase

573

extract options

202

,

226

hiding source text

652

job queue

387

see also objects, database

PROD category

168

Product Design

31

Profiler

Setting Up

1036

profiles creating, Oracle

401

editor, Oracle

549 ,

551

see also objects, database

support for

226

Sybase logins

437

user-associated

563

1151 profiling level, code analyst

92

programs creating

403

editing

550

enabling/disabling

637

project management

Explorer tab

162

Projects

Adding Database Objects

814

Adding Files

818

Build Order

813

Closing

812

Creating

803

Creating From a Database

804

Creating From a Version Control Project

809

Creating From Existing Files

808

Creating Without Initialization

810

Executing Files

817

File Properties

822

Management

802

New Project

803

Opening a File

819

Opening a Recent Project

811

Opening an Existing Project

811

Project Management

802

Properties

821

Setting the Build Order

813

Subproject Properties

823

Subprojects

819

Creating

819

Deleting

820

Renaming

821

Sorting

821

Working with

810

PROVIDER_KEY_NAME

333

,

356

proxy tables creating

430

resynchronizing

694

PRUNE set integrity option

698

public, database device

538

published

335 ,

512

purge recycle bin action

662

purge recycle bin entry action

664

purging, recycle bin

664

Q

QA category

168

Qualifier package setting

485

queries builder options

121

optimization for views

479

optimization, DB2 LUW views

478

optimization, MQTs

466

options, introduced

766

options, setting

767

options, when sent

767

query optimization, table refresh

673

RAPID SQL 8.6/XE5 USER GUIDE

Query Buiilder

Auto Join options

121

code generation options

121

display/style options

121

execution options

121

syntax check options

121

INDEX

RAPID SQL 8.6/XE5 USER GUIDE 1152

INDEX

Query Builder

Adding a Join

888

Auto Join Properties

867

Auto Joins

890

Auto Layout

890

Building a CREATE VIEW Statement

880

Building a DELETE Statement

879

Building a Query

875

Building a SELECT Statement

876

Building an INSERT Statement

877

Building an UPDATE Statement

878

Column Properties

869

Creating a Clause

891

Creating a GROUP BY Clause

895

Creating a HAVING Clause

896

Creating a WHERE Clause

891

Creating an AND Clause

892

Creating an ORDER BY Clause

894

Design

862

Display Options

867

DML Tab

863

Editing Joins

888

Execution Properties

867

Explorer

862

General Properties

867

Getting Started

872

Inserting an AND or OR Clause

893

Joins

886

Editing

888

Inner

886

Left Outer

887

Properties

870

Self

887

Keyboard Commands

865

Moving Additional Tables to the SQL Diagram

Pane

883

Moving Columns in the SQL Statement Tree

898

Moving Tables

882

Moving Tables and Columns in the SQL Statement

Tree

898

Moving Tables and Views

883

Moving Tables in the SQL Statement Tree

898

Opening Queries

900

options/preferences

87

Removing a Join

888

Results Tab

864

Saving Queries

900

Saving Queries as XML

900

Schema Change Detection

900

Selecting a Statement

873

Selecting ALL Columns

885

Selecting an Instance or Database

872

Selecting Columns

874

Selecting Columns in the SQL Diagram Pane

874

Selecting Columns in the SQL Statement Tree

874

Selecting DISTINCT Columns

885

Selecting Tables

882

Setting Column Properties

869

setting options/preferences

121

SQL Diagram Pane

863

SQL Statement Pane

863

SQL Tab

864

Statement Properties

866

Subqueries

898

Syntax Checker

899

Table Properties

868

Table Shortcut Menus

865

Tables in the SQL Diagram Pane

882

Tables/Views Tab

863

Toolbar

864

Using

871

Using Data Editor with Query Builder

901

View Properties

868

Working with Tables in the SQL Diagram Pane

882

Workspace Window Options

862

Query Optimization package setting

467

Query Plan Facility

765

query plans default display type

106

default layout

106

query rewrite, materialized views

543

QUERY_PLAN_... options

778

QUERY_ROWS_RETURNED_LIMIT

778

QUERY_TEMP_SPACE_LIMIT

778

QUERY_TIMING

778

quick option, check tables

608

quick option, checksum tables

610

quick option, repair tables action

691

quiesce database action

665

quiesce instance action

665

quotas, user

558

quoted identifier

335 ,

512

quoted identifiers

88

QUOTED_IDENTIFIER

777

R range partition functions

348

range partitions

577

range-hash/list composite

571

read access materialized query tables

673

read only

335 ,

431 ,

512

reads logical

550

READS SQL DATA function setting

468

reassign by category object action

666

rebalance object action

667

REBIND

601

rebind package

667

rebind plans

668

REBUILD

601

rebuild

InterBase indexes

671

SQL Server objects

671

rebuild full-text catalogs action

668

rebuild outlines object action

672

recompile object action

673

1153 RAPID SQL 8.6/XE5 USER GUIDE

recompute statiistics

517

records maximum length

491

recover tables operation

647

Recovery Status setting

475

recursive triggers

335

,

512

recycle bin displaying contents

228

enabling/disabling

640

flashback (recover) tables

647

object support summary

228

puging tables/indexes

664

purge options

662

purging entire

662

status of

640

redo log groups

see also objects, database

Reduce option, tablespaces

656

reducing a container

475

REF CURSOR

Display in ISQL Window

716

Refresh Method materialized view setting

543

refresh table object action

673

refresh, materialized query tables

466

registration code

18

registration, product

18

registry datasource storage

95

feature lockdown

126

regular expressions browser filtering

39

introduced

742

Release Bound package setting

485

Rely primary key setting

547

Rely unique key setting

561

remote servers

see also objects, database

RENAME trigger event

422

rename action style

104

Reoptvar package setting

485

reordering parameters

464

REORG, ADMIN_MOVE TABLE

658

reorganize

SQL Server objects

677

reorganize full-text catalogs action

679

Reorganize Tablespace

684

repair tables object action

691

REPEAT_INTERVAL attribute

407

Replacement Strategy setting

556

REPLAY, ADMIN_MOVE TABLE

658

replication check constraints

511

materialized view logs

545

Reserve Page Gap setting

436 ,

571

,

573 ,

576

Reserved Psges setting

517 ,

520

,

571 ,

573 ,

579

Resize

791

resizing a container

475

Resource Release package setting

485

RAPID SQL 8.6/XE5 USER GUIDE restart sequence

693

restart sequence action

693

RESTART WITH argument

693

RESTARTABLE attribute

388

restore point

648

RESTRICT delete/update rule

463

RESTRICT WHEN DELETE TRIGGERS clause

709

RESTRICT,MySQL foreign key

370

RESTRICTdelete rule

482

RestrictDrop setting

473

RestrictDrop table setting

491

Result Sets

Closing

785

Editing

786

Formatting

792

Mailing

783

Saving

785

Saving as XML

785

results (ISQL) options

122

Results Editor

780

Closing a Result Set

785

Closing a Result Window

784

Configuring

780

Editing Result Sets

786

Exporting Data

783

Mailing a Result Set

784

Multiple Result Sets

781

One Attached Tab Window

781

One Separate Unattached Window

782

Opening Result Files

740

Read-only Mode

783

Renaming a Result Window

784

Saving Results

785

Separate Unattached Windows

781

Single Result Sets

782

Status Bar

783

Results editor type support

797

results window grid options

104

options/preferences

87

results, SQL format options

123

window/file/set options

122

resynchronize object action

694

return values

MySQL functions

371

returns column, DB2 functions

464

scalar, DB2 functions

464

returns, functions

482

reuse max, password

550

REUSE STORAGE clause

709

reuse time, password

550

Reverse index setting

540

Reverse primary key setting

547

reverse scans, indexes

465

Reverse unique key setting

561

INDEX

1154

INDEX

REVOKE trigger event

422

Right Outer Joins

887

RIGHT, partition function range

348

Roles

228

roles activating/deactivating

694

assigned to logins

517 ,

572

assigning to users

528

creating, Oracle

404

creating, SQL Server

352

Data Dictionary usage

104

editor, SQL Server

504

see also objects, database

rollback segments creating, Oracle

405

editor, Oracle

552

see also objects, database

shrinking

702

rollbacks, materialized views

543

roundrobin partitions

577

row lenght, average

491

Row Compression setting

473

row count

776

Row Movement property and shrink operation

703

Row Movement setting

555

Row Organization setting

555

ROWPAGES

576

rows locking

345

,

517

total in table

491

trigger type

421

RSA_212/1024/2048

333

rule binding

529 ,

579

Rules

230

rules creating, SQL Server

352

creating, Sybase

441

editor, SQL Server

522

hiding source text

652

see also objects, database

Run Job object action jobs running

695

run job object action

695

run script with batch execution

776

runstats last

491

S

SALT, Oracle columns

413

save point function setting

468

scalar, return

464

1155 scale function parameter

483

parameters, DB2 functions

464

parameters, IBM LUW procedures

468 ,

504

Scale setting

491

schedule job queues

387

scheduler (Oracle) chains

185

jobs

210

programs

227

schedules creating

406

editing

553

support summary

231

Scheduling

ISQL Window Scripts

856

Microsoft Task Scheduler

856

schema associated triggers

421

copying

615

see also objects, database

schema object operation

696

Schema Path package setting

485

SCN

648

scratch database

430

Scratchpad Length setting

264

scratchpad option

472

Scratchpad setting

264

Scratchpad settings

463

screen tips

47

Script Execution Facility

Using

853

Script Files

736

Inserting Files

738

scripts query options

766

Secondary Space Allocation

488

Security Policy setting

473

Segment Name setting

436

,

571 ,

573 ,

576

Segment setting

579

segmented tablespaces

305

segments creating, Sybase

442

editor, Sybase

574

extending

442

LOB column usage

556

object creation warnings

125

placing indexes/tables

661

see also objects, database

support for

232

Select * From operation

696

select into/bulkcopy/pllsort

335 ,

431 ,

512

semantic validation options/preferences

115

RAPID SQL 8.6/XE5 USER GUIDE

sequences alias creation shortcut

616

creating synonyms to

620

creating, Oracle

407

creating, SQL Server

354

editing, SQL Server

523

editor, IBM LUW

469

editor, Oracle

553

restarting

693

see also objects, database

support for

233

sequencess restarting

693

Sequential Pages setting

465

,

468 ,

477

,

484 ,

488 ,

495

serial number

18

Server Messages

33

server roles adding logins

347

SERVERERROR trigger event

422

servers connection options/preferences

88

disconnecting

155

trouble-shooting connections

155

sessions activating/deactivating roles in

694

defining profile limits

550

sessions Per User setting

550

SET "_recyclebin"=

640

SET DEFAULT update/delete rule

515

set integrity object operation

697

SET NULL delete rule

463

SET NULL update/delete rule

515

SET NULL, MySQL foreign key

370

SET NULLdelete rule

482

set online/offline object operation

699

SET ROLE

694

set statistics action

700

set undo object operation

701

set... options defaults, SQL Server

109

defaults, Sybase IQ

108

shadows creating, InterBase

323

editor, InterBase

505

support for

234

shortcut code templates

917

shortcuts

47

Show Only My Objects default settings

101

Show System Objects default settings

101

SHOW_STATISTICS DBCC option

624

SHOWCONTIG DBCC option

624

shrink object operation

701

Shrinks setting

552

single user

335

,

431 ,

512

single user database

431

size user datatype

579

Size setting

491

Smart Docking

47

SMTP encoding

124

notification identifiers encoding

SMTP email

124

options/preferences

87 ,

124

Sort in Tempdb setting

517

sort order indexes, InterBase

320

sort, index setting

540

sorting index columns

465 ,

484

index option

540

Source SIze setting

539

packages

547

Source Size setting

549

source text, hiding

652

sp_addalias

438

sp_addsegment

442

sp_addsrvrolemember

347

sp_adduser

438

sp_changedbowner

438

sp_dbextend

442

sp_dboption

431

sp_hidetext

652

sp_iqhelp procedure

660

sp_rename action style

104

sp_sequence_get_range

523

sp_tempdb bind

600

sp_tempdb unbind

709

space clusters

536

deallocating unused

627

space utilization clusters

537

spacing. See style

special registers

463 ,

468

specific name, methods, DB2 LUW

472

SQL bind variable parameterization

724

logging options

118

method type, DB2 LUW

472

parameter style

472

preprocessing/compiler directives

718

query options

766

script directory

100

See also debugger, SQL

SQL * Loader directory

120

SQL Access Level setting

463

,

468

INDEX

RAPID SQL 8.6/XE5 USER GUIDE 1156

INDEX

SQL Editor

716

Closing a Query Window Tab

745

Closing a Script

748

Editing a Script

749

Executing Scripts

759

Goto

743

ISQL Windows

723

Navigating

743

Opening DDL Editors

736

Opening Script Files

736

Opening SQL Windows

723

Renaming a Query Window Tab

745

Saving a Script

747

Windows

739

Splitting

739

SQL Error package setting

485

SQL Scripting

716

DDL Editor

735

Results Editor

780

SQL Editor

716

SQL Server trouble-shooting connectivity

157

SQL Warn/Math Warn package setting

467

SQL Windows

723

Find and Replace

740

Replacing

742

Searching

740

SQL_FLAGGER_ERROR_LEVEL

777

SQL_FLAGGER_WARNING_LEVEL

777

SQL. See also results, SQL

staging tables

698

Start Database operation

704

start date certificate

334

START WITH argument

355

START_DATE attribute

407

statement triggers

421

statistics updating

710

Statistics Recompute setting

517 ,

520

,

527

statistics.computng, SQL Server indexes

517

status functions

539

libraries

543

packages

547

procedures

549

tablespaces

607

triggers

560 ,

603

status bar

ISQL default

111

Status package setting

467

STATUS, check tables results

608

STATUS, repair tables results

691

Stay Resident procedure setting

489

Step Execution Facility

764

step values

713

stogroups creating, DB2 z/OS

300

editor, IBM DB2 Z/OS

489

see also objects, database

specified in tablespace

305

Stop database operation

704

Stop Job object action jobs stopping

705

STOP_ON_WINDOW_CLOSE attribute

388

STOPLIST

342

storage engine

614

Storage Group database setting

481

Storage Group primary key setting

488

stored outlines changing categories

602

dropping by category

633

dropping unused

636

rebuilding

672

stored procedures java, loading

654

storge paths, dropping

632

String Delimiter package setting

485

STRING_RTRUNCATION

777

Structured Types

234

structured types adding/editing methods

471

editor, IBM LUW

470

see also objects, database

style aoto-indent

113

editor

112

ISQL window

113

syntax highlighting options

112

tabs to spaces

113

subject, certificate

334

Subpartition type index setting

541 ,

548 ,

562

,

571

subscribed

335 ,

512

subtypes, blob filters

314

SUID parameter

437

SUSPEND trigger event

422

SWAP, ADMIN_MOVE TABLE

658

switch online object operation

706

Sybase ASE trouble-shooting connectivity

155

version/connectivity support

14

Sybase IQ

Transact-SQL compatibility

776

symmetric keys creating, SQL Server

355

opening/decrypting

357

1157 RAPID SQL 8.6/XE5 USER GUIDE

synonyms creating

620

creating, DB2 z/OS

301

creating, Oracle

409

creating, SQL Server

358

editing, SQL Server

524

editor, DB2 Z/OS

490

editor, Oracle

554

see also objects, database

support for

236

syntax calendaring

388 ,

407

checking durng excute, ISQL

106

checking, Query Builder

121

Syntax Check

722

723

SYSDATE pseudocolumn

413

SysEntries package setting

485

SYSTEM tablespace, default

697

system segment

579

segment name

576

system change number

648

system indexes support summary

237

System Required setting

465 ,

468

,

477 ,

484 ,

488

,

495

system tables support summary

237

SYSTEM tablespace object/user creation warning

125

system triggers support summary

238

T

Tab Menu

47

Table Status setting

491

Table Tablespace setting

466

Table Type setting

491

Tables

Moving Tables in the SQL Diagram Pane

882

tables

664

alias creation shortcut

616

allocating extents to

593

analyzing

596

associated triggers

421

check for errors

608

checksum

609

column summary

696

copying from existing

618

creating synonyms to

620

creating views from

620

creating, DB2 LUW

276

creating, DB2 z/OS

301

creating, InterBase

325

creating, Oracle

410

creating, SQL Server

359

creating, Sybase

443

deallocating unused space

627

default segment warning

125

deleting statistics

628

disabling keys

630

dropping clone

633

dropping unused columns

636

editor, DB2 LUW

472

editor, DB2 Z/OS

490

editor, InterBase

505 ,

507

editor, MySQL

533

editor, Sybase

575

enabling keys

640

estimating size

641

exchange data, clone

643

extracting data as XML.XML

extracting data as

646

flashback

648

flushing

650

hiding source text

652

locking

655

moving between tablespaces

658

optimizing

660

partitioning for Oracle

415

recompiling

673

recover from recycle bin

647

repairing

691

see also objects, database

segment placing

661

selecting all data from

696

shrinking

703

storage engine

614

support for

239

temporal

279

truncating

707

updating statistics

710

Tablespace Buffer Pool database setting

481

INDEX

RAPID SQL 8.6/XE5 USER GUIDE 1158

INDEX tablespaces and dropping storage paths

632

and materialized views

544

changing status

607

coalescing

610

creating, DB2 LUW

280

creating, DB2 z/OS

304

creating, Oracle

417

database placement

462

default, setting

697

editor, DB2 LUW

475

editor, DB2 Z/OS

492

editor, Oracle

557

extent details

559

for materialized query tables

466

in indexes

540 ,

556

in unique keys

562

index creation warning

125

lowering high water mark

656

materialized view logs

545

moving tables between

658

object creation warnings

125

primary key settings

548

purge recycle bin options

662

rebalancing

667

see also objects, database

segment management

559

set undo action

701

support for

242

switching online

706

user default/temporary

563

user quotas

558

tabs to spaces

113

Task Scheduler

856

Technical Requirements

12

Hardware

12

Operating System

12

technical requirements database

14

templates

code. See Code Template feature

temporal tables

279

temporary databases

600 ,

709

temporary databases, Sybase

430

temporary offline mode

607

temporary tables automatic creation/deletion, extract

202 ,

226

TEXT unicode support, Data editor

905

unicode support, Results editor

797

Text Files

Importing

912

The

602

Threadsafe function setting

463 ,

468

Threadsafe setting

264

thresholds free space, segments

442

segment hysteresis

574

segments

574

thresholds/alarms code analyst

92

time formats data editor

93

time-based settings profile limits

550

timeouts server connection/query

88

Timestamp package setting

485

timing, trigger

526

timing, triggers

560

tining, triggers

476

Toggle

717

Token Matching Capability

779

toolbars hiding/displaying

47

ISQL default

111

options/preferences

110

111

preferences

47

Tools

Data Editor

902

Database Search

850

Embarcadero Products

915

File Execution Facility

852

Find in Files

849

Query Builder

861

Scheduling

856

Script Execution Facility

852

Visual Difference

857

torn page detection

335 ,

512

Total Keys setting

465 ,

468 ,

477 ,

484

,

488 ,

495

Total Pages Modified setting

517 ,

520

,

528

Total Rows Modified Since Last setting

528

Total Sections package setting

467

transaction log files

512

attaching

596

detaching

628

Transact-SQL compatibility

776

transfer ownership

706

Transfer Rate setting

475

transparent data encryption

413

1159 RAPID SQL 8.6/XE5 USER GUIDE

triggers adding login

592

alarms/thresholds, time comsumption

93

changing status

603

columns firing, Oracle

422

creating, DB2 LUW

281

creating, DB2 z/OS

306

creating, InterBase

327

,

330

creating, Oracle

421

creating, SQL Server

362

dropping login

635

editor, DB2 Z/OS

493

editor, IBM DB2 LUW

476

editor, Oracle

559

editor, SQL Server

526

editor, Sybase

578

enabling/disabling

604

events

476 ,

494

firing events, Oracle

422

function path

476 ,

494

hiding source text

652

login

572

see also objects, database

support for

243

support for, summary

243

timing

476

,

494

type

476

,

494

trouble-shooting, connections

155

trunc log on chkpt

335

,

431 ,

512

TRUNCATE trigger event

422

truncate object operation

707

TSQL_VARIABLES

777

type columns, DB2 z/OS

491

Oracle columns

412

user datatype

579

Type Bodies

245

type bodies editor, Oracle

560

types alarms/thresholds, time comsumption

93

editor, Oracle

561

parameters, DB2 functions

464

parameters, IBM LUW procedures

468 ,

504

sequences, IBM LUW

469

triggers

560

U

UI

Setting Appearance

47

Setting Classic Microsoft Office 97 style

47

Setting Microsoft Office 2003 style

47

Setting Microsoft Office XP style

47

UID pseudocolumn

413

unbind from temporary database action

709

unbinding logins from

709

UNCHECKED set integrity option

698

RAPID SQL 8.6/XE5 USER GUIDE

UNICHAR unicode support, Data editor

905

unicode support, Results editor

797

Unicode support

Data editor

904

Results editor

797

unique

465

indexes, InterBase

320

unique auto_identity index setting

431

unique index type

540

unique keys

476

creating, DB2 z/OSS

307

creating, InterBase

323

,

328

creating, MySQL

371

creating, Oracle

423

creating, SQL Server

364

creating, Sybase

446

deallocating unused space

627

editor, InterBase

507

editor, MySQL

532

533

editor, Oracle

561

editor, SQL Server

527

editor, Sybase

578

editor, z/OS

494

see also objects, database

support for

246

table, DB2 LUW

474 ,

506

unique setting indexes

465

UNITEXT unicode support, Data editor

905

unicode support, Results editor

797

UNIVARCHAR unicode support, Data editor

905

unicode support, Results editor

797

range-

305

Unlimited Max Size setting

512

unload data default directory

94

unnamed variables

724

unquiesce object operation

709

unregistering datasources

153

unused space, deallocating

627

update rule

515

UPDATE statements triggers, Oracle

422

UPDATE STATISTICS

628

update statistics object action

710

UPDATEs trigger firing on

526

UPDATEUSAGE DBCC option

624

URLs

ER/Studio Portal

87

usage user datatypes

579

use FRM file option, repair tables action

691

USE statements

DDL extract options

97

USE_CURRENT_SESSION attribute

695

INDEX

1160

INDEX

Used Pages setting

517

,

520 ,

528

,

571 ,

573 ,

579

User Datatypes

247

user datatypes creating, DB2 LUW

283

creating, DB2 z/OS

310

creating, SQL Server

366

creating, Sybase

447

editor, DB2 LUW

477

editor, IBM DB2 Z/OS

495

editor, SQL Server

529

see also objects, database

user ID, Developer Network

18

user interface preferences

47

user messages creating, SQL Server

365

creating, Sybase

448

editor, SQL Server

529

see also objects, database

support for

248

USER pseudocolumn

413

USER views

104

users alias definition

566

assigned to logins

517 ,

572

assigning to groups

570

,

581

assigning to profiles

549

changing password

602

copying from existing

618

creating, DB2 LUW

284

,

311

creating, MySQL

375

creating, Oracle

426

creating, SQL Server

366

creating, Sybase

450

database links, associated

538

editor, DB2 Z/OS

495

editor, IBM DB2 LUW

478

editor, MySQL

534

editor, Oracle,editors users, Oracle

563

editor, SQL Server

528

editor, Sybase

581

extracting logins with

97

hiding source text

652

profile assigment

551

purge recycle bin options

662

quiescing database to

665

quiescing instance to

665

role assignment

504

505

see also objects, database

support for

249

tablespace quotas

558

utility, start database option

704

V

Valid package setting

485

Validate index constraint status

547

Validate package setting

485

Validate unique key setting

561

validation, bind packages

599

ValidProc table setting

491

VARCHAR unicode support, Data editor

905

unicode support, Results editor

797

varchar unicode support, Data editor

905

unicode support, Results editor

797

VARCHAR2 unicode support, Data editor

905

unicode support, Results editor

797

variables bind

724

VC Files Tab

Closing

835

Opening

835

VC Files Tab Functionality

833

VCAT

305

VCAT Catalog primary key setting

488

verify function, password

550

VERIFY, ADMIN_MOVE TABLE

658

Version Control

826

Adding Files to Version Control

830

Basics

831

Checking In Projects or Files

839

Checking Out Projects or Files

837

Collapse All

846

Delete

835

Expand All

845

Getting Latest Version

836

Integrating with Merant/Intersolv PVCS Version

Manager

827

Integrating with Microsoft Visual SourceSafe

827

Integrating with MKS Source Integrity

828

MKS Source Integrity

828

Open

835

Properties

845

Refresh

846

Removing a Project or File

844

Removing a Project or File from Version Control

844

Sort

835

Undoing a Check Out

840

VC Files Tab

832

Viewing File Differences

842

Viewing History

842

Visual SourceSafe

827

Working with Files

830

version control

Explorer tab

162

options/preferences

124

view creating, Sybase

451

1161 RAPID SQL 8.6/XE5 USER GUIDE

INDEX views alias creation shortcut

616

associated triggers

421

column summary

696

creating from a table

620

creating synonyms to

620

creating, DB2 LUW

284

creating, DB2 z/OS

311

creating, Oracle

427

creating, SQL Server

367

editor, DB2 LUW

478

editor, DB2 Z/OS

496

editor, Oracle

564

editor, SQL Server

530

editor, Sybase

581

hiding source text

652

query optimization

479

see also objects, database

support for

252

update statistics, DB2 LUW

712

updating statistics

710

virtual columns

412

virtual machine options, Java

117

Visual Difference

Comparing Files

857

Navigating

859

Opening

857

Options

860

Printing

859

Searching

860

visual style

47

Volatile setting

473

Volatile table setting

491

Volatile, materialized query tables

466

W

Waits setting

552

WARNING, check tables results

608

WARNING, repair tables results

691

Warnings options/preferences

87

warnings options/preferences

125

Query Builder options

121

WHAT argument, job queue

387

Windows

SQL Server logins

346

Windows authentication

140

WITH ALGORITHM

333

WITH DEFAULT_LOCATION clause

430

WITH DURABILITY= parameter

431

WITH OVERRIDE

430

WITH PASSWORD

356 –

357

WITH PRIVATE KEY

334

WITH PRIVATE KEY clause

597

WITH SCRATCH_DATABASE

430

WITH SUBJECT

334

Without Login setting

528

RAPID SQL 8.6/XE5 USER GUIDE 1162

INDEX wizards blob filters

313

domains

314

exceptions

315

316

external functions

317

functions, Sybase

434

generators

319

wizards, default directories

99

WORKFILE database type

305

Wraps setting

552

write access materialized query tables

673

Writes setting

552

X

XML

785

type support, Data editor

904

type support, Results editor

797

xmltype viewing as CLOB

106

1163 RAPID SQL 8.6/XE5 USER GUIDE

advertisement

Related manuals