Top Banner
Oracle Installation and Configuration for Topobase
123

and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Sep 01, 2018

Download

Documents

vuongtram
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Oracle Installation

and Configuration

for Topobase

Page 2: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

<Table of Contents - ii

© 2009 Autodesk, Inc. All rights reserved. NOT FOR DISTRIBUTION. The contents of this guide were created for Autodesk Topobase version 2010. The contents of this guide are not intended for other versions of Autodesk Topobase.

Page 3: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

<Table of Contents - 1

TABLE OF CONTENTS

Table of Contents ...............................................................................................................................1 Introduction ......................................................................................................................................4

Course Objectives ..................................................................................................................................... 4 Prerequisites ............................................................................................................................................. 4

Installing and Configuring Oracle ........................................................................................................5 Objectives .................................................................................................................................................. 5 Topobase 2010 .......................................................................................................................................... 5

Topobase Client .................................................................................................................................... 5 Topobase Administrator ....................................................................................................................... 5 Topobase Web ...................................................................................................................................... 6

Oracle Database ........................................................................................................................................ 6 System Requirements ............................................................................................................................... 6

Autodesk Topobase Administrator Requirements ............................................................................... 6 Autodesk Topobase Database Server Hardware and Software Requirements .................................... 7 Autodesk Topobase Client Hardware and Software Requirements ..................................................... 8

Oracle Software Installation...................................................................................................................... 9 Exercise: Installing the Oracle Software on the Database Server ............................................................. 9 Exercise: Patch Installation ..................................................................................................................... 15

Database Creation and Configuration ............................................................................................... 20 Objectives ................................................................................................................................................ 20 Basics ....................................................................................................................................................... 20

Oracle Database and Instance ............................................................................................................ 20 Service Name ...................................................................................................................................... 21 Session ................................................................................................................................................ 22 Listener ............................................................................................................................................... 22

Memory ................................................................................................................................................... 23 System Global Area ............................................................................................................................. 23 Database Buffer Cache........................................................................................................................ 24 Redo Log Buffer .................................................................................................................................. 24 Shared Pool ......................................................................................................................................... 24 Recommendations: Memory Size ....................................................................................................... 25

Processes ................................................................................................................................................. 26 Background Processes ........................................................................................................................ 26

Accessing Data ........................................................................................................................................ 27 Storage Architecture ............................................................................................................................... 29

Physical Structures .............................................................................................................................. 29 Logical Structures ................................................................................................................................ 30 Managing Tablespaces ........................................................................................................................ 31 Recommendations: Tablespaces ........................................................................................................ 32

Performance and Scaling the Database Server ....................................................................................... 34 The Performance Balance ................................................................................................................... 34 Scaling the Database Server ............................................................................................................... 35

Initialization Parameters ......................................................................................................................... 37 Parameters .......................................................................................................................................... 37

Page 4: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

<Table of Contents - 2

List of Parameters ............................................................................................................................... 38 Querying Parameters .......................................................................................................................... 39 Changing Parameters .......................................................................................................................... 40

Creating the Database............................................................................................................................. 40 Starting Up the Database ........................................................................................................................ 41 Shutting Down the Database .................................................................................................................. 41 Exercise: Configure Listener (listener.ora) .............................................................................................. 42 Exercise: Creating the Database ............................................................................................................. 47 Exercise: Configure Net Service Name (tnsnames.ora) .......................................................................... 69 Exercise: Configure sqlnet.ora ................................................................................................................ 73 Summary of Configured Files .................................................................................................................. 73 Exercise: Browse Database Structure ..................................................................................................... 74 Exercise: Create Tablespace .................................................................................................................... 75 Exercise: Edit Tablespace ........................................................................................................................ 79 Exercise: UNDO Advisor .......................................................................................................................... 82 Exercise: Organize All Tablespaces ......................................................................................................... 84 Exercise: Installing the Oracle Software on the Client ............................................................................ 85 Exercise: Creating a Text Initialization Parameter File ............................................................................ 90 Exercise: Create a Control File Script ...................................................................................................... 91 Exercise: Set Maximum Size of Memory (MEMORY_MAX_TARGET) ..................................................... 94

Installing Topobase Administrator .................................................................................................... 96 Objectives ................................................................................................................................................ 96 Setup ....................................................................................................................................................... 96 Topobase Server Administrator .............................................................................................................. 96

About TBSYS ........................................................................................................................................ 96 About TBMAIN .................................................................................................................................... 97 About MDSYS User .............................................................................................................................. 97 Create TBSYS ....................................................................................................................................... 97 TBSYS Oracle Rights ............................................................................................................................ 98

Exercise: Install the TBSYS User .............................................................................................................. 99 Oracle Tools ................................................................................................................................... 102

Objectives .............................................................................................................................................. 102 Oracle Enterprise Manager and Database Console .............................................................................. 102

Login .................................................................................................................................................. 102 Home Page ........................................................................................................................................ 103 Related Links ..................................................................................................................................... 105 Server Page ....................................................................................................................................... 105 Schema Page ..................................................................................................................................... 106

SQL *Plus ............................................................................................................................................... 106 Login .................................................................................................................................................. 106

SQL Developer ....................................................................................................................................... 107 Login .................................................................................................................................................. 107 Browsing a Table ............................................................................................................................... 108 SQL Worksheet ................................................................................................................................. 109

SQL Sheet .............................................................................................................................................. 110 Login .................................................................................................................................................. 110 Main Window.................................................................................................................................... 111 Tables ................................................................................................................................................ 112

Page 5: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

<Table of Contents - 3

Users ................................................................................................................................................. 113 Tools .................................................................................................................................................. 114 SQL Spy.............................................................................................................................................. 114 Scripts................................................................................................................................................ 115

Troubleshooting ............................................................................................................................ 116 Lesson: TNS: no listener ........................................................................................................................ 116

Appendix A .................................................................................................................................... 117 Lesson: Installing the Loop Back Adapter ............................................................................................. 117 Lesson: How to Download the Latest Patches in Metalink ................................................................... 119

Appendix B .................................................................................................................................... 121 Answers to Exercise: Creating a text initialization parameter file: ................................................... 121

Page 6: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Introduction - 4

INTRODUCTION

This course will guide you in the installation and configuration of the database server. You will understand all the components of the database, and you will learn how to create it with the correct settings. In this course you will become familiar with the terminology and with the use of the tools to administer the database. You will learn how to scale the server and the memory.

Course Objectives

After completing this course, you will be able to:

Describe the components of Autodesk Topobase 2010

Install the Oracle software and latest patch in the database server

Identify the instance and its components

Describe the memory structures, background processes, and logical and physical structures of the database

Scale the database server and configure all the files required by both server and client

Create a database with the appropriate settings and manage the tablespaces

Size the memory

Install the Topobase system user

Become familiar with the tools used to query and administer the database

Prerequisites

It is recommended that you have a working knowledge of:

SQL

Page 7: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing and Configuring Oracle - 5

INSTALLING AND CONFIGURING ORACLE

In this chapter you will review the components of Autodesk Topobase 2010. You will also learn the steps to install the Oracle software and patch in the database server.

Objectives

After completing this chapter you will be able to:

Describe the components of Autodesk Topobase 2010

Install the Oracle software in the database server

Install the latest patch in the database server

Topobase 2010

Autodesk Topobase integrates geospatial design and management data for infrastructure and utilities. It centralizes engineering and asset data and provides access and management of this information through desktop software and web-enabled applications. This improves the efficiency and accuracy of the information by eliminating the need to duplicate data across multiple departments and groups.

Topobase is designed to use Oracle as the centralized data store with data access performed through Topobase Client and Topobase Web. Management of Topobase is performed through Topobase Administrator.

Topobase 2010 includes pre-configured data models for specific utility domains, such as water, waste water, electrical and cadastral systems. These modules provide a pre-defined data model that can be customized for customer-specific purposes.

Topobase Client

Topobase Client is a desktop tool based on Autodesk Map 3D. It is used to create, edit and plot infrastructure data. It also provides analysis functions and reporting functions.

Topobase Administrator

Topobase Administrator is a desktop management application used to configure and manage Topobase. It allows administrators to create and edit user and user groups, manage Topobase permissions and access levels to data. It also enables administrators to create, configure and customize utility data models that are used by Topobase Client and Topobase Web.

Page 8: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing and Configuring Oracle - 6

Topobase Web

Topobase Web enables the sharing of geospatial data to users with access to a web browser, such as Microsoft Internet Explorer and Mozilla Firefox. Users can use Topobase Web as a lightweight data access and editing tool for mapping data and allows full access to all workflows, long transactions, and topologies.

Oracle Database

Oracle is a commercial relational database management system (RDBMS). While commonly used in a wide range of industries, it is also used in many GIS applications due to its ability to store, analyze and share both attribute and spatial data. Topobase Client, Topobase Administrator and Topobase Web store both spatial and attribute feature data within Oracle. Oracle provides the advantage of storing spatial and attributes data in a single data store, unlike many file-based GIS products in which spatial and attribute data are stored in separate files.

Topobase defines a data model in Oracle to structure the feature data as Oracle tables and columns. Topobase also stores system information, such as metadata for the data model and customizations made to Topobase forms. User and user group configuration for Topobase security is also stored within the Topobase system tables.

System Requirements

Autodesk Topobase Administrator Requirements

Hardware/Software Requirement Notes

Operating System Windows XP Professional SP2, with .NET Framework 2.x

Windows Vista Business

Web Brower Microsoft Internet Explorer 6.0, Service Pack 1, or later

Processor Intel® Pentium® IV processor, 3 GHz or faster or compatible

(Minimum: Intel Pentium III or later, with 1.6 MHz or faster processor or compatible)

RAM 1GB

Graphics Card 1024x768 VGA with True Color (minimum)

Page 9: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing and Configuring Oracle - 7

Open GL-compatible 3D video card (optional)

Hard Disk 5GB Free Disk Space

