How does one use ORADEBUG from Server Manager/ SQL*Plus? (for DBA

1 Answer

Answer :

Execute the "ORADEBUG HELP" command from svrmgrl or sqlplus to
obtain a list of valid ORADEBUG commands. Look at these examples:
SQLPLUS> REM Trace SQL statements with bind variables
SQLPLUS> oradebug setospid 10121
Oracle pid: 91, Unix process pid: 10121, image: oracleorcl
SQLPLUS> oradebug EVENT 10046 trace name context forever, level
12
Statement processed.
SQLPLUS> ! vi /app/oracle/admin/orcl/bdump/ora_10121.trc
SQLPLUS> REM Trace Process Statistics
SQLPLUS> oradebug setorapid 2
Unix process pid: 1436, image: ora_pmon_orcl
SQLPLUS> oradebug procstat
Statement processed.
SQLPLUS>> oradebug TRACEFILE_NAME
/app/oracle/admin/orcl/bdump/pmon_1436.trc
SQLPLUS> REM List semaphores and shared memory segments in use
SQLPLUS> oradebug ipc
SQLPLUS> REM Dump Error Stack
SQLPLUS> oradebug setospid <pid>
SQLPLUS> oradebug event immediate trace name errorstack level 3
SQLPLUS> REM Dump Parallel Server DLM locks
SQLPLUS> oradebug lkdebug -a convlock
SQLPLUS> oradebug lkdebug -a convres
SQLPLUS> oradebug lkdebug -r <resource handle> (i.e 0x8066d338
from convres dump)

Related questions

Description : What is OEM (Oracle Enterprise Manager)? (for DBA

Last Answer : OEM is a set of systems management tools provided by Oracle Corporation for managing the Oracle environment. It provides tools to monitor the Oracle environment and automate tasks (both one-time and repetitive in nature) to take database administration a step closer to "Lights Out" management.

Description : Why are OPS$ accounts a security risk in a client/server environment? (for DBA

Last Answer : f you allow people to log in with OPS$ accounts from Windows Workstations, you cannot be sure who they really are. With terminals, you can rely on operating system passwords, with Windows, you ... of whether you have identified your ID with a password or defined it to be IDENTIFIED EXTERNALLY.

Description : Where is a procedure return in an external pl/sql library executed at the client or at the server?

Last Answer : At the client.

Description : What is difference between SQL and SQL*PLUS?

Last Answer : SQL*PLUS is a command line tool where as SQL and PL/SQL language interface and reporting tool. Its a command line tool that allows user to type SQL commands to be executed directly against an Oracle ... SQL*PLUS commands are used to format query result, Set options, Edit SQL commands and PL/SQL.

Description : What package procedure used for invoke sql *plus from sql *forms ?

Last Answer : Host (E.g. Host (sqlplus))

Description : SQL> SELECT * FROM MY_SCHEMA.MY_TABLE; SP2-0678: Column or attribute type cannot be displayed by SQL*Plus Why I’m getting this error?

Last Answer : The table has a BLOB column.

Description : ………….. is a utility to capture a continuous record of server activity and provide auditing capability. A) SQL server Profile B) SQL server service manager C) SQL server setup D) SQL server wizard.

Last Answer : B) SQL server service manager

