2-Collecting Statistical Information - Practice1

2-Collecting Statistical Information - Practice1 -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Collecting Statistical Information Practice 1 The goal of this practice is to familiarize yourself with the different methods of collecting statistical information. 1. Log on as “system/manager as sysdba”. 2. Check that TIME_STATISTICS has been set to true SQL> SHOW PARAMETER timed_statistics If a value of true is returned, continue to step 3 orherwise SQL> ALTER SYSTEM SET timed_statistics = true; 3. Issue a command that will create a trace file for the session SQL> ALTER SESSION SET SQL_TRACE=TRUE; 4. Run a query to count the number of rows in the DBA_TABLES dictionary view. In order to locate your new trace files easily, delete all the trace files in the USER_DUMP_DEST destination before running the trace. SQL> SELECT COUNT(*) FROM DBA_TABLES; 5. Now disable the trace command after running the above query SQL> ALTER SESSION SET SQL_TRACE=FALSE; 6. At the OS level view the resulting trace file located in the directory set by USER_DUMP_DEST. 7. Open two sessions, the first as user scott and second as user sys. From the second session generate user trace file for the first session using the DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION procedure. Get the user ID and serial# from the v$session Session 1 Connect as: scott/tiger Session 2 Connect as: sys/change_on_install as sysdba
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/15/2011 for the course ECON 2023 taught by Professor Johnson during the Summer '11 term at FAU.

Page1 / 5

2-Collecting Statistical Information - Practice1 -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online