ITPub博客

首页 > 数据库 > Oracle > sqlt

sqlt

原创 Oracle 作者:哎呀我的天呐 时间:2015-02-09 13:51:44 0 删除 编辑

点击(此处)折叠或打开

  1. [oracle@test install]$ ll sqcrea*
  2. -rw-r--r-- 1 oracle oinstall 4771 Oct 31 02:00 sqcreate.sql
  3. [oracle@test install]$ pwd
  4. /home/oracle/sqlt/install

点击(此处)折叠或打开

  1. [oracle@test install]$ sqlplus / as sysdba

  2. SQL*Plus: Release 10.2.0.4.0 - Production on Thu Feb 5 03:54:30 2015

  3. Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


  4. Connected to:
  5. Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
  6. With the Partitioning, OLAP, Data Mining and Real Application Testing options

  7. 03:54:30 SQL> @sqcreate    

  8. zip error: Nothing to (SQLT_installation_logs_archive.zip)

  9. zip error: Nothing to (SQLT_installation_logs_archive.zip)

  10. PL/SQL procedure successfully completed.

  11. Elapsed: 00:00:00.00

  12. Specify optional Connect Identifier (as per Oracle Net)
  13. Include "@" symbol, ie. @PROD
  14. If not applicable, enter nothing and hit the "Enter" key.
  15. You *MUST* provide a connect identifier when installing
  16. SQLT in a Pluggable Database in 12c
  17. This connect identifier is only used while exporting SQLT
  18. repository everytime you execute one of the main methods.

  19. Optional Connect Identifier (ie: @PROD): @TestDB12


  20. PL/SQL procedure successfully completed.

  21. Elapsed: 00:00:00.00

  22. PL/SQL procedure successfully completed.

  23. Elapsed: 00:00:00.02

  24. Define SQLTXPLAIN password (hidden and case sensitive).



  25. Elapsed: 00:00:00.05

  26. Password for user SQLTXPLAIN:
  27. Re-enter password:


  28. PL/SQL procedure successfully completed.

  29. Elapsed: 00:00:00.01
  30. ... please wait

  31. TABLESPACE         FREE_SPACE_MB
  32. ------------------------------ -------------
  33. TEST                 30125
  34. EXAMPLE              32700
  35. USERS                 32734

  36. Elapsed: 00:00:00.49

  37. Specify PERMANENT tablespace to be used by SQLTXPLAIN.

  38. Tablespace name is case sensitive.

  39. Default tablespace [USERS]:

  40. PL/SQL procedure successfully completed.

  41. Elapsed: 00:00:00.04
  42. ... please wait

  43. TABLESPACE
  44. ------------------------------
  45. TEMP001

  46. Elapsed: 00:00:00.01

  47. Specify TEMPORARY tablespace to be used by SQLTXPLAIN.

  48. Tablespace name is case sensitive.

  49. Temporary tablespace [TEMP001]:

  50. PL/SQL procedure successfully completed.

  51. Elapsed: 00:00:00.01

  52. The main application user of SQLT is the schema
  53. owner that issued the SQL to be analyzed.
  54. For example, on an EBS application you would
  55. enter APPS.
  56. You will not be asked to enter its password.
  57. To add more SQLT users after this installation
  58. is completed simply grant them the SQLT_USER_ROLE
  59. role.

  60. Main application user of SQLT:

  61. PL/SQL procedure successfully completed.

  62. Elapsed: 00:00:00.00

  63. SQLT can make extensive use of licensed features
  64. provided by the Oracle Diagnostic and the Oracle
  65. Tuning Packs, including SQL Tuning Advisor (STA),
  66. SQL Monitoring and Automatic Workload Repository
  67. (AWR).
  68. To enable or disable access to these features
  69. from the SQLT tool enter one of the following
  70. values when asked:

  71. \"T\" if you have license for Diagnostic and Tuning
  72. \"D\" if you have license only for Oracle Diagnostic
  73. \"N\" if you do not have these two licenses

  74. Oracle Pack license [T]:

  75. PL/SQL procedure successfully completed.

  76. Elapsed: 00:00:00.00

  77. PL/SQL procedure successfully completed.

  78. Elapsed: 00:00:00.00

  79. PL/SQL procedure successfully completed.

  80. Elapsed: 00:00:00.00

  81. PL/SQL procedure successfully completed.

  82. Elapsed: 00:00:00.00

  83. PL/SQL procedure successfully completed.

  84. Elapsed: 00:00:00.01

  85. PL/SQL procedure successfully completed.

  86. Elapsed: 00:00:00.00

  87. PL/SQL procedure successfully completed.

  88. Elapsed: 00:00:00.01

  89. PL/SQL procedure successfully completed.
建立好了就能连了

点击(此处)折叠或打开

  1. 04:51:08 SQL> conn SQLTXPLAIN/oracle
  2. Connected.
  3. 04:51:18 SQL> select * from tab;

  4. TNAME             TABTYPE    CLUSTERID
  5. ------------------------------ ------- ----------


点击(此处)折叠或打开

  1. 04:16:24 SQL> select * from table(dbms_xplan.display_cursor(null,null));

  2. PLAN_TABLE_OUTPUT
  3. --------------------------------------------------------------------------------------------------------------------------
  4. SQL_ID    1j2cqw0sxv467, child number 0
  5. -------------------------------------
  6. select a.id , b.ename, b.hiredate from c_lob a , empt b where a.id =
  7. b.empno

  8. Plan hash value: 646364930

  9. ------------------------------------------------------------------------
  10. | Id | Operation       |  Name |  Rows | Bytes | Cost (%CPU)| Time     |
  11. ------------------------------------------------------------------------
  12. | 0 | SELECT STATEMENT |       |       |       | 73747 (100)|          |
  13. |* 1| HASH JOIN        |       |    14 |   476 | 73747 (1)  | 00:14:45 |
  14. | 2 | TABLE ACCESS FULL|  EMPT |    14 |   406 |     3 (0)  | 00:00:01 |
  15. | 3 | TABLE ACCESS FULL| C_LOB |  1008K|  4922K| 73732 (1)  | 00:14:45 |
  16. ------------------------------------------------------------------------

  17. Predicate Information (identified by operation id):
  18. ---------------------------------------------------

  19.    1 - access("A"."ID"="B"."EMPNO")

  20. Note
  21. -----
  22.    - dynamic sampling used for this statement

点击(此处)折叠或打开

  1. oracle@test11g:/home/oracle/sqlt/run> pwd
  2. /home/oracle/sqlt/run

点击(此处)折叠或打开

  1. -rw-r--r-- 1 oracle oinstall 4431 Oct 30 14:00 sqltxtract.sql + sql_id
这个不真正的跑只是将你的执行计划,信息拿出来。


点击(此处)折叠或打开

  1. [oracle@test run]$ sqlplus / as sysdba

  2. SQL*Plus: Release 10.2.0.4.0 - Production on Thu Feb 5 04:27:55 2015

  3. Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


  4. Connected to:
  5. Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
  6. With the Partitioning, OLAP, Data Mining and Real Application Testing options

  7. 04:27:56 SQL> @sqltxtract 1j2cqw0sxv467

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29990276/viewspace-1431181/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: oracle dump 函数
请登录后发表评论 登录
全部评论
https://cloud.tencent.com/developer/inventory/14362

注册时间:2014-10-30

  • 博文量
    403
  • 访问量
    2528743