Description : How does one use the import/export utilities? (for DBA

Last Answer : Look for the "imp" and "exp" executables in your $ORACLE_HOME/bin directory. One can run them interactively, using command line parameters, or using parameter files. Look at the imp/exp parameters ... and export data with the "Schema Manager" GUI that ships with Oracle Enterprise Manager (OEM).

Description : WHY USE RMAN ? (for DBA

Last Answer : No extra costs Its available free ?RMAN introduced in Oracle 8 it has become simpler with newer versions and easier than user managed backups ?Proper security ?You are 100% sure your ... what need to backed up Knows what is required for recovery Knows what backups are redundant

Description : What is STATSPACK and how does one use it? (for DBA

Last Answer : Statspack is a set of performance monitoring and reporting utilities provided by Oracle from Oracle8i and above. Statspack provides improved BSTAT/ESTAT functionality, though the old BSTAT/ESTAT scripts ... values recorded in two snapshots . sptrunc.sql - Truncates all data in Statspack tables

Description : What tuning indicators can one use? (for DBA

Last Answer : The following high-level tuning indicators can be used to establish if a database is performing optimally or not: . Buffer Cache Hit Ratio Formula: Hit Ratio = (Logical Reads - Physical ... increase hit ratio . Library Cache Hit Ratio Action: Increase the SHARED_POOL_SIZE to increase hit ratio

Description : What database block size should I use? (for DBA)

Last Answer : Oracle recommends that your database block size match, or be multiples of your operating system block size. One can use smaller block sizes, but the performance cost is significant. Your choice should ... 8K. This is because volume manager products use 8K blocks (and this is not configurable).

Description : Can one export a subset of a table? (for DBA

Last Answer : From Oracle8i one can use the QUERY= export parameter to selectively unload a subset of the data from a table. Look at this example: exp scott/tiger tables=emp query=\"where deptno=10\"

Description : What is import/export and why does one need it? (for DBA

Last Answer : The Oracle export (EXP) and import (IMP) utilities are used to perform logical database backup and recovery. They are also used to move Oracle data from one machine, database or schema to ... corruption. Ensure that all the data can be read. . Transporting tablespaces between databases . Etc.

Description : Are there any troubleshooting tips for OEM? (for DBA

Last Answer : . Create the OEM repository with a user (which will manage the OEM) and store it in a tablespace that does not share any data with other database users. It is a bad practice to create ... successfully. Check the log to see the results of the execution rather than relying on this status.

Description : Where can one get more information about TCL? (for DBA

Last Answer : One can write custom event checking routines for OEM using the TCL (Tool Command Language) language. Check the following sites for more information about TCL: . The Tcl Developer Xchange - ... the OraTCL package . Tom Poindexter's Tcl Page - Oratcl was originally written by Tom Poindexter

Description : How does one start the Oracle Intelligent Agent? (for DBA

Last Answer : One needs to start an OIA (Oracle Intelligent Agent) process on all machines that will to be managed via OEM. For OEM 9i and above:

Description : What is the Oracle Intelligent Agent? (for DBA

Last Answer : The Oracle Intelligent Agent (OIA) is an autonomous process that needs to run on a remote node in the network to make the node OEM manageable. The Oracle Intelligent Agent is ... events registered in Enterprise Manager; and . Executing tasks associated with jobs submitted to Enterprise Manager.

Description : How does one backout events and jobs during maintenance slots? (for DBA

Last Answer : Managemnet and data collection activity can be suspended by imposing a blackout. Look at these examples: agentctl start blackout # Blackout the entrire agent agentctl stop blackout # Resume normal monitoring ... management agentctl start blackout -s jobs -d 00:20 # Blackout jobs for 20 minutes

Description : What kind of jobs can one schedule with OEM? (for DBA

Last Answer : OEM comes with pre-defined jobs like Export, Import, run OS commands, run sql scripts, SQL*Plus commands etc. It also gives you the flexibility of scheduling custom jobs written with the TCL language.

Description : Should the OEM Console be displayed at all times (when there are scheduled jobs)? (for DBA

Last Answer : When a job is submitted the agent will confirm the status of the job. When the status shows up as scheduled, you can close down the OEM console. The processing of the job is managed by the OIA ... that OEM will not be able to send e-mail and paging notifications when the Console is not started.

Description : WHAT IS RMAN ? (for DBA

Last Answer : Recovery Manager is a tool that: manages the process of creating backups and also manages the process of restoring and recovering from them.

Description : Are there any undocumented commands in Oracle? (for DBA

Last Answer : Sure there are, but it is hard to find them. Look at these examples: From Server Manager (Oracle7.3 and above): ORADEBUG HELP It looks like one can change memory locations with the ORADEBUG POKE ... rdbms/lib/oradbx.o; make -f oracle.mk oradbx) SQL*Plus: ALTER SESSION SET CURRENT_SCHEMA = SYS;

Description : What is the difference between DBFile Sequential and Scattered Reads?(for DBA

Last Answer : Both "db file sequential read" and "db file scattered read" events signify time waited for I/O read requests to complete. Time is reported in 100's of a second for Oracle 8i releases and below, ... v_$system_event b where a.event = 'db file sequential read' and b.event = 'db file scattered read';

Description : How does one tune Oracle Wait events? (for DBA

Last Answer : Some wait events from V$SESSION_WAIT and V$SYSTEM_EVENT views: Event Name: Tuning Recommendation: db file sequential read Tune SQL to do less I/O. Make sure all objects are analyzed. Redistribute ... SYS.V$BH log buffer spaces Increase LOG_BUFFER parameter or move log files to faster disks

Description : How does one manage Oracle database users? (for DBA

Last Answer : Oracle user accounts can be locked, unlocked, forced to choose new passwords, etc. For example, all accounts except SYS and SYSTEM will be locked after creating an Oracle9iDB database using the DB ... locked users account ALTER USER scott PASSWORD EXPIRE; -- Force user to choose a new password

Description : How does one manage Oracle database users? (for DBA

Last Answer : Oracle user accounts can be locked, unlocked, forced to choose new passwords, etc. For example, all accounts except SYS and SYSTEM will be locked after creating an Oracle9iDB database using the ... from SYS.V$BH log buffer spaces Increase LOG_BUFFER parameter or move log files to faster disks

Description : What are the common RMAN errors (with solutions)? (for DBA

Last Answer : Some of the common RMAN errors are: RMAN-20242: Specification does not match any archivelog in the recovery catalog. Add to RMAN script: sql 'alter system archive log current'; RMAN-06089: archived log xyz not found or out of sync with catalog Execute from RMAN: change archivelog all validate;

Description : What tools/utilities does Oracle provide to assist with performance tuning? (for DBA

Last Answer : Oracle provide the following tools/ utilities to assist with performance monitoring and tuning: . TKProf . UTLBSTAT.SQL and UTLESTAT.SQL - Begin and end stats monitoring . Statspack . Oracle Enterprise Manager - Tuning Pack

Description : How does one backup a database using the export utility? (for DBA

Last Answer : Oracle exports are "logical" database backups (not physical) as they extract data and logical definitions from the database into a file. Other backup strategies normally back-up the physical data ... exports include more information about the database in the export file than user level exports.

Description : What is the difference between restoring and recovering? (for DBA

Last Answer : Restoring involves copying backup files from secondary storage (backup media) to disk. This can be done to replace damaged files or to copy/move a database to a new location. Recovery is the process ... as SYSDBA Sql> RECOVER DATABASE UNTIL TIME '2001-03-06:16:00:00' USING BACKUP CONTROLFILE;

Description : What is the difference between online and offline backups? (for DBA

Last Answer : A hot backup is a backup performed while the database is online and available for read/write. Except for Oracle exports, one can only do on- line backups when running in ARCHIVELOG mode. A cold backup is a backup performed while the database is off-line and unavailable to its users.

Description : What strategies are available for backing-up an Oracle database? (for DBA

Last Answer : The following methods are valid for backing-up an Oracle database: Export/Import - Exports are "logical" database backups in that they extract logical definitions and data from the database to a file. ... , etc. If your database is in ARCGIVELOG mode, you also need to backup archived log files.

Description : Why and when should I backup my database? (for DBA

Last Answer : Backup and recovery is one of the most important aspects of a DBAs job. If you lose your company's data, you could very well lose your job. Hardware and software can always be ... things that will get you. Most failed recoveries are a result of organizational errors and miscommunications.

Description : How does one give developers access to trace files (required as input to tkprof)? (for DBA)

Last Answer : The "alter session set sql_trace=true" command generates trace files in USER_DUMP_DEST that can be used by developers as input to tkprof. On Unix the default file mask for these files are "rwx r-- -- ... = true Include this in your INIT.ORA file and bounce your database for it to take effect.

Description : How does one create a standby database? (for DBA)

Last Answer : While your production database is running, take an (image copy) backup and restore it on duplicate hardware. Note that an export will not work!!! On your standby database, issue ... the standby database, stop the recovery process and activate it: ALTER DATABASE ACTIVATE STANDBY DATABASE;

Description : Can one rename a tablespace? (for DBA)

Last Answer : No, this is listed as Enhancement Request 148742. Workaround: Export all of the objects from the tablespace Drop the tablespace including contents Recreate the tablespace Import the objects

Description : Can one resize tablespaces and data files? (for DBA)

Last Answer : One can manually increase or decrease the size of a datafile from Oracle 7.2 using the command. ALTER DATABASE DATAFILE 'filename2' RESIZE 100M; Because you can change the ... UNLIMITED DEFAULT STORAGE (INITIAL 10240 NEXT 10240 MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0) ONLINE PERMANENT;

Description : How does one switch to another user in Oracle? (for DBA

Last Answer : Users normally use the "connect" statement to connect from one database user to another. However, DBAs can switch from one user to another without a password. Of course it is not advisable to ... tiger Connected. Note: Also see the su.sql script in the Useful Scripts and Sample Programs Page.

Description : How does one enforce strict password control? (for DBA

Last Answer : By default Oracle's security is not extremely good. For example, Oracle will allow users to choose single character passwords and passwords that match their names and userids. Also, passwords don ... be used for authentication . PASSWORD_REUSE_TIME - number of days before a password can be reused

Description : Who created all these users in my database?/ Can I drop this user? (for DBA

Last Answer : Oracle creates a number of default database users or schemas when a new database is created. Below are a few of them: SYS/CHANGE_ON_INSTALL or INTERNAL Oracle Data Dictionary/ Catalog Created ... there should be no problem altering these users to use a different default and temporary tablespace.

Description : How does one change an Oracle user's password?(for DBA

Last Answer : Issue the following SQL command: ALTER USER IDENTIFIED BY ; From Oracle8 you can just type "password" from SQL*Plus, or if you need to change another user's password, type "password ... this example: SQL> password Changing password for SCOTT Old password: New password: Retype new password:

Description : What is in all those X$ tables? (for DBA

Last Answer : The following list attempts to describe some x$ tables. The list may not be complete or accurate, but represents an attempt to figure out what information they contain. One should generally not ... Fixed Table. It can predict the potential loss of decreasing the number of database buffers. The

Description : How does one list one's databases in the OEM Console? (for DBA

Last Answer : Follow these steps to discover databases and other services from the OEM Console: 1. Ensure the GLOBAL_DBNAME parameter is set for all databases in your LISTENER.ORA file (optional). ... OEM Discovery Wizard will guide you through the process of discovering your databases and other services.

Description : How does one create a repository? (for DBA

Last Answer : For OEM v2 and above, start the Oracle Enterprise Manager Configuration Assistant (emca on Unix) to create and configure the management server and repository. Remember to setup a backup for the repository database after creating it.

Description : How does one stop and start the OMS? (for DBA

Last Answer : Use the following command sequence to stop and start the OMS (Oracle Management Server): oemctl start oms oemctl status oms sysman/oem_temp oemctl stop oms sysman/oem_temp Windows NT/2000 users can just ... of "oem_temp". NOTE: Use command oemctrl instead of oemctl for Oracle 8i and below.

Description : What are the components of OEM? (for DBA

Last Answer : Oracle Enterprise Manager (OEM) has the following components: . Management Server (OMS): Middle tier server that handles communication with the intelligent agents. The OEM Console connects to the ... database and takes care of the execution of jobs and events scheduled through the Console.

Description : What is Oracle Label Security? (for DBA

Last Answer : Oracle Label Security (formerly called Trusted Oracle MLS RDBMS) uses the VPD (Virtual Private Database) feature of Oracle8i to implement row level security. Access to rows are restricted according ... , controlled and managed from the Policy Manager, an Enterprise Manager-based GUI utility.

Description : What is a Virtual Private Database? (for DBA

Last Answer : Oracle 8i introduced the notion of a Virtual Private Database (VPD). A VPD offers Fine-Grained Access Control (FGAC) for secure separation of data. This ensures that users only have ... the DBMS_RLS (Row Level Security) package. Select from SYS.V$VPD_POLICY to see existing VPD configuration.

Description : What is Fine Grained Access Control? (for DBA

Last Answer : See question "What is a Virtual Private Database".