Pointing Device Mouse, trackball or other device

DVD Drive Any speed (for installation)

RDMBS Client Oracle Database 10g Client Release 2 Administrator

Oracle Database 11g Client Release 1 Administrator

Oracle client administrator should be installed. Do not install Instant or Runtime clients.

If you want to use 3D-enabled documents, you will need to install Oracle Database 11g.

Autodesk Topobase Database Server Hardware and Software Requirements

Hardware/Software Requirement Notes

Operating System Any operating system for which Oracle 10.2 R2 (latest subversion) or 11g R1 (11.1.0.7.0) Standard Edition, Standard Edition One or Enterprise Edition are certified.

RAM 2GB (depending on size of database)

Hard Disk 20GB free disk space (this varies depending on size of database)

DVD Drive Any speed (for installation purposes)

RDBMS Any supported operating systems for Oracle Standard Edition 10.2.X or greater

Standard One, Standard and Enterprise Editions of Oracle 10g or 11g

To support jobs/long

transactions – Oracle

Enterprise Edition (10g /

11g with the patch

11.1.0.7.0) is required

To support 3D -

Oracle11g + Spatial is

Page 10: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing and Configuring Oracle - 8

required

Autodesk Topobase Client Hardware and Software Requirements

Hardware/Software Requirement Notes

Operating System Windows XP Professional, SP2 or later; Windows Vista Enterprise, Business, or Ultimate, SP1 or later

32 bit Operating Systems only

Graphics card 1280 x 1024 32bit color (True Color), 128 MB or greater

For graphics cards that support Hardware Acceleration, DirectX 9.0c or later must be installed

Web Browser Microsoft Internet Explorer 6.0, Service Pack 1 (or later)

Microsoft Internet Explorer 7.0

Processor Intel® Pentium® IV processor, 3 GHz or faster or compatible

(Minimum: Intel Pentium III or later, with 1.6 MHz or faster processor or compatible)

RAM 2GB

Hard Disk 5 GB free disk space

Pointing Device Mouse, Trackball, or other device

DVD Drive Any speed (for installation purposes)

Other Software Microsoft Internet Information Server (IIS)

.Net framework 3.5 (provided)

Excel 2003 (or later) is required to use the Topobase Client Excel Import functionality

Word 2003 (or later) is required to use the Topobase Client Word

Page 11: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing and Configuring Oracle - 9

export functionality

Oracle Software Installation

The installation creates a home directory by default. In this course, the base home is C:\oracle.

Exercise: Installing the Oracle Software on the Database Server

1. From the installation DVD, execute setup.exe. The installation launches.

2. In the Select a Product to Install window, select Oracle Database 11g. Click Next.

3. In the Select Installation Method window, select Advanced Installation.

Select Installation Method Window

Page 12: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing and Configuring Oracle - 10

4. Click Next.

5. In the Select Installation Type window, select Enterprise Edition and click Next.

6. In the Specify Home Details window, click Browse and add a new folder called oracle. Retain the defaults in the Name and Path fields:

Name: OraDb11g_home1

Path: c:\oracle\product\11.1.0\db_1

7. Click Next.

Page 13: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing and Configuring Oracle - 11

8. The system checks the prerequisites for the installation. If the test fails, you must solve the problem before continuing. Note: For demo environments on a laptop, a loopback adapter must be installed before you can continue. See details in Appendix Lesson: Installing the loopback adapter.

9. Click Next.

Page 14: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing and Configuring Oracle - 12

10. It is recommended that you install the software first and then create the database. Select Install Software Only.

11. Click Next.

Page 15: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing and Configuring Oracle - 13

12. The components that will be installed are displayed.

13. Click Install. The installation process begins.

Page 16: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing and Configuring Oracle - 14

14. An End of Installation window is displayed when the installation is complete.

15. Click Exit.

16. Click Yes.

Page 17: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing and Configuring Oracle - 15

Exercise: Patch Installation

