| Oracle9i Administrator's Reference Release 2 (9.2.0.2) for hp OpenVMS Alpha Part Number B10506-01 |
|
Ensuring that Oracle9i operates successfully can involve tuning the system or modifying parameters. These tasks require a thorough understanding of HP OpenVMS Alpha system administration as well as the concepts documented in the Oracle9i Database Administrator's Guide.
This chapter contains the following topics:
When you start up SQL*Plus, a bequeath protocol adapter connection will be made if no TNS connect descriptor is supplied. Refer to Chapter 9, "Oracle Net on HP OpenVMS Alpha" for more information about bequeath adapter.
Three control files are created whenever you create a database. by default, the files are named control01.ctl, control02.ctl and control03.ctl. They reside in the directory pointed to by the logical ora_db. However, Oracle Corporation recommends that you back up the control files and create additional copies. When you add more control files, be sure to add the new filenames and locations to the CONTROL_FILES initialization parameter.
Refer to the Oracle9i Database Administrator's Guide for general information. Specific information for HP OpenVMS Alpha can be summarized as follows:
During the ORACLE installation procedure, you create one database file in the directory referenced by the logical name ORA_DB, typically ORA_ROOT:[oradata.<dbname>]system01.dbf.
To add database files to an existing tablespace, use the SQL statement ALTER TABLESPACE. You cannot remove or delete a file; however, you can remove tablespaces other than the SYSTEM tablespace.
There are some commands that are useful in managing database files. The commands mentioned here are documented fully in the Oracle9i Database Administrator's Guide.
In addition to using the ALTER DATABASE command to mount, open, or close a database, to add or drop redo log files, and to archive redo log files, this command can be used to rename and/or move tablespace files and redo log files.
You cannot use the ALTER DATABASE BACKUP CONTROLFILE command to back up control files to tape. To back up control files to tape, back up to disk and then copy to tape.
Before using the DROP TABLESPACE INCLUDING CONTENTS command, take the tablespace offline to ensure that no temporary segments are in use.
When specifying files to be added to the database, logical names are fully translated to either physical device names or system-level concealed logical names (if defined) and then written to the control file.
If the name of the physical device is somehow disassociated with the database file location(s), the RDBMS cannot access these files. Use the ALTER DATABASE command to RENAME the file to its current location. After renaming the files, shut down the database and then back up the control files as in the following example:
SQL> ALTER DATABASE RENAME FILE 2> 'DISK$1:[ORACLE9i.oradata.V9TEST]SYSTEM01.DBF' TO 3> 'MY$DISK:[ORACLE9i.oradata.V9TEST]SYSTEM01.DBF' SQL> EXIT $ BACKUP/LOG/VERIFY/IGNORE=INTERLOCK - DISK$1:[ORACLE9i.oradata.V9TEST]*.CTL - MY$DISK:[ORACLE9i.oradata.V9TEST]*.CTL
To move a tablespace file to a new location perform the following steps:
$ SQLPLUS/NOLOG SQL> CONNECT / AS SYSDBA SQL> SELECT * from V$DBFILE; SQL> SELECT * from V$LOGFILE; SQL> SHUTDOWN SQL> EXIT
$ BACKUP/IGNORE=NOBACK/DELETE/VERIFY - <device>:[<dir>]<filename>.<ext> - <new_device>:[<new_dir>]<new_filename>.<ext>
$ SQLPLUS/NOLOG SQL> CONNECT / AS SYSDBA SQL> STARTUP EXCLUSIVE MOUNT <dbname>
V$dbfile.
SQL> ALTER DATABASE 2> RENAME FILE '<device>:[<dir>]<filename>.<ext>' 3> to '<new_device>:[<new_dir>]<new_filename>.<ext>'; SQL> ALTER DATABASE <dbname> OPEN; SQL> EXIT
Perform the following steps to move a redo log file to a new location:
$ SQLPLUS/NOLOG SQL> CONNECT / AS SYSDBA SQL> SHUTDOWN SQL> EXIT $ BACKUP/IGNORE=NOBACK - <old_device>:[<dir>]<filename>.<ext> - <new_device>:[<new_dir>]<new_filename>.<ext> $ SQLPLUS/NOLOG SQL> CONNECT / AS SYSDBA SQL> STARTUP EXCLUSIVE MOUNT <dbname>
SQL> CONNECT / AS SYSDBA SQL> ALTER DATABASE RENAME FILE 2> '<device>:[<dir>]<old_redofile1>.RDO', 3> '<device>:[<dir>]<old_redofile2>.RDO' to 4> '<device>:[<dir>]<new_redofile1>.RDO', 5> '<device>:[<dir>]<new_redofile2>.RDO';
The filenames specified must be correct and the new files must already exist. If either of these requirements are not met, the statement will fail.
SQL> SHUTDOWN
SQL> CONNECT / AS SYSDBA SQL> STARTUP OPEN <dbname> SQL> EXIT
This section gives information about the following:
The database verification utility (DBV) is the preferred technique for verifying the integrity of your database. Invoke this utility with the DBV symbol on OpenVMS.
To use this utility to verify data in an Oracle9i Release 2 (9.2.0.2) database, point to the 9.2 files from your Oracle9i Release 2 (9.2.0.2) installation.
Sometimes an Oracle server process will seem to be spinning or hung. To provide Oracle with useful information on this process, you may occasionally be asked to generate a trace file containing debugging information.
The command utility ORAMBX is one way to obtain this information. ORAMBX takes the process name, not its PID, as an argument. At the prompt, you feed one command at a time. When you have finished sending commands, exit with control-Z. Then a trace file will exist in ORA_DUMP that contains information that is useful for debugging purposes.
Table 5-1 lists the most common ORAMBX commands and their functions:
The two most useful commands are DUMP and SYSTEM. DUMP shows the process' call stack, which is useful if the process is hanging or spinning. The command DUMP 1 simply generates a printout of the call stack. The command DUMP 10 prints a call stack and information about all cursors, queries, and other Oracle process information available. Likewise, the command SYSTEM 1 produces a small amount of interesting information about an instance, while SYSTEM 10 tells about almost anything happening in the instance, processes, cursors, locks.
|
|
![]() Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|