MetaLink (http://metalink.oracle.com) is the Oracle support site for Oracle registered customers. Using your MetaLink account, download the following patch:

11g Release 1 (11.1.0.7) Patch Set 1 for Microsoft Windows (32-Bit)

See Lesson: How to download latest patches in Metalink in the Appendix.

1. Execute setup.exe and follow the wizard to install the patch.

2. In the Welcome window, click Next.

3. In the Specify Home Details window, make sure that the right Name (OracleDb11g_home1) and Path are selected. If your server has more than one Oracle version, then you may have different Oracle home paths. If so, install this patch using the same home path that you specified in the Oracle 11g software installation.

4. Click Next.

Page 18: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing and Configuring Oracle - 16

5. Optionally, provide your email and MetaLink information.

6. Click Next.

7. The installer verifies the pre-requisites. Click Next.

Page 19: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing and Configuring Oracle - 17

8. The Summary window is displayed.

9. Click Install. An installation progress window is shown.

Page 20: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing and Configuring Oracle - 18

10. Next, the Configuration Assistants progress window is displayed.

Page 21: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing and Configuring Oracle - 19

11. Wait until the End of Installation window is displayed.

12. Click Exit to complete the patch installation process.

Page 22: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 20

DATABASE CREATION AND CONFIGURATION

This chapter covers the basic concepts for understanding the database and all its components—from the memory to the physical and logical structures. You will learn to create the database with the right settings, and configure all the necessary files in both server and client.

Objectives

After completing this chapter, you will be able to:

Identify the instance and its components

Describe the memory structures of the instance

Describe the background processes executed by the server

Explain the logical and physical structures of the database

Scale the database server

Configure all the files required by the server and client, such as the listener

Create a database with the appropriate settings

Create and edit tablespaces

Create backup for the server initialization file and for the control files

Size the memory

Basics

Oracle Database and Instance

An Oracle Database comprises the instance and the related databases.

The instance is the memory resident incarnation of a database. It is a set of memory structures and background processes that manage and access the database.

The database is composed of logical and physical structures. It contains the information of the system and the user data. The operating system can access the files of the database through the instance.

When the instance is started, Oracle associates it with a database; this is called mounting the database.

Page 23: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 21

Oracle Database

Service Name

A service name identifies a way of accessing an instance from outside the server. An instance can have many services or service names.

In the exercise at the end of this chapter you will configure the Net Service Name to identify an instance. You will use the Oracle Net Manager for the configuration. Note that the service name here is the same as the global database name.

Page 24: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 22

Session

On user login a connection is established between the user and the database instance and a user session is established. The session is the state of the user login and it will last until the user disconnects from the database.

Listener

The listener is a network component that establishes the connection from a client with the database. The listener establishes the appropriate connection, whether it is a dedicated or shared server.

When you configure the listener you must specify:

listener name

port, the default is 1521

host, this is the database server name

protocol, TCP/IP for a client/server network configuration

database service name, the listener can ‘listen’ to more than one database services

The listener configuration file (listener.ora) can be found in your {ORACLE_HOME}\NETWORK\ADMIN folder, in the course you can find it in C:\oracle\product\11.1.0\db_1\NETWORK\ADMIN

The listener can be configured with the Enterprise Manager, the Oracle Net Configuration Assistant or the Oracle Net Manager. The exercise in this chapter shows how to configure the listener using the Oracle Net Configuration Assistant.

You can also use the command line to start, stop or see the status of the listener.

cmd> lsnrctl start

cmd> lsnrctl stop

cmd> lsnrctl status

Page 25: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 23

Memory

There are two basic memory structures associated with the database instance:

System Global Area (SGA), this area contains mainly data and control information for the instance. This is a shared memory area used by all server and background processes. It is allocated when the instance is started.

Program Global Area (PGA), this area contains data and control information for a server or background process. The memory is not shared; it is allocated and used exclusively by each process.

System Global Area

The SGA consists of the following memory structures:

Database buffer cache, stores data retrieved from the database.

Redo log buffer, stores redo information used for instance recovery.

Shared pool, stores data structures that can be shared among users, such as SQLs, data dictionary information and others.

Large pool, this area is optional and can be used by large processes, such as backup and recovery operations.

Java pool, this area is used for Java code and data in the Java Virtual Machine (JVM).

Streams pool, it stores buffered queue messages and is used by Oracle streams.

SGA

Page 26: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 24

The SGA is a dynamic area, and the sizes of the memory structures change. Oracle can manage automatically the memory; you only need to set initialization parameters. Refer to the Oracle Performance for Topobase course for details.

Database Buffer Cache

This area stores data blocks retrieved from the data files on disk. When a user process requires data, it looks for the data in the database buffer cache. If the process finds the data (cache hit), it reads it directly from memory. If the data is not found (cache miss); the process has to read the data from disk and copy it to the buffer cache before it can process it. Accessing data in the memory is faster than accessing it from disk.

The buffers in the cache are managed by a least recently used algorithm (LRU) – how long the buffer is in the cache and how many times it has been accessed (touch count). Therefore, when data is read from disk, it is placed in the middle of the LRU list, and blocks move upwards in the list if the touch count grows, or downwards if the blocks in the buffer are not being used. If the memory is full, the buffers that are lowest in the LRU list are released to free space for new data blocks.

Redo Log Buffer

It holds redo information that can be used for recovery. The Oracle processes write redo entries into this area from the user’s memory space. The Log Write background process (LGWR) writes information from the redo log buffer into the active redo log file on disk.

Shared Pool

The shared pool is divided into the following areas:

The library cache, it contains the shared SQL area and a portion of the data dictionary tables.

The data dictionary cache, it contains information of the data dictionary – the system tables and views that describe the database structure and users. This cache stores data as rows instead of buffers.

The SQL query result cache, this area is optional and is available since Oracle 11g. Results of queries can be cached in this area; the next time the query is executed, the database can directly retrieve the results from the cache without executing the query. This can improve performance for queries that are being executed frequently.

PL/SQL function result cache, this area is optional and is available since Oracle 11g. This area can be used for PL/SQL program units that are used frequently and the input doesn’t change. You have to include the syntax in the PL/SQL function to specify that the result will be cached.

Others, other memory structures such as control structures.

Each SQL statement is represented in the shared SQL area of the shared pool and a private portion is represented in the PGA. The shared SQL area stores the parse tree and the execution plan for the statement. When a user executes a statement, if it exists in the shared SQL area, Oracle recognizes it and reuses the memory. Otherwise Oracle allocates space from the shared pool to store it in the shared SQL area.

Page 27: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 25

PL/SQL programs are processed in a similar way. Oracle allocates a shared area for the parsed, compiled form of a program and a private area for specific values of the session such as variables. When the program is executed, the shared area is used by all the users and the private area maintains specific values of each session.

Shared Pool

Recommendations: Memory Size

When you install the database, you are asked to set an initial memory size for the SGA and PGA. It is recommended that you assign 40% to 60% of your total memory for Oracle usage. This may vary depending on the other applications running in the database server. From the total memory assigned, by default 60% is assigned for the SGA and 40% for the PGA. These values can be adjusted later.

For small and midsize databases, it is recommended that you enable Automatic Memory Management (AMM) so the memory is adjusted to the workload. In general, the DBA will manually manage the memory for larger databases.

There are two initialization parameters that have to be set when sizing the memory: MEMORY_TARGET and MEMORY_MAX_TARGET. Review the Initialization parameters section on this chapter for more information.

Page 28: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 26

Processes

As explained before, the database starts a server process whenever a request is done to the server. The server process has associated background processes to manage the memory, write data to disk, and do other necessary tasks. In general, the processes are a series of steps that are executed by the operating system.

There are two configuration options for a server process:

Dedicated server, this is the recommended mode for edit/update applications. In this case each user process is serviced by a dedicated server process.

Shared server, in this case the server process serves any user process, there is a shared pool of server processes. This mode is recommended for a web solution that starts a large number of connections.

Background Processes

The most relevant background processes are:

Database Writer process (DBWn), this process writes modified buffers (dirty buffers) from the database buffer cache to disk. Modified buffers in the database buffer cache are managed by a least recently used write (LRUW) list. When the available buffers fall below an internal threshold, the DBWn process writes dirty buffers to the data files following the order of the LRUW list. This order is the same order of redo written to the redo logs for the changed buffers. By default there is one process, but you can configure more in multiprocessor systems.

Log Writer process (LGWR), it writes redo entries from the redo log buffer to the redo log files on disk. If a user commits a transaction, LGWR puts the commit in the redo log buffer and writes the entries in the redo files. The commit is assigned a SCN (System Change Number) which is also recorded in the redo log for synchronization in recovery.

Checkpoint process (CKPT), it writes checkpoints (that contain the SCN in the redo) to the headers of data files and to the control files. The SGA manages a redo byte address (RBA) that is a pointer of the redo and marks the position where recovery should be done in case of failure. The CKPT process writes this position to the control file every 3 seconds.

System Monitor process (SMON), it manages recovery when the instance is started. It also cleans up temporary segments that are not being used.

Process Monitor process (PMON), it is in charge of recovering a failed user process. It cleans the blocks in the database buffer cache.

Recover process (RECO), this process manages failures of distributed transactions in a distributed database configuration.

Archiver process (ARCn), it copies redo log files to a storage device when a log switch is done. This process is present only when automatic archiving is turned on and the database is in ARCHIVELOG mode.

Page 29: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 27

Background Processes

Accessing Data

The following steps describe the procedure of a user requesting data from the database server:

1. Initially, when the instance is started, Oracle allocates space for the SGA.

2. A client makes a request to the database server.

Page 30: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 28

3. The server starts a process to handle this request and creates its own private PGA.

4. The sever process looks for the statement in the shared pool; if it doesn’t find it, it allocates a new area in the shared SQL area. Additionally, the server process retrieves needed data from disk or from the SGA. The redo log buffer is written as well with any redo entries.

5. If the transaction is committed, the LogWriter process (LGWR) records the transaction from the redo log buffer to the redo log file. The Database Writer process (DBWn) writes data to disk when necessary.

6. The server process sends a confirmation message to the application if the transaction was successful. Otherwise it sends back an error message.

To ensure the successful execution of the statement, the necessary background processes will run and the server will manage concurrency among all users connected to the instance.

Accessing Data

Page 31: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 29

Storage Architecture

The Oracle Database is divided into physical and logical structures that are closely related.

Physical and Logical Structures

Physical Structures

The Oracle Database is structured in several files described below:

Data files (*.dbf), they contain user data, metadata and the data dictionary.

Control files (*.ctl), they contain information of the database structure. You need them to access the data files.

Online redo log files (*.log), these can be used for data recovery if the server crashes. By default the files are assigned a *.log extension, but it is recommended to use another extension such as *.rdo.

There are other files that contain additional information for the database:

Page 32: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 30

Parameter file, it holds initialization information used when the instance is started.

Password file, it allows remote connections to the database for administrative tasks.

Backup files, they are used for database recovery.

Archived redo log files, they contain the redo history generated by the instance. They allow the recovery of restored data files.

Trace files, they contain errors logged by server or background processes

Alert log files, they store errors and messages chronologically. You should review these files periodically.

Logical Structures

Schema

A schema is a collection of logical data structures owned by a database user. Some of the types of objects that can be included in a schema are tables, views, synonyms, triggers, sequences, and indexes. A Topobase document is related to an Oracle schema.

Tablespaces

These are logical storage units. A database is divided in tablespaces. Each tablespace is associated to one or more data files on disk. Generally speaking, tablespaces associate groups of objects. It is recommended to have a separate tablespace for indexes and another for data. In the Topobase Administrator, when you import a new dump file you have to specify the tablespace for data and indexes.

Each database must have a SYSTEM and SYSAUX tablespaces. These are created when the database is created. The SYSTEM tablespace holds the data dictionary tables. The SYSAUX tablespace is an auxiliary tablespace for the SYSTEM tablespace; it holds additional information such as the enterprise manager repository and the Oracle Spatial system tables.

Each database instance has an UNDO tablespace that stores undo information. It is created when the database is created. It can be used in database recovery to roll back uncommitted transactions.

You can define a temporary tablespace for every user or database-wide. It is recommended that you have only one temporary tablespace. This is used when a SQL statement needs a temporary work area to complete execution. By default, after the database creation a temporary tablespace, TEMP, is created.

A typical database creation creates a default tablespace USERS for user data. You can create additional tablespaces to store your data. It is recommended to have user data and indexes in separate tablespaces. In the chapter exercise you will create an additional tablespace for indexes.

If you selected the option of installing sample data while creating the database, an additional EXAMPLE tablespace is created.

The tablespaces can be online (accessible) or offline (not accessible)

Page 33: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 31

Data Blocks, Extents and Segments

Data is stored in physical data blocks; these are the smallest data structure. They have a specific number of bytes that is specified when creating the database. The default is 8 KB which is recommended for most databases.

The extents constitute groups of contiguous data blocks that store the same type of information.

Segments are sets of extents. Extents are added dynamically as needed and may not be contiguous on the disk. The data objects are stored as segments.

Managing Tablespaces

When you create a tablespaces you can define different settings, these are described below:

Management of Extents

A tablespace can be locally managed or dictionary managed. The first option allows the Oracle Database server to manage dynamically the extents. This is the recommended option.

Types

A tablespace can be permanent, temporary or undo. As explained before, temporary tablespaces are used for temporarily execution of statements. Undo tablespace stores undo information. Permanent tablespaces store user data.

Status

A tablespace can be in one of 3 statuses: Read Write, Read Only and Offline. In the first state all user can read and write data into the tablespace. In the Read Only state, only current transactions can be committed or rolled back, but no further transactions are permitted. In Offline mode, the tablespace is not available.

Storage Sizing

You can create a tablespace that is extended automatically if you set it to AUTOEXTEND. You can also define a maximum size for the tablespace or set it to unlimited.

Extent Allocation

The extent allocation can be set to Automatic or Uniform. In the first case, the sizes of the extents are managed by the system. In the second case, you specify the size of the extent. It is recommended to use the second option, uniform, for the temporary tablespace.

Page 34: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 32

Segment Space Management

This can be set to Automatic or Manual. It is recommended to use the Automatic option (Automatic Segment Space Management – ASSM).

Enable Logging

If you disable this option, the inserts done to the objects via direct DML or loads with SQL *Loader are not logged in the redo log files. Therefore these operations cannot be recovered from the redo log files in case of failure. By default this option is enabled and it is recommended to have always this option enabled.

Recommendations: Tablespaces

Undo Tablespace

You should set a small initial size for the UNDO tablespace (100MB) and enable AUTOEXTEND. This will allow the tablespace to grow as needed. Once the database is stable, use the Undo Advisor to obtain a recommended size for the tablespace. Re-size it to 120% of the recommended size and disable the AUTOEXTEND option.

Note that if you are doing large bulk loads of data, you may need to set the UNDO tablespace to a bigger size (i.e. 1000MB).

Temporary Tablespace

Use a Uniform Extent Allocation. The recommended size for a standard transactional usage of the database is 64KB or multiples up to 1MB (in general this is the recommended size). When the size of the extent is small the performance is better.

General Recommendations

You should separate tables and indexes into different tablespace and disks if you are

not using RAID disk configuration.

You should separate read write and read only data into different tablespace to

enable the use of read only tablespace. The read only tablespaces will assist with

speed of the backup of the database.

Tablespaces should be used to categorize data logically (i.e. GIS, FINANCE, INDEX,

etc). However the number of data files is limited for a database so this concept

should not be taken to extremes.

It is recommended that fewer larger data files are better than many smaller data

files. This is because the number of data files is limited for a database. However

make sure that size of the data file is supported by the operating system and the

backup solution. In general a maximum file size would be 20GB as backup systems

that use tapes can handle only that size.

Page 35: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 33

There are two approaches for managing the user tablespaces, you can set them to AUTOEXTEND automatically, or you can manually resize them when necessary, this gives you more control over your data files. In the second case, the Enterprise Manager alerts may notify you when the tablespace has reached a maximum threshold and you need to extend the tablespace (See Chapter Oracle Tools> Enterprise Manager Home Page).

The following table shows a summary of the recommendations for the tablespaces, the initial and maximum size of your tablespaces will depend on the size of the project:

Tablespace name

Size (MB)

Type AUTOEXTEND Extent Allocation

Maximum File Size (MB)

Comments

SYSTEM 1000 PERMANENT Y Auto 2000

SYSAUX 1000 PERMANENT N Auto 2000

TEMP 1000 TEMPORARY N Uniform

(1024 KB)

2000

UNDOTBS1 100

or

1000

UNDO Initially

Y

-After-

N

Auto 2000 Initially 100MB with AUTOEXTEND. If you are doing large bulk loads of data, set it to 1000MB.

Afterwards, it must be set to a fixed size using the Undo Advisor and disable AUTOEXTEND.

USERS 2000 PERMANENT N 4000 This is a tablespace that comes by default with the database creation and could be used for user data. In general you would create your own user tablespaces.

INDX 2000 PERMANENT N Auto 4000 This is a new created tablespace to store indexes.

USER_DATA 2000 PERMANENT N Auto 4000 This is a new created tablespace to store user data.

Page 36: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 34

Performance and Scaling the Database Server

The Performance Balance

The following diagram can be used to represent general performance characteristics that all computer systems have to balance. The system must balance investment in hardware and software against the user requirements. The outcome of the system is a perceived level of server performance. The complete system or client application may have a different level of perceived performance. When looking at performance each individual tier of the solution architecture should be examined before performance issues are tackled.

HARDWARE

SOFTWARE

Pe

rce

ive

d P

erf

orm

an

ce

User Resource

Requirements

£ $

Hardware and Software

Investment

Balancing Performance and Software/Hardware Investment

In the specific case of Oracle applications the general diagram can be extended to include the main areas of performance and scalability. This diagram illustrates the following key issues:

Software investment needs to be considered as well as hardware. Often, poor software or design problems can cause issues that a hardware investment cannot fix. Increasing the software investment enables you leverage the hardware potential.

Hardware investment needs to be in proportion in all four areas (cpu, disk, memory and network). There is no benefit to investing large amount in the memory if the system is disk I/O bound.

Page 37: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 35

HARDWARE

Pe

rce

ive

d P

erf

orm

an

ce

Network

CPU

DISK

MEMORY

IndexingApplication Logic (SQL) Table Design

Number

Speed

Number

Speed

Configuration & Layout

Amount

Speed

User Resource

Requirements

£ $

Hardware and Software

Investment

Balancing Performance and Software/Hardware Investment (Detailed)

Scaling the Database Server

The scaling of a database server is an extension of the performance balance principles. There is no exact formula for generating the total amount of CPU, disk and memory needed for a particular system, however experience shows that the following guidelines can be used for sizing Oracle spatial database servers. The following guidelines presume that the application logic, table and index design have been tuned to an optimal level. Also the user profile is that of an update user of the Oracle spatial database. The update user’s actions would include:

System login

Drawing graphics and querying attributes

Digitizing and editing graphics and attributes

Network tracing and reports

Page 38: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 36

Number of concurrent users

Number of CPU Amount of memory

1-25 2 1 GB for operating system +1 GB per CPU + 10% total data size

26-100 4 1 GB for operating system +1 GB per CPU + 25% total data size

101-250 8 1 GB for operating system +1 GB per CPU + 50% total data size

251-500 16 1 GB for operating system +1 GB per CPU + 50% total data size

The formula for estimating disk space requirements is even more difficult to define. The options for estimating the disk space requirement are:

Perform a test load of all the data. The expected schema should be used.

Perform a test load of sample data and then multiply to gain an estimate of the total data requirement. The sample size should be no less than 1% of expected total data. The expected schema should be used.

Using expected schema and estimated row numbers, calculate the bytes per row and multiply to gain the upper limit of the data. When estimating spatial data the number or ordinances will need to be estimated also.

When none of the above is possible it is suggested that a base value for estimating data in an Oracle spatial database would be 1.5KB per feature for table data and 1KB per feature for indexing. This gives a very rough estimate for disk space and should be re-evaluated when schema and sample data is available.

Factors to consider for estimating disk space requirements are as follows:

read only data can be packed more tightly, lower pctfree

heavily indexed schemas may require more space

complex polygon schemas may require much more storage space

Page 39: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 37

Other factors to consider regarding the disk for a system are:

RAID: using RAID 5 or 01 (aka 10) to speed up data read access, the more disk the better.

Disk access speed: use fast disk and consider using multiple disk controllers

Initialization Parameters

The server parameter file spfile<SID>.ora (spfiletbdata.ora) is created with the database creation. It is located in {ORACLE_HOME}\database (C:\oracle\product\11.1.0\db_1\database) folder.

This file stores initialization parameters that are read by the database server when the instance is started. The server parameter file is a binary file and should not be edited directly with a text editor. It should only be updated using the SQL *Plus client or the Oracle Enterprise manager.

When the instance is started, Oracle searches for the spfile in the specified folder. If the file is not available, the server searches for a text initialization file called init<SID>.ora in the same folder.

The text initialization parameter file is equivalent to the spfile but it is edited manually using a text editor.

It is recommended that you use the spfile for instance startup, and that you create a text initialization file from the spfile as a backup.

You can use the following command to create a text initialization parameter file from a server parameter file: (See the Exercise: Creating a Text Initialization Parameter File.)

-- This option creates a pfile in the default location with a default name

CREATE PFILE FROM SPFILE;

-- This option creates a pfile and spfile in different locations

CREATE PFILE <text_initialization_file> FROM SPFILE <server_parameter_file>;

You can use the following commands to create a server parameter file from a text initialization parameter file:

-- The command creates the spfile in the default location

-- and with the default name. It is recommended that you use the defaults

CREATE SPFILE FROM PFILE <text_initialization_file>;

CREATE SPFILE <server_parameter_file> FROM PFILE <text_initialization_file>;

Parameters

There are two types of parameters: static and dynamic.

Static parameters take effect only when the database is shut down and re-started. They can be modified by changing the init.ora and spfile parameter files.

Page 40: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 38

The dynamic parameters can take effect while the instance is still running.

List of Parameters

Below is a list of the most important initialization parameters. See Oracle’s documentation for a complete list of parameters.

Database Structure and Data Access

DB_NAME and DB_DOMAIN determine the global database name (GLOBAL_DBNAME)

DB_FILES determines the maximum number of data files that can be opened for a database

CONTROL_FILES points to one or more control file names

DB_BLOCK_SIZE is the data block size in bytes, the default is 8KB, and allowed values are between 2KB and 32KB. It is set on database creation and is default for all tablespaces, it cannot be changed. The default size (8KB) is normally recommended if you have variable size of tables.

UNDO_MANAGEMENT: specifies the mode of undo space management. The default is AUTO, in this case the instance is started in Automatic Undo Management (AUM). The second mode is MANUAL, in this case the instance uses Rollback Undo mode (RBU). Manual mode requires configuration of the rollback segments.

Memory

PGA_AGGREGATE_TARGET specifies the total memory used for server processes in the PGA (Program Global Area). It ranges from 10 MB to 4096 GB. The default is the greatest value between 20% of the SGA or 10 MB.

SGA_TARGET specifies the total size of the SGA. When this is specified, all SGA memory pools are automatically sized:

DB_CACHE_SIZE defines the standard block buffer cache size. The default is 48 MB, and the minimum is 16 MB.

SHARED_POOL_SIZE specifies the size of the shared pool in the SGA. The default is 16 MB in 32 bit systems.

LARGE_POOL_SIZE defines the size of the large pool.

JAVA_POOL_SIZE specifies the size of the java pool.

STREAMS_POOL_SIZE specifies the size of the streams pool.

When you select Automatic Shared Memory Management (ASMM) all the memory pools are automatically sized. The log buffer, keep and recycle buffers are manually sized and the total is subtracted from the total SGA.

Page 41: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 39

MEMORY_TARGET is the total memory used by Oracle. The PGA and SGA memory will be adjusted to this total.

MEMORY_MAX_TARGET is the total amount of memory that can be assigned to the memory (MEMORY_TARGET can grow up to this value). It is recommended to initially set this value so the MEMORY_TARGET can grow till this limit. Otherwise, the MEMORY_MAX_TARGET = MEMORY_TARGET and you need to restart the instance if you want to expand the MEMORY_TARGET.

Parameters and Memory Structures

Others

PROCESSES maximum number of OS user processes, the default is OS dependent.

Querying Parameters

Use the view V$PARAMETER to find out values of parameters.

SELECT name, value FROM V$PARAMETER WHERE name LIKE 'memory%';

Page 42: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 40

The SHOW PARAMETER <string> command displays parameters that have a given string in their name.

SHOW PARAMETER POOL

The view V$SPPARAMETER shows the parameters in the server parameter file.

The view V$PARAMETER2 shows parameters in the current session.

Changing Parameters

You can use the commands ALTER SYSTEM or ALTER SESSION to change dynamic parameters. The first clause alters all sessions and the second clause alters only the current session.

ALTER SYSTEM SET <parameter> = <value> SCOPE = {SPFILE|MEMORY|BOTH};

ALTER SESSION SET <parameter> = <value> SCOPE = {SPFILE|MEMORY|BOTH};

SCOPE=SPFILE, the changes are made in the spfile and they are effective when the instance is re-started.

SCOPE=MEMORY, the changes are applied immediately in the memory. This can de bone for dynamic parameters but is not valid for static parameters. The changes are not applied to the spfile.

SCOPE=BOTH, this is the default value if not specified. The changes are applied in the spfile and in memory. This specification is valid for dynamic parameters, and the change is permanent as the server parameter file is updated. This specification is not valid for static parameters.

Creating the Database

The Database Configuration Assistant (DBCA) allows you to create, modify and delete databases. Although there are some pre-defined templates that you can use for database creation, you will create a Custom Database so you have more control over general configuration settings.

Page 43: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 41

Starting Up the Database

You can start up the database using Enterprise Manager or via SQL *Plus.

The database can be in 3 modes:

NOMOUNT, this mode can be used for re-creation of control files. In this case the instance is started but the database is not mounted and is closed.

MOUNT, this mode can be used for maintenance tasks, such as doing a full database recovery.

OPEN, in this case the database can be accessed by any user. In this mode, all data files and online redo log files are opened.

In SQL *Plus, login as SYSDBA and use the STARTUP command. By default the instance is started with the parameter file (spfile) located in the C:\oracle\product\11.1.0\db_1\database folder. Otherwise you could point to a different parameter file with the keyword PFILE = <parameter_file>.

SQL>STARTUP -- The instance is started and the database mounted and opened

SQL>STARTUP NOMOUNT –- The instance is started and the DB is not mounted.

SQL>ALTER DATABSE MOUNT; -- The database is mounted

SQL>ALTER DATABSE OPEN; -- To open the database after is mounted

Shutting Down the Database

In the same way, you can shut down the database using Enterprise Manager or via SQL *Plus. The shut down can have 4 modes:

NORMAL, this is the default mode if the command is executed using SQL *PLUS. In this case Oracle waits till all the sessions disconnect before shutting down the database.

TRANSACTIONAL, in this mode the transactions are finished before the shut down.

IMMEDIATE, Oracle rolls back any uncommitted transactions and disconnects all users.

ABORT, this is the fastest shut down option. It should be used only when you face problems starting the instance or none of the other shut down options work. Note that with this option the transactions are not rolled back, and the database is not closed nor dismounted. The next startup has to be done with instance recovery (this is done automatically).

Page 44: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 42

Exercise: Configure Listener (listener.ora)

1. Start the Oracle Net Manager. You can access it via Windows Explorer by selecting Programs > Oracle – OraDb11g_home1 > Configuration and Migration Tools > Oracle Net Manager.

2. Select the Listeners tree node, and click on the left-side.

3. The Choose Listener Name window is displayed with the default listener name LISTENER.

4. Click OK. The listener named LISTENER is created.

Page 45: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 43

5. Click Add Address at the bottom of the window.

Page 46: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 44

6. A new Address1 tab is shown. By default, the Host field shows the computer’s name (topobase) and the listener is assigned a default port number of 1521.

7. In the combo-box, select Database Services.

8. Click Add Database

Page 47: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 45

9. A new Database1 tab is shown. Enter the following values:

Global Database Name: TBDB

The global database name can also have a domain after the name (tbdb.ads.autodesk.com). You would use a domain when you have a large number of databases that you wish to administer in different domains.

Oracle Home Directory: C:\oracle\product\11.1.0\db_1

SID: TBDB (The SID is the system identifier and it identifies the instance.)

10. Select File > Save Network Configuration.

11. The configuration file for the listener (listener.ora) is created in the folder C:\oracle\product\11.1.0\db_1\NETWORK\ADMIN. Open it to see the results.

Page 48: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 46

12. From the command line, execute lsnrctl start.

The listener.ora file must be present only in the database server.

Page 49: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 47

Exercise: Creating the Database

1. Start the Database Configuration Assistant (DBCA). You can access it in the Windows Explorer by selecting Programs > Oracle – OraDb11g_home1 > Configuration and Migration Tools > Database Configuration Assistant.

2. The Welcome page is displayed. Click Next.

3. Select Create a Database.

4. Click Next.

Page 50: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 48

5. Select Custom Database.

6. Click Next.

Page 51: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 49

7. Enter the Global Database Name TBDB. In this case, the SID is the same as the Global Database Name. The initialization parameter DB_NAME will be set to TBDB.

8. Click Next.

Page 52: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 50

9. Ensure that Configure Enterprise Manager is toggled on. The Configure Database Control for local management option is selected by default.

10. Click Next.

11. If there is no listener installed or the listener was not started, a warning is displayed. Follow the steps in the previous exercise to install a listener.

Page 53: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 51

12. If the listener is present, you are asked to introduce passwords for the administrative users. Enter a password for each administrative account; alternatively you can set one password for all accounts. In this course, you will use one password for all accounts: autodesk.

13. Click Next.

Page 54: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 52

14. In the Storage Options, make sure that File System is toggled on.

15. Click Next.

16. In the database server, use Windows Explorer to create a folder called oracleDB1. You will use this folder to store the data files.

Page 55: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 53

17. In the Database File Locations window, select Use Common Location for All Database Files. Click Browse and select the newly-created folder oracleDB1.

18. Click Next.

Page 56: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 54

19. Toggle off Specify Flash Recover Area and ensure that Enable Archiving is also toggled off.

20. Click Next.

Page 57: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 55

21. Make sure Enterprise Manager Repository is toggled on. Toggle on Oracle Spatial if you have a license. Note that Topobase does not require the Spatial option. Toggle off the other options as they are not needed for Topobase.

22. Click Standard Database components….

Page 58: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 56

23. Toggle off Oracle Application Express and make sure the other options are toggled on.

24. Click OK.

25. In the Database Control window, click Next.

Page 59: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 57

26. On the Memory tab of the Initialization Parameters window, toggle on Use Automatic Memory Management (AMM). Assign an adequate percentage of memory, as explained in the Memory section of this chapter (recommended: 40% - 60%). The image below shows an example with 2 GB of total memory. Note that the MEMORY_TARGET parameter is assigned the value that you define here.

Page 60: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 58

27. In the Sizing tab, leave the defaults: Block Size (8192 Bytes). The block size cannot be changed after creating the database.

Change the number of Processes to 250. For large systems, you can set it to 500.

The values entered here set the values for the initialization parameters DB_BLOCK_SIZE and PROCESSES.

Page 61: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 59

28. On the Character Sets tab, select Choose from the list of character sets. For Database Character Set, select AL32UTF8 – Unicode UTF-8 Universal character set. For National Character Set, select AL16UFT16 – Unicode UTF -16 Universal character set.

Page 62: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 60

29. On the Connection Mode tab, select Dedicated Server Mode.

30. Click Next.

Page 63: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 61

31. In the Security Settings window, select Keep the enhanced 11g default security settings. The enhanced 11g security settings provide higher security, such as enforcing case sensitivity and complex passwords, among others.

32. Click Next.

Page 64: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 62

33. Toggle on Enable automatic maintenance tasks.

34. Click Next.

Page 65: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 63

35. The Database Storage window is displayed. Here you can configure the tablespaces, data files, redo log groups (for online redo log files), and control files. You will only configure control files and redo log groups. Afterwards, you will use the Enterprise Manager to configure tablespaces and data files.

36. Using Windows Explorer, create a new folder called oracleDB2. This folder will contain mirrored files that can be used for database recovery. The folder can reside on a different disk in your database server; in this case you could name the folder oracleDB1. In this course, you will use the same drive - so you will name the folder oracleDB2.

37. Select Controlfile from the Storage tree. By default, you have three control files. Change the folder where you store the control files as shown below:

C:\oracleDB1\{DB_NAME} ,

C:\oracleDB2\{DB_NAME} , and

{ORACLE_HOME}\oradata\{DB_NAME} {DB_NAME} = TBDB and {ORACLE_HOME} = C:\oracle\product\11.1.0\db_1 You can verify these values if you click File Location Variables.

Page 66: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 64

38. Select Redo Log Groups. Select group 1, and rename the first file to redo01a.log.

Add a second file called redo01b.log and change the File Directory to C:\oracleDB2\TBDB\. The File Size should be 100 MB.

Note that the files are named *.log by default. Although the example here uses the default, it is recommended that they be named with a different extension - such as *.rdo.

39. Do the same for group 2 and 3, so you have mirrored redo files in a different folder. Call the files redo02a.log and redo02b.log for the second group, and redo03a.log and redo03b.log for the third group. The File Size is 100MB.

40. Click Next.

Page 67: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 65

41. In the Creation Options window, toggle on Create Database, Save as a Database Template, and Generate Database Creation Scripts.

42. Click Finish.

Page 68: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 66

43. A Confirmation window is displayed.

44. Click OK.

45. A confirmation window indicates that the template has been created. Click OK.

46. A confirmation window indicates that the scripts have been created. Click OK.

47. A progress window appears, showing details of the database creation process. The process takes approximately one hour.

Page 69: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 67

48. At the end of the installation process, a window shows the Global Database Name, SID, the location of the server parameter file, and the Database Control URL.

Note: The default port for the Database Control is 1158. If this port is being used, another port is assigned (in this case 5500).

49. Click Exit.

Page 70: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 68

50. Browse the data files, online redo log files, and control files that are created in your database server:

Also browse the third control file created in the folder C:\oracle\product\11.1.0\db_1\oradata\TBDB.

Note that tablespaces data files are assigned a default size; you will re-size them in further exercises.

51. When Database Control has been successfully installed with the database creation, you can access it directly from Windows via Programs > Oracle – OraDb11h_home1 > Database Control – TBDB. This launches the Enterprise Manager Database Control.

Page 71: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 69

Exercise: Configure Net Service Name (tnsnames.ora)

1. Start the Oracle Net Manager. You can access it via Windows Explorer by selecting Programs > Oracle – OraDb11g_home1 > Configuration and Migration Tools > Oracle Net Manager.

2. Select the Service Naming tree node, and click on the left-side.

3. Enter the Net Service Name TBSERV.

4. Click Next.

5. In the Protocol window, select TCP/IP (Internet Protocol).

6. Click Next.

Page 72: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 70

7. Enter the Host Name Topobase and retain the default Port Number 1521.

8. Click Next.

9. Enter the Service Name TBDB. Here, the service name refers to the global database name (GLOBAL_DBNAME). Set the Connection Type to Dedicated Server.

10. Click Next.

Page 73: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 71

11. The Test window is displayed. You can click Test... to check the connection.

12. Click Finish.

13. You can see the properties of the TBSERV Net Service Name.

Page 74: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 72

14. Select File > Save Network Configuration.

15. The configuration file for the service naming (tnsnames.ora) is created in the folder C:\oracle\product\11.1.0\db_1\NETWORK\ADMIN. Open it to see the results.

The tnsnames.ora file must be present on the client. It is also recommended (though not mandatory) to have the same file in the database server.

Page 75: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 73

Exercise: Configure sqlnet.ora

1. Open the sqlnet.ora file located in C:\oracle\product\11.1.0\db_1\NETWORK\ADMIN.

2. Add a comment # to the SQLNET.AUTHENTICATION_SERVICES = (NTS) line:

#SQLNET.AUTHENTICATION_SERVICES = (NTS)

Alternatively, you can change SQLNET.AUTHENTICATION_SERVICES = (NTS) to:

SQLNET.AUTHENTICATION_SERVICES = (NONE)

This sqlnet.ora file must be present in the database server and in the client.

Summary of Configured Files

You will have to configure the following files in the server and client:

File Server Client

Listener.ora Required ----

Tnsname.ora Recommended (not mandatory) Required

Sqlnet.ora Required Required

Page 76: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 74

Exercise: Browse Database Structure

In this exercise, you will browse for all the tablespaces and their data files in the database.

1. Connect to SQL *Plus with sys.

2. Execute the following query:

column tablespace_name format A20

column file_name format A40

SELECT tablespace_name, file_name, bytes/1024/1024 MB

FROM DBA_DATA_FILES

ORDER BY tablespace_name;

3. Note the result (the sizes may vary in your system).

4. Browse to where the data files are located (C:\ORACLEDB1\TBDB\), and compare the results of your query.

Note that the TEMP01.DBF tablespace was not shown in the query.

Page 77: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 75

Exercise: Create Tablespace

In this exercise, you will create a new INDX tablespace to store the indexes. Refer to the tablespace properties in the table below from the Storage Structure section of this chapter.

Tablespace name

Size (MB) Type AUTOEXTEND Extent Allocation

Maximum File Size (MB)

Comments

INDX 2000 PERMANENT N Auto 4000 In this exercise, you will only set the size to 500 MB. On your system, you will size it according to the needs of your project.

1. Start the Enterprise Manager Database Control. Enter the URL https://topobase:5500/em/ (or the appropriate URL of your database control). Enter the following values:

User Name: sys

Password: Autodesk

Connect as: SYSDBA

2. Click Login.

3. The Enterprise Manager page is displayed.

Page 78: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 76

4. Select the Server tab and click Tablespaces under Storage.

5. The Tablespaces page is shown with all the tablespaces that were created by default with the database installation. Click Create.

Page 79: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 77

6. Enter Name INDX. Validate that all the settings are correct:

Extent Management: Locally Managed

Type: Permanent

Status: Read Write

7. Under Datafiles, click Add.

Page 80: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 78

8. The Add Datafile page is displayed. Enter the following settings:

File Name: INDX01.dbf

File Directory is set by default to C:\ORACLEDB1\TBDB

File Size: 500 MB

Toggle off Automatically extend datafile when full (AUTOEXTEND)

Set Maximum File Size to Value 4000 MB

9. Click Continue. An information message appears:

Page 81: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 79

10. Click OK. The settings are applied and you have a new INDX tablespace.

Exercise: Edit Tablespace

In this exercise, you will re-size the USER_DATA tablespace using the Enterprise Manager. The USER_DATA tablespace is a user created tablespace.

Follow these steps to resize all your tablespaces according to the recommended sizes and settings explained in the Storage Architecture section of this chapter (see table below).

Tablespace name

Size (MB)

Type AUTOEXTEND Extent Allocation

Maximum File Size (MB)

Comments

USER_DATA 2000 PERMANENT N Auto 4000 In this exercise you will set the size only to 500 MB. In your system you will size it according to the size of the project.

1. Start the Enterprise Manager Database Control. Enter the URL https://topobase:5500/em/ (or the appropriate URL of your database control). Login as sys.

2. The Enterprise Manager page is displayed.

3. Select the Server tab, and click Tablespaces under Storage.

4. The Tablespaces page is shown with all the tablespaces that were created by default with the database installation - plus the user-created tablespaces. Select USER_DATA tablespace and click Edit.

Page 82: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 80

5. You are on the General tab of the USER_DATA tablespace. The following properties are visible: Extent Management, Type, and Status. If you want the tablespace to be the default tablespace for all user data, toggle on Set as default permanent tablespace. Otherwise, toggle it off. To change the size, click Edit.

6. In the Edit Tablespace page do the following changes:

Change the File Size to 500 MB.

Toggle off Automatically extend datafile when full (AUTOEXTEND).

Set Maximum File Size to Value 4000 MB.

Page 83: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 81

7. Click Continue. Note that in Enterprise Manager, buttons are located at the top and at the bottom of the page. Either may be used.

8. In the Edit Tablespace page, an information message indicates that the changes are not applied until you click Apply.

9. Click Apply. A confirmation message appears, indicating that the tablespace has been modified.

10. You may return to the initial Tablespaces page by clicking the hyperlink Database Instance: TBDB > Tablespaces >

Page 84: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 82

Exercise: UNDO Advisor

As previously explained, you can set the UNDO tablespace to AUTOEXTEND. Then, when the system is running and is in a stable state, you can use the UNDO Advisor to set the appropriate size for the tablespace.

In this exercise, you will use the UNDO Advisor.

1. Go to the Server tab of the Enterprise Manager. If you are in the Tablespaces section, click Database Instance: TBDB to go back to the Server tab.

2. At the bottom of the page, in the Related Links section, click Advisor Central.

3. In Advisor Central, click Automatic Undo Management.

Page 85: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 83

4. In Automatic Undo Management, click Run Analysis. Note that if you have performed large bulk loads of data in the last seven days, you shouldn’t run the Analysis. Run the analysis at a time when your system is running in a stable state so you receive an optimum recommendation from the advisor.

5. The results of the analysis are shown. These results may vary in your system.

6. Click Edit Undo Tablespace and re-size it according to the recommendation (set it to 120% of the size recommended).

Page 86: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 84

Exercise: Organize All Tablespaces

In this exercise, you edit all the default tablespaces according to recommended settings.

Tablespace name

Size (MB)

Type AUTOEXTEND [MB]

Extent Allocation

Maximum File Size (MB)

Actions

SYSTEM 1000 PERMANENT Y

[10 MB]

Auto 2000 1. Edit tablespace

2. Edit data file

- Change the size

- Set the size of the increment of the AUTOEXTEND to 10 MB

- Set Maximum File Size to 2000 MB

SYSAUX 1000 PERMANENT N Auto 2000 1. Edit tablespace

2. Edit data file

- Change the size

- Toggle off AUTOEXTEND

- Set Maximum File Size to 2000 MB

3. Apply changes

TEMP 1000 TEMPORARY N

Uniform

(1024KB)

2000 1. Edit tablespace

2. Edit data file

- Toggle off AUTOEXTEND

- Set Maximum File Size to 2000 MB

3. Apply changes

Note: The Extent Allocation with Uniform size is set to 1024 KB by default.

UNDOTBS1 100

Or 1000

UNDO Initially

Y

-After-

N

Auto 2000 1. Edit tablespace

2. Edit data file

- Change the size to 100 MB or 1000 MB if you are doing large bulk loads of data

- Toggle on AUTOEXTEND

- Set the size of the AUTOEXTEND increment to 10 MB

- Set Maximum File Size to Value 2000 MB

3. Apply changes

Afterwards, this must be set to a fixed size using the Undo Advisor and by disabling AUTOEXTEND.

Exercise: UNDO Advisor provides further details of this process.

USERS 2000 PERMANENT N Auto 4000 You can edit the size as in Exercise: Edit Tablespace

INDX 2000 PERMANENT N Auto 4000 This was done in Exercise: Create Tablespace

USER_DATA 2000 PERMANENT N Auto 4000 This tablespace was used in Exercise: Edit Tablespace

Page 87: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 85

Exercise: Installing the Oracle Software on the Client

In this exercise, you will install the Oracle client.

1. Execute setup.exe from the Oracle client DVD. The Welcome window is shown.

2. Click Next.

Page 88: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 86

3. Select the Administrator installation type.

4. Click Next.

Page 89: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 87

5. Select the Oracle Base; browse and create the folder C:\oracle. Leave the defaults for Name and Path.

Page 90: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 88

6. Click Next. The pre-requisites are verified.

7. Click Next.

Page 91: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 89

8. The summary of the products to be installed is shown.

9. Click Install.

10. Note that on the client machine, you have to configure the tnsnames.ora and the sqlnet.ora files.

Page 92: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 90

Exercise: Creating a Text Initialization Parameter File

In this exercise, you will create a text initialization parameter file from the server parameter file.

1. Login to SQL *Plus as the sys user.

2. Execute the command CREATE PFILE as shown below:

SQL> CREATE PFILE FROM SPFILE;

3. The INITtbdb.ora file is created in the default location C:\oracle\product\11.1.0\db_1\database.

4. Open the file INITtbdb.ora with Wordpad to view the parameters stored in the file.

a. What’s the size of the DB_BLOCK_SIZE parameter?________________

b. Which parameter defines the total size of the memory?____________

c. What’s the total size of the memory?______________

d. How many control files were defined?_____________

e. What’s the name of the database?________________

Page 93: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 91

(Refer to Appendix B for answers.)

Exercise: Create a Control File Script

In this exercise, you will learn to create a backup of the control file. There are two methods of creating a backup: the first method creates a binary file (non-readable file), and the second creates a SQL script (trace file) that can be used to re-create the control file. You will use the second method.

1. Connect as sys in SQL *Plus.

2. Execute the command:

ALTER DATABASE BACKUP CONTROLFILE TO TRACE;

3. The control file script is created in the folder set by the USER_DUMP_DEST parameter. Show the value of the parameter by executing the following command:

SHOW PARAMETER user_dump

4. Use Windows Explorer and browse for the folder indicated by the parameter; look for a file named tbdb_ora_<server_process_id>.trc. You can determine the correct file by comparing with the system date.

Page 94: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 92

5. Open the file. Search for the clause STARTUP NOMOUNT.

Before this clause, you can read the explanation of the SQL statements generated. There are two sets of statements; the first set is supposed to be used if all the redo log files are available.

Recall that you created three groups of online redo log files and each group contained two files in different folders (or disks). The first group includes the files redo01a.log and redo01b.log (these are identical files), and the same is true for the second and third groups. For each group, you must have at least one file that is intact, and you can use this file to replace the corrupted files. For example, assume the redo01b.log is corrupted. You would copy the redo01a.log to that location and rename it, thereby replacing the corrupted file.

Page 95: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 93

Therefore, if your online redo log files are available, use the first set of SQL statements to re-create the control file. Otherwise, use the second set of statements.

6. Now copy the first set of statements (Set #1. NORESETLOGS case) to another file, so that you can use this file to re-create the control file if it is corrupted. Create a new file in C:\Topobase2010\sqls\ called createcontrolfile.sql. Copy all of the statements, starting from STARTUP NOMOUNT, to the beginning of the other set of statements (Set #2. RESETLOGS case).

7. Add an additional line, immediately before the STARTUP NOMOUNT, with the connection to the sys user.

8. Note that you will use this file only if your control file is corrupted. As previously explained, the control files store information of the physical database structure (data files and redo logs). Therefore, it is recommended that you make such backup script whenever you make any changes to the structure - such as adding or dropping a tablespace; adding, moving or renaming a data file; or changing read-write tablespaces to read-only.

Page 96: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 94

Exercise: Set Maximum Size of Memory (MEMORY_MAX_TARGET)

In this exercise, you will set a value for the MEMORY_MAX_TARGET parameter. Note that this is a static parameter - so a restart of the instance is required in order for the changes to take effect.

1. On the command line, open SQL *Plus and connect as the sys user.

cmd> sqlplus sys/autodesk as sysdba

2. Set the total memory size to 800 MB. In your system, this should be set to the recommended size according to the theory of this chapter.

SQL> alter system set memory_max_target=800M scope=spfile;

3. It is now necessary to shut down the instance for the new maximum size to take effect. Shut down the instance, using the IMMEDIATE option, and then start it up again.

SQL> shutdown immediate

SQL> startup

Note that the maximum SGA is set automatically.

Page 97: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Database Creation and Configuration - 95

4. To display the parameter values, enter the show parameter command:

5. If for any reason you corrupt the spfile and the database cannot be started, execute the command CREATE SPFILE FROM PFILE to restore the SPFILE from your saved text parameter file.

6. After successfully changing the MEMORY_MAX_TARGET, you should backup the spfile again as shown in the previous exercise.

Page 98: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing Topobase Administrator - 96

INSTALLING TOPOBASE ADMINISTRATOR

This chapter covers the installation of the Topobase System user, which stores metadata of the application.

Objectives

After completing this chapter, you will be able to:

Describe the TBSYS user and its Oracle rights

Use the Topobase Server Administrator

Install the TBSYS user in the database server

Setup

Installing Autodesk Topobase 2010 requires that Oracle database already be installed. After your machine is ready, you can install Topobase in a few steps, following the instructions of the Setup process.

The following topic shows in detail how to install the TBSYS schema in a Topobase implementation.

Topobase Server Administrator

About TBSYS

After Autodesk Topobase 2010 is installed, you can use the Topobase Server Administrator to create the TBSYS Oracle schema in the Oracle database. As suggested by its acronym, this schema represents the “TopoBase SYStem user.”

A schema is a collection of logical data structures owned by a database user. Some types of objects that can be included in a schema are tables, views, synonyms, triggers, sequences, and indexes.

TBSYS stores metadata, procedures and special functionality for Autodesk Topobase 2010. Data for Topobase users, workspaces, and documents are also managed by TBSYS.

Page 99: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing Topobase Administrator - 97

About TBMAIN

If you do not want to provide TBSYS credentials to all Topobase users, you can create a Topobase Main User (TBMAIN). TBMAIN has restricted rights on TBSYS: Administrative users must connect through TBSYS. After creating the Topobase Main User, non-administrative users can log into Topobase Client using TBMAIN.

About MDSYS User

Oracle Locator is an integrated set of functions and procedures that allow spatial data to be stored, accessed and analyzed quickly and efficiently. During any database creation, Oracle creates certain default database schemas. MDSYS is the system user configuration schema native to and supporting Oracle Locator.

The schema uses the sdoapi.jar file. This file loads the Java client interface for general spatial operations.

A Java Archive (jar) file is a compressed file that can store many other files.

The sdoapi Java client interface contains the following classes:

JGeometry. Class that maps the SQL type SDO_GEOMETRY. The main methods for reading and writing database raster images are load(STRUCT) and store().

JGeometry.Point. Convenience class that represents a double-typed point.

DataException. Class for MapViewer data access exceptions.

Before you create the TBSYS schema, you must verify that the Oracle MDSYS user was properly loaded, the user is unlocked, and the password is not expired.

Create TBSYS

To create the TBSYS schema, perform the following steps:

Launch the Topobase Server Administrator.

Check the Oracle System (SYS) User.

Check the Spatial System (MDSYS) User.

Create the Topobase System (TBSYS) User.

Page 100: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing Topobase Administrator - 98

TBSYS Oracle Rights

Once you create the TBSYS user you will get a log file with all the grants that have given to the TBSYS user. These are listed in the table below. Some grants are created WITH ADMIN OPTION, which means that TBSYS can grant these privileges to other users.

Grant WITH ADMIN OPTION

UNLIMITED TABLESPACE Y

CONNECT Y

CREATE TABLE Y

CREATE JOB Y

CREATE SEQUENCE Y

CREATE TRIGGER Y

CREATE USER N

CREATE VIEW Y

CREATE ANY CONTEXT Y

CREATE PROCEDURE Y

CREATE SYNONYM Y

DROP USER N

CREATE TYPE N

ALTER USER N

EXECUTE ON SYS.DBMS_RLS Y

SELECT ON V_$SESSION N

Page 101: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing Topobase Administrator - 99

Exercise: Install the TBSYS User

1. Launch the Topobase Server Administrator. From Windows, launch Start menu > All Programs > Autodesk > Autodesk Topobase 2010 > Autodesk Topobase Server Administrator 2010. The Topobase Server Administrator login dialog box appears. Log on as the Oracle System User, SYS.

Enter:

User name: SYS

Password: autodesk

Service name: tbserv (this is the Net Service Name)

2. Click Login.

3. The Topobase Server Administrator window appears.

4. Click Oracle System User in the explorer tree. Information for the Oracle System User appears in the right pane of the window. Verify that the service name is correct for this user. It should be tbserv.

Page 102: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing Topobase Administrator - 100

5. Click Spatial System User in the file explorer tree. Information for the Spatial System User appears.

6. Click Unlock.

7. Click Set password and assign a password. The default password is mdsys.

8. The account is now unlocked and has a password that won’t expire. The information for the Spatial System User should appear as displayed in the figure below.

9. Click Topobase System User in the explorer tree. Information fields for the Topobase System User appear, but they lack content because the TBSYS schema is not yet created.

10. Click Create to create the TBSYS database schema.

Page 103: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Installing Topobase Administrator - 101

11. Introduce a password and select tablespaces. Set the Default to USERS (or to your tablespace for user data), and the Temporary to TEMP.

12. The Select Jar File dialog box appears, and asks you to select the jar file that contains the stored Java procedures to be loaded into this schema. The file can be found in the C:\Program Files\Autodesk Topobase Administrator 2010\TBSys folder, which is specified by default. Select the jar file, and then click Open.

13. After you successfully create the TBSYS schema, the information for the Topobase System User appears as shown in below.

14. Click Topobase Main User in the explorer tree.

15. Click Create to create the Topobase Main user with the inserted Password and choose the appropriate tablespaces.

16. After you successfully create the TBMAIN user, its information appears as shown below.

17. Click Close to close the Topobase Server Administrator window.

Page 104: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Oracle Tools - 102

ORACLE TOOLS

This chapter covers some of the tools that can be used to access the Oracle database, execute statements, procedures and functions, and perform administrative tasks in general.

Objectives

After completing this chapter, you will be able to:

Browse the Enterprise Manager

Login to SQL *Plus

Browse the SQL Developer

Browse and use the SQL Sheet

Oracle Enterprise Manager and Database Console

The Oracle Enterprise Manager Database Control is the Oracle tool used to perform several administrative operations for the database.

This tool needs an agent in the server that connects with the database; this is the so called Database Console. This agent is associated to the dbconsole Windows service. Therefore before starting the Enterprise Manager make sure that the dbconsole service is started. You can start, stop or see the status of the dbconsole directly from the command lines by executing the emctl command.

cmd> emctl start dbconsole

cmd> emctl stop dbconsole

cmd> emctl status dbconsole

Login

Login to the Enterprise Manager by accessing the site https://topobase:5500/em/console/logon/logon

Normally, the default port is 1158. If this port is already being used, another port is assigned (like here 5500).

Enter the login credentials:

User Name = sys

Connect as SYSDBA

Page 105: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Oracle Tools - 103

Login Window for the Enterprise Manager

Click Login. The Home page of the Enterprise Manager is displayed.

Home Page

On this page you see the general information of the database such as status, active sessions, space summary, alerts and so on. The page is refreshed every minute as stated in the right upper combo box.

Enterprise Manager Home Page

Page 106: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Oracle Tools - 104

In the General section, you see the Status of the database. You can use the Shutdown button to shutdown the database. You can access the Listener properties through the Listener link.

General Section of the Enterprise Manager Home Page

The Space Summary section shows you any problems with the tablespaces. In the example below there is one critical problem with the USER_DATA tablespace; it has reached a percentage higher than the thresholds defined for the tablespace.

Space Summary of the Enterprise Manager Home Page

Page 107: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Oracle Tools - 105

Related Links

In the related Links section at the bottom of any page, you can access the Advisor Central. See the course Oracle Performance for Topobase for more information.

Related Links Section with Advisor Central Link

Server Page

Server Page

Some of the options that can be accessed by the Server Page are shown below:

Tablepsaces: to create, edit and review tablespaces.

Initialization parameters: through this option you can alter the parameters directly instead of using the ALTER SYSTEM command from SQL *Plus.

Users: each Topobase document represents an Oracle user, in this section you can see the status of the account, assigned tablespaces and other details of the user.

Memory advisor: this advisor recommends memory sizing according to the statistics, this topic is covered in the Oracle Performance for Topobase course.

Automatic Workload Repository (AWR): this topic is covered in the Oracle Performance for Topobase course.

Page 108: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Oracle Tools - 106

Schema Page

In this page you can browse the database objects and programs.

Schema Page

SQL *Plus

SQL *Plus is a command line SQL. It is installed by default with the database in the {ORACLE_HOME}\bin directory. It is used to execute statements and PL/SQL code.

Login

To login into SQL *Plus access the command line and run sqlplus as shown below:

cmd> sqlplus <user_name>/<password>@<service_name>

cmd> sqlplus ttorawa/avs@tbserv

Note that if you do not introduce the password when you execute sqlplus, you are asked afterwards to introduce it.

If you are logged in as sys or system user, it is recommended that you use the /nolog option so the password is not exposed. Note that the sys user has to login always as sysdba or sysoper.

Page 109: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Oracle Tools - 107

SQL Developer

SQL Developer is a graphical tool used to browse the database, run scripts and debug code. It is installed with a default Oracle 11g installation in the {ORACLE_HOME}\sqldeveloper directory. In previous Oracle versions SQL *Plus had a GUI interface, since 11g the SQL *Plus GUI is replaced by the SQL Developer.

Login

To login into the SQL Developer you have to create a new connection:

Creating a New Connection to Log in to the SQL Developer

Enter the properties of the connection and the Net Service Name.

Page 110: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Oracle Tools - 108

Click Connect. You get the list of database objects for the schema.

Browsing a Table

If you expand Tables and select a table, you get the properties of the table: columns, data, indexes, grants, etc.

Page 111: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Oracle Tools - 109

SQL Worksheet

The SQL Worksheet is used to execute PL/SQL scripts and statements.

Select the connection, right-click, and select Open SQL Worksheet from the context menu. The SQL worksheet for the connection is displayed. In the upper part of the window you can introduce the statements or PL/SQL code; after executing it, you see the results in the lower part of the window.

SQL Worksheet

Page 112: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Oracle Tools - 110

SQL Sheet

This is a Topobase tool that can be used to browse the database, execute queries, import/export dumps and other tasks.

Login

You can login to the SQL Sheet from the Topobase Administrator. Select Workspace > Sql Sheet

Login to the SQL Sheet from the Topobase Administrator

In the Login window the first Username defines the user to which you are connected.

Login Window with Username

Page 113: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Oracle Tools - 111

Main Window

The figure below shows the main window of the SQL Sheet.

Main Window the the SQL Sheet

The query window is used to enter the SQL statements and scripts. Press F5 to run a script.

The results window shows the results of the queries executed.

Both windows, query and results, can be cleared by pressing F4.

The combo box in the upper-right can be used to select the type of objects that you want to display, i.e. tables, indexes, views and so on. You can also select to see only Topobase system tables or user tables.

If you are displaying tables or views, their columns are displayed as well.

Page 114: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Oracle Tools - 112

Tables

If you right-click a table you see a list of tasks that can be done with the table.

Right-Click for a List of Table Tasks

Select, this option executes a query SELECT * FROM <table_name> and shows the result in the Results window.

Grid, this option shows the data in a Grid view.

Excel, exports the data to excel.

Export, this option allows you to export the data to Ascii file, SQL or SOL Loader file.

Def, this option shows the table definition statement.

Relation Wizard, to create queries based on relations with the selected table.

Drop table, deletes the table.

Page 115: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Oracle Tools - 113

Users

If you want to connect to a different user, select Users in the combo box, then right-click the user and select Connect.

Connect as a Different User

You could also export a dump file or drop the user using the context menu.

Page 116: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Oracle Tools - 114

Tools

The Tools menu allows you to execute several tasks such as importing and exporting dumps, creating users and others.

Tools Menu

SQL Spy

The SQL Spy is a tool that shows the SQL statements that are being executed. It can be accessed from the Tools menu.

Click Start to begin showing the statements. i.e. In the mean time you could be working with Topobase Admin or Client or any application accessing the database.

SQL Spy Window

The statements are displayed in the Sql Spy main window. Click Stop to end the process.

Page 117: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Oracle Tools - 115

You see the schema and module where the statements are being executed, and the SQL statement. You can save these statements to a file, using the menu File > Save as ...

Scripts

The menu Scripts shows a list of pre-defined scripts. These are stored in the folder C:\Program Files\Autodesk Topobase Administrator 2010\Data\SqlSheet\Scripts.

You can create your own scripts, add them to that directory and they will be listed in the Scripts menu.

Scripts Menu

Page 118: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Troubleshooting - 116

TROUBLESHOOTING

Lesson: TNS: no listener

The Oracle error, ORA-1254 - TNS: no listener, could occur when the listener is not started or the listener was not configured.

In the command line check the status of the listener:

cmd> lsnrctl status

If the listener is not started, use the command line to start it:

cmd> lsnrtcl start

If there is no listener, configure it following the steps described in the Exercise: Configure Listener.

Page 119: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Appendix A - 117

APPENDIX A

Lesson: Installing the Loop Back Adapter

To install a loopback adapter on Windows 2003 or Windows XP:

1. Open the Windows Control Panel.

2. Double-click Add Hardware to start the Add Hardware wizard.

3. In the Welcome window, click Next.

4. In the Is the hardware connected? window, select Yes, I have already connected the hardware, and click Next.

5. In the The following hardware is already installed on your computer window, in the list of installed hardware, select Add a new hardware device, and click Next.

6. In the The wizard can help you install other hardware window, select Install the hardware that I manually select from a list, and click Next.

7. From the list of hardware types, select the type of hardware you are installing window, select Network adapters, and click Next.

8. In the Select Network Adapter window, make the following selections:

Manufacturer: Select Microsoft.

Network Adapter: Select Microsoft Loopback Adapter.

9. Click Next.

10. In the The wizard is ready to install your hardware window, click Next.

11. In the Completing the Add Hardware Wizard window, click Finish.

12. If you are using Windows 2003, restart your computer.

13. Right-click My Network Places on the desktop and choose Properties. This displays the Network Connections Control Panel.

14. Right-click the connection that was just created. This is usually named "Local Area Connection 2". Choose Properties.

15. On the General tab, select Internet Protocol (TCP/IP), and click Properties.

16. In the Properties dialog box, click Use the following IP address and do the following:

Page 120: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Appendix A - 118

a. IP Address: Enter a non-routable IP for the loopback adapter. Oracle recommends the following non-routable addresses:

192.168.x.x (x is any value between 0 and 255)

10.10.10.12

b. Subnet mask: Enter 255.255.255.0.

c. Record the values you entered, which you will need later in this procedure.

d. Leave all other fields empty.

e. Click OK.

17. Click OK.

18. Close Network Connections.

19. Restart the computer.

20. Add a line to the SYSTEM_DRIVE:\WINDOWS\system32\drivers\etc\hosts file with the following

format, after the localhost line:

IP_address hostname.domainname hostname

where:

o IP_address is the non-routable IP address you entered in step 16.

o hostname is the name of the computer.

o domainname is the name of the domain.

For example:

10.10.10.12 mycomputer.autodesk.com mycomputer

Check the network configuration:

a. Open System in the Control Panel, and select the Computer Name tab. In Full computer name, make sure you see the host name and the domain name, for example,

sales.us.mycompany.com.

b. Click Change. In Computer name, you should see the hostname, and in Full computer name, you should see the host name and domain name. Using the previous example, the host

name would be sales and the domain would be us.mycompany.com.

c. Click More. In Primary DNS suffix of this computer, you should see the domain name, for

example, us.mycompany.com.

Page 121: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Appendix A - 119

Lesson: How to Download the Latest Patches in Metalink

In this lesson, you will download the latest patch (11.) for the Oracle Database.

1. Login to your Metalink account

2. Select Patches & Updates. Click Simple Search.

3. In the Simple Search page, click Quick Links.

Page 122: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Appendix A - 120

4. In the Quick Links page, select Oracle Database > Microsoft Windows (32-bit) > 11.1.0.7.0

5. Download and install the patch as explained in the Exercise: Patch Installation.

Page 123: and Configuration for Topobase - Amazon Web Serviceshelp.autodesk.com.s3.amazonaws.com/...Oracle_Install_and_Config.pdf · SQL *Plus ... Scripts ... Topobase is designed to use Oracle

Appendix B - 121

APPENDIX B

Answers to Exercise: Creating a text initialization parameter file:

a. What’s the size of the DB_BLOCK_SIZE parameter?___________8KB_____

b. Which parameter defines the total size of the memory?_MEMORY_TARGET

c. What’s the total size of the memory?_____412MB_________

d. How many control files were defined?_____3________

e. What’s the name of the database?_______TBDB________